Commit Graph

1308 Commits

Author SHA1 Message Date
Warner Losh
d1458cfdf4 MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes. 2004-06-27 12:41:44 +00:00
Lukas Ertl
5d4284a178 Catch up with usbd_get_string_desc() change. 2004-06-26 13:21:31 +00:00
Lukas Ertl
35ea382b1a Our softc has no sc_hdev, but a sc_dev. This in turn has no direct
sc_parent, so back out the previous commit, as it breaks the build.

If there's a pointy hat left, pass it on.
2004-06-26 13:12:46 +00:00
Lukas Ertl
5bebcf6d1c MFNetBSD.
uhid.c (1.61), author: jdolecek
   add support for USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctls,
   with same meaning as for ugen(4)

usbdi_util.h (1.29), usb_quirks.c (1.50), uhid.c (1.62),
ugen.c (1.68), usb_subr.c (1.114) author: mycroft
   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.

usb_subr.c (1.116), author: mycroft
    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.

Obtained from:   NetBSD
2004-06-26 10:35:10 +00:00
Poul-Henning Kamp
cb9ea5f4cb Pick the hotchar out of the tty structure instead of caching private
copies.

No current line disciplines have a dynamically changing hotchar, and
expecting to receive anything sensible during a change in ldisc is
insane so no locking of the hotchar field is necessary.
2004-06-26 09:20:07 +00:00
Lukas Ertl
57ceda5d84 MFNetBSD.
ohci.c (1.147), author: mycroft
   Failure to properly mask off UE_DIR_IN from the endpoint address
   was causing OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set
   spuriously, causing rather interesting lossage.

   Suddenly I get MUCH better performance with ehci...

ohci.c (1.148), author: mycroft
   Adjust a couple of comments to make it clear WTF is going on.

Obtained from:   NetBSD
2004-06-26 09:19:31 +00:00
Lukas Ertl
dae4042053 MFNetBSD ehci.c and ehcireg.h
ehci.c (1.55), ehcireg.h (1.16); author: mycroft
     Set the data toggle correctly, and use EHCI_QTD_DTC.  This fixes
     problems with my ALi-based drive enclosure (it works now, rather
     than failing to attach).  Also seems to work with a GL811-based
     enclosure and an ASUS enclosure with a CD-RW, on both Intel and
     NEC controllers.

     Note: The ALi enclosure is currently very SLOW, due to some issue
     with taking too long to notice that the QTD is complete.  This
     requires more investigation.

ehci.c (1.56); author: mycroft
     Failure to properly mask off UE_DIR_IN from the endpoint address
     was causing OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set
     spuriously, causing rather interesting lossage.

     Suddenly I get MUCH better performance with ehci...

ehci.c (1.58); author: mycroft
     Fix a stupid bug in ehci_check_intr() that caused use to try to
     complete a transaction that was still running.  Now ehci can
     handle multiple devices being active at once.

ehci.c (1.59); author: enami
     As the ehci_idone() now uses the variable `epipe'
     unconditionally, always declare it (in other words, make this
     file compile w/o EHCI_DEBUG).

ehci.c (1.60); author: mycroft
     Remove comment about the data toggle being borked.

ehci.c (1.61); author: mycroft
     Update comment.

ehci.c (1.62); author: mycroft
     Adjust a couple of comments to make it clear WTF is going on.

ehci.c (1.63); author: mycroft
     Fix an error in a debug printf().

ehci.c (1.64), ehcireg.h (1.17); author: mycroft
     Further cleanup of toggle handling.  Now that we use EHCI_QH_DTC,
     we don't need to fiddle with the TOGGLE bit in the overlay
     descriptor, so minimize how much we fuss with it.

Obtained from:   NetBSD
2004-06-26 00:52:37 +00:00
Julian Elischer
327b288e5c Convert Netgraph to use mbuf tags to pass its meta information around.
Thanks to Sam for importing tags in a way that allowed this to be done.

Submitted by:	Gleb Smirnoff <glebius@cell.sick.ru>
Also allow the sr and ar drivers to create netgraph versions of their modules.
Document the change to the ksocket node.
2004-06-25 19:22:05 +00:00
John Birrell
bbfccfb3c6 Sync to usbdevs 1.183 2004-06-24 05:25:04 +00:00
John Birrell
f1912fcf16 Add Delorme Publishing Earthmate GPS 2004-06-24 05:05:56 +00:00
Lukas Ertl
5980decb5b MFNetBSD 1.60, author: augustss
Several changes:
    * Implement read for ulpt.
    * If the device is not opened for reading, occasionally drain any
      data the printer might have (but don't hammer the printer with reads).
    * Lower the buffer size to one page.
   The driver seems to work with more printers now.

Obtained from: NetBSD
2004-06-23 11:16:12 +00:00
Lukas Ertl
1f6625d1f8 MFNetBSD 1.15, author: mycroft
Fix an unimportant typo.
2004-06-20 15:32:19 +00:00
MIHIRA Sanpei Yoshiro
66f600d2e1 Sync to 1.182 of usbdevs 2004-06-19 22:17:34 +00:00
MIHIRA Sanpei Yoshiro
e67a98a725 Add support Microtune Bluetooth dongle
PR:		kern/68049
Submitted by:	Markus Brueffer <markus@brueffer.de>
2004-06-19 22:16:03 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
MIHIRA Sanpei Yoshiro
ee0f521c12 To support the promiscuous mode udav(4) driver
PR:		kern/67862
Submitted by:	WATANABE Shingo <nabe@nabechan.org>
2004-06-13 11:22:58 +00:00
Poul-Henning Kamp
1930e303cf Deorbit COMPAT_SUNOS.
We inherited this from the sparc32 port of BSD4.4-Lite1.  We have neither
a sparc32 port nor a SunOS4.x compatibility desire these days.
2004-06-11 11:16:26 +00:00
Ian Dowse
f2b2cfdac0 Initialise `restartcnt' in the newly malloc'd usbd_port structure,
as otherwise the junk it contains may cause uhub_explore to give
up without ever trying to restart the port. This fixes the following
errors I was seeing with a VIA UHCI controller:

	uhub0: port error, restarting port 1
	uhub0: port error, giving up port 1
2004-06-10 01:13:26 +00:00
Christian Weisgerber
0e939c0cea Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
Christian Weisgerber
1d5056708c * Fix multicast reception.
* Replace handrolled crc calculation with ether_crc32_le().

Based on:

PR:		67544
Submitted by:	HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
2004-06-09 00:25:44 +00:00
MIHIRA Sanpei Yoshiro
55184d950a Sync to 1.181 of usbdevs 2004-06-05 21:36:06 +00:00
MIHIRA Sanpei Yoshiro
7c48241358 Add support Sony/Ericsson SEMC DSS-20 SyncStation,
which can be used to communicate with the P900 mobile phone.

PR:		misc/67606
Submitted by:	Christian Gusenbauer <c47g@gmx.at>
MFC after:	1 week
2004-06-05 21:33:59 +00:00
MIHIRA Sanpei Yoshiro
157077e99b Sync to 1.180 of usbdevs 2004-06-05 13:37:54 +00:00
MIHIRA Sanpei Yoshiro
a9ec4ac997 Add device ID for atuwi USB wlan driver, AWL400 Wireless adapter.
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

PR:		kern/67254
Submitted by:	Arjan van Leeuwen <avleeuwen@piwebs.com>
2004-06-05 13:36:10 +00:00
MIHIRA Sanpei Yoshiro
4845af6ce0 Sync to 1.179 of usbdevs 2004-06-05 05:25:16 +00:00
MIHIRA Sanpei Yoshiro
b9ebb45a96 Add support Neodio-3260 8-in-1 multi format USB memory card / flash controller
PR:		kern/67115
Submitted by:	Jukka A. Ukkonen <jau@iki.fi>
MFC after:	1 week
2004-06-05 05:23:46 +00:00
Poul-Henning Kamp
13e84a71e0 Centralize the line discipline optimization determination in a function
called ttyldoptim().

Use this function from all the relevant drivers.

I belive no drivers finger linesw[] directly anymore, paving the way for
locking and refcounting.
2004-06-04 21:55:55 +00:00
Poul-Henning Kamp
fe3ec6224a Manual edits to change linesw[]-frobbing to ttyld_*() calls. 2004-06-04 20:04:52 +00:00
Poul-Henning Kamp
2140d01b27 Machine generated patch which changes linedisc calls from accessing
linesw[] directly to using the ttyld...() functions

The ttyld...() functions ar inline so there is no performance hit.
2004-06-04 16:02:56 +00:00
Poul-Henning Kamp
e451f9b758 Make the remaining serial drivers call ttyioctl() rather than calling
the linedisc directly.
2004-06-04 08:02:37 +00:00
Poul-Henning Kamp
a1cda79464 There is no need to explicitly call ttwakeup() and ttwwakeup() after
ttyclose() has been called.  It's already been done once by ttyclose,
and probably once by the line-discipline too.
2004-06-01 11:38:06 +00:00
Poul-Henning Kamp
bda4474a59 ttyclose() increments t_gen. Remove redundant increments in drivers. 2004-06-01 10:15:56 +00:00
Poul-Henning Kamp
fe12f24bb0 Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
MIHIRA Sanpei Yoshiro
f7ec9a7547 check interface number
Kyocera AH-K3001V has 2 data interface.  But we could use only one
interface(id = 0)

PR:		kern/66779
Submitted by:	Togawa Satoshi <toga@puyo.org>
2004-05-30 01:48:04 +00:00
Ian Dowse
94122d1695 In axe_stop(), close the pipes before calling axe_reset(). axe_reset()
changes the device configuration index, which should not be done
while there are pipes open.

Debugged with help from:	Luke Dean <LukeD@pobox.com>
2004-05-29 15:21:33 +00:00
Ian Dowse
93804be0d7 Refuse to change the configuration index if the device has open
pipes, since open pipes are linked off a usbd_interface structure
that is free()'d when the configuration index is changed. Attempting
to close or use such pipes later would access freed memory and
usually crash the system.

The only driver that is known to trigger this problem is if_axe,
which is itself at fault, but it is worth detecting the situation
to avoid the obscure crashes that result from this type of easily
made driver mistakes.
2004-05-29 14:51:23 +00:00
Julian Elischer
f8aae7776f Switch to using C99 sparse initialisers for the type methods array.
Should make no binary difference.

Submitted by:	Gleb Smirnoff <glebius@cell.sick.ru>
Reviewed by:	Harti Brandt <harti@freebsd.org>
MFC after:	1 week
2004-05-29 00:51:19 +00:00
Lukas Ertl
29d81b7db1 Update URL to HID spec.
Obtained from:  NetBSD
2004-05-23 17:09:07 +00:00
Lukas Ertl
b04f1772b7 Update URL to HID spec.
Obtained from:  NetBSD
2004-05-23 16:55:28 +00:00
Maxime Henrion
866a788cc2 We don't need to initialize if_output, ether_ifattach() does it
for us.
2004-05-23 16:11:53 +00:00
Lukas Ertl
b113636e68 MFNetBSD 1.80; author: wiz
URL updates, from Jared Yanovich and jmc@openbsd, forwarded by the latter.

Obtained from:  NetBSD
2004-05-23 14:01:23 +00:00
Ian Dowse
eadf519a78 Replace the static "qdat" structure with a per-instance softc field
in all USB ethernet drivers. The qdat structure contains a pointer
to the interface's struct ifnet and is used to process incoming
packets, so simultaneous use of two similar devices caused crashes
and confusion.

The if_udav driver appeared in the tree since Daan's PR, so I made
similar changes to that driver too.

PR:		kern/59290
Submitted by:	Daan Vreeken <Danovitsch@Vitsch.net>
2004-05-23 12:35:25 +00:00
Lukas Ertl
5ac85402da Diff reduction to NetBSD.
MFNetBSD 1.177; author: toshii
   Use the correct wValue to get hub desriptors.
   Also, make wValue checks of root hub codes less strict.

MFNetBSD 1.178: author: martin
   Interrupt descriptors might become invalid while being processed in
   uhci_check_intr - so remember their next pointer before calling it.
   Patch provided by Matthew Orgass in PR kern/24542.

Obtained from:   NetBSD
2004-05-23 11:43:34 +00:00
Lukas Ertl
d0834d4dc8 Add Intel PCI vendor ID. 2004-05-22 14:18:05 +00:00
Lukas Ertl
b2d36e0f30 Fix typos in comments.
Submitted by:   Gerhard Gonter <gonter@falbala.wu-wien.ac.at>
2004-05-22 09:29:52 +00:00
MIHIRA Sanpei Yoshiro
c970d559f1 Sync to 1.178 of usbdevs 2004-05-21 01:39:38 +00:00
MIHIRA Sanpei Yoshiro
3ee4bca213 add support Kyocera AH-K3001V (cellular phone in Japan)
PR:		kern/66779
Submitted by:	Togawa Satoshi <toga@puyo.org>
MFC after:	1 week
2004-05-21 01:36:48 +00:00
MIHIRA Sanpei Yoshiro
e68f2db9a3 MFNetBSD (umodem.c 1.46):
URL updates
2004-05-14 15:16:09 +00:00
MIHIRA Sanpei Yoshiro
c6b0444f5f fix SONY_CLIE_41 (as PEG-SJ33/U)
PR:		kern/64968
Submitted by:	John Merryweather Cooper <coop9211@uidaho.edu>
MFC after:	1 week
2004-05-06 13:33:59 +00:00
Mike Silbersack
f71ae83f34 Remove "Scheduling overrun" interrupts from the set of normal interrupts
that the OHCI driver uses.  Broken OHCI devices (like the controller
in my laptop, apparently) like to set this bit at times.  Research
through google shows that this problem has shown up on other systems
as well.

As the scheduling overrun handler doesn't actually do anything, and
the only effect is console spamming, disabling the interrupt seems
to be the right thing to do.  (And it is also what linux 2.6 does.)
2004-05-06 09:21:05 +00:00