summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Completely back out 1.37. Something else is going on and John wants tonjl2004-12-011-9/+0
| | | | keep the locking and solve the real problem.
* Remove the last vestiges of the userconfig option. None of this actuallyscottl2004-12-011-1/+1
| | | | did anything, so this commit should be considered a NO-OP.
* Fix "Lock ACPI PCI link not exclusively lockedobrien2004-12-011-0/+12
| | | | | | @sys/dev/acpica/acpi_pci_link.c:153" panic by backing out rev 1.37 in the SMP case. It appears that on a dual-proc machine the assertions in the rev 1.37 commit log hold true.
* Don't bother locking in attach(). At boot time, we're single-threadednjl2004-11-301-4/+1
| | | | | anyway and for some reason, witness seems confused about what's already locked and triggers a false panic.
* Make sure the link array is big enough to hold both _CRS and _PRSnjl2004-11-301-8/+30
| | | | | | | | | | | | resource lists. It used to be sized based only on _CRS, hence _PRS could perform an out-of-bounds access if it was larger (i.e., when there are dependent functions). Add asserts to detect this case. Note, this is only a temporary fix and I believe _PRS and _CRS should have separate arrays. Also, fix a typo where the wrong irq was being check for the APIC case. Submitted by: tegge
* Instead of translating PCI to ACPI power states, just use a CTASSERTnjl2004-11-291-18/+10
| | | | that they are equivalent.
* Attach the device at acpi_sony instead of acpi_snc. Rename someimp2004-11-291-39/+39
| | | | internal variables as well to reflect the change.
* Add support for the TwinMOS Memory Disk IV.iedowse2004-11-282-0/+8
| | | | | | PR: kern/73766 Submitted by: Valentin Nechayev MFC after: 1 week
* Add the device ID for the 3Com 3CRSHEW696 wireless adapter.iedowse2004-11-281-0/+1
| | | | | PR: kern/73286 Submitted by: Daan Vreeken
* Add support for the Trumpion/Comotron C3310 MP3 player.iedowse2004-11-282-0/+8
|
* - Don't blindly use the return value of uart_cpu_channel() to calculatemarius2004-11-281-7/+33
| | | | | | | | | | | | | | | | | | | | the address of a channel on a SCC, it returns 0 on failure. [1] - Hardcode channel 1 for the keyboard on Z8530, the information present in the Open Firmware device tree doesn't allow to determine this via uart_cpu_channel(). This makes the keyboard (if one backs out rev. 1.5 of sys/dev/puc/puc_sbus.c and has both keyboard and mouse plugged in to avoid the hang that revision works around) and consequently syscons(4) on Ultra 2 work. There's a problem with the keyboard LEDs similar to the one on Ultra 60 (LEDs don't get lit under X) though, instead of lighting just a specific single one all get lit and can't be turned off again. [1] - Add comments about what uart_cpu_channel() and uart_cpu_getdev_keyboard() do and their constraints. - Improve the comments about what uart_cpu_getdev_[console,dbgport]() do, they don't return an address (as in bus) but an Open Firmware package handle. Reviewed by: marcel (modulo the comments) [1]
* Temporarily disable programming IRQ links on resume. The new code hangsnjl2004-11-261-0/+2
| | | | several of my systems.
* With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in frombz2004-11-261-2/+2
| | | | | | | | | | | | | | | | | NetBSD got activated. NetBSD has an additional change in their mii.c rev 1.26 which got missed with that merger: : When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well, : not just the media mask. This prevents PHYs/TBIs that only support : Gigabit media from slipping through the cracks. With this GE only ones like from the SK-9844 are detected again. PR: i386/63313, i386/71733, kern/73725 Tested by: matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov> Approved by: rwatson (mentor) Obtained from: NetBSD mii.c rev 1.26 MFC after: 1 week
* Don't use PAGE_SIZE to calculate controller-specific attributes.scottl2004-11-252-2/+3
| | | | | | PR: kern/21220 Submitted by: Dennis Lindroos MFC After: 1 week
* Return ATA register values in the request struct when ATAREQUEST returns.sos2004-11-242-5/+10
|
* - Remove some no longer used constants.jhb2004-11-231-8/+3
| | | | - Sort function prototypes.
* Rework the ACPI PCI link code.jhb2004-11-235-1060/+697
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use a new-bus device driver for the ACPI PCI link devices. The devices are called pci_linkX. The driver includes suspend/resume support so that the ACPI bridge drivers no longer have to poke the links to get them to handle suspend/resume. Also, the code to handle which IRQs a link is routed to and choosing an IRQ when a link is not already routed is all contained in the link driver. The PCI bridge drivers now ask the link driver which IRQ to use once they determine that a _PRT entry does not use a hardwired interrupt number. - The new link driver includes support for multiple IRQ resources per link device as well as preserving any non-IRQ resources when adjusting the IRQ that a link is routed to. - The entire approach to routing when using a link device is now link-centric rather than pci bus/device/pin specific. Thus, when using a tunable to override the default IRQ settings, one now uses a single tunable to route an entire link rather than routing a single device that uses the link (which has great foot-shooting potential if the user tries to route the same link to two different IRQs using two different pci bus/device/pin hints). For example, to adjust the IRQ that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the loader. - As a side effect of having the link driver, unused link devices will now be disabled when they are probed. - The algorithm for choosing an IRQ for a link that doesn't already have an IRQ assigned is now much closer to the one used in $PIR routing. When a link is routed via an ISA IRQ, only known-good IRQs that the BIOS has already used are used for routing instead of using probabilities to guess at which IRQs are probably not used by an ISA device. One change from $PIR is that the SCI is always considered a viable ISA IRQ, so that if the BIOS does not setup any IRQs the kernel will degenerate to routing all interrupts over the SCI. For non ISA IRQs, interrupts are picked from the possible pool using a simplistic weighting algorithm. Tested by: ru, scottl, others on acpi@ Reviewed by: njl
* Make hme(4) mpsafeyongari2004-11-224-29/+123
| | | | | | | | | | | | | - Let hme_start()/hme_init() acquire lock and then call hme_start_locked()/hme_init_locked() respectivly. - Teardown interrupt handler before hme_detach(). - Remove IFF_NEEDSGIANT flag and mark interrupt handler INTR_MPSAFE. - Set callout handler to CALLOUT_MPSAFE. - Add locks in hme MII interface. Reviewed by: jake Tested by: Julian C. Dunn <jdunn at opentrend dot net> MFC after: 2 weeks
* Properly wither the geom container on detach. This will allow one toimp2004-11-211-0/+5
| | | | | | | | then later reload fdc and not have duplicate fd devices in dev. # Maybe this should be moved to a convenience function. Reviewed by: phk
* uart_i8251_ops is gone.nyan2004-11-211-8/+2
|
* Don't force busdma to pre-allocate bounce pages for static allocations.scottl2004-11-211-2/+2
|
* Don't force busdma to pre-allocate bounce pages for the parent tag.scottl2004-11-211-2/+2
|
* Commit ALTQ-patch for ed(4).mlaier2004-11-211-2/+4
| | | | | Requested and tested by: pav MFC after: 1 week
* o Support for the i8251 wasn't there. Remove the files.marcel2004-11-215-1637/+0
| | | | | o Remove the headers with IC register definitions. The headers are now taken from sys/dev/ic
* Include the header with the register definitions from sys/dev/ic. Theymarcel2004-11-212-2/+4
| | | | are shared now.
* This file was repocopied from sys/dev/uart/uart_dev_z8530.h.marcel2004-11-211-3/+3
|
* This file was repocopied from sys/dev/uart/uart_dev_sab82532.h.marcel2004-11-211-0/+5
|
* Include the common <dev/ic/ns16550.h> instead of the privatemarcel2004-11-201-1/+2
| | | | <dev/uart_dev_ns8250.h>. The latter can be removed now.
* o Remove the com_thr, com_rhr, com_isr and com_lctl defines. They aremarcel2004-11-201-28/+59
| | | | | | | | | | | | | | | | | not used and aliases for other defines. o Add REG_DATA as an alias for com_data. Likewise for other register defines. o Add LCR_SBREAK and make CFCR_SBREAK an alias for it. Likewise for the other LCR register bits that are known with the CFCR prefix. o Add MCR_IE and make MCR_IENABLE an alias for it. o Add LSR_TEMT and make LSR_TSRE an alias for it. o Add LSR_THRE and make LSR_TXRDY as alias for it. o Add FCR_ENABLE and make FIFO_ENABLE as alias for it. Likewise for the other FCR register bits that are known with the FIFO prefix. o Add EFR_CTS and make EFR_AUTOCTS an alias for it. o Add EFR_RTS and make EFR_AUTORTS an alias for it. This is a first step in cleaning up the definitions in this file.
* Add some useful target mode diagnostics for incoming commandsgibbs2004-11-181-7/+11
| | | | under the AHC_SHOW_TQIN debug flag.
* Revert to basing all timeout/timer values in ms rather than us. The switchgibbs2004-11-184-16/+26
| | | | | | | | | to us was to help out the Linux port, but really just invited overflow. In fact, the request sense timer was overflowing prior to this change making it much shorter than intended. aic_osm_lib.h: Be more careful about overflow in all timer/timeout primitives.
* Correct URL of the programming manual.brueffer2004-11-171-1/+1
|
* Add missing /* DEVICE_POLLING */brueffer2004-11-171-1/+1
|
* only clear the IFF_OACTIVE flag when we have a chance of being able tojmg2004-11-171-4/+4
| | | | | | | | | queue a packet to the hardware... instead of when the hardware queue is empty.. don't initalize cur_tx now that it doesn't need to be... Pointed out by: bde
* Remove the whole uart_cpu_identify() stuff again. Now that it's no longermarius2004-11-178-39/+0
| | | | | | | used on sparc64 they are only stubs on all architectures and it doesn't look like if we would need it in the near future again. Ok'ed by: marcel
* Add a driver back end for MC146818 and compatible clocks based on themarius2004-11-173-47/+340
| | | | | | | | | | | respective NetBSD driver for use with the genclock interface. It's first use will be on sparc64 but it was also tested on alpha with a preliminary patch to switch alpha to use the genclock code together with this driver instead of the respective code in alpha/alpha/clock.c and the rather MD mcclock(4). Using it on i386 and amd64 won't be that hard but some changes/extensions to improve the genclock code in general should be done first, e.g. add locking and make it easier to access the NVRAM usually coupled with RTCs.
* o sparc64/isa/isa.c:marius2004-11-171-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The claim in the commit log of rev. 1.11 of dev/uart/uart_cpu_sparc64.c etc. that UARTs are the only relevant ISA devices on sparc64 turned out to be false. While there are sparc64 models where UARTs are the only devices on the ISA bus there are in fact also low-cost models where all devices traditionally found on the EBus are hooked up to the ISA bus. There are also models that use a mix between EBus and ISA devices with things like an AT keyboard controller and other rather interesting devices that we might want to support in the futute hook up to the ISA bus. In order to not need to add sparc64 specific device_identify methods to all of the respective ISA drivers and also not add OFW specific code to the common ISA code make the sparc64 ISA bus code fake up PnP devices so most ISA drivers probe their devices without further changes. Unfortunately Sun doesn't adhere to the ISA bindings defined in IEEE 1275-1994 for the properties of most of the ISA devices which would allow to obtain the vendor and logical IDs from their properties. So we we just use a simple table which maps the name properties to PnP IDs. This could be done in a more sophisticated way but I courrently don't see the need for this. [1] - Add the children with fully mapped and specified resources (in the OFW sense) similar to what is done in the EBus code for the IRQ resources of the children as adjusting the resources and the resource list entries respectively in isa_alloc_resource() as done perviously causes trouble with drivers which use rman_get_start(), pass-through or allocate and release resources multiple times, etc. Adjusting the resources might be better off in a bus_activate_resource method but the common ISA code currently doesn't allow for an isa_activate_resource(). [2] With this change: - ppbus(4) and lpt(4) attach and work (modulo ECP mode, which requires real ISADMA code but it currently only consists of stubs on sparc64). - atkbdc(4) and atkbdc(4) attach, no further testing done. - fdc(4) itself attaches but causes a hang while attaching fd0 also when is DMA disabled, further work in fdc(4) is required here as e.g. fd0 uses the address of fd1 on sparc64 (not sure if sparc64 supports more than one floppy drive at all). All of these drivers previously caused panics in the sparc64 ISA code. - Minor changes, e.g. use __FBSDID, remove a dupe word in a comment and declare one global variable which isn't used outside of isa.c static. o dev/uart/uart_cpu_sparc64.c and modules/uart/Makefile: - Remove the code for registering the UARTs on the ISA bus from the sparc64 uart_cpu_identify() again and rely on probing them via PnP. Original idea by: tmm [1] No objections by: tmm [1], [2]
* o Sync with the NetBSD mk48txx driver (the result simplyfies some changesmarius2004-11-173-74/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | I have in mind for the genclock interface): - Recognize the MK48T18 as well (differs from the MK48T08 only in packaging options and voltages). - Allow MD code to provide functions for reading/writing NVRAM/RTC locations. If passed NULL, the old behaviour using bus_space_{read,write}_1() is used. Otherwise, all access to the chip goes via the MD functions. This is necessary for mvmeppc boards where the mk48txx NVRAM/RTC is not directly addressable. - Cleanup MI mk48txx(4) todclock driver: - Prepare mk48txxvar.h and leave only register definitions in mk48txxreg.h. - Define struct mk48txx_softc as usual devices and allocate necessary members in it. - Change mk48txx_attach() to only take a device_t. o While converting the sparc64 eeprom driver to the above changes: - Remove some dead code and stale comments. - Use the NVRAM size provided by the mk48txx driver instead of hardcoding it as suggested by a comment. - Add a comment about why it doesn't make much sense to read the hostid directly from the NVRAM except for displaying it when attaching. - Don't print the hostid if it reads all zero because it's stored elsewhere.
* Don't set the BUS_DMA_ALLOCNOW flag for the parent tag or the tags that arescottl2004-11-171-3/+3
| | | | | | used for static memory allocations. Discussed with: sos
* Make interrupt coalescing work on big endian systems.yongari2004-11-171-2/+4
| | | | | | | Also change struct ucode.length to be in number of elements (u_int32_t) to help endian handling. MFC after: 2 weeks
* Enable throttling/C3 quirks for PIIX4 parts. Defer checking quirks untilnjl2004-11-161-9/+21
| | | | | | | | | after boot so that PCI is initialized and we can probe for the problem chipsets. Note that while probed but unusable states are disabled, they aren't freed yet. In the future, it may make sense to detach them. Tested by: Adam K Kirchoff <adamk at voicenet com> MFC after: 2 days
* Add virtual AT keyboard driver vkbd(4).emax2004-11-162-0/+1372
| | | | Not yet connected to the build.
* Fix just the worst of the timeout race conditions that the previousiedowse2004-11-163-3/+13
| | | | | | backed out commits were trying to address: when cancelling the timeout callout, also cancel the abort_task event, since it is possible that the timeout has already fired and set up an abort_task.
* move the lock after the NULL check so we don't have a hard(er) to diagnosejmg2004-11-151-2/+2
| | | | | | panic... Pointed out by: Bjoern A. Zeeb
* Remove more debuggingimp2004-11-151-1/+1
|
* fix the missing lock in sk_jfree (verified w/ an assert)jmg2004-11-152-10/+23
| | | | | | | | also fix up handling and proding of the tx, _OACTIVE is now handled better... Submitted by: Peter Edwards (sk_jfree) Obtained from: OpenBSD and/or NetBSD (tx prod)
* After discussions with Nate, repo copy the acpi assist drivers fromimp2004-11-151-168/+0
| | | | | | | | | | i386 to dev/acpi_support. In theory, these devices could be found other than in i386 machines only as amd64 becomes more popular. These drivers don't appear to do anything i386 specific, so move them to dev/acpi_support. Move config lines to files so that those architectures that don't support kernel modules can build them into the kernel. At the same time, rename acpi_snc to acpi_sony to follow the lead of all the other specialty devices.
* Merge 1.3 from acpi_snc.c: don't use return_VALUE() macroimp2004-11-151-24/+22
| | | | Improve style(9) compliance.
* Apply a bandaid to avoid hangs on Ultra 2 machines. The second Z8530marcel2004-11-151-1/+1
| | | | | | connects to the keyboard and mouse and needs some special treatment. Until this is fully understood, implemented and tested, simply avoid probing the second Z8530. This is also what the zs(4) driver does.
* Be slightly more paranoid about using the divisor in a division andmarcel2004-11-151-2/+6
| | | | the calculated baudrate. Neither should be 0.
OpenPOWER on IntegriCloud