Commit Graph

1461 Commits

Author SHA1 Message Date
Warner Losh
9c3ae2ef4b Add a temporary workaround to the panic on boot with hub attached and
panic on hub detach bugs that have been reported.  This work around
detaches the device before deleting it.  This changes the detach order
from in-order to pre-order.  This avoids uhub's deleting the children
after its subdevs has been deleted.

This is only a workaround.  This leads to a strange condition in the
device tree where attached devices are children of detached ones.  I
really don't know what that's supposed to mean, but does violate my
sense of POLA.  Fortunately, the violation is short lived, which is
why I'm going ahead and committing the work around.

# We really need to consider life w/o the multiple nested layers of
# compatibility macros.  They make finding bugs like this *MUCH*
# harder.

Patch by: iadowse

MT5 before: next_release(5.3-BETA5) (unless someting better comes along)
2004-09-22 06:02:10 +00:00
MIHIRA Sanpei Yoshiro
4e526aae71 add '/* Panasonic products */' line(I removed it) 2004-09-20 04:56:13 +00:00
Ian Dowse
abb67fff1c Add Sitecom's LN-029 USB 2.0 Ethernet adapter. 2004-09-18 19:48:10 +00:00
Poul-Henning Kamp
dfcb390b5b Fix compilation again. 2004-09-17 19:24:58 +00:00
Poul-Henning Kamp
d75207f145 Overhaul ucom serial driver by using generic stuff instead of homerolled
all over the place.
2004-09-17 11:53:45 +00:00
Poul-Henning Kamp
a45b36ad47 Use ttyalloc() instead of ttymalloc(NULL) 2004-09-17 07:28:07 +00:00
Warner Losh
7e76a985ca Add comments about why we're freeing subdevs (which is completely
redundant at this point and should be retired).  Don't free subdevs if
we don't attach any devices.  This was leaving stale device_t's
around.  Don't touch the device if it isn't attached since the name
isn't meaningful then.  Switch from strncpy (properly used) to
strlcpy.

From a patch submitted by Peter Pentchev
2004-09-09 20:47:28 +00:00
Warner Losh
9c56382454 We don't need a uhub_child_detached() routine now that we don't detach
device_t instances when no driver attaches.  They are left around, and
we need to remember them.

# The usbd_device_handle->subdevs[] array likely is completely bogus
# at this point, but one change at a time, since its removal will need
# to have similar code replace it extracted from newbus.

Part of the patch submitted by Peter Pentchev after an excellent
analysis of the underlying problems.

MFC After: 1 week
2004-09-09 20:43:49 +00:00
Warner Losh
b3b0e2521a For the moment, back out my back out of green's 1.87 commit. While it
produced better results for a test program I had here, it didn't
substantially change the number of crashes that I saw.  Both the old
code and the new code seemed to produce the same crashes from the usb
layer.  Since the new code also solves a close() crash, go with it
until the underlying issues wrt devices going away can be addressed.
2004-09-09 17:49:53 +00:00
Warner Losh
63ba42fbf5 Back out 1.88.
The reference counts are there to block detach until the sleepers in
read/write/ioctl have gotten out, not to prevent the open device from
going away.  Restore the old behavior so that we have a chance to wake
up sleepers when the usb device goes away, so they can properly return
EIO back to the caller when this happens.

Otherwise, we have a guarnateed panic waiting to happen when a device
detaches with an active read channel.

This should be merged to 5 asap.
2004-09-08 07:13:39 +00:00
Dag-Erling Smørgrav
fbf4080e88 Use %zu to format size_t. 2004-09-05 12:33:15 +00:00
Dag-Erling Smørgrav
8985c52bb6 Device driver for the Cypress CY7C637xx and CY7C640/1xx families of USB
to RS232 bridges, such as the one found in the DeLorme Earthmate USB GPS
receiver (which is the only device currently supported by this driver).

While other USB to serial drivers in the tree rely heavily on ucom, this
one is self-contained.  The reason for that is that ucom assumes that
the bridge uses bulk pipes for I/O, while the Cypress parts actually
register as human interface devices and use HID reports for configuration
and I/O.

The driver is not entirely complete: there is no support yet for flow
control, and output doesn't seem to work, though I don't know if that is
because of a bug in the code, or simply because the Earthmate is a read-
only device.
2004-09-05 09:43:47 +00:00
MIHIRA Sanpei Yoshiro
e7934ccbaa Add support Western Digital External USB HDD
ONSPEC entry are sorted

PR:		kern/71031
Submitted by:	Johann Hugo <jhugo@icomtek.csir.co.za>
MFC after:	1 week
2004-09-04 07:07:35 +00:00
MIHIRA Sanpei Yoshiro
3785db4f85 Add support Nikon CoolScan LS40 ED
PR:		kern/71139
Submitted by:	Pierre DAVID <Pierre.David@crc.u-strasbg.fr>
MFC after:	1 week
2004-09-03 23:29:01 +00:00
MIHIRA Sanpei Yoshiro
44cf44fbff Add support Qualcomm CDMA modem
PR:		kern/71043
Submitted by:	Tomas Krivanek <tom@atack.cz>
MFC after:	1 week
2004-09-03 23:19:27 +00:00
MIHIRA Sanpei Yoshiro
42554f699b add support ELECOM UC-SGT(minor change version)
http://www2.elecom.co.jp/products/UC-SGT.html

PR:		[FreeBSD-users-jp 80725]
Submitted by:	NAKAMURA Kazushi <kaz@kobe1995.net>
MFC after:	1 week
2004-09-03 22:41:37 +00:00
Ian Dowse
efe26acda8 Fix two cases where a successful return from usbd_transfer() would
be treated as an error and cause a transfer to be freed twice. This
can probably only happen at boot time when transfers are processed
synchronously.
2004-08-29 02:35:59 +00:00
Dag-Erling Smørgrav
461af901ed Correct capitalization of DeLorme Publishing. 2004-08-26 16:59:50 +00:00
David E. O'Brien
a886592542 86 new vendor ID's from USB.org, and 3 corrections of existing vendor ID's. 2004-08-19 19:21:14 +00:00
Warner Losh
1ff2328528 Tweak the compatibility macros a little so that the device printing is
moved into them.
2004-08-15 23:39:18 +00:00
Ian Dowse
4ba861fa77 Use the USBD_FORCE_SHORT_XFER flag when setting up transmit transfers.
Without this, the device cannot detect the end of ethernet packets
whose size is a multiple of the USB packat size.

PR:		kern/70474
Submitted by:	Andrew Thompson <andy@fud.org.nz>
MFC after:	1 week
2004-08-15 10:51:21 +00:00
Warner Losh
487d427700 Next step in making usb more newbus:
o reprobe children when a new driver is added to uhub
o fix the usbd_probe_and_attach to set the ivars to a malloc'd area, as well
  as freeing the ivars on child destruction.
o Don't delete children that don't attach. Evidentally, the need to do this
  is a common misconception.
o minor formatting foo that may violate style(9) at the moment, but keeps the
  diffs against my p4 tree smaller.

This does not solve the ugen gobbling things up problem, but the fixes
I have for that expose bugs in other parts of the tree...
2004-08-14 22:10:26 +00:00
MIHIRA Sanpei Yoshiro
bac683b5db add support for SanDisk Cruzer Mini 256MB USB 2.0 Flash Drive
PR:		kern/65438
Submitted by:	Peter D. Quilty <pdquilty@adelphia.net>
MFC after:	1 week
2004-08-12 23:29:22 +00:00
MIHIRA Sanpei Yoshiro
882a77b811 add support Sitecom CN-311 usb flash reader(aka SIIG_WINTERREADER)
PR:		kern/64722
Submitted by:	Thiemo Nordenholz <nz@thiemo.net>
MFC after:	1 week
2004-08-12 20:14:20 +00:00
Robert Watson
1510469e95 Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework
if_start routines cannot currently be entered without Giant.  When
the kernel is running with debug.mpsafenet != 0, this will defer
if_start execution to a task queue thread holding Giant, which may
introduce additional latency, but avoid incorrect execution.

Suggested by:	dfr
2004-08-11 03:38:55 +00:00
MIHIRA Sanpei Yoshiro
d41f8399cd Add support Sony Handycam TRV-30 memory stick slot
PR:		kern/69915
Submitted by:	Christian Gusenbauer <c47g@gmx.at>
MFC after:	1 week
2004-08-08 07:09:43 +00:00
MIHIRA Sanpei Yoshiro
2de562f7a1 Add support to Sony Ericsson USB Cable(Susteen USB Data Cable)
PR:		kern/66416
Submitted by:	Fredrik Lindberg <fliREMOVEME@shapeshifter.se>
MFC after:	1 week
2004-08-08 05:21:56 +00:00
MIHIRA Sanpei Yoshiro
9caf2e9831 Add support for Belkin F5U409 serial-usb adapter
PR:              kern/69804
Submitted by:    Dan Nelson <dnelson@allantgroup.com>
2004-08-07 23:45:04 +00:00
Ian Dowse
bff05e31bb Reinstate a usb_transfer_complete() call that got lost in the
previous revision.
2004-08-02 20:53:31 +00:00
Ian Dowse
f50033ff2e Make the USB subsystem unloadable and detachable, though currently
a significant amount of memory may be leaked each time a host
controller is detached.
2004-08-02 15:37:35 +00:00
Ian Dowse
67dab3d6c9 When searching for a suitable block of memory on the free list,
skip blocks that are too big by a factor of two or greater. This
avoids some cases of extremely inefficient memory use that can occur
when large (e.g. 64k) blocks on the free list get used when allocating
a 4k chunk of 64-byte fragments. Because fragments have their own
free list, the 60k difference got lost forever every time.
2004-08-02 13:59:02 +00:00
Ian Dowse
da37d6ad41 Attempt to follow the correct procedure for synchronising with the
system BIOS to disable legacy device emulation as per the "EHCI
Extended Capability: Pre-OS to OS Handoff Synchronisation" section
of the EHCI spec. BIOSes that implement legacy emulation using SMIs
are supposed to disable the emulation when this procedure is performed.
2004-08-02 12:56:01 +00:00
Ian Dowse
2dacb7cc04 Implement basic support for EHCI interrupt pipes. This is unlikely
to be particularly correct or optimal, but it seems to be enough
to allow the attachment of USB2 hubs and USB2 devices connected via
USB2 hubs. None of the split transaction support is implemented in
our USB stack, so USB1 peripherals will definitely not work when
connected via USB2 hubs.
2004-08-01 18:47:42 +00:00
Warner Losh
c19786b8ac Remove redundant inclusion of bus_if.h. It isn't needed in this file, as
sys/bus.h includes it.
2004-07-22 22:59:44 +00:00
Warner Losh
9937071c27 MFp4:
Improve child_detached a little and make it conform better to
style(9).  Also, improve comment about what we'll be doing in the
future about driver_added.  Soon it will be possible to kldload usb
drivers and have them attach w/o a need to disconnect/reconnect them.
2004-07-22 22:53:38 +00:00
Benno Rice
06167613da Identify VIA EHCI root hubs and at least one VIA USB2.0 controller. 2004-07-19 23:22:10 +00:00
Lukas Ertl
ec47b83454 Diff reduction to NetBSD.
usbdi.c rev. 1.104, author: mycroft
   ugen_isoc_rintr() may recycle the xfer immediately.  Therefore, we
   avoid touching the xfer after calling the callback in
   usb_transfer_complete().  From PR 25960.
2004-07-19 20:49:02 +00:00
Lukas Ertl
483c6192ec Diff reduction to NetBSD.
ehci.c rev. 1.69, author: mycroft
uhci.c rev. 1.179, author: mycroft
   hcpriv is not actually used here.  Remove references to it.

Obtained from:   NetBSD
2004-07-19 20:47:46 +00:00
MIHIRA Sanpei Yoshiro
788b424006 Add support System TALKS Inc. SGC-X2UL
PR:		FreeBSD-users-jp/80137
Submitted by:	HORIO Shinsuke <shin@happynet.co.jp>
2004-07-18 06:45:38 +00:00
Poul-Henning Kamp
672c05d49c Preparation commit for the tty cleanups that will follow in the near
future:

rename ttyopen() -> tty_open() and ttyclose() -> tty_close().

We need the ttyopen() and ttyclose() for the new generic cdevsw
functions for tty devices in order to have consistent naming.
2004-07-15 20:47:41 +00:00
Lukas Ertl
e65b8f47b3 MFNetBSD.
rev. 1.67, author: mycroft
   Fix a byte order error.

rev. 1.68, author: mycroft
   Adjust some silliness that was causing us to do extra work for
   "frame list rollover" interrupts, which we pretty much ignore.

Obtained from:   NetBSD
2004-07-15 19:25:06 +00:00
Warner Losh
7eb52d171e Remove even more references to generating usbdevs_data.h, et al.
Noticed by: njl
2004-07-12 23:11:09 +00:00
Warner Losh
77967bd75c Remove the instructions for regenerating usbdevs.h: that's now no
longer necessary.
2004-07-12 22:57:06 +00:00
MIHIRA Sanpei Yoshiro
b866026be5 Add device ID for atuwi USB wlan driver, Linksys WUSB11 v2.8 wireless adapter.
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

PR:		kern/68465
Submitted by:	Suihong Liang <s2liang@uwaterloo.ca>
2004-07-04 09:13:53 +00:00
Marcel Moolenaar
d7d057c585 Unbreak -O2 build: initialize nstatus to avoid uninitialized warning. 2004-07-03 02:10:52 +00:00
Lukas Ertl
acd6dd0ca1 MFNetBSD.
rev 1.66, author: mycroft
   Fix an endianness problem (EHCI_NULL was being double-swapped).

Obtained from:  NetBSD
2004-07-01 21:17:50 +00:00
Lukas Ertl
c88e858068 MFNetBSD.
rev. 1.68, author: mycroft
   Ignore a port error that happens to come in at the same time as a
   connect status change.  Some root hubs seem to report both.

Obtained from:   NetBSD
2004-07-01 21:14:03 +00:00
Brooks Davis
c9e7c6f4fb Add support to the uftdi driver for Intrepid Control Systems' vehicle
bus interfaces.  These interfaces use the FTDI chipset with different
Vendor and Product IDs.

Add two additional baud rate enumerations.  The vehicle bus interfaces
use a baud rate of 2000000.  Also add 3000000 as it is the other FTDI
baud divisor special case.

I've commited a slightly different patch from that provided in the PR as
I changed the matching code a bit yesterday.

Submitted by:	Mike Durian <durian at shadetreesoftware.com>
PR:		kern/67357
2004-07-01 17:16:20 +00:00
Brooks Davis
5ec632a1e4 Product and vendor ids for SIIG US2308 USB to Serial adaptor.
Tested against:	rwatson's laptop
2004-07-01 05:14:12 +00:00
Brian Feldman
320f640b93 It's not very useful to set a softc refcount around blocking read/write
operations when the refcount doesn't protect the opens and closes.  Fix
this, and don't actually let a time out happen: now ugen(4) devices do
not get freed out from under the programs with them open.
2004-07-01 02:07:01 +00:00
Warner Losh
1c91aaf9ab Add pnpinfo and location information to uhub. We also keep track of
the subdevices of uhub better now to accomplish this.

Submitted by: Bernd Walter
2004-06-30 02:56:24 +00:00
Alexander Langer
52b8c8cd00 - Fix style bug in Dell Bluetooth adapter (don't repeat Vendor in
device listing).
- Add generic "Port Replicator" entry for the USB Hubs used in
  Dell port replicators.
2004-06-27 17:27:04 +00:00
Warner Losh
0661633386 Now that all the in-tree referrences to these old files are gone, go
ahead and remove them.
2004-06-27 16:59:15 +00:00
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
Josef Karthauser
3e69419a37 Regen 2004-05-05 19:40:03 +00:00
Josef Karthauser
81bf999d56 Add support for the new Zire 31 device.
Submitted by:	Adriaan de Groot <adridg@cs.kun.nl>
2004-05-05 19:39:24 +00:00
MIHIRA Sanpei Yoshiro
e3433c8b27 Sync to 1.176 of usbdevs 2004-05-04 11:37:26 +00:00
MIHIRA Sanpei Yoshiro
9ea2290de0 fix typo (adapte -> adapter)
Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>
2004-05-04 11:36:54 +00:00
MIHIRA Sanpei Yoshiro
39b7f9fc17 Sync to 1.175 of usbdevs 2004-05-04 11:23:45 +00:00
MIHIRA Sanpei Yoshiro
5151db7f71 Fix device ID for Linksys USB 2.0 10/100 ethernet controller
(use LINKSYS2)

Submitted by:	takawata-san
2004-05-04 11:22:09 +00:00
MIHIRA Sanpei Yoshiro
10aee7e1c4 Sync to 1.174 of usbdevs 2004-05-04 09:41:08 +00:00
MIHIRA Sanpei Yoshiro
6183ba9d09 Add some device ID for atuwi USB wlan driver
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

Fix ATMEL DWL-120 Wireless adapter product ID.
(I checked http://www.linux-usb.org/usb.ids)

PR:		kern/66227
Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>
2004-05-04 09:39:44 +00:00
MIHIRA Sanpei Yoshiro
d6f89a0596 Sync to 1.173 of usbdevs 2004-05-02 13:23:25 +00:00
MIHIRA Sanpei Yoshiro
a62da76023 Add support SUNTAC U-Cable type A4 (AS144L4)
http://www.sun-denshi.co.jp/scc/products/mobile/as144l4/as144l4.htm (in Japanese)

PR:		kern/66144
Submitted by:	KURASHINA Hideyuki <rushani@FreeBSD.org>
2004-05-02 13:21:28 +00:00
MIHIRA Sanpei Yoshiro
3fa30d6c9a Sync to 1.172 of usbdevs 2004-04-27 13:56:39 +00:00
MIHIRA Sanpei Yoshiro
2137eb2fa7 Add support DELL BC02 Bluetooth USB Adapter(TrueMobile 300)
PR:		kern/65777
Submitted by:	Patrick Hurrelmann <outi@bytephobia.de>
2004-04-27 13:55:26 +00:00
MIHIRA Sanpei Yoshiro
6dc98d2539 Sync to 1.171 of usbdevs 2004-04-25 11:24:40 +00:00
MIHIRA Sanpei Yoshiro
e9d1d719e0 Add support Buffalo(MELCO) USB-Key Lan Adaptor(LUA-U2-KTX)
Submitted by:	KAWAI Kenichi <kawai.kenichi@canon.co.jp>
2004-04-25 11:21:30 +00:00
David E. O'Brien
38974555bd Add support for the ADMtek AN8513 USB Ethernet adapter.
Submitted by:	taxman <taxman@freedombi.com>
2004-04-16 05:24:45 +00:00
David E. O'Brien
e5b1e74d89 Correct $FreeBSD$ style. 2004-04-16 05:22:11 +00:00
Ian Dowse
a76d86b892 Use the correct flag for mbuf allocations (M_DONTWAIT, not M_NOWAIT). 2004-04-06 19:32:00 +00:00
Julian Elischer
10030054ac Do the looping retry trick in the first operation to try to talk
with the device, not the second..

Submitted by: ticso@cicely12.cicely.de
2004-04-01 18:55:28 +00:00
Julian Elischer
c8e8e129a5 MFNetBSD Version 1.146
various probing and attaching tweeks.

Submitted by:	Rudolf Cejka <cejkar@fit.vutbr.cz>

Obtained from:	NetBSD
MFC after: 3 days
2004-03-26 18:56:58 +00:00
Julian Elischer
8737555800 Put the event notification back where it was for freeBSD, after device creation.
Since NetBSD doesn't have devfs the order for them doesn't matter..
Reverses one part of 1.60->1.61 NetBSD diff reduction.

Obtained from:	 Not NetBSD
2004-03-20 07:31:11 +00:00
Julian Elischer
9db42b4960 Diff reduction to NetBSD
Bring over sundry small fixes from NetBSD

Obtained from:	NetBSD
MFC after:	1 week
2004-03-19 08:19:52 +00:00
Julian Elischer
bb841defc0 Diff reduction to NetBSD
Trying to figure out why this only works with SOME EHCI  controllers.

Obtained from:	NetBSD
MFC after:	1 week
2004-03-19 07:14:23 +00:00
Julian Elischer
4de762365a Re-enable detach events after adding a bugfix from NetBSD
that unbreaks them.

Submitted by:	dillon
Obtained from:	NetBSD
MFC after:	2 days
2004-03-19 06:15:45 +00:00
Maxim Sobolev
273ac7b968 Regen after 1.169 of usbdevs. 2004-03-18 01:06:28 +00:00
Maxim Sobolev
7dc0ba8937 Add support for Crystalfontz CFA-632, CFA-633 and CFA-634, all of them
are based on the same USB->COM bridge, but have different product IDs.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:  http://www.tnpi.biz/computing/freebsd/crystalfontz.shtml
MFC after:      3 days
2004-03-18 01:02:46 +00:00
Nate Lawson
5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
Josef Karthauser
6909422ddd Regen. 2004-03-14 21:57:35 +00:00
Josef Karthauser
295964d6a9 Add support for Handspring TREO 600.
Submitted by:	Tuc <tuc@ttsg.com>
MFC after:	1 week
2004-03-14 21:56:51 +00:00
Matthew N. Dodd
e3bbbec2ca Announce ethernet MAC addresss in ether_ifattach(). 2004-03-14 07:12:25 +00:00
Tim J. Robbins
2a5bb2de6b Add support for the Epson Perfection 1670 scanner. 2004-03-13 08:45:16 +00:00
Tim J. Robbins
7e035f1e26 Regen 2004-03-13 08:25:51 +00:00
Tim J. Robbins
1df4c96417 Add EPSON Perfection 1670 scanner. 2004-03-13 08:21:22 +00:00
MIHIRA Sanpei Yoshiro
ff89e92686 Sync to 1.166 of usbdevs 2004-03-07 05:34:36 +00:00
MIHIRA Sanpei Yoshiro
b34b7c59ee Add support 2 devices(USB-DVD-R drives)
- Logitec LDR-H443SU2
	- IO-DATA DVR-UEH8

PR:		kern/63793
Submitted by:	Ryuji MATSUMOTO <matumoto@pluto.ai.kyutech.ac.jp>
MFC after:	1 week
2004-03-07 05:33:09 +00:00
Poul-Henning Kamp
7896170112 Implement a crude but functional usbd_ratecheck() to limit the number
of "usb0: %d scheduling overruns" messages I have to contend with.
2004-03-04 20:49:03 +00:00
MIHIRA Sanpei Yoshiro
d7bd2883ec Sync to 1.165 of usbdevs 2004-03-04 07:22:30 +00:00
MIHIRA Sanpei Yoshiro
a439ea6c55 Add support SimpleTech UCF-100 USB CompactFlash reader(OnSpec Electronic, Inc.)
PR:		kern/63619
Submitted by:	Greg Rivers <gcr@sa.fedex.com>
MFC after:	1 week
2004-03-04 07:20:48 +00:00
Peter Wemm
ed1b77af8c Add new Matrix Orbital LCD panel id's so that they are recognized and
attached via uftdi->ucom.
2004-03-02 19:03:26 +00:00
Peter Wemm
ec88698685 Regen 2004-03-02 19:01:56 +00:00
Peter Wemm
2c711f0694 Add some device id's for Matrix Orbital's newer LCD panels. These use
another ftdi usb->serial bridge with different ID's.
2004-03-02 19:01:30 +00:00
Bernd Walter
7de8778318 add driver for BWCT console management serials 2004-03-01 02:34:49 +00:00
MIHIRA Sanpei Yoshiro
7f869e12d8 Sync to 1.163 of usbdevs 2004-02-28 00:15:08 +00:00
MIHIRA Sanpei Yoshiro
cdd40f3bd6 add support DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated 10/100 PHY)
- Corega FEther USB-TXC

PR:		kern/62932
Submitted by:	HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
Obtained from:	NetBSD
2004-02-28 00:12:47 +00:00
John Baldwin
1f220d57d6 Fix a problem with the USB keyboard driver not properly handling key
rollover resulting in duplicate keypress events.

PR:		57273
PR:		63171
Submitted by:	plasma <plasma at freebsd.sinica.edu.tw>
Submitted by:	Brian Candler <B.Candler at pobox.com>
MFC after:	1 week
2004-02-23 15:36:40 +00:00
Poul-Henning Kamp
dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Poul-Henning Kamp
8e1f1df080 Device megapatch 3/6:
Add missing D_TTY flags to various drivers.

Complete asserts that dev_t's passed to ttyread(), ttywrite(),
ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty
pointer.

Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default
cdevsw methods for D_TTY drivers and remove the explicit initializations
in various drivers cdevsw structures.
2004-02-21 20:41:11 +00:00
Poul-Henning Kamp
c9c7976f7f Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
2004-02-21 19:42:58 +00:00