aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Back out TX/RX descriptor/buffer management changes from earier commit.Prafulla Deuskar2002-08-262-208/+304
| | | | | | | | | We are having panics with the driver under stress with jumbo frames. Unfortunately we didnot catch it during our regular test cycle. I am going to MFC the backout immediately. Notes: svn path=/head/; revision=102452
* Overhaul the ACPI PCI bridge driver a bit:John Baldwin2002-08-265-589/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add an ACPI PCI-PCI bridge driver (the previous driver just handled Host-PCI bridges) that is a PCI driver that is a subclass of the generic PCI-PCI bridge driver. It overrides probe, attach, read_ivar, and pci_route_interrupt. - The probe routine only succeeds if our parent is an ACPI PCI bus which we test for by seeing if we can read our ACPI_HANDLE as an ivar. - The attach routine saves a copy of our handle and calls the new acpi_pcib_attach_common() function described below. - The read_ivar routine handles normal PCI-PCI bridge ivars and adds an ivar to return the ACPI_HANDLE of the bus this bridge represents. - The route_interrupt routine fetches the _PRT (PCI Interrupt Routing Table) from the bridge device's softc and passes it off to acpi_pcib_route_interrupt() to route the interrupt. - Split the old ACPI Host-PCI bridge driver into two pieces. Part of the attach routine and most of the route_interrupt routine remain in acpi_pcib.c and are shared by both ACPI PCI bridge drivers. - The attach routine verifies the PCI bridge is present, reads in the _PRT for the bridge, and attaches the child PCI bus. - The route_interrupt routine uses the passed in _PRT to route a PCI interrupt. The rest of the driver is the ACPI Host-PCI bridge specific bits that live in acpi_pcib_acpi.c. - We no longer duplicate pcib_maxslots but use it directly. - The driver now uses the pcib devclass instead of its own devclass. This means that PCI busses are now only children of pcib devices. - Allow the ACPI_HANDLE for the child PCI bus to be read as an ivar of the child bus. - Fetch the _PRT for routing PCI interrupts directly from our softc instead of walking the devclass to find ourself and then fetch our own softc. With this change and the new ACPI PCI bus driver, ACPI can now properly route interrupts for devices behind PCI-PCI bridges. That is, the Itanium2 with like 10 PCI busses can now boot ok and route all the PCI interrupts. Hopefully this will also fix problems people are having with CardBus bridges behind PCI-PCI bridges not properly routing interrupts when ACPI is used. Tested on: i386, ia64 Notes: svn path=/head/; revision=102447
* Add an ACPI PCI bus driver that is a subclass of the generic PCI busJohn Baldwin2002-08-261-0/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver. This driver overrides the probe, attach, and read_ivar methods. If the parent bridge is an ACPI PCI bridge, then the probe routine will match, otherwise it will fail. It tests this by seeing if it can get the ACPI_HANDLE ivar from the bridge device. In the attach routine, it uses pci_add_children() to add all the child devices (but with a slightly larger ivar so it can store ACPI_HANDLE's for child devices) and then walks through the ACPI namespace below the bus device to cache ACPI_HANDLE's for all child devices present in the namespace. It does this by comparing the pci slot and function to the address encoded in _ADR of the devices in the ACPI namespace. The read_ivar routine passes most requests off to pci_read_ivar() and adds a new request so that the ACPI_HANDLE for a child device can be read. To add proper power support the power methods can be overridden as well, but that is not currently implemented. Also, there are cases where a device may show in the ACPI namespace as a PCI device that the PCI probe does not find. Currently such devices are ignored. Tested on: i386, ia64 Notes: svn path=/head/; revision=102445
* Export a few symbols as globals to allow subclassing of this driver. InJohn Baldwin2002-08-262-37/+91
| | | | | | | | | | | | | | | | OOP speak, you would mark these as 'protected' members. Specifically: - Make the pcib_softc struct public so it can be used by subclasses. - Make pcib_{read,write}_ivar(), pcib_alloc_resource(), pcib_maxslots(), and pcib_{read,write}_config() globals that can be used by subclasses. - Make the pcib devclass a global variable. - Move most of the pcib_attach() function into a global pcib_attach_common() function that can be called by the attach routines of subclasses. Tested on: i386, alpha, sparc64, ia64 Notes: svn path=/head/; revision=102441
* Various changes to make it easier to subclass the PCI bus device.John Baldwin2002-08-262-30/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the pci devclass a global variable. - Add child devices in pci_attach() instead of pci_probe(). Change pci_probe() to just check for a valid bus number from the associated bridge and return -1000 if successful. This allows subclasses of the PCI bus driver to override the generic driver. - Move the code to load the vendor data into its own public function. Really though, doing this at attach is just plain wrong. This should really be done in the module load routine instead. As a side effect, the 'busno' variable in pci_attach() is now no longer static (minor bug that was harmless so far.) - Change pci_add_children() to take an extra argument that is the size of the device info structure passed to pci_read_device() and make it public so subclasses of the PCI bus can call it in their attach routines. - Move the bits to attach a probed PCI child to a PCI bus into a global pci_add_child() function. This will allow subclasses that can detect a PCI device not found in the normal PCI probe to add those devices in their own attach routine. (I have seen this in the ACPI tree on my laptop for example.) As a side effect, change the static function pci_add_resources() to get the busno, slot, and func from the passed in dinfo structure instead of requiring them as function arguments. Tested on: i386, alpha, ia64, sparc64 Notes: svn path=/head/; revision=102440
* In acpi_pcib_route_interrupt(), the code claims to check to see if a PCIJohn Baldwin2002-08-262-4/+4
| | | | | | | | | | LNK device (interrupt source provider sort of) is present before using it, but the code actually tested the status (_STA) of the PCI bridge device doing the routing, not the actual LNK device. Fix it to check the status of the LNK device. Notes: svn path=/head/; revision=102439
* Replace various spelling with FALLTHROUGH which is lint()ablePhilippe Charnier2002-08-2510-22/+22
| | | | Notes: svn path=/head/; revision=102412
* Add new sysctl MIB (hw.acpi.sleep_delay) to specify the delay (inMitsuru IWASAKI2002-08-252-0/+9
| | | | | | | | seconds) before ACPI sleep. Some machines might need this to sleep by Hot-key. Notes: svn path=/head/; revision=102402
* Add suspend and resume support.Orion Hodson2002-08-251-8/+45
| | | | | | | | Contributed by: Takanori Watanabe <takawata@FreeBSD.org> PR: kern/41809 Notes: svn path=/head/; revision=102390
* Fixed editing errors in rev.1.4 which manifested as printf format errorsBruce Evans2002-08-251-2/+2
| | | | | | | at compile time and probably as panics at runtime. Notes: svn path=/head/; revision=102386
* o Retire vm_page_zero_fill() and vm_page_zero_fill_area(). Ever sinceAlan Cox2002-08-252-2/+2
| | | | | | | | | pmap_zero_page() and pmap_zero_page_area() were modified to accept a struct vm_page * instead of a physical address, vm_page_zero_fill() and vm_page_zero_fill_area() have served no purpose. Notes: svn path=/head/; revision=102382
* Be sure to unregister from sndstat on unregister. Gets rid of phantomNick Sayer2002-08-241-0/+1
| | | | | | | sndstat output after removing uaudio. Notes: svn path=/head/; revision=102374
* Fix typos: s/O2Mirco/O2Micro/Marc Fonvieille2002-08-241-6/+6
| | | | | | | Approved by: imp Notes: svn path=/head/; revision=102354
* style: put return types on a line by themselves.Alfred Perlstein2002-08-242-71/+142
| | | | Notes: svn path=/head/; revision=102336
* style:Alfred Perlstein2002-08-233-137/+271
| | | | | | | | put return values on a line by themselves. fix some paste issues where whitespace was used instead of tabs. Notes: svn path=/head/; revision=102335
* Make sure channel buffer start is associated with channel, otherwiseOrion Hodson2002-08-231-3/+3
| | | | | | | | getptr is broken. Noise reported by Thomas Draney <tmdraney@yahoo.com> who also tested the patch. Notes: svn path=/head/; revision=102328
* Do some minor cleanups found during backport to RELENG_4.Matt Jacob2002-08-233-25/+24
| | | | Notes: svn path=/head/; revision=102304
* Pick a cleaner method (and put in a separate function) for findingMatt Jacob2002-08-231-21/+43
| | | | | | | the peer device on a dual board. Notes: svn path=/head/; revision=102303
* s/AC97_MIX_PHONES/AC97_MIX_AUXOUT/ to match ac97r2.{2,3}.Orion Hodson2002-08-233-6/+39
| | | | | | | | | | | | | | | Attempt to determine what function of AUX_OUT is: "True line level out", "Headphone out", or "4-Channel out" and frig OSS mixer label accordingly. Addresses problem raised by Randy Bush on -multimedia of not being able to hear audio on ich2 m/b which was eventually found to be because the mixer monitor value was 0. On this h/w the label "monitor" should now be presented as the marginally more intuitive "ogain". Notes: svn path=/head/; revision=102302
* Replace (ab)uses of "NULL" where "0" is really meant.Archie Cobbs2002-08-2211-15/+15
| | | | Notes: svn path=/head/; revision=102291
* Use machine/limits.h rather than userland limits.h (which may come fromPeter Wemm2002-08-221-1/+1
| | | | | | | the userland source tree, or even worse: /usr/include) Notes: svn path=/head/; revision=102290
* Define ISP_DMA_ADDR_T to be a bus_addr_t, not a u_int32_t.Matt Jacob2002-08-221-0/+3
| | | | | | | This is in preparation to completing A64 PCI support. Notes: svn path=/head/; revision=102272
* unused variable removal (pointed out by bde)Matt Jacob2002-08-221-1/+0
| | | | Notes: svn path=/head/; revision=102271
* Add an entry for Avlab's low profile 4 serial port card.John Hay2002-08-221-0/+12
| | | | | | | | | PR: 41146 Submitted by: Shinsuke Matsui <smatsui@internet-inc.co.jp> Obtained from: NetBSD Notes: svn path=/head/; revision=102261
* Add an entry for VScom PCI-200L 2 port serial card.John Hay2002-08-221-0/+10
| | | | | | | | | PR: 41142 Submitted by: Shinsuke Matsui <smatsui@internet-inc.co.jp> Obtained from: OpenBSD Notes: svn path=/head/; revision=102259
* TX/RX descriptor/buffer management changes.Prafulla Deuskar2002-08-212-304/+208
| | | | | | | | | | Use array based scheme instead of queueing macros. Submitted by: Luigi Rizzo (rizzo@icir.org) MFC after: 3 days Notes: svn path=/head/; revision=102242
* Don't use "NULL" when "0" is really meant.Archie Cobbs2002-08-214-7/+7
| | | | Notes: svn path=/head/; revision=102241
* Use the _STA method of a battery control method to see if a battery isJohn Baldwin2002-08-211-10/+16
| | | | | | | | | present or not. My laptop now properly notices when a battery is removed. Reviewed by: iwasaki Notes: svn path=/head/; revision=102222
* When setting the WI_RID_ENCRYPTION mode, we have to conditionallyWarner Losh2002-08-211-11/+20
| | | | | | | | | | set EXCLUDE_UNENCRYPTED if we're not in OPEN mode (or if we are a symbol card). Obtained from: OpenBSD (looks like a millert@ special) Notes: svn path=/head/; revision=102208
* comment about the magic number -149Warner Losh2002-08-211-0/+6
| | | | Notes: svn path=/head/; revision=102206
* Treat IBSS the same as ADHOC in wi_get_cur_ssid. This makes ifconfigWarner Losh2002-08-211-0/+1
| | | | | | | | work better, but might not make ibss actually work on the prism2 cards that I have (this is the first time I've tried ibss in a long time). Notes: svn path=/head/; revision=102204
* A chunk of cleanup, both stylistic and substantive.Matt Jacob2002-08-206-322/+1013
| | | | | | | | | | | We now also read configuration information for the SCSI cards- this allows us to try and say what the speed settings now are. Start, but not yet complete, the process of reorgs && #defines so that we can backport to RELENG_4 pretty soon. Notes: svn path=/head/; revision=102199
* - Use the __BUS_ACCESSOR macro for EISA_ACCESSOR insteadMaxime Henrion2002-08-201-14/+4
| | | | | | | | | | of reimplementing it. - #undef EISA_ACCESSOR after use like we do for other accessors. Reviewed by: tmm Notes: svn path=/head/; revision=102177
* Back out last commit. Needs slightly more subtle handling.Orion Hodson2002-08-201-33/+35
| | | | Notes: svn path=/head/; revision=102172
* de-count atkbdc. I have more extensive patches to make properly dynamic,Peter Wemm2002-08-192-4/+2
| | | | | | | | | but since pc hardware only allows one AT-style keyboard controller, this doesn't seem particularly urgent. (I do not know what the old sunriver remote keyboard/mouse/vga cards do, that might be an exception). Notes: svn path=/head/; revision=102149
* de-count schistory.c. The handling of NSC was rather bogus here and wasPeter Wemm2002-08-191-4/+13
| | | | | | | | | | | little more than a place holder, because nothing actually counted the number of 'sc' units to compare it against NSC. A bit more work here is needed so that the scaling of SC_MAX_HISTORY_SIZE and extra_history_size goes up when more sc units are added. But, it does not appear that we can have more than one console yet, so it does not seem particularly urgent. Notes: svn path=/head/; revision=102148
* style(9) nit.Maxime Henrion2002-08-191-1/+1
| | | | Notes: svn path=/head/; revision=102145
* Use the __BUS_ACCESSOR macro for PCIB_ACCESSOR instead ofMaxime Henrion2002-08-191-14/+2
| | | | | | | | | reimplementing it. Reviewed by: tmm Notes: svn path=/head/; revision=102144
* Stop trying to align malloc()ed memory. Rely on malloc() instead, just likeSemen Ustimenko2002-08-192-24/+17
| | | | | | | others. Notes: svn path=/head/; revision=102138
* Do not reset card in epic_freebsd_attach() as reset is done inSemen Ustimenko2002-08-191-7/+0
| | | | | | | epic_common_attach(). Notes: svn path=/head/; revision=102135
* Fix buffer length.Søren Schmidt2002-08-191-1/+1
| | | | | | | PR: 41063 Notes: svn path=/head/; revision=102126
* Fix typo.Søren Schmidt2002-08-191-1/+1
| | | | Notes: svn path=/head/; revision=102125
* 1. Allow information about current history size be retrieved using ioctl(2);Maxim Sobolev2002-08-191-5/+44
| | | | | | | | 2. modify screen dumpung routine, so that in addition to visible area, it allows to grab any portion of history buffer as well. Notes: svn path=/head/; revision=102108
* Cater for ich4 quirks.Orion Hodson2002-08-192-9/+29
| | | | | | | | Reported by: Jacob Rhoden Tested by: Jacob Rhoden, mp Notes: svn path=/head/; revision=102106
* Apply reference counting patch. Fixes problem of two applicationsOrion Hodson2002-08-181-35/+33
| | | | | | | | | | | | | opening the device, eg one read only and one write only, and the reference count being non-zero when both exit rendering device permanently busy. PR: kern/35004 Submitted by: Bill Wells MFC after: 3 days Notes: svn path=/head/; revision=102064
* Fix args for contigmalloc, cosmetics.Søren Schmidt2002-08-183-83/+86
| | | | Notes: svn path=/head/; revision=102058
* Use uhci_pci_match to return the device description and rework theJosef Karthauser2002-08-181-28/+22
| | | | | | | vendor description code. Notes: svn path=/head/; revision=102056
* Add a comment to remind that uhci_pci_match will never return NULL.Josef Karthauser2002-08-181-6/+11
| | | | | | | | Don't display the "New UHCI DeviceId" message unless booting verbosely. Use a switch statement for the vendor match code. Notes: svn path=/head/; revision=102055
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidMaxim Sobolev2002-08-183-6/+6
| | | | | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net Notes: svn path=/head/; revision=102052
* Fix VRA configuration.Orion Hodson2002-08-181-3/+6
| | | | | | | Reported and fixed by: Grzybowski Rafal <grzybek@inferno.mikrus.pw.edu.pl> Notes: svn path=/head/; revision=102039