summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb.c
Commit message (Collapse)AuthorAgeFilesLines
* Prepare to commit SL811 based Host controller driver.Takanori Watanabe2005-07-141-0/+1
| | | | Notes: svn path=/head/; revision=147987
* Don't defer the boot-time exploration of high-speed USB busses.Ian Dowse2005-03-271-3/+9
| | | | | | | | | | 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. Notes: svn path=/head/; revision=144181
* Now that all architectures allow hooks to be inserted beforeIan Dowse2005-03-191-6/+2
| | | | | | | | | | 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. Notes: svn path=/head/; revision=143850
* Defer boot-time exploration of USB busses until all devices in theIan Dowse2005-03-171-1/+30
| | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=143762
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Include fcntl.hPoul-Henning Kamp2004-12-221-2/+2
| | | | | | | | check O_NONBLOCK instead of IO_NDELAY Don't include vnode.h. Notes: svn path=/head/; revision=139203
* Add sys/uio.h explicitly, and move sys/vnode.h include to be moreWarner Losh2004-12-131-1/+2
| | | | | | | | | | alphabetical. # vnode.h should not be included here, but it is required for proper decoding # of the flags args. This may change in the future... Notes: svn path=/head/; revision=138785
* Make the USB subsystem unloadable and detachable, though currentlyIan Dowse2004-08-021-22/+49
| | | | | | | | a significant amount of memory may be leaked each time a host controller is detached. Notes: svn path=/head/; revision=133018
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-5/+5
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* MFNetBSD 1.80; author: wizLukas Ertl2004-05-231-2/+3
| | | | | | | | | URL updates, from Jared Yanovich and jmc@openbsd, forwarded by the latter. Obtained from: NetBSD Notes: svn path=/head/; revision=129610
* Device megapatch 4/6:Poul-Henning Kamp2004-02-211-0/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=126080
* Device megapatch 1/6:Poul-Henning Kamp2004-02-211-1/+0
| | | | | | | | | | 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. Notes: svn path=/head/; revision=126076
* MFNetBSD:Josef Karthauser2003-11-091-0/+1
| | | | | | | | | - 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() Notes: svn path=/head/; revision=122376
* - Implement selwakeuppri() which allows raising the priority of aSeigo Tanimura2003-11-091-1/+1
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=122352
* Correct a typo on line 552 of revision 1.92 which was breaking GENERIC:-Bruce M Simpson2003-10-051-1/+1
| | | | | | | _FreeBSD_version should be __FreeBSD_version. Notes: svn path=/head/; revision=120782
* Make it easier to run this code on RELENG_4.Josef Karthauser2003-10-041-2/+8
| | | | | | | Submitted by: luoqi Notes: svn path=/head/; revision=120768
* Fix the cdevsw compatibility for -stable.Josef Karthauser2003-08-251-1/+1
| | | | Notes: svn path=/head/; revision=119478
* Use __FBSDID().David E. O'Brien2003-08-241-1/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Make a note of some patches from NetBSD that we already have.Josef Karthauser2003-07-141-1/+2
| | | | Notes: svn path=/head/; revision=117588
* MFNetBSD:Josef Karthauser2003-07-141-1/+4
| | | | | | | | | date: 2002/09/23 05:51:20; author: simonb; Remove breaks after returns, unreachable returns and returns after returns(!). Notes: svn path=/head/; revision=117569
* add EHCI (USB 2.0) controller support.Bernd Walter2003-04-141-0/+1
| | | | | | | | | Approved by: joe gallatin (mentor) Obtained from: NetBSD Notes: svn path=/head/; revision=113473
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+7
| | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=111815
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-2/+2
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-2/+2
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Deprecate the USB_SETDEBUG IOCTL as debug levels can now be setJosef Karthauser2002-09-151-13/+0
| | | | | | | using sysctl. Notes: svn path=/head/; revision=103366
* Use the hw.usb sysctl tree instead of debug.usb.Josef Karthauser2002-08-081-2/+2
| | | | | | | Requested by: imp Notes: svn path=/head/; revision=101521
* Replace the FOO_DEBUG definitions with USB_DEBUG, and switch theJosef Karthauser2002-07-311-6/+2
| | | | | | | | | 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. Notes: svn path=/head/; revision=101060
* Get bored with hard coded debug level variables and introduce a debug.usbJosef Karthauser2002-07-311-0/+8
| | | | | | | | | sysctl tree for tweaking them real-time. Reviewed by: iedowse Notes: svn path=/head/; revision=101053
* Use usb_callout_init() instead of directly calling callout_init() withPeter Wemm2002-05-091-1/+1
| | | | | | | | | NetBSD's expected arguments. This unbreaks the kernel compile. Pointy hat to: joe Notes: svn path=/head/; revision=96274
* MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),Josef Karthauser2002-05-061-2/+3
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=96121
* Slight tidy up to reduce the differences between our version and NetBSD's.Josef Karthauser2002-04-091-9/+9
| | | | | | | (No functional changes). Notes: svn path=/head/; revision=94277
* Lock down Giant in the usb_task_thread() kthread.Josef Karthauser2002-04-081-0/+4
| | | | Notes: svn path=/head/; revision=94224
* MFNetBSD:Josef Karthauser2002-04-071-1/+1
| | | | | | | | | | 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). Notes: svn path=/head/; revision=94103
* MFNetBSD:Josef Karthauser2002-04-071-1/+3
| | | | | | | | | | | 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). Notes: svn path=/head/; revision=94102
* MFNetBSD:Josef Karthauser2002-04-071-7/+11
| | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=94101
* MFNetBSD:Josef Karthauser2002-04-071-1/+8
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=94100
* MFNetBSD:Josef Karthauser2002-04-071-2/+2
| | | | | | | | | revision 1.59 date: 2001/11/26 20:16:55; author: augustss; state: Exp; lines: +3 -3 Change wchan name for usb task thread. Notes: svn path=/head/; revision=94099
* MFNetBSD: usb.c (1.58)Josef Karthauser2002-04-071-32/+60
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=94098
* MFNetBSD: ohci.c (1.109), uhci.c (1.144), uhub.c (1.56), usb.c (1.57),Josef Karthauser2002-04-071-3/+14
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=94068
* MFNetBSD: (partial merge, as part was already there).Josef Karthauser2002-04-021-2/+2
| | | | | | | | | revision 1.56 date: 2001/11/13 07:55:30; author: augustss; state: Exp; lines: +4 -4 Add some #endif comments. Notes: svn path=/head/; revision=93646
* MFNetBSD:Josef Karthauser2002-04-021-1/+2
| | | | | | | | | revision 1.54 date: 2001/11/09 14:59:11; author: augustss; state: Exp; lines: +2 -1 Add a debug message. Notes: svn path=/head/; revision=93645
* MFNetBSD: usb.c (1.53), usbdi.h (1.49)Josef Karthauser2002-04-021-9/+22
| | | | | | | | date: 2001/01/23 17:04:30; author: augustss; Ad function to remove a usb task. Notes: svn path=/head/; revision=93641
* MFNetBSD:Josef Karthauser2002-04-021-1/+6
| | | | | | | | | revision 1.52 date: 2001/01/21 19:00:29; author: augustss; state: Exp; lines: +5 -0 Ad a comment. Notes: svn path=/head/; revision=93640
* MFNetBSD: uhub.c (1.49), usb.c (1.51), usbdi.h (1.48), usbdivar.h (1.63)Josef Karthauser2002-04-021-25/+55
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=93639
* MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.hJosef Karthauser2002-04-011-2/+41
| | | | | | | | | | | | (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. Notes: svn path=/head/; revision=93594
* Update $NetBSD$ idents to reflect reality.Josef Karthauser2002-04-011-1/+1
| | | | Notes: svn path=/head/; revision=93558
* Merge from NetBSD: Removed unnecessary variable declaration.Josef Karthauser2002-04-011-6/+1
| | | | Notes: svn path=/head/; revision=93555
* Merge from NetBSD:Josef Karthauser2002-04-011-3/+3
| | | | | | | | | usb.c rev 1.43, usb_port.h rev 1.26, usb_subr.c rev 1.71 Some OpenBSD portability fixes. Notes: svn path=/head/; revision=93549
* Merge from NetBSD:Josef Karthauser2002-04-011-1/+4
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=93548
* Be more specific about when block major numbers disappeared fromJosef Karthauser2002-03-111-1/+1
| | | | | | | the cdev switch. Notes: svn path=/head/; revision=92094