Commit Graph

48 Commits

Author SHA1 Message Date
drochner d8e1a7b61a Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
2012-01-30 19:41:18 +00:00
dyoung 2e65254f9b Deregister PMF handlers during detachment. Complete the host controller
shutdown.
2011-04-04 22:48:15 +00:00
pgoyette 2d953f414b Revert earlier changes to callers of pci_find{vendor,product} since
the original routine entrypoint name has been restored.

Requested by dyoung@ and mrg@
2010-05-25 08:37:10 +00:00
pgoyette b18bc9eab4 Update all callers of the pci_find{vendor,product} routines to now call
these routines through their global pointers.
2010-05-24 20:29:49 +00:00
mrg ebc9e23316 various aprint_* fixes. 2010-03-11 03:54:56 +00:00
cegger 1ab9e723df detach ohci on shutdown 2009-04-26 08:54:13 +00:00
cegger c398d65d42 Fix error handling. 2009-04-26 08:46:10 +00:00
dyoung a3a7e82760 Use device_t instead of 'struct device *' or device_ptr_t. Use cfdata_t
instead of 'struct cfdata *'. Delete some gratuitous parentheses.
2009-04-17 19:44:13 +00:00
dyoung 40bf52a73b Disable interrupts on the h/w before disestablishing the PCI interrupt
handler.
2009-04-17 17:31:01 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nakayama 136678d875 Fix ohci brokenness in previous commit. 2008-03-29 02:20:41 +00:00
drochner fd0ded75ed split device/softc for USB host controllers and the usb (control)
device,
this is hairy stuff, and I've only tested with uhci/ehci at pci,
please test the rest and report problems
2008-03-28 17:14:45 +00:00
dyoung 347c1a2644 Use device_t and accessors.
In ohci_{pci,cardbus}_attach, do not get the device_t by casting
the softc to void *, but use `self' instead.
2008-03-07 21:48:46 +00:00
dyoung 2e3b67d337 Register the shutdown hook using pmf_device_register1(). 2008-03-07 21:36:51 +00:00
dyoung 1fa24f5705 Add method to detach children.
Temporary: use PMF_FN_PROTO, PMF_FN_ARGS.
2008-02-22 22:22:27 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej d36c43c511 Use ANSI function decls and static. 2005-06-28 00:28:41 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
mycroft 31a80e2d68 For the PCIVERBOSE case, separate vendors and products into separate tables.
Eliminating redundant pointers in the tables saves nearly 20K (20% of the table
size).  In the process, add a pci_findproduct() and make that and
pci_findvendor() return a "const char *".
2004-08-02 18:43:38 +00:00
itojun 6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
lukem 9048aaae21 add RCSID 2001-11-13 07:48:40 +00:00
augustss 7ae1e6394f Add some data structures to keep enable finding companion controllers
for EHCI.
2001-11-06 03:17:36 +00:00
sommerfeld 851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
augustss 130aad8a7d ANSIfy. 2000-09-06 00:17:23 +00:00
augustss 30c20f930f Change my email address. 2000-04-27 15:26:44 +00:00
augustss 74beeca710 Move the size of the mapped bus_space region into the bus independent softc. 2000-04-25 09:20:54 +00:00
augustss b14b78dfc9 Deallocate resources (bus space and interrupts) when detaching from
the bus.
1999-10-12 11:21:24 +00:00
augustss 7049e8eb1b Add preliminary (untested) code for detaching the USB host controller
(needed for CardBus based controllers).
1999-09-15 10:25:30 +00:00
augustss 10d4a4d5fe And commit two files I forgot in the rearrangement for testing for
interrupt context.
1999-09-14 01:07:13 +00:00
augustss e1766aacfa Make sure not to use the io handle before it's been initialized. 1999-09-04 22:00:32 +00:00
augustss 5d8adfb5a2 Disable interrupts early. 1999-08-21 21:35:36 +00:00
augustss 4655ae1230 Keep track of vendor id and make sure the vendor string is NUL terminated. 1999-05-20 09:52:35 +00:00
thorpej 0d0cc4aa14 Rework the way ukbd attaches itself as the console (again). We now allow
the code to pick the first USB keyboard instance as the console, ignoring
which USB controller it's on.  Should eventually allow detaching of the
console keyboard.

From Jason Thorpe <thorpej@nas.nasa.gov>
1999-05-13 23:34:38 +00:00
thorpej 375d7c32f2 Add a way for machine-dependent code to tell a USB controller that it
has the console input device.  The USB keyboard driver uses this to
attach the first USB keyboard instance as the console keyboard.

Unfortunately, this must still be deferred to autoconfiguration time,
but there's not much we can do about that right now.
1999-05-06 19:12:22 +00:00
augustss da39a16267 Fold lines to 80 chars. 1998-12-27 13:03:58 +00:00
augustss ca707fcdf2 Make the copyright header conform to the NetBSD template. 1998-11-25 22:32:04 +00:00
augustss 72de215752 Use PCI class/subclass/interface to match USB host controllers instead
of vendor/product id.  This makes the probe find more controllers
without recompilation.
1998-07-25 23:23:01 +00:00
augustss 8bafec3cec I forgot to commit these when usb_mem was added. 1998-07-25 15:15:39 +00:00
augustss f190634e3d Add an Acer labs USB controller. 1998-07-22 10:43:37 +00:00
augustss deb00272b9 Add USB support. Supported so far:
* UHCI and OHCI host controllers on PCI
* Hubs
* HID devices withe special drivers for mouse and keyboard
* Printers
1998-07-12 19:51:55 +00:00