Commit Graph

1461 Commits

Author SHA1 Message Date
Julian Elischer
18b5fd62f9 MFNetBSD
Whitespace diff reduction, formatting fixes and one actual
arithmetic error that NetBSD have fixed.

Obtained from:	NetBSD
MFC after: 1 week
2004-12-13 07:45:02 +00:00
Warner Losh
1239b0391a We don't need vnode.h, but do need uio.h in these files. vnode.h
shouldn't be included in drivers, generally, so remove them.

OK'd by: phk
2004-12-13 07:09:54 +00:00
Warner Losh
a9557e2194 Add sys/uio.h explicitly, and move sys/vnode.h include to be more
alphabetical.

# vnode.h should not be included here, but it is required for proper decoding
# of the flags args.  This may change in the future...
2004-12-13 07:08:22 +00:00
Warner Losh
317ccb1fc3 sys/vnode.h is inappropriate for a driver. Use sys/uio.h instead. 2004-12-13 06:26:23 +00:00
Warner Losh
da5c87ba08 Crank down the lame-o-matic a notch by moving the = inside the /* */ rather
than outside to fix the build.
2004-12-13 05:41:33 +00:00
Julian Elischer
d0a9f61fea Try make code for teh M$ Intellimouse less obtrusive
when not using such a device.
2004-12-13 02:20:48 +00:00
Julian Elischer
22c2b56594 Don't export the 'dt' field as that would break the exisiting ABI.
keep the code but comment it out so that if the ABI changes we
can see easily what should be done.

Submitted by:	iedowse
2004-12-13 01:23:49 +00:00
Julian Elischer
0e7470486d Revert addition of Lide scanner entry..
It's a duplicate of an already exisiting entry. (with another name).
2004-12-13 00:25:03 +00:00
Julian Elischer
a09345e6cd Add support for Cannon LIDE 20 scanner
PR:	kern/74301
Submitted by:	Vlad Manilici <vman@tmok.com>
MFC after:	1 week
2004-12-12 08:35:21 +00:00
Julian Elischer
c29b0a0f7e Add support for USB Microsoft Intellimouse
PR:		kern/70607
Submitted by:	Matt Wright <matt@consultmatt.co.uk>
MFC after:	1 week
2004-12-12 05:34:20 +00:00
Julian Elischer
060cd8af25 Changes to cache endpoint descriptors for all the interfaces. this information
is not always available if we change interfaces.

Submitted by:	jamie at bishopston dot net  (jamie jones)
MFC after:	1 week
2004-12-12 02:27:30 +00:00
Christian Brueffer
61af118148 URL of the data sheet has changed.
Obtained from:	OpenBSD
2004-12-09 13:27:44 +00:00
Scott Mitchell
d49a36b1d5 Diff-reduction before merging if_axe to RELENG_4.
Approved by:	imp (mentor)
MFC after:	1 week
2004-12-08 22:02:58 +00:00
Ian Dowse
01a95e0acf Add support for the TwinMOS Memory Disk IV.
PR:		kern/73766
Submitted by:	Valentin Nechayev
MFC after:	1 week
2004-11-28 21:49:30 +00:00
Ian Dowse
104f472f30 Add the device ID for the 3Com 3CRSHEW696 wireless adapter.
PR:		kern/73286
Submitted by:	Daan Vreeken
2004-11-28 21:40:36 +00:00
Ian Dowse
3589f4d21c Add support for the Trumpion/Comotron C3310 MP3 player. 2004-11-28 21:36:39 +00:00
Ian Dowse
f6b587096b Fix just the worst of the timeout race conditions that the previous
backed out commits were trying to address: when cancelling the timeout
callout, also cancel the abort_task event, since it is possible that
the timeout has already fired and set up an abort_task.
2004-11-16 00:48:27 +00:00
Ian Dowse
b044e17063 Put back usb_uncallout_drain(), as it is now also used by umass.c. 2004-11-12 03:24:12 +00:00
Ian Dowse
85b8134e51 Back out my recent changes for timeout races, as there have been
reports of problems. The bug is probably that there are cases where
`xfer->timeout && !sc->sc_bus.use_polling' is not a suitable test
for an active timeout callout, so an explicit flag will be necessary.
Apologies for the breakage.
2004-11-12 02:57:35 +00:00
Ian Dowse
a5158af81f Keep a handle on the startup rescan timer and cancel the timer if
the device goes away.
2004-11-10 00:48:22 +00:00
Ian Dowse
0ce606de7c Attempt to fix a number of race conditions in the handling of
transfer timeouts that typically cause a transfer to be completed
twice, resulting in panics and page faults:

 o A transfer completion interrupt could arrive while an abort_task
   event was set up, so the transfer would be aborted after it had
   completed. This is very easy to reproduce. Fix this by setting
   the transfer status to USBD_TIMEOUT before scheduling the
   abort_task so that the transfer completion code will ignore it.

 o The transfer completion code could execute concurrently with the
   timeout callout, leaving the callout blocked (e.g. waiting for
   Giant) while the transfer completion code runs. In this case,
   callout_stop() does not prevent the callout from running, so
   again the timeout code would run after the transfer was complete.
   Handle this case by checking the return value from callout_stop(),
   and ignoring the transfer if the callout could not be removed.

 o Finally, protect against a timeout callout occurring while a
   transfer is being aborted by another process. Here we arrange
   for the timeout processing to ignore the transfer, and use
   callout_drain() to ensure that the callout has really gone before
   completing the transfer.

This was tested by repeatedly performing USB transfers with a timeout
set to approximately the same as the normal transfer completion
time. In the PR below, apparently this occurred by accident with a
particular printer and the default timeout.

PR:		kern/71491
2004-11-09 20:51:32 +00:00
Ian Dowse
8e1cbbc611 When a port cannot be set up, report the error code in the `disabling
port X' message.
2004-11-09 19:46:57 +00:00
Ian Dowse
b483f84d55 The ehci_dump() function shouldn't be declared static, as it is
just a convenience function to be called from debuggers that gets
compiled in when EHCI_DEBUG is defined. Move its declaration to
make this more obvious.
2004-11-03 15:12:18 +00:00
Ian Dowse
f79bef6097 Merge recent USB2/EHCI related changes from NetBSD:
o Reduce the interrupt delay to 2 microframes.
 o Follow the spec more closely when updating the overlay qTD in the QH.
 o No need to generate an interrupt at the data part of a control
   transfer, it's generated by the status transfer.
 o Make sure to update the data toggle on short transfers.
 o Turn the printf about needing toggle update into a DPRINTF.
 o Keep track of what high speed port (if any) a device belongs to
   so we can set the transaction translator fields for the transfer.
 o Verbosely refuse to open low/full speed pipes that depend on
   unimplemented split transaction support.
 o Fix various typos in comments.

Obtained from:	NetBSD
2004-11-03 01:52:50 +00:00
Ian Dowse
cf181f3b71 Save and restore state across suspend/resume events.
Submitted by:	David Gwynne <dlg@openbsd.org>
Obtained from:	OpenBSD (+ extra patches supplied by David)
2004-10-30 15:13:09 +00:00
Lukas Ertl
bdb93b0178 Add support for the B&B Electronics USB->RS422/485 adapter.
PR:            kern/73178
Submitted by:  Scott Price <prices@dflytech.com>
2004-10-30 09:21:44 +00:00
John Baldwin
b7001e08ba Handle all types of interrupts when operating the uhci(4) controller in
polled mode.

PR:		kern/73000
Submitted by:	Daan Vreeken <Danovitsch at Vitsch dot net>
MFC after:	1 month
2004-10-28 20:24:50 +00:00
Ralf S. Engelschall
1b0ee80834 Add identifiers for the HP Laserjet 2300d USB
printer and the HP ScanJet 4670v USB scanner.

MFC after:	1 week
2004-10-24 11:16:29 +00:00
Lukas Ertl
fb88672937 Add support for the Vodafone Mobile Connect 3G datacard. 2004-10-16 21:27:28 +00:00
Alexander Kabaev
95cb3d1a6b Use a taskqueue rather than an swi to handle deferred notifications.
Obtained from:	same change for umct(4) driver.
2004-10-15 03:44:56 +00:00
Lukas Ertl
d533a2843b Add device IDs for Intel ICH6.
PR:             kern/72492
Submitted by:   Florian Le Goff <madflo@beertech.org>
2004-10-13 14:51:42 +00:00
Brian Feldman
d363b98e1f Permit fcntl(F_SETFL) to work on a ugen(4) device by not returning failure
for FIOASYNC.
2004-10-13 04:13:05 +00:00
Brian Feldman
601486239c Back out rev.1.91 which implemented bulk read transfers in ugen(4) as
asynchronous.  I realize that this means the custom application will
not work as written, but it is not okay to break most users of ugen(4).

The major problem is that a bulk read transfer is not an interrupt
saying that X bytes are available -- it is a request to be able to
receive up to X bytes, with T timeout, and S short-transfer-okayness.

The timeout is a software mechanism that ugen(4) provides and cannot
be implemented using asynchronous reads -- the timeout must start at
the time a read is done.

The status of up to how many bytes can be received in this transfer
and whether a short transfer returns data or error is also encoded
at least in ohci(4)'s requests to the controller.  Trying to detect
the "maximum width" results in using a single buffer of far too
small when an application requests a large read.

Even if you combat this by replacing all buffers again with the
maximal sized read buffer (1kb) that ugen(4) would allow you to
use before, you don't get the right semantics -- you have to
throw data away or make all the timeouts invalid or make the
short-transfer settings invalid.

There is no way to do this right without extending the ugen(4) API
much further -- it breaks the USB camera interfaces used because
they need a chain of many maximal-width transfers, for example, and
it makes cross-platform support for all the BSDs gratuitously hard.

Instead of trying to do select(2) on a bulk read pipe -- which has
neither the information on desired transfer length nor ability to
implement timeout -- an application can simply use a kernel thread
and pipe to turn that endpoint into something poll-able.

It is unfortunate that bulk endpoints cannot provide the same semantics
that interrupt and isochronous endpoints can, but it is possible to just
use ioctl(USB_GET_ENDPOINT_DESC) to find out when different semantics
must be used without preventing the normal users of the ugen(4) device
from working.
2004-10-13 04:12:20 +00:00
Poul-Henning Kamp
920f6e438f Use generic tty code.
New device names are ttyy{unit}
2004-10-12 09:21:03 +00:00
Poul-Henning Kamp
71ee88dacc Use generic tty code instead of local copies.
New devicename is ttyy{unit}{port}

No callout devices created as there is no modemcontrol on these ports.

Add data structure to represent each port to avoid excessive array use.
2004-10-12 09:18:37 +00:00
Bruce M Simpson
cdd2389652 Pass through the commands necessary to format USB floppy devices,
from within umass_ufi_transform(). This includes the 12-byte commands
FORMAT_UNIT, WRITE_AND_VERIFY, VERIFY, and READ_FORMAT_CAPACITIES
(sorted in numerical order).

Reviewed by:	ken, scottl
MFC after:	2 weeks
2004-10-12 08:58:57 +00:00
Brian Feldman
00b5244e28 Further modify bulk endpoint behavior to be able to tear down the
current transfer fully in the "purge" routine, and to actually finish
kicking out any read()s in progress.
2004-10-12 04:02:06 +00:00
Takanori Watanabe
42d69dd63e Don't use matchlvl attach arg. It seems to be not initialized
in FreeBSD probe mechanism.
2004-10-09 07:48:31 +00:00
Scott Long
8aebfc9c7e Use a taskqueue rather than an swi to handle deferred notifications. 2004-10-05 04:03:00 +00:00
Stefan Farfeleder
c8c529b86f The macro for the function specifier inline is spelled '__inline'. 2004-10-03 16:12:29 +00:00
MIHIRA Sanpei Yoshiro
e1135559d2 Add device ID for atuwi USB wlan driver,
(Atmel at76c503a http://vitsch.net/bsd/atuwi)
	o AINCOMM AWU2000B
	o ATMEL WL1130USB

PR:		kern/72195
Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>
MFC after:	1 week
2004-10-03 09:30:09 +00:00
Brian Feldman
96ee6195ef * Use two cdevsw's for ugen(4): one for control endpoints, and one for
data endpoints.  The control endpoint doesn't need read/write/poll
  operations, and more importantly, the thread counts should be
  separate so that the control endpoint can properly reference itself
  while deleting and recreating the data endpoints.
* Add some macros that handle referencing/releasing devices, and use them
  for sleeping/woken-up and open/close operations as apppropriate.
* Use d_purge for FreeBSD, and a loop testing the open status for all
  the endpoints for NetBSD and OpenBSD, so that when the device is
  detached, the right thing always happens.
2004-10-02 22:49:54 +00:00
Brian Feldman
df3d6ec928 * When toggling short transfers on a bulk transfer endpoint, cancel and
restart the current waiting transfer.  If this isn't done, the device's
  next transfer (that we would like to do a short read on) is going to
  return an error -- for short transfer.
* For bulk transfer endpoints, restore the maximum transfer length each
  time a transfer is done, or the first short transfer will make all the
  rest that size or smaller.
* Remove impossibilities (malloc(M_WAITOK) == NULL, &var == NULL).
2004-10-02 22:33:26 +00:00
Poul-Henning Kamp
d5bd33eeac Add support for CTS modemsignal as well.
RI does not seem to be supported.
2004-10-02 12:47:30 +00:00
Peter Wemm
12bdf8d107 Remove extra */
Submitted by: Manfred Antar <null@pozo.com>
2004-09-30 02:13:42 +00:00
Bill Paul
3229c9302a When opening a pipe, usbd_setup_pipe() will do a usbd_clear_endpoint_stall()
to make sure the pipe is ready. Some devices apparently don't support
the clear stall command however. So what happens when you issue such
devices a clear stall command? Typically, the command just times out.
This, at least, is the behavior I've observed with two devices that
I own: a Rio600 mp3 player and a T-Mobile Sidekick II.

It used to be that after the timeout expired, the pipe open operation
would conclude and you could still access the device, with the only
negative effect being a long delay on open. But in the recent past,
someone added code to make the timeout a fatal error, thereby breaking
the ability to communicate with these devices in any way.

I don't know exactly what the right solution is for this problem:
presumeably there is some way to determine whether or not a device
supports the 'clear stall' command beyond just issuing one and waiting
to see if it times out, but I don't know what that is. So for now,
I've added a special case to the error checking code so that the
timeout is once again non-fatal, thereby letting me use my two
devices again.
2004-09-29 18:12:33 +00:00
Bill Paul
983b3659b8 Fix minor indentation/formatting nit. (No code changes.) 2004-09-29 15:46:37 +00:00
Poul-Henning Kamp
ae59037978 Use generic infrastructure for the ucom driver instead of local stuff.
This changes the naming of USB serial devices to: /dev/ttyU%d and
/dev/cuaU%d for call-in and call-out devices respectively.  (Please
notice: capital 'U')

Please also note that we now have .init and .lock devices for USB
serial ports.  These are not persistent across device removal.  devd(8)
can be used to configure them on attachment time.

These changes also improve the chances of the system surviving if
the USB device is unplugged at an inconvenient time.  At least we
do not rip things apart while there are any threads in the device
driver anymore.

	Remove cdevsw, rely on the tty generic one.

	Don't make_dev(), use ttycreate() which does all the magic.

	In detach, do close procesing if we ripped things apart
	while the device was open.  Call ttyfree() once we're done
	cleaning up.
2004-09-28 20:23:49 +00:00
Bill Paul
2bb980892d Arrgh. Recently I tried using ugen(4) in an application that uses
select(2), and discovered to my horror that ugen(4)'s bulk in/out support
is horribly lobotomized. Bulk transfers are done using the synchronous
API instead of the asynchronous one. This causes the following broken
behavior to occur:

- You open the bulk in/out ugen device and get a descriptor
- You create some other descriptor (socket, other device, etc...)
- You select on both the descriptors waiting until either one has
  data ready to read
- Because of ugen's brokenness, you block in usb_bulk_transfer() inside
  ugen_do_read() instead of blocking in select()
- The non-USB descriptor becomes ready for reading, but you remain blocked
  on select()
- The USB descriptor becomes ready for reading
- Only now are you woken up so that you can ready data from either
  descriptor.

The result is select() can only wake up when there's USB data pending. If
any other descriptor becomes ready, you lose: until the USB descriptor
becomes ready, you stay asleep.

The correct approach is to use async bulk transfers, so I changed
the read code to use the async bulk transfer API. I left the write
side alone for now since it's less of an issue.

Note that the uscanner driver has the same brokenness in it.
2004-09-28 18:39:04 +00:00
Warner Losh
57a7beac10 detach before ivar delete. 2004-09-26 05:51:43 +00:00
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