Commit Graph

122 Commits

Author SHA1 Message Date
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
kiyohara
2db72b9118 * splsoftusb, IPL_SOFTUSB, and IPL_HARDUSB defines in usbdi.h
-> the current names are confusing (didn't change other drivers)
* fix invalid memory access in usbd_transfer (kern/24636)
-> needed for this driver
* fix USB HC detach race condition (kern/32011)
-> main patch needed for this driver, sc_dying changes in other drivers
not necessary but seem right to me

Patch from Matthew Orgass.
  http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
2007-08-15 04:00:33 +00:00
drochner
47032dbc5e -g/c usbd_init()/usbd_finish() which don't do anything useful
-use <fs/unicode.h> for utf16->utf8 conversion instead of a private
 implementation
-streamline the COMPAT_30 utf16->ascii conversion a bit: remove
 length check (USB_MAX_STRING_LEN is too large to be useful) and
 replace array index arithmetics
2007-02-26 13:44:40 +00:00
mlelstv
1fb16b2557 The diagnostic code doesn't track busy_free correctly when a
device gets removed. However, when the diagnostic check fails,
it is much better to complete the free operation than to abort
it, because this just causes an infinite loop.
2007-02-10 07:52:29 +00:00
hubertf
eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
macallan
27138de097 move int j into #ifdef COMPAT_30 to avoid an unused variable warning when
building without COMPAT_30
2006-12-05 20:45:36 +00:00
pavel
9b8e4189e5 Restore compatibility of USB_DEVICEINFO ioctl and reads from /dev/usb with
NetBSD 3.x. Patch from Stephan Thesing provided in
http://mail-index.netbsd.org/current-users/2006/03/21/0002.html, with some
modifications by me.
See also
http://mail-index.netbsd.org/current-users/2006/08/29/0017.html

The code is conditionally compiled depending on COMPAT_30.

Also fix a leak of struct usb_event in usbread() introduced while converting
on-stack variables to dynamic allocation.

Reviewed by martin@.
2006-12-03 22:34:58 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow
52ba9f7bb5 add braces for if-else statement, in the event that DPRINTF is an
empty statement; shuts gcc up about 'empty statement in if-else'.
2006-10-04 23:55:22 +00:00
christos
5dd246492d Coverity CID 3014: Don't check for NULL after deref (from Arnaud Lacombe) 2006-10-03 18:20:57 +00:00
perry
93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos
a9cf21849d - const poisoning
- eliminate variable shadowing
2005-05-30 04:21:39 +00:00
augustss
c2c00331d7 Use UTF8 to encode strings read from the device (instead of using '?' for
characters >=0x100).

Also add serial number string to the device information struct.
2005-05-02 15:32:18 +00:00
augustss
122fe5d16e Whine about not being able to figure out default language if we are debugging. 2004-10-24 12:52:40 +00:00
augustss
67f0f483bd Make an iterator abstraction for looping through all descriptors.
Move usb_get_string() and make it public.
2004-10-23 13:26:33 +00:00
mycroft
ab236698f0 ugen_isoc_rintr() may recycle the xfer immediately. Therefore, we avoid
touching the xfer after calling the callback in usb_transfer_complete().
From PR 25960.
2004-07-17 20:16:13 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
augustss
86650920c9 Get rid of trailing white space. 2002-07-11 21:14:24 +00:00
lukem
06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- 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()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
augustss
4bc0b333ea Update dma memory access API a little. 2002-05-19 06:24:30 +00:00
thorpej
c49eaa2724 Don't use NULL for non-pointer arguments. 2002-02-28 04:49:16 +00:00
augustss
2c66bc238b Fix a typo that prevented timeout in control requests from working.
Spotted by Alfred Perlstein <bright@mu.org>.
2002-02-26 10:22:48 +00:00
christos
6728d906e9 Prefix structure members to protect them against clashes with eg. c++ keywords.
Suggested by Alfred Perlstein, from FreeBSD, ok'd by augustss
2002-02-20 20:30:12 +00:00
augustss
319f13f6ef Give usbd_do_request_flags() an extra argument for the timeout. 2002-02-11 15:11:49 +00:00
augustss
e644076000 A little const poisoning. (From FreeBSD.) 2002-02-11 12:42:48 +00:00
augustss
ff21b251a0 Make sure we don't have any pending softintrs when entering polling mode.
Thanks to Darrin for finding and fixing this problem when using USB
keyboards in DDB.
2001-12-30 20:26:59 +00:00
augustss
bfc3660fb1 Add some more DIAGNOSTIC tests.
Make usb_match_device() match on USB_PRODUCT_ANY.
2001-12-24 21:36:15 +00:00
augustss
2fdd0f5a4b Some more paranoia checks when DIAGNOSTIC. 2001-12-12 15:38:58 +00:00
augustss
22735e5d44 Move usbd_clear_endpoint_toggle() prototype to usbdi.h. 2001-12-12 15:23:58 +00:00
augustss
02aa2a59bc Handle vendor/product lookup with a common routine. 2001-12-03 01:47:12 +00:00
augustss
23d4159897 Add a subroutine to search for a vendor/product pair. 2001-12-02 23:25:25 +00:00
augustss
7467533f5a Improve dump routine slightly. 2001-11-22 04:31:01 +00:00
augustss
df1a49923c Fix indentation and typos. 2001-11-21 15:37:41 +00:00
augustss
7e4459fe10 Keep track of device speed for USB 2.0. 2001-11-20 13:48:03 +00:00
augustss
b684cbc2a7 usbd_interface2device_handle() cannot fail. 2001-11-15 15:15:58 +00:00
lukem
667807e40c add RCSIDs 2001-11-13 06:24:53 +00:00
augustss
9a444aef81 Get rid of unused abort_handle. 2001-11-10 17:11:38 +00:00
augustss
3d963db4f2 Add some dump routines for debugging. 2001-11-10 16:54:56 +00:00
augustss
f14db62d03 Add a DIAGNOSTIC. 2001-04-17 00:05:33 +00:00
augustss
38c02444d9 Finally get rid of the UGLY and EVIL hack for avoiding tsleep(). 2001-04-13 11:19:58 +00:00
augustss
e8db629494 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.
2001-01-21 02:39:52 +00:00
augustss
79c6c8ec3f Make this compile again after const-ification. 2001-01-19 04:01:10 +00:00
augustss
d9c7baa183 Add a way to do control transfers on other pipes than the default pipe. 2000-09-23 21:02:04 +00:00
augustss
1c94b92bc4 Initialize pointer before doing free of it. 2000-06-06 11:36:21 +00:00
augustss
c6ddc6009b Make it compile with USB_DEBUG. 2000-06-01 15:51:26 +00:00
augustss
ed9486e158 Bring the coding style into the 80s, i.e., get rid of __P and use
ANSI prototypes and declarations.
2000-06-01 14:28:57 +00:00
augustss
18cd73168e Be more careful when setting the alternate interface so we don't end up with
nothing set at all if it fails.
2000-05-31 16:14:42 +00:00