summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ugen.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* kqueue attach functions should return an errno or 0, not a plain 1. Fixnicm2011-07-021-7/+7
| | | | | | the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
* garbage collect "usb events". without /dev/usb there is no way to accessjakemsr2011-01-251-7/+1
| | | | | | them from userland, and nothing in the kernel uses them. ok krw@, miod@
* * instead of NULLing pointers to interface descriptors in the uaa, markjakemsr2011-01-161-12/+30
| | | | | | | | | | | | | interfaces as being claimed in the usbd_device's copy of the interface descriptors * allow ugen(4) to be attached if there are unused interfaces in a configuration that has had drivers attached * make ugen(4) aware that it may be sharing a device with (an)other driver(s), and if so: * do not let ugen(4) change the configuration * do not let ugen(4) access the already claimed interfaces discussed with deraadt and miod
* remove dying flag in detach() function.yuo2010-09-241-2/+1
| | | | | | The dying flag will be set in activate()/DEACTIVATE. ok deraadt@
* Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tnicm2009-11-091-3/+1
| | | | | | | | | | supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
* Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()deraadt2009-10-311-1/+3
| | | | | | | calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-3/+3
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* clalloc() can't fail, so there's no need to handle failure cases.blambert2009-07-191-3/+2
| | | | | | | | Change to void function. Also, no need to have global tty stats pointer, so just return it from clalloc, as the caller frees it immediately anyway. ok miod@
* catch up NetBSD kern/41048.yuo2009-06-051-2/+4
| | | | | | check for a non-NULL configuration descriptor before dereferencing. ok deraadt@
* o Correctly clear UGEN_ASLP in all cases.fgsch2008-12-141-12/+15
| | | | | | | o Use the timeout for isochronous transfers as well o Allow to set the timeout for both, read and write From FreeBSD. you@ ok some time ago.
* - don't leave nodes unconfigured, when setting alternate settingmartynas2008-09-081-5/+6
| | | | | fails. fixes my ups looked over by fgs@. ok sthen@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* remove #ifdef __macppc__ due to a misunderstanding:todd2008-06-141-12/+1
| | | | | | | | | - the wskbd/wsmouse is not phantom, but actually is pre-paired keyboard/mice talking wskbd/wsmouse to the os this permits the bluetooth device to attach as wskbd/wsmouse using bluetooth keyboards for ddb> and in general if you have paired them in an os that supports flipping the funny bluetooth device into full bluetooth mode ok drahn@
* Remove unneeded scope declarations that shadows existing ones. krw@ okfgsch2007-10-201-2/+1
|
* treat usb vendor/product names as a locator, and have usbd_print handle it,deraadt2007-10-111-6/+1
| | | | | | so that it shows up before the :. as a result, all the usb devices do not need to have name printing code anymore. all this now works and prints nicely because usbd_probe_and_attach() is serialized. ok kettenis
* respect timeouts. prompted by freebsd pr110122, but also proplerlyhenning2007-06-291-2/+7
| | | | calculate the timeout. help & ok jsg
* Remove the definition and usage of the USB_DECLARE_DRIVER_CLASS andmbalmer2007-06-141-2/+17
| | | | | | | | USB_DECLARE_DRIVER macros. No binary change. ok dlg.
* Remove the definition and use of the device_ptr_t which was a struct device *.mbalmer2007-06-121-2/+2
| | | | | | No binary change. ok mk.
* Remove the usb_proc_ptr type definition, which was really a 'struct proc *'mbalmer2007-06-111-7/+7
| | | | | | | | only. No binary change. ok mk.
* Remove the USB_GET_SC_OPEN macro. There is a double check for sc == NULL inmbalmer2007-06-111-2/+6
| | | | | | | | ulpt.c, I am aware of that and it will be changed later. No binary change. ok mk.
* Remove the definition and use of the USB_GET_SC macro, no binary change.mbalmer2007-06-111-7/+7
| | | | ok mk.
* More USB cleanup: In usb_port.h, get rid of the sel_klist #definemk2007-06-111-4/+4
| | | | | | | (which was there twice without gcc complaining) and update all uses of it. ok jsg mbalmer
* Remove the definition and use of the USBDEVNAME macro.mbalmer2007-06-101-8/+8
| | | | | | | (This might look easy, but it was a big diff. Thanks to dlg and especially jsg for looking over it; we found at least four mistakes in the initial diff.) ok jsg.
* Remove the definition and use of the USBDEV macro. It only created confusionmbalmer2007-06-101-7/+7
| | | | | | | | and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev. No binary changes. ok jsg.
* Mechanical removal of USBBASEDEVICE. No binary change.mk2007-06-061-2/+2
| | | | | | Tested by thib and myself. ok mbalmer jsg
* Remove the "Static" declaration of many functions. It was defined to be emptymbalmer2007-06-051-28/+28
| | | | | | | and it was not consistently used. It was confusing as it suggested these functions were static, which they were not. discussed with dlg and jsg, ok jsg.
* Remove some #ifdef {Free|Net}BSD/#endif to make the code more readable.mbalmer2007-05-311-75/+1
| | | | ok jsg
* Farewell USB_{ATTACH,MATCH,DETACH}* you will not be missed.jsg2007-05-271-13/+14
| | | | ok deraadt@ krw@ mbalmer@
* Remove logprintf macrojsg2007-05-211-3/+3
|
* poll errors should be POLLERR, not some random E valuetedu2006-11-011-5/+5
| | | | from alexandre ratchov. ok claudio
* In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesmiod2006-06-231-2/+2
| | | | | | something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
* Recent Powerbook systems have their on-board keyboard and mouse devicesmiod2006-06-171-3/+15
| | | | | also showing up as usb devices, but both devices are tied. To make things less confusing, do not attach the usb phantoms at all.
* Move contents of sys/select.h to sys/selinfo.h in preparation for amillert2005-11-211-2/+2
| | | | | userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
* Don't keep the devinfo string on the stack, instead use malloc/free.brad2005-08-011-4/+5
| | | | | | | | This should cure some rare stack overflows. From augustss NetBSD ok dlg@ pascoe@
* from netbsd via freebsd via jsg@dlg2004-10-311-2/+5
| | | | | | | | | | | | | | | usbdi_util.h (1.29), uhid.c (1.62), ugen.c (1.68), usb_subr.c (1.114) Yes, some devices return incorrect lengths in their string descriptors. Rather than losing, do what Windows does: just request the maximum size, and allow a shorter response. Obsoletes the need for UQ_NO_STRINGS, and therefore these "quirks" are removed. usb_subr.c (1.116) In the "seemed like a good idea until I found the fatal flaw" department... Attempting to read a maximum-size string descriptor causes my kue device to go completely apeshit. So, go back to the original method, but allow the device to return a shorter string than it claimed.
* from freebsd, ugen.c 1.68 usbdi_util.c 1.27 usbdi_util.h 1.15dlg2004-07-211-1/+32
| | | | | | | | log message: Implement outgoing interrupt pipes. It is part of the USB 1.1 spec. The Lego Infrared Tower use it. ok deraadt@
* put "do { } while (0)" wrappers on all the debug maroc functionsderaadt2004-07-081-3/+3
|
* kqueue support for various usb devices including: usb, uhid, ugen,nate2003-06-271-2/+128
| | | | | and uscanner From NetBSD
* string cleanup; nate okderaadt2003-05-071-2/+2
|
* sync with NetBSDnate2002-11-111-8/+18
|
* update $NetBSD$ tagsnate2002-07-251-2/+2
|
* get rid of trailing whitespacenate2002-07-251-7/+7
|
* no provate cdev_decl()s, they are in sys/conf.h nowmickey2002-07-101-2/+2
|
* sync with NetBSDnate2002-07-091-75/+90
|
* make the timeout a function parameternate2002-07-091-2/+3
| | | | From NetBSD
* Meant to commit only ulpt and committed everything. Most things weren't readynate2002-05-071-92/+76
|
* Sync ulpt driver with NetBSDnate2002-05-071-76/+92
|
* prefix structure members to avoid name clashes.nate2002-05-021-42/+42
| | | | From NetBSD
* Synchronize usb code with NetBSD.nate2001-10-311-12/+27
|
* occured->occurredmpech2001-09-201-2/+2
| | | | | idea from deraadt@ via NetBSD millert@ ok