Commit Graph

2137 Commits

Author SHA1 Message Date
Andrew Thompson
2b78d30630 Remove the uscanner(4) driver, this follows the removal of the kernel scanner
driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and
contained no logic, the default interface is now libusb (supported by sane).

Reviewed by:	HPS
2009-03-19 20:33:26 +00:00
Renato Botelho
102bad657b - Add Sun Type 7 keyboard
- Rename Type 6 entry (following NetBSD)
- Add Sun Type 7 Keyboard USB Hub

PR:		usb/132811
Reviewed by:	thompsa
Approved by:	thompsa
2009-03-19 17:16:33 +00:00
Andrew Thompson
7214348f57 MFp4 //depot/projects/usb 159225,159241,159292
Fix regression issue in the USB file system interface.
 - Use cdev_privdata pointer as indicator of correct file handle.
 - Remove redundant FIFO opened flags.

Don't send ZLP at close for ulpt and uscanner devices as this causes some
models to stop working. This reverts back to the USB1 behaviour.

Submitted by:	Hans Petter Selasky
2009-03-17 01:46:40 +00:00
Andrew Thompson
39fcd91bb5 MFp4 //depot/projects/usb 159238,159275
Add umass quirks.

Submitted by:	Michael Gmelin
2009-03-17 01:42:46 +00:00
Andrew Thompson
d3db083bcc Add Supertop IDE adapter and Quickcam entries. 2009-03-17 01:38:51 +00:00
Andrew Thompson
3f67dc0f46 HID usage minimum can be equal to the maximum.
Submitted by:	Hans Petter Selasky
Tested by:	Andreas Tobler
2009-03-13 22:28:37 +00:00
Andrew Thompson
46364b29a8 MFp4 //depot/projects/usb 159004,159053,159091
More HID parsing fixes for usb mice.
 - be less strict on the last HID item usage.
 - preserve item size and count accross items
 - improve default HID usage selection.

Tested by:	ache
Submitted by:	Hans Petter Selasky
2009-03-12 02:32:54 +00:00
Andrew Thompson
d59dbd0a3d MFp4 //depot/projects/usb 158981,159016,159024
Sync support for ATMEGA DCI parts.

Submitted by:	Hans Petter Selasky
2009-03-11 04:58:21 +00:00
Andrew Thompson
1be5bf51d3 Fix a possible NULL pointer access at controller attach.
Submitted by:	Hans Petter Selasky
2009-03-11 04:56:30 +00:00
Andrew Thompson
b1e14b53e3 Make sure HID has a default usage, this fixes recent mouse problems.
Tested by:	Renato Botelho
Tested by:	beech (earlier version)
Submitted by:	Hans Petter Selasky
2009-03-10 19:35:41 +00:00
Andrew Thompson
0f6e8f934f MFp4 //depot/projects/usb 158942,158948
Allow USB to be compiled without ugen support.

Submitted by:	Hans Petter Selasky
2009-03-09 20:08:08 +00:00
Andrew Thompson
07bf38d7cf Fix musb_otg.h include filename.
Submitted by:	Hans Petter Selasky
2009-03-09 20:05:46 +00:00
Andrew Thompson
bf87f556ac MFp4 //depot/projects/usb@158916
USB mouse patch to address complicated data reporting descriptors.

Reported by:	Boris Kotzev
Submitted by:	Hans Petter Selasky
2009-03-09 15:25:46 +00:00
Warner Losh
155a83e87a remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
Andrew Thompson
da6c1373fa MFp4 //depot/projects/usb@158868
Fix bugs and improve HID parsing.
- fix possible memory leak found
- fix possible NULL pointer access
- fix possible invalid memory read
- parsing improvements
- reset item data position when a new report ID is detected.

Submitted by:	Hans Petter Selasky
2009-03-08 22:58:19 +00:00
Andrew Thompson
4309a3fb19 MFp4 //depot/projects/usb@158869
Fix sael init code.

Reported by:	Alberto Mijares
Submitted by:	Hans Petter Selasky
2009-03-08 22:55:17 +00:00
Andrew Thompson
75fd0939b4 Move m_getcl() into its own function. This also fixes a bug where the m_adj for
ETHER_ALIGN was having no effect since m_len had not been set.
2009-03-08 06:56:13 +00:00
Andrew Thompson
36002e92e9 Fix endian conversion from htole16 to htole32.
Tested with:	ARM xscale
2009-03-08 06:03:28 +00:00
Andrew Thompson
e55e1ebc35 (re)merge r186415,186416 from the old usb stack;
o add Transaction Translator support (still missing ISOC xfers)
o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be
  set in USBMODE
o split reset work into new public routine ehci_reset so bus shim drivers
  can force big-endian byte-select before ehci_init
o enable TT and big-endian MMIO
o force a reset before ehci_init to get byte-select setup

Also go back to using USB_EHCI_BIG_ENDIAN_DESC at compile time to enable the
byteswapping and reduce diffs to the original commits.

This fixes the new USB stack on the Cambria board.
2009-03-07 19:49:47 +00:00
Andrew Thompson
5f1286689c Fix some missed htole32 conversions to htoehci32.
Reviewed by:	hps
2009-03-07 18:08:59 +00:00
Andrew Thompson
d1864afbac MFp4 //depot/projects/usb@158692
Workaround a EHCI performance problem by issuing a doorbell after queueing a
bulk xfer.

Submitted by:	Hans Petter Selasky
2009-03-06 17:13:12 +00:00
Andrew Thompson
d953f72075 Ensure the cached rq pointer is still valid before waking up the address, the
zyd_cmd function may have timed out. It wouldnt cause a panic but could wakeup
someone.

Spotted by:	HPS
2009-03-06 17:04:47 +00:00
Joerg Wunsch
bbb39ba587 Add a couple of more things to the FTDI driver I came across:
. Dresden Elektronik "Wireless Handheld Terminal"
. Atmel STK541 "Zigbee Controller"

MFC after:	1 week
2009-03-06 14:53:51 +00:00
Andrew Thompson
8a93629e41 Fix usb2_poll not to return an error number as the function return value is a
bitmask of events.

Pointed out by:	HPS
2009-03-05 19:20:17 +00:00
Andrew Thompson
c3beab6ac5 Add support for the UNION interface descriptor, used by Nokia phones.
PR:		usb/117185
2009-03-05 16:15:07 +00:00
Andrew Thompson
dc4b1d1662 Add Mobile Action MA-620 Infrared Adapter.
PR:		usb/125072
Submitted by:	Alexander Logvinov
MFC after:	1 week
2009-03-04 03:47:57 +00:00
Andrew Thompson
9aef556d71 Rename the ushub device class back to uhub as it was in the old usb stack,
moused(8) looks for "uhub/ums" to decide if needs to load the module.

Reported by:	Garrett Cooper
2009-03-02 05:37:05 +00:00
Andrew Thompson
deefe58337 Move the serial drivers from Giant to using their own mutexs.
Tested with:	u3g, ubser, uplcom
2009-03-02 02:44:10 +00:00
Andrew Thompson
f35aaff035 A couple of style nits in the last commit
- unwrap short lines
 - move variable initialisation out of the declaration.
2009-02-28 17:20:00 +00:00
Andrew Thompson
f5f145ba07 - Remove the usb interface number from the device nodes as it is not needed.
- Do not recreate the device nodes in set_alt_interface as the endpoints do not
  change.

Submitted by:	Hans Petter Selasky
2009-02-28 17:14:03 +00:00
Andrew Thompson
50230f983b Change the last references to PRIV_ROOT. /dev/usb used to be world writable so
further root checks were needed, this isnt the case anymore but just change it
to PRIV_DRIVER until it can be investigated later.

Spotted by:	rwatson
2009-02-27 22:12:15 +00:00
Andrew Thompson
a09d8d7315 Remove ic_update_mcast calls that are not implemented.
Spotted by:	sam
Pointy hat:	me
2009-02-27 21:50:15 +00:00
Andrew Thompson
77ddf3d34a Partial sync to //depot/projects/usb
- Reissue the ctrl request on failure
- Ensure Tx and ctrl requests are not interleaved
- Add promisc callbacks

Obtained from:	Hans Petter Selasky
2009-02-27 21:14:29 +00:00
Andrew Thompson
ee3e3ff5c2 Change USB over to make_dev() for all device nodes, previously it hooked into
the devfs clone handler to open the (invisible) devices on the fly.

The /dev entries are layed out as follows,

 /dev/usbctl      = master device
 /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>)
 /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint

This also removes the custom permissions model from USB.  Bump
__FreeBSD_version to 800066.

Submitted by:	rink (earlier version)
2009-02-27 17:27:16 +00:00
Ed Schouten
5d38a4d4f7 Also use proper capitalisation of FreeBSD in other source files.
Approved by:	thompsa
2009-02-24 17:15:29 +00:00
Ed Schouten
4b0af1dacc Use my address of the FreeBSD project in the copyright statement in USB2.
If I remember correctly, our policy was to use FreeBSD with proper
capitalisation in our email addresses. Fix this in Nick Hibma's address
as well.
2009-02-24 17:10:43 +00:00
Andrew Thompson
750a268260 MFp4 //depot/projects/usb@158015
Add support for the Sael M460 3G modem.

Submitted by:	Hans Petter Selasky
2009-02-24 05:35:48 +00:00
Andrew Thompson
6c9cef576c Fix compiler warning. 2009-02-24 04:16:19 +00:00
Andrew Thompson
f78fa6b67e MFp4 //depot/projects/usb@157974
Add support for setting and getting the USB template value through libusb20 and
usbconfig.

Submitted by:	Hans Petter Selasky
2009-02-24 03:43:05 +00:00
Andrew Thompson
e280503373 MFp4 //depot/projects/usb@157958
- We don't need to exit the Giant mutex when sleeping. This is done
  automatically. Replace Giant by NULL mutex for all control requests in the
  enumeration path.
- Optimise away duplicate alternate interface selection requests in USB Host
  mode.

Submitted by:	Hans Petter Selasky
2009-02-24 03:41:52 +00:00
Andrew Thompson
16589bea5b MFp4 //depot/projects/usb@157909
Changes to make implementing USB NDIS easier.

Submitted by:	Hans Petter Selasky
2009-02-24 03:40:48 +00:00
Andrew Thompson
4a35cda731 MFp4 //depot/projects/usb@157853
Clean up old way of polling the USB hardware.  The existing polling support was
a bit hackish.

Submitted by:	Hans Petter Selasky
2009-02-24 03:39:13 +00:00
Andrew Thompson
bce32d7bc4 MFp4 //depot/projects/usb@157847
Improvements to "usb2_transfer_setup()" and "usb2_transfer_unsetup()". Set
"ppxfer[n]" when the transfer setup is complete to prevent races.  Remove
redundant NULL-checks from "usb2_transfer_unsetup()".

Submitted by:	Hans Petter Selasky
2009-02-24 03:38:24 +00:00
Andrew Thompson
3e5e312a28 MFp4 //depot/projects/usb; 157814, 157863, 157868
- The software computed HID size is not always correct, because the algoritm
  does not handle unsorted HID descriptors.
- Change the way we obtain the report ID.
- Use the X/Y/Z+button locations instead for report ID source for ums.
- Add more range checks.
- Remove Microsoft Mouse quirks. If the positions are moduloed the report
  length multiplied by 8, the values seem correct.
- Some minor style changes.

Submitted by:	Hans Petter Selasky
2009-02-24 03:34:05 +00:00
Andrew Thompson
96ca458f65 Make sure at least two tx slots are free before sending the mbuf since an
additional frame may be sent for 80211 protection.
2009-02-23 23:46:56 +00:00
Andrew Thompson
3a3f90c6c3 Move the uaudio and ata-usb drivers into their correct locations. 2009-02-23 21:19:18 +00:00
Andrew Thompson
d7e3163d8c Reintroduce r188878, provide compat typedefs for usb1. 2009-02-23 19:06:47 +00:00
Andrew Thompson
02ac645488 Move the new USB stack into its new home. 2009-02-23 18:31:00 +00:00
Andrew Thompson
3975e3a1ea Move usb to a graveyard location under sys/legacy/dev, it is intended that the
new USB2 stack will fully replace this for 8.0.

Remove kernel modules, a subsequent commit will update conf/files. Unhook
usbdevs from the build.
2009-02-23 18:16:17 +00:00
Nick Hibma
63573f79e2 Add support for CMOTECH devices (not sure whether this is the correct
name) (not sure whether this works correctly, but should be close).

Fix the stub attach phase for some Novatel cards. They expect the CSW
(repsonse to CBW, SCSI eject command) to be fetched before switching to
modem mode.

MFC after:	2 weeks
2009-02-13 19:49:51 +00:00