summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* print vendor and product in hexa on debug.fgsch2008-06-211-2/+2
|
* do not leak memory if there is no power source. code is ifdef USB_DEBUG.fgsch2008-05-191-2/+3
|
* try a few times before giving up while getting the device descriptor. iffgsch2008-05-191-19/+30
| | | | | | | | | it fails, reset the port and try again. this seems to fix some devices that would punt with "device problem, disabling port" otherwise. from augustss@netbsd with some change as per discussion with theo. set the address before getting the descriptor. from peterbu at bemac dot com via netbsd kern/24716. tested by many.
* improve/repair locator printing; ok jsgderaadt2007-11-041-4/+4
|
* treat usb vendor/product names as a locator, and have usbd_print handle it,deraadt2007-10-111-20/+14
| | | | | | 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
* serialize usbd_probe_and_attach(); only let one usb device be match'd andderaadt2007-10-111-14/+31
| | | | attached at a time; ok kettenis
* Simpliest memset(,0,) -> M_ZERO changes. One (caddr *) cast removal,krw2007-10-061-3/+2
| | | | | otherwise just adding M_ZERO to malloc() and removing the immediately adjacent memset(,0,).
* KNFgilles2007-09-111-2/+2
| | | | prompted and "much better" by marco@, ok pyr@
* add string length arguments to some functions, and do not copy a stringderaadt2007-09-091-27/+31
| | | | buffer to itself; checked by jsg and kettenis and others
* more M_ZERO conversions; ok krw@.fgsch2007-09-091-3/+2
|
* no need to say in two ways "a set of usb devices went away"; ok by a fewderaadt2007-07-211-6/+5
|
* Remove the definition and use of the device_ptr_t which was a struct device *.mbalmer2007-06-121-7/+7
| | | | | | No binary change. ok mk.
* Remove the definiton and usage of the USB_DO_ATTACH macro. It was a wrappermbalmer2007-06-111-4/+4
| | | | | | around a single function only and it did not even use all of it's arguments. ok jsg.
* Get rid of the USBDEVPTRNAME macro.mbalmer2007-06-101-6/+6
| | | | | | No binary change. ok jsg.
* Remove the definition and use of USBDEVUNIT.mbalmer2007-06-101-2/+2
| | | | ok jsg.
* Remove the definition and use of the USBDEVNAME macro.mbalmer2007-06-101-3/+3
| | | | | | | (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 "Static" declaration of many functions. It was defined to be emptymbalmer2007-06-051-15/+15
| | | | | | | 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.
* delete two extra lines which are not needed because that is how stringsderaadt2007-06-031-3/+1
| | | | actually work, surprise surprise; ok claudio cnst
* Remove logprintf macrojsg2007-05-211-3/+3
|
* place types needed by usbdevs_data.h, directly into that file so that itderaadt2007-02-281-18/+1
| | | | is consumable by anyone who includes it (matches idea in pcidevs)
* Prefer malloc over the stack for an array of 256 pointers. ok dlg@miod2006-07-171-3/+9
|
* some knf, no binary changedlg2006-07-161-68/+66
|
* get rid of ifdef __OtherBSD__ cruftdlg2006-07-161-63/+1
|
* fix typos in debug messagesmjc2006-06-261-2/+2
| | | | ok pascoe@
* Save and restore the data toggle value when a pipe to an endpointpascoe2006-05-311-1/+2
| | | | | | | | | | | | | | is closed and then reopened. This may be necessary now that we no longer clear endpoint stalls every time a pipe is opened. Previously we could assume an initial toggle value of zero because a clear-stall operation resets the device's toggle state. Derived from work in FreeBSD. This is most likely to affect devices like printers, which open pipes for short periods of time and close them again. ok dlg@
* Zero the memory allocated for subdevs[], preventing a quick trip tokrw2006-05-011-4/+5
| | | | | | | ddb>. Discovered by trying 'usbdevs -v' while a broken card reader was trying to attach. Broken device provided by Manuel Pata. ok pedro@ deraadt@
* 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@.
* Store the usb device names and vendors in more compact structures.drahn2005-10-171-18/+26
| | | | | Originally committed in 2001, backed out in a sync, now back in. saves close to 12k of kernel size. commit deraadt@
* Don't clear possibly non-existant stall condition while setting up thekrw2005-10-101-4/+1
| | | | | | | | pipe. Some devices such as some iPods react badly. Normal devices don't need it. From nathanw via NetBSD. Fixes the 2nd generation iPod mini donated by Ed Wandasiewicz. ok pascoe@
* Don't keep the devinfo string on the stack, instead use malloc/free.brad2005-08-011-2/+19
| | | | | | | | This should cure some rare stack overflows. From augustss NetBSD ok dlg@ pascoe@
* remove trailing newline in panic(9); ok millert@ and deraadt@fgsch2005-07-181-2/+2
|
* Relocate debugging printf so it describes the right thing.pascoe2005-04-211-2/+2
|
* use snprintf to avoid crossing the overflow point; ok ottoderaadt2005-04-161-3/+4
|
* change usbd_printBCD() to return number of bytes really placed or 0, notderaadt2005-04-161-2/+9
| | | | snprintf() style semantics [which people fail to grok]; ok otto
* Merge support for USB1 devices located beyond USB2 hubs, mostly from netbsd.pascoe2005-03-131-8/+25
| | | | | | | Supports bulk, control and interrupt pipes, letting USB1 keyboards and most network interfaces work when connected to a USB2 hub. ok dlg@
* backout the original method of reattaching a usb device now that we havedlg2004-12-121-37/+2
| | | | something better and more flexible to use.
* ugly ugly hack to allow a usb device to do a full reset of the port duringdlg2004-11-081-2/+38
| | | | | | | | | attach. this is required by atu (atmel based usb wireless) devices. something better will be done, but we need it for now to work on atu. ok deraadt@
* fix getting strings off a device which broke with the removal of thedlg2004-11-021-2/+2
| | | | UQ_NO_STRINGS quirk.
* from netbsd via freebsd via jsg@dlg2004-10-311-8/+21
| | | | | | | | | | | | | | | 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.
* Remove 'usb_'realloc() usage because it doesn't know the size of the olddrahn2004-08-301-15/+1
| | | | | buffer, thus may copy too much, causing a memory fault. ok millert, dlg, henning, tdeval, otto
* put "do { } while (0)" wrappers on all the debug maroc functionsderaadt2004-07-081-3/+3
|
* Sync USB code with NetBSD.nate2003-07-081-24/+74
| | | | This includes numerous fixes and paves the way for usb 2.0 support.
* try a little harder to attach devices that are really slownate2003-05-181-3/+4
|
* string cleanup; nate okderaadt2003-05-071-14/+23
|
* strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.ho2003-04-271-5/+7
|
* get rid of trailing whitespacenate2002-07-251-22/+22
|
* Meant to commit only ulpt and committed everything. Most things weren't readynate2002-05-071-59/+21
|
* Sync ulpt driver with NetBSDnate2002-05-071-21/+59
|
* prefix structure members to avoid name clashes.nate2002-05-021-22/+22
| | | | From NetBSD
* Synchronize usb code with NetBSD.nate2001-10-311-43/+48
|