Commit Graph

1942 Commits

Author SHA1 Message Date
Jack F Vogel
b8b1729d3c Add PCI device support for Intel S7000FC4UR in usb and ichwd, systems
will not install without the usb changes in the install kernel, so I
would like to MFC this in time for 7.0 RC

MFC: 3 days
2007-11-15 23:59:36 +00:00
Henrik Brix Andersen
419f6676c3 Update quirks for the MetaGeek Wi-Spy 1A, 1B and 2.4x.
PR:		usb/116057
Approved by:	imp, erwin (mentor)
2007-11-11 20:57:08 +00:00
Sam Leffler
b0db4c9328 Add private tx/rx buffer management to support large frame sizes
and update the rx code to handle multiple frames in a single usb
transfer.  AX772 parts (at least) exhibit many input errors when
operated with a 2K rx buffer and no errors w/ a 4K rx buffer (it's
unclear what the cause of the errors is for 2K so this may just be
covering up the real issue).  Larger rx buffer sizes show no
significant performance improvement for AX772.  Bypassing the common
buffer management routines also eliminates an extra context switch
on every packet which noticeably improves performance (TCP netperf
rx goes from 45 Mb/s to 85 MB/s).

Submitted by:	"J.R. Oldroyd" <fbsd@opal.com>
Reviewed by:	imp
Obtained from:	openbsd (partly)
MFC after:	3 weeks
2007-11-10 16:23:38 +00:00
Ariff Abdullah
20005f72d1 - Remove magic number and fit max rx buffer size accurately.
- Patch registers CR47 and CR157 on devices that require it.
- Fix power calibration setting on ZD1211B.

Obtained from:	OpenBSD

- Fix multicast transfer by properly reprogram multicast global
  hash table, which in turns fix promiscuous mode and IPv6
  autoconfiguration / local networking.

Reviewed by:	sam, Weongyo Jeong
Tested using:	Aztech WL230 , Belkin F5D7050, Unicorn WL-54G,
             	3COM 3CRUSB10075
MFC after:	1 week
2007-11-08 08:25:58 +00:00
Kevin Lo
02f0a39fed Check wep flag in *_tx_mgt since we need to encrypt some management frame
in case of shared authentification.

Obtained from: NetBSD
2007-11-06 07:30:12 +00:00
Alexander Kabaev
907aa90518 Do not pass an address to local stack variable to usbd_set_report_async.
Allocate space in keyboard state structure instead to prevent random byte
from possibly overwritten stack location frombeing shoved into USB device
when transfer actually takes place.

This fixes at least one instance of LEDs not working with USB keyboards.
2007-11-05 19:51:12 +00:00
Sam Leffler
96492b1b20 upgrade zd1211b firmware for the zyd driver. This solves a hardware
reset problem when we reboot the system with the zyd device inserted.

Submitted by:	Weongyo Jeong
Reported by:	Ted Lindgreen (ted@tednet.nl)
MFC after:	1 week
2007-11-03 19:24:51 +00:00
Sam Leffler
38cb62eb95 fix a typo in rx radiotap's flags
Submitted by:	Weongyo Jeong
Reviewed by:	sam
MFC after:	3 days
2007-11-03 19:22:54 +00:00
Sam Leffler
d8e40e35ce correct entry 2007-11-03 19:11:35 +00:00
Alexander Motin
11bfc2922d Add one of HTC Smartphone/PocketPC device IDs.
Tested with Qtek S200 (HTC Prophet).
2007-10-22 08:28:24 +00:00
Julian Elischer
3745c395ec Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.

I'd LOVE to do this rename in 7.0  so that we can eventually MFC the
new kthread_xxx() calls.
2007-10-20 23:23:23 +00:00
Sam Leffler
df8a38f46a fix an incorrect setting of `retry times' in case of zd1211b, we
should set the ZYD_MACB_MAX_RETRY register instead of ZYD_MAC_RETRY

Submitted by:	Weongyo Jeong
MFC after:	1 week
2007-10-19 16:33:31 +00:00
Takanori Watanabe
02c788a24e Add Winchiphead (or Nanjin QinHeng Electronics) USB Serial converter driver.
I tested it on cheap serial converter.(Only costs 980JPY.)
2007-10-18 10:51:06 +00:00
Alexander Kabaev
d5d78259ac Make ukbd_getc respect non-blocking behavior if one is requested. Change
ukbd_poll to mark this keyboard instance as polling before calling
usbd_set_polling at USB level. usbd_set_polling runs softintr before
returning, stealing our input and making consequent polling getchar
kind of pointless.

This allows USB keyboards to coexist peacefully with serial console in DDB
and other contexts where polling is used.

MFC after:	1 week
2007-10-15 20:37:34 +00:00
Sam Leffler
b6cbf52f09 fix a bug of RX routines that can't process multi-frame transactions
properly due to the shortage of the RX buffer size.  In a case of zyd
devices, up to 3 frames can be combined in an USB transaction.  So, RX
buffer should be at least ((MCLBYTES + extra structs) * 3)

Submitted by:	Weongyo Jeong <weongyo.jeong@gmail.com>
MFC after:	3 days
2007-10-15 17:39:47 +00:00
John Baldwin
6b66deaeff The ukbd driver has some questionable "magic" to for a default keyboard
which is ukbd0.  Specifically, the keyboard driver structures for ukbd0
are not allocated/freed but are statically allocated via a persistent
global variable.  There is some additional magic for the ukbd0 such that
if the keyboard is marked as probed in this global variable, then we
don't check to see if the device_t we are probing has an interface.

This causes a problem if an attach of ukbd0 fails without fulling clearing
the state in the global variable.  Specifically, if the keyboard fails to
initialize in init_keyboard() or kbd_register(), then the keyboard will
still be marked as probed.  The USB layer will then try to offer the
"generic" version of the USB keyboard device (as opposed to the
per-interface sub-devices) and the ukbd(4) driver will see that the
keyboard is marked probe and will skip the "is this a per-interface device"
check.  Later in ukbd_attach() it panics because it tries to dereference
the interface pointer which is NULL.

The fix is to clear the flags in the persistent keyboard data for ukbd0
when init_keyboard() or kbd_register() fail.

MFC after:	1 week
Reviewed by:	imp
2007-10-12 19:47:42 +00:00
Takanori Watanabe
5e6c8da764 Add another zydas device: Planex GW-US54GD (a.k.a Dempaotoko) 2007-10-12 08:45:55 +00:00
Luigi Rizzo
cf1a10e8c0 Add entries for Epson multifunction scanner/printer/card readers,
with all functions supported. This is done adding usb device IDs
to the table of recognised devices (because there is no standard
'scanner' class, so no other way to recognise them), and with
a small change to the uscanner attach routine that prevents
reconfiguring the whole USB device while we are dealing only with
one of its USB interfaces.

The latter part has been suggested by Steinar Hamre in
http://www.freebsd.org/cgi/query-pr.cgi?pr=107665 , i have
only added a bit of explaination to the code.

I have personally tried this on the Epson DX-5050 and DX-6000
devices (on the US market they have different names, CX-something).
I have good reasons to think that, possibly with the mere addition
of more USB ids to the table in uscanner.c, this should work with
all Epson multifunction devices in that family (from DX-3800 to
DX-7000 - these units are in the 50-120$ price range).
More details on related topics (SANE configuration, OCR, etc.)
at http://info.iet.unipi.it/~luigi/FreeBSD/dx5050.html

Manpage updates coming soon.

Approved by: re, imp
MFC after: 3 days
2007-10-05 07:26:39 +00:00
Warner Losh
2ba799df13 Add support for the AX88178 and AX88772 based devices.
Submitted by: sam@
Approved by: re@ (blanket)
2007-09-25 20:47:24 +00:00
John Baldwin
75d4506b87 - Only assume that a PCI device on the same slot is a "neighbor" USB
controller if it's sole child device has the "usb" device class.
  Previously ehci(4) would think that PCI-ISA bridges on the same slot
  (such as in some Intel ICHs) were "neighbors" resulting in spurious
  warnings about neighbor count mismatches.
- Fix a memory leak when looking for neighbors.

MFC after:	1 week
Approved by:	re (kensmith)
Tested by:	phk
2007-09-19 16:21:34 +00:00
Sam Leffler
b105a06908 Update beacon handling to sync w/ vap code base:
o add driver callback to handle notification of beacon changes;
  this is required for devices that manage beacon frames themselves
  (devices must override the default handler which does nothing)
o move beacon update-related flags from ieee80211com to the beacon
  offsets storage (or handle however a driver wants)
o expand beacon offsets structure with members needed for 11h/dfs
  and appie's
o change calling convention for ieee80211_beacon_alloc and
  ieee80211_beacon_update
o add overlapping bss support for 11g; requires driver to pass
  beacon frames from overlapping bss up to net80211 which is not
  presently done by any driver
o move HT beacon contents update to a routine in the HT code area

Reviewed by:	avatar, thompsa, sephe
Approved by:	re (blanket wireless)
2007-09-17 19:07:24 +00:00
Warner Losh
30ac77cd25 Zyd needs be under Giant because USB is under Giant.
Submitted by: Weongyo Jeong
Reviewed by: sam@
Approved by: re@ (blanket)
2007-09-15 23:30:10 +00:00
Sam Leffler
2a2391c23c - fix a bug that zyd_attach() returns 0 even if it encountered errors
that can lead to a panic when the stick is yanked.
- make sure that zyd_attach() returns 0 or errno.

Submitted by:	Weongyo Jeong <weongyo.jeong@gmail.com>
Reported by:	Ted Lindgreen <ted@tednet.nl>
Reviewed by:	sam
Approved by:	re (blanket wireless)
2007-09-07 03:54:54 +00:00
Sam Leffler
5c096cfbe5 Add missing bg scanning bits; update ic_lastdata and cancel any
bg scan when there's outbound traffic.

Approved by:	re (blanket wireless)
2007-09-05 23:40:59 +00:00
Sam Leffler
2b9411e29f Add missing bits that made bg scanning lame:
o update ic_lastdata to reflect time of last outbound frame
o outbound traffic must preempt/cancel bg scanning to avoid delays

This stuff was somehow missed in the initial import.

Reviewed by:	thompsa, avatar, sephe (earlier version)
Approved by:	re (blanket wireless)
2007-09-05 23:00:27 +00:00
Warner Losh
eb0fa74e92 A port of the zyd driver from NetBSD by . This supports the ZyDAS
ZD1211/ZD1211B USB IEEE 802.11b/g wireless network devices.  Not (yet)
connected to the build process (next batch of commits once I've looped
the current back back).

Submitted by: Weongyo Jeong
Reviewed by: sam@
Approved by: re@
2007-08-29 21:16:50 +00:00
Warner Losh
4c2b0b2a5e Add devices for the forthcoming zyd driver, ported from NetBSD, by
Weongyo Jeong.

Submitted by: Weongyo Jeong
Approved by: re@
2007-08-29 21:00:57 +00:00
Don Lewis
4d54b88811 Replace three copies of the host controller reset sequence that
differ in their details with calls to a new function, ehci_hcreset(),
that performs the reset.

The original sequences either had no delay or a 1ms delay between
telling the controller to stop and asserting the controller reset
bit.  One instance of the original reset sequence waited for the
controller to indicate that its reset was complete before continuing,
but the other two immediately let the subsequent code execute.  The
latter is a problem on some hardware, because a read of the HCCPARAMS
register returns an incorrect value while the reset is in progress,
which triggers an infinite loop in ehci_pci_givecontroller(), which
hangs the system on shutdown.

The reset sequence in ehci_hcreset() starts with the most complete
instance from the original code, which contains a loop to wait for
the controller to indicate that its reset is complete.   This appears
to be the correct thing to do according to "Enhanced Host Controller
Interface Specification for Universal Serial Bus" revision 1.0,
section 2.3.1.  Add another loop to wait for the controller to
indicate that it has stopped before setting the HCRESET bit.  This
is required by the section 2.3.1 in the specification, which says
that setting HCRESET before the controller has halted "will result
in undefined behaviour".

Reviewed by:	imp (previous patch version without the extra wait loop)
Tested by:	se  (previous patch version without the extra wait loop)
Approved by:	re (bmah)
MFC after:	1 week
2007-08-12 18:45:24 +00:00
Warner Losh
d8e3f30539 Merge in the AX88178 and AX88772 register definions (along with
rename) from OpenBSD.  This also dribbles in a few fields from OpenBSD
as well.

Approved by: re@ (blanket)
Obtained from: OpenBSD
2007-08-09 04:40:07 +00:00
Warner Losh
1dfb823e11 Add missing newline in printf.
Submitted by:  "R.Mahmatkhanov" cvs-src at yandex ru
Approved by: re (blanket)
2007-07-29 18:16:43 +00:00
Takanori Watanabe
32ee7eee09 Minor Bug fix that will cause panic with some terminal with voice path on USB.
Approved by: re@ (kensmith)
2007-07-27 12:00:29 +00:00
Warner Losh
6dc2dedb7a Start to converge on standard ways of saying some things like
Ethernet and Adapter.

Obtained from: NetBSD (kinda)
Approved by: re (blanket)
2007-07-25 07:11:08 +00:00
Warner Losh
3b62e837c9 Fix absolutely maddening autorepeat bug that would cause the last key
to repeat if you had more than two keys down at any given time (which
happened to me all the time with emacs).

This is taken from PR 110681, although what URATAN Shigenobu describes
there is different than the pathology that I have been seeing.  I'm
seeing this only in X, while he sees it on his console, yet I think
the two problems are related.  I've also reworked the patch slightly
to conform to the coding standards of adjacent code.

It is unclear to me if this merely masks the maddening bug that I have
seen, or if this is a real fix.  I typically see the problem when I'm
typing fast in emacs and using lots of motion keys (meta and control).
In either case, my workstation at work again is finally useful with
this patch.

PR:		110681
Submitted by:	URATAN Shigenobu
Approved by: 	re (blanket)
2007-07-25 06:48:33 +00:00
Warner Losh
8a639d8fb6 ums(4) does not work if the mouse defaults to boot protocol. Force
the protocol to be report on each open, but ignore any errors as set
protocol for mice that don't implement the boot protocol can generate
an error.  Evidentally, the Gyration GyroPoint RF Technology Receiver
(Gyration Ultra Cordless) device has this problem.

Submitted by: Eugene M. Kim
PR: 106565
Approved by: re (blanket)
2007-07-25 06:43:06 +00:00
Warner Losh
0e0e91989d Add support for ShanTou ST268 usb nic. This is from a patch for NetBSD
the PR pointed to.  This appears to have been written by Julian Suschlik.

Submitted by: Kuan-Chung Chiu
Obtained from: http://www.nabble.com/Patch-for-udav(4)-t4070804.html
PR: 114860
Approved by: re@ (blanket)
2007-07-24 14:44:23 +00:00
Warner Losh
944f82cd4f Change new Wi-Spy device name to Wi-Spy 2.4x.
Submitted by: Brix Andersen
Approved by: re@ (blanket)
PR: 114807
2007-07-22 18:29:18 +00:00
Warner Losh
9fb43cb678 WISPY added an X.
Approved by: re
2007-07-22 15:59:45 +00:00
Warner Losh
7e23029ae6 Add some additional devices.
Submitted by: HPS hselasky at c2i dot net
Approved by: re (blanket)
2007-07-22 03:45:35 +00:00
Sepherosa Ziehau
733ab6b6c8 Correct RSSI calculation.
Noticed by: Hans Petter Selasky <hselasky@c2i.net>
Approved by: re (kensmith), sam (mentor)
2007-07-17 11:27:57 +00:00
Warner Losh
36fef1500d Add additional product id and quirks entry for MetaGeek Wi-Spy
Submitted by: Robert Noland
PR: 114481
Approved by: re@ (blanket)
2007-07-10 21:00:10 +00:00
Warner Losh
2f33a9032b Missed in last commit: add usb task for rue to use for its ticks.
Approved by: re (bmah)
2007-07-09 20:56:39 +00:00
Warner Losh
f129c7fd08 When all the other drivers were converted to scheduling a taskqueue to
do the heavy lifting of the 'mii_tick' function, rue was left behind.
Implement this in a naive way.  Reports from the field show this makes
the driver functional with some locking issues, as opposed to an
instant panic.  Those will be addressed in a later version of the
driver.

Approved by: re@ (bmah)
2007-07-09 16:58:07 +00:00
Warner Losh
bb900be1fe Fix duplicates that crept in at the last minute :-(.
Noticed by: Ian Freislich
Approved by: re@ (blanket)
2007-07-09 14:26:08 +00:00
Warner Losh
66807691fe Further diff reduction against the proposed merged usbdevs: Add a few
more vendors, use slightly more standardized names.

No md5 chagnes for !USBVERBOSE kernels

Approved by: re@ (blanket)
2007-07-09 06:20:07 +00:00
Warner Losh
dc950f0469 More vendors from the merged list.
Sort NETGEAR list per convention.
Swap QUALCOMM and QUALCOMM2.
Add a few vendor products.

no md5 changes with this file (except when USBVERBOSE is enabled)

Approved by: re@ (blanket)
2007-07-09 05:47:32 +00:00
Warner Losh
f1d2cc831c Trivial differences with the proposed merged BSD usbdevs file merged
in.  These are exclusively in the name of the company for this round.
No new devices have been added, but the MITEL entry has been
eliminated because nothing uses it.  You won't see any difference
unless you have USBVERBOSE defined for the kernel.

Approved by: re@ (blanket)
2007-07-06 20:05:39 +00:00
Warner Losh
56f6c2d8fa uhub already does the printing and naming of a device, so don't do it
again here for compat drivers.

Approved by: re@ (blanket)
2007-07-06 20:02:37 +00:00
Warner Losh
05adc69b08 Prefer device_printf to printf + device_get_nameunit. This saves
about 100 bytes.

Approved by: re (blanket)
2007-07-05 15:25:32 +00:00
Warner Losh
d9c12353bf Prefer device_printf to printf("%s: ...", device_get_nameunit()). On
amd64, we save about 240 bytes (this is about 20 per instance).

Approved by: re (blanket)
2007-07-05 06:42:14 +00:00
Warner Losh
96e0645dd4 Prefer device_printf to printf("%s:...", device_get_nameunit(),...);
This saves ~300 bytes for uvscom.c and ~100 for uvisor.c

Approved by: re (blanket)
2007-07-05 06:28:46 +00:00
Warner Losh
8705c3d30b Add quirks, derived from the linux quirks table for:
o Adonics Cable 205
o Aiptek PocketCAM 3Mega
o Belkin USB2SCSI
o Casio QV DigiCam
o CCYU EasyDisk ED1064
o Desknote UCR-61S2B
o Epson Stylus Photo 875DC Card Reader
o Epson Stylus Photo 895 Card Reader
o Feiya 5-in-1 Card Reader
o Hitachi Dvd-CAM DZ-MV100A Camcorder
o HP CD-WRiter+ CD-4e
o Insystem Storage Adapter v2
o Kyocera Finecam S3x
o Kyocera Finecam S4
o Kyocera Finecam S5
o Kyocera Finecam L3
o Lexar USB CF Reader
o MindAtWork Digital Wallet
o Minolta Dimage F300
o Minolta Dimage E223
o Minsumi USB Fdd
o Netac USB-CF-Card
o NetChip USB Clik! 40
o Onspec MDCFE-B USB CF Reader
o Onspec SIIG/Datafab Memory Stick + CF Reader/Writer
o Onspec Datafab-based Reader
o Onspec PNY/Datafab CF+SM Reader
o Onspec SimpleTech/Datafab CF+SM Reader
o Onspec MDSM-b Reader
o Onspec USB To CF + SM Combo (LC1)
o Onspec ImageMate SDDR55
o Panasonic LS-120 Camera
o Samsung Techwin Digimax 410
o Shuttle eUSB SmartMedia / CompactFlash Adapter
o Skanhex MD 7425 Camera
o Skanhex SX 520z Camera
o Sony Memorystick NW-MS7
o Sony Portable USB Hardrive V2
o Sony Memorystick PEG N760c
o Sony Memorystick MSC-U03
o TREK/IBM USB memory key
o Trumpion T33520 USB Flash Card Controller
o Trumpion MP3 Player
o Vivtar Vivicam 35Xx
o WinMaxGroup USB Flash Disk 64M-C
o Zoran Digital Camera EX-20 DSC

and maybe a few others...

Submitted by: Vaidas Damosevicius and flz
PR: 79893
Reviewed by: njl, flz
Approved by: re (blanket)
2007-07-05 05:26:08 +00:00
Warner Losh
e196c772a8 Add support for Western Digital MyBook external enclosures. They need
this quirk to work.

Submitted by: Dierk Sacher
PR: usb/99419
Approved by: re (blanket)
2007-07-05 04:05:51 +00:00
Warner Losh
bf21ee8d91 WD Firewire/USB Combo hangs under load on USB interface. Fix with
these quirks.

Submitted by: John Pettitt
PR: 79140
Approved by: re@ (blanket)
2007-07-02 04:55:56 +00:00
Warner Losh
c78c2f1bd2 Fix two more PRs:
(1) Add size parameter to usbd_get_string()
(2) Properly limit speed when a full speed hub is plugged into a high
    speed hub.

Submitted by: Hans Petter Selasky
PR: 80773, 79725
Approved by: re@ (kensmith)
2007-06-30 20:18:44 +00:00
Warner Losh
1371adb3ca Additional devices from NetBSD and OpenBSD. This includes devices not
yet supported by this driver.  Support will be committed soon, or a
filter on all the 'newer' devices will be installed before the
release.

Approved by: re@ (blanket)
Obtained from: NetBSD, OpenBSD
Small Furry Animals by: Pink Floyd
2007-06-30 20:08:08 +00:00
Warner Losh
ad416b7abe umass quirk: Samsung YP-U2 USB MP3/Ogg Player
Submitted by: Ulrich Spoerlein
PR: 114154
Approved by: re@ (blanket)
2007-06-30 14:53:44 +00:00
Warner Losh
439ebffe8d quirk for CENTURY EX35QUAT disk enclosure
Submitted by: Daniel Hartmeier
PR: 94132
Approved by: re (blanket)
2007-06-30 04:58:35 +00:00
Warner Losh
a72de103a1 Fix cheapy Myson USB-IDE adapter
Submitted by: Arno J. Klaassen
PR: 88939
Approved by: re@ (blanket)
2007-06-30 04:42:29 +00:00
Warner Losh
006bd3063f Expand the transform API to allow transports to return 'success' for
the command.  Make UFI devices return 'success' when asked to do a
SYNC_CACHE.  There's no support for write caching in the UFI spec, so
this is the most appropriate action to undertake.

Reviewed by: scottl
Approved by: re@ (blanket)
2007-06-30 02:50:57 +00:00
Warner Losh
5d3558fcac Reduce diffs to OtherBSD by using usb_lookup. No functional changes.
Approved by: re@ (Blanket)
2007-06-30 02:42:36 +00:00
Warner Losh
4524d0b678 Remove duplicate USBDEVUNIT #define
Approved by: re@ (blanket)
2007-06-30 02:41:29 +00:00
Warner Losh
0d5a50d6bf Add definition for UIPROTO_MOUSE.
Approved by: re@
2007-06-30 02:40:21 +00:00
Warner Losh
ea36be213c Update to merged names for things. No functional changes.
Approved by: re (blanket)
2007-06-30 02:35:42 +00:00
Warner Losh
3995a80fd6 Add support for various MS Wirless usb mice. the patch is from
Hellmuth with some refinements by myself and flz@.  It works for me
with my non-MS mice, so nothing should be broken by it.

Submitted by: Hellmuth Michaelis
PR: 90162
Approved by: re (blanket)
2007-06-29 21:07:41 +00:00
Warner Losh
57c02fd548 Change uhub to dynamic status size for status change endpoint. From a
pr, the submitter says:

	Found this while running freebsd as guest in qemu with -usb
	parameter. The patch implements the missing dynamic size based on
	number of ports a hub has.

Submitted by: Lonnie Mendez
PR: 94946
Approved by: re@ (blanket)
2007-06-29 20:34:42 +00:00
Warner Losh
9729910999 The timeout is in milliseconds, not in hz. Only the portion of the
patch that converts ms to ticks was used.  Another PR states that a
return code of 0 is the right one for libusb.

Submitted by: Lonnie Mendez
PR: 94311
Approved by: re (blanket)
2007-06-28 06:22:40 +00:00
Warner Losh
e9da08f2eb With the advent of G3/CDMA modems, the old buffer sizes are no longer
adequate.  Increase them to 1k.  The referenced PR made this a sysctl,
but that seems like overkill to me.  The difference between 320 and
2048 bytes in modern systems, even embedded ones, seems to be in the
noise to be worth the extra hair to make it settable.

PR: 74609
Submitted by: Divacky Roman
Approved by: re (blanket)
2007-06-28 05:50:14 +00:00
Warner Losh
dc0c82bc3f For both interrupt and isochronous (the patch was unclear which one it
applied to, but I'd think both), honor the timeout that's been set.
Return 0 bytes to be consistant with what libusb expects.  By default,
the timeout will be zero, so only applications that change the default
will see a change.  The patch only seems to apply to the interrupt end
points, but it should also apply to isochronous endpoints as well.

Submitted by: Maurice Castro
PR: 110122
Approved by: re (blanket)
2007-06-28 05:15:33 +00:00
Warner Losh
67c4e28638 Partially updated usbdevs from OpenBSD's usbdevs. Also, some sorting
of the file numerically for vendors and then each product numerically
by vendor (with all the foo2's sorting after the foo's).  Someday, all
the usbdevs will be merged, I hope, but until then, we have these
mega-merges.

This also finishes the LINKSYS4 -> CISCOLINKSYS rename.

Approved by: re@ (blanket)
2007-06-26 05:29:27 +00:00
Warner Losh
b19eb2f4c1 LINKSYS4 is going to be going away. Migrate to CISCOLINKSYS instead.
There is no md5 delta for this change.

Approved by: re@ (blanket)
2007-06-25 20:51:58 +00:00
Warner Losh
5acfdb129b Starting in version 1.56, ucomstop started calling ucomstart to work
around an output freezing problem (see the CVS log for details).  This
is the same approach that sio takes to solve that problem.  However,
ucom has a problem that sio doesn't have.

Consider the case where output is pending, and the device is closed.
ttyclose calls tt_close (which indirects to ucomclose) and then calls
ttyflush which calls tt_stop (which indirects to ucomstop).  Since
ucomclose removed all the usb transfer points, sc_oxfer will be NULL
when ucomstop calls ucomstart.  This results in a null pointer
dereference.

Since calling ucomstart in ucomstart solves other problems, we need to
work with this calling sequence.  The easiest way to do that is to
bail early if sc_oxfer is NULL.

Kazuaki ODA-san came up with this patch, and filed a PR.  I had seen
this bug at work and this patch does seem to solve it.  He had no idea
why it worked, but knew that either this patch, or backing out ucom.c
1.56 fixed his panic.  I just did the legwork of chasing down the code
paths that would cause this, and added a comment.  This is obscure
enough to warrant a comment, I think.

Submitted by: Kazuaki ODA-san
PR: 113964
Approved by: re (bmah)
2007-06-25 06:40:20 +00:00
Warner Losh
a272617c67 For USBVERBOSE case, we can't have " in any of the names.
Submitted by:  Flemming Jacobsen
Approved by: re (blanket)
2007-06-23 16:50:46 +00:00
Warner Losh
aca96341db Drag in another device: The Surecom RT2570.
Obtained from: OpenBSD
Approved by: re@ (blanket for device IDs)
2007-06-23 06:52:56 +00:00
Warner Losh
0b204f9c17 Add a boatload of devices from OpenBSD and NetBSD to kue and cdce.
Obtained From: OpenBSD/NetBSD
Approved by: re (blanket)
2007-06-23 06:47:43 +00:00
Warner Losh
2de4b931b6 Note the Belkin F5U111 Adapter is covered by NETMATE entry.
Approved by: re (blanket)
2007-06-23 06:29:19 +00:00
Warner Losh
cea0228c56 Remove duplicate ID and recall that I comes after E in alphabetical
listings.

Approved by: re@
2007-06-23 05:59:53 +00:00
Warner Losh
1331348cb7 Merge some device IDs from OpenBSD for aue. Minor sorting of usbdevs
to fix disorder.

Obtained from: OpenBSD
Approved by: re@ (blanket)
2007-06-23 05:52:12 +00:00
Warner Losh
fbd57cc069 We need a special module loader routine, not the stock usbd one. This
also eliminates a routine unused message.

Submitted by: mjacob
Approved by: re@
2007-06-23 04:20:24 +00:00
Warner Losh
78f3413f0c Initialize id before using it.
Submitted by: mjacob
Approved by: re@
2007-06-23 04:18:44 +00:00
Warner Losh
c199bfa6cb Add support for Garmin iQue 3600
Submitted by: Lapo Luchini
PR: 113324
Approved by: re (kensmith, blanket)
2007-06-22 06:02:19 +00:00
Warner Losh
30d52b75e4 add support for Option GlobeTrotter 3G+
(PR says this may be from OpenBSD)

Submitted by: Simun Mikecin
PR: 111710
Approved by: re (kensmith, blanket)
2007-06-22 05:56:05 +00:00
Warner Losh
e5be70a464 Tactrix Openport support
Submitted by: Jonathan Charest
PR: 110992
Approved by: re (kensmith, blanket)
2007-06-22 05:53:05 +00:00
Warner Losh
54a25dd338 add Benq 3300U/4300U support
Submitted by: Denis Sadykov
PR: 110477
Approved by: re (kensmith, blanket)
2007-06-22 05:49:12 +00:00
Warner Losh
dffc4a655f Crystalfontz CFA-635 20x4 USB LCD
(plus minor sorting)

Submitted by: John Wilson
PR: 107526
Approved by: re (kensmith, blanket)
2007-06-22 05:44:41 +00:00
Warner Losh
c0a4ed889c Update uvisor to support the Fossil Abacus Wrist PDA
Submitted by: Simon Dick
PR: 96714
Approved by: re (kensmith, blanket)
2007-06-22 05:33:20 +00:00
Warner Losh
b1aafdf7af USB Ethernet Adaptor "ELECOM LD-USB20"
PR: 86195
Submitted by: kato <redzonemiata@yahoo.co.jp>
Approved by: re (kensmith)
2007-06-22 05:20:11 +00:00
Warner Losh
21bf93883e USL101 Host-to-Host bridge support
PR: 82436
Submitted by: Maxim M. Kazachek
Approved by: re (kensmith)
2007-06-22 05:14:27 +00:00
Warner Losh
638c640a71 Add support for YANO external USB-HDD.
Submitted by: Norihiro TANAKA
PR: 94742
Approved by: re (kensmith blanket)
2007-06-21 20:13:07 +00:00
Warner Losh
c2861c84f6 Fix two PRs by adding vendor IDs:
PR 108097: ADMtek 851X USB-to-LAN adapter
PR 74849: Samsung SPH-i500 does not attach properly as usb modem/Palm device

PR: 108097, 74849
Approved by: re@ (kensmith trivial usb blanket)
2007-06-21 17:55:28 +00:00
Warner Losh
bbc84740c1 Latest round of usb cleanups:
o Consistently use device_foo_t and bus_foo_t for functions implementing
  device_foo and bus_foo respectively.  Adjust those routines that were wrong
  (we should do this throughout the tree).
o make all the modules depend on usb.  Otherwise these modules won't
  load.
o ucycom doesn't need usb_port.h
o Minor unifdefing
o uhub, umass, ums, urio, uscanner conversion complete.
o ukbd: Remove the NO_SET_PROTO quirk (fixes a PR 77940).  NetBSD removed
  their check and setting the proto a long time ago.
o umodem panic fixed.  UQ_ASSUME_CM_OVER_DATA quirk removed because I've never
  seen a umodem that needed this rejection for proection (this gets rid of
  ~20% of the quirks).

Approved by: re@ (kensmith)
PR: 77940
2007-06-21 14:42:34 +00:00
Warner Losh
cb198db63b Restore approximately FreeBDS 6.x's level of compatibility macros.
Older drivers that do not wish to convert to the native API (which
will work with both 6.x and 7.x) can simply include
<dev/usb/usb_port.h>.  Drivers in the tree shouldn't these macros,
unless they actually work on other OSes and are actively maintained.

Approved by: re@
2007-06-21 14:36:22 +00:00
Warner Losh
7bd250d818 s/logprintf/printf/g
Approved by: re@
2007-06-20 05:11:37 +00:00
Xin LI
b76d072be1 Include usb_port.h to fix build.
Reported by:	tinderbox
Approved by:	re (mux)
2007-06-19 10:28:08 +00:00
Warner Losh
c8222a9830 Mark the few remaining drivers that haven't been converted as needing
usb_port.h by explicitly including it.
2007-06-18 22:32:09 +00:00
Warner Losh
3f35ccb617 Expand usb_port macros 2007-06-18 22:31:35 +00:00
Warner Losh
34f7cf9af5 Remove usb_port.h from usb.h, except for one or two useful things that
don't belong there (these moved into usb.h).
2007-06-18 22:30:53 +00:00
Warner Losh
bd6bb69705 Expand usb_port.h macros. 2007-06-18 22:30:08 +00:00
Warner Losh
70c1d26317 Expand usb_callout_init 2007-06-18 22:28:32 +00:00
Warner Losh
70f16d924f Finish removal of usb_port.h macros. 2007-06-18 22:27:57 +00:00
Warner Losh
a5509ec848 Use device_foo_t to declare kobj methods
Fix shutdown type to return int rather than void.
2007-06-18 22:25:46 +00:00