Commit Graph

2476 Commits

Author SHA1 Message Date
Andrew Thompson
5b3bb704f7 Use a more obvious prefix for the USB control (endpoint 0) transfers rather
than default_*.
2010-04-22 22:15:08 +00:00
Andrew Thompson
91cd92400f Properly name the sxlocks, mutexes and condvars. 2010-04-22 22:00:16 +00:00
Andrew Thompson
0d92ac2a92 Use SX_DUPOK rather than making the string unique. 2010-04-22 21:41:50 +00:00
Andrew Thompson
b850ecc180 Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
the illusion of a tunable setting but was always turned on regardless.

MFC after:	1 week
2010-04-22 21:31:34 +00:00
Andrew Thompson
6639021699 Also add the usb mode to the devd string as the usb controller can work in both
host or device (gadget) modes.

Suggested by:	HPS
2010-04-21 23:03:26 +00:00
Andrew Thompson
3acd904d85 Change usb devd events from fake attach to a notify. The ugen device is not a
proper device_t so it faked the devctl event to appear like one, this is now a
notify which allows more information to be passed.

We notify for both the device attach/detach and for each usb interface. A devd
rule can now match on the interface properties, including composite devices
which may have a uvideo interface and also usound and possibly uhid too.

An example to match a umass device with a scsi subclass and BBB protocol would be

notify 100 {
	match "system"          "USB";
	match "subsystem"       "INTERFACE";
	match "type"            "ATTACH";
	match "intclass"        "0x08";
	match "intsubclass"     "0x06";
	match "intprotocol"     "0x50";
	action ...
};

The old attach devctl event has been retained for the moment to make merging to
8.1 easier. This was never compatible with 7.x or earlier due to the ugen regex
change needed.

Reviewed by:	warner
MFC after:	1 week
2010-04-21 21:51:14 +00:00
Gavin Atkinson
2d8d6ee437 Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local
(almost identically named) local #define.

Reviewed by:	hselasky
2010-04-14 22:03:48 +00:00
Kevin Lo
547f27959b Eliminate duplicate comment 2010-04-14 07:07:43 +00:00
Kevin Lo
cc552e7ed9 The Quanta Q101 modem has a different type of cdrom driver disk,
add the product id and use a standard scsi eject.

Reviewed by:	thompsa
MFC after:	3 days
2010-04-13 06:27:02 +00:00
Rui Paulo
ddc7073258 Remove previously added if 0's.
MFC after:	1 month
2010-04-09 11:56:38 +00:00
Rui Paulo
a31532b4ad Remove debugging code that snuck in. 2010-04-07 17:48:13 +00:00
Rui Paulo
b6108616ac net80211 rate control framework (net80211 ratectl).
This framework allows drivers to abstract the rate control algorithm and
just feed the framework with the usable parameters. The rate control
framework will now deal with passing the parameters to the selected
algorithm. Right now we have AMRR (the default) and RSSADAPT but there's
no way to select one with ifconfig, yet.
The objective is to have more rate control algorithms in the net80211
stack so all drivers[0] can use it. Ideally, we'll have the well-known
sample rate control algorithm in the net80211 at some point so all
drivers can use it (not just ath).

[0] all drivers that do rate control in software, that is.

Reviewed by:	bschmidt, thompsa, weyongo
MFC after:	1 months
2010-04-07 15:29:13 +00:00
Andrew Thompson
b4eb1a01cf Do not sync cache for the PL2506
PR:		usb/144915
Submitted by:	Monty Hall
2010-03-28 20:09:04 +00:00
Andrew Thompson
9e5d4aec14 Do not swap Apple keys when detecting Apple-FN keyboards.
Reported by:	Steven Noonan
Submitted by:	Hans Petter Selasky
2010-03-28 20:07:08 +00:00
Andrew Thompson
79491ae837 Make sure the bsd_urb_list gets initialised and that new URB's are queued at
the end of the list.

Submitted by:	Hans Petter Selasky
2010-03-28 20:04:03 +00:00
Andrew Thompson
4a4bd31b44 Add PCI IDs for two more nForce controllers.
Submitted by:	Dmitry Luhtionov @ gmail.com
2010-03-28 20:02:50 +00:00
Andrew Thompson
208f52dae6 Add a couple of usb product IDs.
Submitted by:	Dmitry Luhtionov @ gmail.com
2010-03-28 20:02:13 +00:00
Alexander Leidinger
2ac4d1f92f - add some usb devices (scanner, printer, usb storage)
- add quirks for the usb storage

Reviewed by:	hselasky
2010-03-26 11:02:01 +00:00
Warner Losh
30e980f2d1 Add support for the Samsung S3C2xx0 family of ARM SoCs written by
Andrew Turner.  The kernel supports the LN2410SBC evaluation board,
and likely others.  These parts (or similar ones) are in some open
hardware designs for phones.

Submitted by:	Andrew Turner
2010-03-20 03:39:35 +00:00
Andrew Thompson
f03fdead6f Add device ID for the NATURAL4000 keyboard 2010-03-11 22:09:21 +00:00
Andrew Thompson
3707a5e930 - Integrate latest driver code from OpenBSD
- Drain our tasks from the ieee80211 taskqueue
- Add more IDs

Submitted by:	Akinori Furukoshi
2010-03-11 22:05:12 +00:00
Andrew Thompson
abaa9bfe96 extend search for Apple Function Key.
PR:		usb/144414
Submitted by:	Hans Petter Selasky
2010-03-11 21:57:01 +00:00
Andrew Thompson
3fed7cb2bd Add new device ID for the SMC 2514HUB
Submitted by:	Alexander Best
2010-03-11 21:55:25 +00:00
Andrew Thompson
5914c5bf3a add new vendor ID for APACER
Submitted by:	Paul B Mahol
2010-03-11 21:54:23 +00:00
Andrew Thompson
a7aca4cd92 Implement USB kernel driver detach from userland.
Submitted by:	Hans Petter Selasky
2010-03-11 21:50:36 +00:00
Andrew Thompson
3f6c7805b4 Make sure there is a way to reset the endpoint FIFO on transfer errors for
ISOCHRONOUS transfers

Submitted by:	Hans Petter Selasky
2010-03-11 21:49:43 +00:00
Andrew Thompson
6703f98c02 For USS820 driver we need to manually reset TX FIFO at each SETUP transaction
because the chip doesn't do this by itself.

Submitted by:	Hans Petter Selasky
2010-03-11 21:49:00 +00:00
Andrew Thompson
6a268418dc isochronous endpoint descriptors should have two more bytes which are zero by
default.

Submitted by:	Hans Petter Selasky
2010-03-11 21:48:10 +00:00
Andrew Thompson
3e4af77774 Add new uvisor(4) device ID.
PR:		usb/144201
2010-03-11 21:47:25 +00:00
Andrew Thompson
8366b369e4 It appears that some UVISOR devices do not handle when the clear stall command
is issued at the beginning of the initial IN/OUT data transfers.  Reason
unknown, probably firmware fault. Now the stall is only cleared on data
transfer errors.

PR:		usb/144199
Submitted by:	Hans Petter Selasky
2010-03-11 21:46:33 +00:00
Andrew Thompson
9a8e0122d2 - make the usb_temp_setup() and usb_temp_unsetup() functions public so that
other modules can generate USB descriptors.
- extend the vendor specific request function by one length pointer argument,
  because not all descriptors store the length in the first byte. For example
  HID descriptors.

Submitted by:	Hans Petter Selasky
2010-03-11 21:45:31 +00:00
Andrew Thompson
8817f29901 Use wMaxPacketSize for the uftdi input buffer size.
Submitted by:	Hans Petter Selasky
2010-03-11 21:42:09 +00:00
Andrew Thompson
ea67d33c62 Reapply r185998 which was overwritten at some point. 2010-03-11 20:41:21 +00:00
Andrew Thompson
f0c078e6e0 Wrap the proc wakeup special case for ddb in ifdef DDB.
Submitted by:	Giovanni Trematerra
2010-03-11 08:33:39 +00:00
Joel Dahl
7e4b1c0608 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-03 10:18:03 +00:00
Andrew Thompson
8bbbf173a2 Add device ID for the FTDI 4232H.
PR:		usb/143832
Submitted by:	UEMURA Tetsuya
2010-02-14 20:10:41 +00:00
Andrew Thompson
2386d71421 Add support for the E1752 3G modem and the required eject command.
Submitted by:	Milan Obuch
2010-02-14 20:05:12 +00:00
Andrew Thompson
3e889e246c Make umodem more tolerant for devices which modem descriptors are misplaced.
Reported by:	Erick Wales
Submitted by:	Hans Petter Selasky
2010-02-14 19:59:19 +00:00
Andrew Thompson
b60541a9ec Add UQ_KBD_BOOTPROTO quirk needed in r203896 2010-02-14 19:56:05 +00:00
Andrew Thompson
1bdb81f124 Detect when we are polling from kernel via cngetc() in the boot process and
reserve the keypresses so they do not get passed to syscons.

Submitted by:	Hans Petter Selasky
2010-02-14 19:53:45 +00:00
Andrew Thompson
cf223a88bc Disable the use of the IAAD usb doorbell on NVidia controllers as it can cause
the hardware to stall.

Submitted by:	Hans Petter Selasky
2010-02-09 00:38:40 +00:00
Andrew Thompson
504cfaf891 The ZTE MF633R modem has a different type of cdrom driver disk, add the product
ID and use a standard scsi eject.

Reported by:	Patrick Lamaiziere
MFC after:	3 days
2010-02-05 01:47:43 +00:00
Andrew Thompson
0988266155 Properly name the 0x0016 ZTE product as MF633R now that its known. 2010-02-04 23:34:35 +00:00
Andrew Thompson
2155c5d814 Rework cam error handling to fix Mitsumi floppy drives.
Submitted by:	mav
2010-01-29 02:38:34 +00:00
Andrew Thompson
c2b2c741a0 Simplify attach for UMASS_PROTO_CBI_I mode and change some switch() returns
into breaks.

Submitted by:	Hans Petter Selesky
2010-01-29 02:35:50 +00:00
Andrew Thompson
4d69093fcc Add null check on quirk lookup and add a couple of umass quirks.
Submitted by:	Hans Petter Selesky
2010-01-29 02:33:50 +00:00
Andrew Thompson
dae1952f93 Add the Netgear WPN111 2010-01-29 02:32:46 +00:00
Andrew Thompson
8fa484e2cc Sync usb products to perforce. 2010-01-29 02:32:18 +00:00
Andrew Thompson
0283fab7f0 Attempt to recover on a TX error rather than stopping all transfers.
Submitted by:	Hans Petter Selesky
2010-01-29 02:31:33 +00:00
Andrew Thompson
89119752d0 Optimise EHCI ISOC HS done check.
Submitted by:	Hans Petter Selasky
2010-01-29 01:30:13 +00:00