before starting exploring (4 seconds), and extend the wait period
if new USB buses are attached while waiting.
This works around a problem seen when there is more than one EHCI
controller in the system and you kldload usb.ko after the system
has booted. The problem is that usb.ko contains 3 separate PCI
drivers which get initialised one by one (uhci, ohci, ehci), and
when each driver is initialised, all PCI buses are re-probed after
just the addition of that driver. This means that there can be a
significant delay between the attaching of a companion controller
and the subsequent EHCI attach, so it is possible for the companion
controller's USB 1.x bus to be scanned before the EHCI driver gets
a chance to check if there is really a USB 2.x device connected.
This ensures that we explore EHCI busses before their companion
controllers' busses, so that ports connected to full/low speed
devices will be properly routed to the companion controllers by the
time the OHCI/UHCI exploration occurs.
configure_final(), assert that "cold" is true in usb_cold_explore()
when there are busses to explore. When USB is kldloaded after boot,
usb_cold_explore() will still get invoked but the list of busses
to explore in that case should always be empty.
system have been attached, but no later. This ensures that we do
not explore ohci or uhci busses before the companion echi controller
has been initialised, so it should fix the problem of multi-speed
USB devices getting attached as USB 1 devices first and then
re-attached as USB 2.
Some further changes are needed on architectures that do not currently
allow hooks to be inserted before configure_final() - alpha, ia64,
powerpc and sparc64. On these architectures the exploration will
now be delayed until the usb kthread runs.
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.
Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Free approx 86 major numbers with a mostly automatically generated patch.
A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
thread being waken up. The thread waken up can run at a priority as
high as after tsleep().
- Replace selwakeup()s with selwakeuppri()s and pass appropriate
priorities.
- Add cv_broadcastpri() which raises the priority of the broadcast
threads. Used by selwakeuppri() if collision occurs.
Not objected in: -arch, -current
branches:
Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.
This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.
Approved by: re(scottl)
debugging levels to off by default. Now that debug levels can be
tweaked by sysctl we don't need to go through hoops to get the
different usb parts to produce debug data.
usbdi.h (1.60)
(and local changes compatibility changes to ufm.c and urio.c)
date: 2002/02/11 15:11:49; author: augustss;
Give usbd_do_request_flags() an extra argument for the timeout.
revision 1.58
date: 2001/11/20 23:53:26; author: augustss; state: Exp; lines: +61 -33
Create a special kernel thread to run the usb short lived tasks (instead
of using the device discovery threads).
revision 1.65
date: 2002/01/03 22:20:45; author: augustss; state: Exp; lines: +9 -2
Add a DIAGNOSTIC check. From FreeBSD.
(Just wrap these changes, that we already had, with a #ifdef DIAGNOSTIC).
revision 1.62
date: 2002/01/02 20:55:58; author: augustss; state: Exp; lines: +11 -10
Some more usb_proc_ptr changes.
Also some minor stylistic changes.
revision 1.63
date: 2002/01/02 20:58:12; author: augustss; state: Exp; lines: +4 -4
Fix typo in last commit.
revision 1.64
date: 2002/01/02 22:44:44; author: augustss; state: Exp; lines: +7 -4
Add a comment.
The usb_proc_ptr changes were introduced in 1.62 and backed out in 1.64.
revision 1.61
date: 2001/12/31 15:55:51; author: augustss; state: Exp; lines: +3 -5
Delay bus enumeration a little in case the controller is a companion
controller. This way the main controller can gain ownership of the port
before enumeration starts.
date: 2001/11/20 23:53:26; author: augustss; state: Exp; lines: +61 -33
Create a special kernel thread to run the usb short lived tasks (instead
of using the device discovery threads).
The change to usb_port.h is a little hack whilst I address an issue
with NetBSD.
usbdi.c (1.86), usbdivar.h (1.66)
[Some partial, because most of this was merged in a while ago]
date: 2001/11/20 13:48:03; author: augustss;
Keep track of device speed for USB 2.0.
date: 2001/01/21 19:00:06; author: augustss;
Change the operation of the USB event thread. Before it only
performed USB device discovery, now it can also perform (short)
tasks for device drivers that need a process context, but don't
have one. This is not pretty, but better than using busy-wait
in an interrupt context.
(1.39), usbdi.c (1.79), usbdi.h (1.47), usbdivar.h (1.62)
date: 2001/01/21 02:39:52; author: augustss;
Add code to use soft interrupt to handle USB interrupt processing.
Don't enable the code since it doesn't work with the kludgy Ethernet
drivers.
usb.c 1.40:
revision 1.40
date: 2000/03/14 23:13:12; author: augustss; state: Exp; lines: +4 -1
Make sure the USB event thread discovers all devices first time
it call usb_discover(). It should now be possible to have the
root NFS mounted over a USB Ethernet Adapter.