christos
2f27be7da0
- const poisoning
...
- avoid shadowing
- usbd_trim_spaces was writing to const memory; give it a buffer.
2005-05-30 04:20:46 +00:00
soren
5350b653c5
Sync 1284 id printing with the devinfo change, but leave it disabled for now.
2005-05-23 16:35:26 +00:00
augustss
834327c847
Don't keep the devinfo string on the stack, instead use malloc/free.
...
This should cure some rare stack overflows.
2005-05-11 10:02:28 +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
mycroft
3839e0db1b
Separate out vendors from the product table, to reduce string duplication.
...
Saves ~10K.
2005-03-04 05:03:19 +00:00
mycroft
2d562a01e2
Copyright maintenance.
2005-03-02 11:37:27 +00:00
augustss
90d454c7f7
Keep track of what high speed port (if any) a device belongs to so we can
...
set the transaction translator fields for the transfer.
Add a gross hack for split transaction completion in the ehci driver that
allows control transfers to be translated. Interrupt transfers do not work.
Warn when any low/full speed device is opened.
2004-10-23 16:17:56 +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
drochner
96b589fc18
a round of autoconf cleanup:
...
-convert submatch() style functions (passed to config_search() or
config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
on "locators.h"
2004-09-13 12:55:47 +00:00
drochner
57cc3c5e5e
remove a redundant check
2004-09-08 19:59:15 +00:00
mycroft
dbee7a2507
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.
2004-06-23 06:27:54 +00:00
mycroft
1bce39942b
Whoops, use the correct value for the maximum string descriptor length.
2004-06-23 05:23:19 +00:00
mycroft
ef77780b63
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.
2004-06-23 02:30:52 +00:00
itojun
300aa0dcd5
use bounded string ops (snprintf, strl*)
2004-04-23 17:25:25 +00:00
itojun
aca4c091d3
sprintf -> snprintf
2004-04-22 00:17:10 +00:00
augustss
da2d21f6ee
Set the device address before reading the device descriptor.
...
This makes certain non-conforming devices work.
Suggested by Peter Burnett in kern/24716.
2004-03-15 10:35:04 +00:00
drochner
835771a879
On disconnect, set the "subdev" pointer to NULL, otherwise
...
free()d memory will be referenced through
usbd_add_dev_event(USB_EVENT_DEVICE_DETACH)->
usbd_fill_deviceinfo()
later.
might need more review, but at least it doesn't crash on
amd64 anymore
2004-02-25 21:52:59 +00:00
augustss
7cbb919e9d
Fix pasto.
2004-01-28 22:37:50 +00:00
augustss
33d0bfd046
If vendor or product is the empty string, ignore it.
...
From FreeBSD.
2004-01-28 22:00:06 +00:00
augustss
7cdc2658bb
Try harder to get initial descriptor. Do a port reset now and then
...
in the retry loop.
2004-01-05 13:32:23 +00:00
mycroft
ab223e99bc
Allow a device to reject CLEAR_FEATURE ENDPOINT_STALL (with a STALL) -- the
...
assumption being that the device will never use a STALL of a non-control pipe,
I guess.
2003-09-23 21:44:42 +00:00
mycroft
8b05b0c1d3
In usbd_setup_pipe(), check the return value from usbd_clear_endpoint_stall().
2003-09-12 16:22:57 +00:00
martin
d505b18964
Make sure to include opt_foo.h if a defflag option FOO is used.
2003-06-23 11:00:59 +00:00
augustss
a9dbc85017
Try to get full device descriptor a few times. This makes some slow
...
devices work. From FreeBSD.
2003-01-10 11:19:13 +00:00
augustss
8789d465b2
Try getting string descriptors in a slightly different way to works around
...
some problematic devices. From Alexander Kabaev <kan@FreeBSD.ORG>.
2003-01-01 16:21:50 +00:00
thorpej
72a7af27b0
Use aprint_normal() in cfprint routines.
2003-01-01 00:10:15 +00:00
thorpej
6c88de3b53
Introduce a new routine, config_match(), which invokes the
...
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
augustss
86650920c9
Get rid of trailing white space.
2002-07-11 21:14:24 +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
tsutsui
e6f8529d26
Call malloc(9) with M_ZERO flag instead of memset() after malloc().
2002-01-12 16:58:16 +00:00
augustss
37c8189778
Correct a comment.
2001-11-22 21:59:33 +00:00
augustss
2f560c9410
Sanity check max packet lengths.
2001-11-20 16:09:01 +00:00
augustss
86e6ea35eb
Update for new speed handling.
2001-11-20 13:50:07 +00:00
augustss
1f6462461a
Make it possible to report device speeds with ioctl(USB_DEVICEINFO).
2001-11-17 01:49:53 +00:00
augustss
3db4a768d4
Handle devices that disappear during reset gracefully.
2001-11-16 01:57:47 +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
21f0709fbe
Abort any xfers on the control pipe before closing it on detach.
2001-11-10 17:10:42 +00:00
augustss
02186d8353
Small portability improvement.
2001-11-10 16:53:32 +00:00
augustss
dfe96bae01
Add a little infrastructure so that individual drivers can easily check
...
if thee was a vendor+product locator match.
2001-08-15 00:04:59 +00:00
lukem
c15945130c
delint: remove unnecessary assignment to same objection (hidden in #define)
2001-05-16 04:50:11 +00:00
augustss
29984607e8
Trim space off both ends of device product and vendor strings.
2001-01-21 02:34:34 +00:00
jdolecek
34c8ae80da
constify
2001-01-18 20:28:15 +00:00
augustss
e6616f532a
Cosmetic changes.
2001-01-08 20:21:16 +00:00
augustss
34bb7b9a35
Don't try to access a device that is being disconnected when generating
...
the detach event. Fixes (I hope) PR 11713 from itohy@netbsd.org (ITOH Yasufumi).
2000-12-13 04:05:14 +00:00
augustss
a675063a0d
Add a hack to try and figure out if the TI UTUSB41 hub is bus powered
...
despite claiming to be self powered (it's important to know so that the
power budget can be met).
2000-10-24 15:01:26 +00:00
augustss
3a05d9ba7b
Avoid empty strings for vendor&product.
2000-10-12 23:11:04 +00:00
augustss
5218e2a490
Improve some portability items.
2000-06-01 14:37:51 +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
ca8d562f6e
Be more careful when setting the alternate interface.
2000-05-31 16:15:49 +00:00