summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb.c
Commit message (Collapse)AuthorAgeFilesLines
* MFNetBSD:joe2003-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()
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-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
* Correct a typo on line 552 of revision 1.92 which was breaking GENERIC:-bms2003-10-051-1/+1
| | | | _FreeBSD_version should be __FreeBSD_version.
* Make it easier to run this code on RELENG_4.joe2003-10-041-2/+8
| | | | Submitted by: luoqi
* Fix the cdevsw compatibility for -stable.joe2003-08-251-1/+1
|
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Make a note of some patches from NetBSD that we already have.joe2003-07-141-1/+2
|
* MFNetBSD:joe2003-07-141-1/+4
| | | | | | date: 2002/09/23 05:51:20; author: simonb; Remove breaks after returns, unreachable returns and returns after returns(!).
* add EHCI (USB 2.0) controller support.ticso2003-04-141-0/+1
| | | | | | Approved by: joe gallatin (mentor) Obtained from: NetBSD
* Gigacommit to improve device-driver source compatibility betweenphk2003-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)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Deprecate the USB_SETDEBUG IOCTL as debug levels can now be setjoe2002-09-151-13/+0
| | | | using sysctl.
* Use the hw.usb sysctl tree instead of debug.usb.joe2002-08-081-2/+2
| | | | Requested by: imp
* Replace the FOO_DEBUG definitions with USB_DEBUG, and switch thejoe2002-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.
* Get bored with hard coded debug level variables and introduce a debug.usbjoe2002-07-311-0/+8
| | | | | | sysctl tree for tweaking them real-time. Reviewed by: iedowse
* Use usb_callout_init() instead of directly calling callout_init() withpeter2002-05-091-1/+1
| | | | | | NetBSD's expected arguments. This unbreaks the kernel compile. Pointy hat to: joe
* MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),joe2002-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.
* Slight tidy up to reduce the differences between our version and NetBSD's.joe2002-04-091-9/+9
| | | | (No functional changes).
* Lock down Giant in the usb_task_thread() kthread.joe2002-04-081-0/+4
|
* MFNetBSD:joe2002-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).
* MFNetBSD:joe2002-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).
* MFNetBSD:joe2002-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.
* MFNetBSD:joe2002-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.
* MFNetBSD:joe2002-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.
* MFNetBSD: usb.c (1.58)joe2002-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.
* MFNetBSD: ohci.c (1.109), uhci.c (1.144), uhub.c (1.56), usb.c (1.57),joe2002-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.
* MFNetBSD: (partial merge, as part was already there).joe2002-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.
* MFNetBSD:joe2002-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.
* MFNetBSD: usb.c (1.53), usbdi.h (1.49)joe2002-04-021-9/+22
| | | | | date: 2001/01/23 17:04:30; author: augustss; Ad function to remove a usb task.
* MFNetBSD:joe2002-04-021-1/+6
| | | | | | revision 1.52 date: 2001/01/21 19:00:29; author: augustss; state: Exp; lines: +5 -0 Ad a comment.
* MFNetBSD: uhub.c (1.49), usb.c (1.51), usbdi.h (1.48), usbdivar.h (1.63)joe2002-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.
* MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.hjoe2002-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.
* Update $NetBSD$ idents to reflect reality.joe2002-04-011-1/+1
|
* Merge from NetBSD: Removed unnecessary variable declaration.joe2002-04-011-6/+1
|
* Merge from NetBSD:joe2002-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.
* Merge from NetBSD:joe2002-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.
* Be more specific about when block major numbers disappeared fromjoe2002-03-111-1/+1
| | | | the cdev switch.
* Prefix structure members to protect them against clashes with eg.alfred2002-02-201-7/+7
| | | | | | | | | c++ keywords. This keeps us in sync with NetBSD because they actually committed my delta first. Ok'd by: lennard
* Re-add bmaj to the cdevsw's, but don't compile it in on -current.joe2002-02-151-0/+3
| | | | | This makes the code more portable between -current, -stable and the other BSDs.
* Fix a bug introduced in rev.1.40 which can cause systems to crash whengreen2002-02-141-7/+9
| | | | | detaching USB devices. Specifically, a variable which was not meant to be reused was, in fact, being reused.
* Follow NetBSD and ANSIfy the function definitions.joe2002-02-031-14/+14
| | | | Remove trailing whitespaces (submitted to NetBSD).
* Merge from NetBSD.joe2002-01-281-16/+41
| | | | | | | | | | | | | | | | | | | | uhub.c: revision 1.37 usb.4: revision 1.30 usb.c: revision 1.38 usb.h: revision 1.40 usb_port.h: revision 1.21 usb_subr.c: revision 1.65 usbdi.h: revision 1.40 Split the attach/detach events up into device, driver and controller attach and detach events. The commit message from NetBSD was: date: 2000/02/02 07:34:00; author: augustss; state: Exp; Change the USB event mechanism to include more information about devices and drivers. Partly from FreeBSD. Also rework usbd to take these new event types into account.
* Back out the last commit. I committed the wrong file by accident.joe2002-01-261-39/+14
| | | | | The commit message wasn't relevant to that change. This code will be committed later.
* Rearrange the code in USB_DETACH, so that it's like NetBSD's.joe2002-01-261-14/+39
| | | | No functional change.
* Merge from NetBSD:joe2002-01-261-0/+6
| | | | | | | | | | usb.c: revision 1.39 revision 1.39 date: 2000/02/22 11:30:56; author: augustss; lines: +7 -1 Prepare a little for having USB interrupt processing done outside the hard interrupt level (in a thread or a softintr). No real soft processing done yet.
* Merge from NetBSD:joe2002-01-261-1/+1
| | | | | | | | | | usb.c: revision 1.41 revision 1.41 date: 2000/03/16 00:46:38; author: augustss; lines: +2 -2 Make the USB event queue longer. Mine overflows before the (user-land) event handler has started. But then I have about 25 devices connected. :)
* Merge from NetBSD:joe2002-01-241-5/+18
| | | | | | | | | | | | | | | | | | usb.c: -r1.35 - 1.37 usb_port.h: tiny bit of -r1.26 + an extra bit in the FreeBSD config section. revision 1.37 date: 2000/01/24 18:35:51; author: thorpej; state: Exp; lines: +7 -1 Use config_pending. ---------------------------- revision 1.36 date: 1999/12/22 23:54:09; author: augustss; state: Exp; lines: +2 -2 Use the flags `locator' to govern if devices are detected early or late during cold boot. ---------------------------- revision 1.35 date: 1999/12/20 02:12:23; author: augustss; state: Exp; lines: +8 -5 Make sure tsleep() is not called during cold boot.
* Revert uio.uio_td back to uio.uio_procp, using a #define in usb_port tojoe2002-01-021-2/+2
| | | | do the right thing on -current.
* Sync with NetBSD. Non-functional changes that bring this filejoe2002-01-021-55/+25
| | | | | | closer to the NetBSD version. Reviewed by: md5
OpenPOWER on IntegriCloud