Commit Graph

268 Commits

Author SHA1 Message Date
Nick Hibma
57d56d6643 Add Sun keyboard and NetChip 2000-01-10 22:31:01 +00:00
Bill Paul
61ebfeecad Add the vendor/device IDs for the LinkSys USB100TX.
Note: the .INF file for LinkSys's driver says the vendor ID is 0x66b,
however this does not agree with the vendor ID listed for LinkSys in
the company list from www.usb.org. In fact, 0x66b doesn't seem to appear
in the company list at all. Furthermore, this same vendor ID crops
up in some of the D-Link .INF files. Frankly I don't know what the heck
is going on here, but I need to add 0x66b to usbdevs and call it
something, so here we are.
2000-01-08 07:32:48 +00:00
Bill Paul
dd3e57dac6 Be a bit more discriminating when trying to decide when to screen out
certain PHY addresses in aue_miibus_readreg(). Not all adapters based
on the Pegasus chip may have their PHYs wired for the same MII bus
addresses: the logic that I used for my ADMtek eval board might not
apply to other adapters, so make sure to only use it if this is really
an ADMtek eval board (check the vendor/device ID).

This will hopefully make the LinkSys USB100TX adapter work correctly.
2000-01-08 06:52:36 +00:00
Bill Paul
5edf2bc0a5 Leave the SOFS value (number of StartOfFrames to wait while filling
an URB before sending ZLP) set to the default. Choosing a bad value
can apparently cause a lockup on some machines/controllers.

Reported by: Doug Ambrisko
2000-01-08 00:40:44 +00:00
Bill Paul
d04bb221f3 Add the vendor and device IDs for a whole bunch of additional USB
ethernet adapters that are supported by the aue and kue drivers.
There are actually a couple more out there from Accton, Asante and
EXP Computer, however I was not able to find any Windows device
drivers for these on their servers, and hence could not harvest
their vendor/device ID info. If somebody has one of these things
and can look in the .inf file that comes with the Windows driver,
I'd appreciate knowing what it says for 'VID' and 'PID.'

Additional adapters include: the D-Link DSB-650 and DSB-650TX, the
SMC 2102USB, 2104USB and 2202USB, the ATen UC10T, and the Netgear EA101.
These are all mentioned in the man pages, relnotes and LINT.

Also correct the date in the kue(4) man page. I wrote this thing
on Jan, 4 2000, not 1999.
2000-01-07 22:18:49 +00:00
Bill Paul
032eb46fbb Cleanups: remove stale comments left over from when I cloned the ADMtek
driver, remove unused member of kue_chain struct also left over from
ADMtek driver.
2000-01-06 07:39:07 +00:00
Bill Paul
a7fffc4bc2 Update copyright date for Y2K (did the other files but forgot this one).
Also update comments to credit to Rob Furr with donating the adapter
that I used for testing. No code changes.
2000-01-05 23:38:07 +00:00
Bill Paul
a40a664637 Correct the vendor ID for KLSI: it's actually 0x5e9. 0x3e8 is the
vendor ID for Aox Inc, which makes the controller engine and/or
firmware for the KLSI chip.
2000-01-05 18:25:53 +00:00
Bill Paul
78126c2704 Doh. Forgot to add the entry for the 3Com 3c19250 to the supported
devices table.
2000-01-05 17:31:05 +00:00
Bill Paul
6998849dc4 Do not attempt to load the firmware a second time. If you reboot your
machine but leave your KLSI adapter plugged into your USB port, it
may stay powered on and retain its firmware in memory. Trying to load
the firmware again in this case will wedge the chip. Try to detect this
in the kue_load_fw() routine and bail if the firmware is already
loaded and running.

Also, in the probe/match routine, force the revision code to the
hardware default and force a rescan of the quirk database. This is
necessary because the adapter will return a different revision code
if the firmware has been loaded. Without the firmware, the revision
code is 0x002. With the firmware, the revision code is 0x202. This
confuses the quirk mechanism, which won't match a quirk to a device
unless the revision code agrees with the quirk table entry.

This makes probe/attach of these devices somewhat more reliable.

Also add a few comments about the device's operation.
2000-01-05 17:13:50 +00:00
Bill Paul
dfd1e98eac Add device driver support for USB ethernet adapters based on the
Kawasaki LSI KL5KUSB101B chip, including the LinkSys USB10T, the
Entrega NET-USB-E45, the Peracom USB Ethernet Adapter, the 3Com
3c19250 and the ADS Technologies USB-10BT. This device is 10mbs
half-duplex only, so there's miibus or ifmedia support. This device
also requires firmware to be loaded into it, however KLSI allows
redistribution of the firmware images (I specifically asked about
this; they said it was ok).

Special thanks to Annelise Anderson for getting me in touch with
KLSI (eventually) and thanks to KLSI for providing the necessary
programming info.

Highlights:
- Add driver files to /sys/dev/usb
- update usbdevs and regenerate attendate files
- update usb_quirks.c
- Update HARDWARE.TXT and RELNOTES.TXT for i386 and alpha
- Update LINT, GENERIC and others for i386, alpha and pc98
- Add man page
- Add module
- Update sysinstall and userconfig.c
2000-01-05 04:27:24 +00:00
Peter Wemm
664a31e496 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 04:46:21 +00:00
Bill Paul
ed63a7aaef This commit adds device driver support for the ADMtek AN986 Pegasus
USB ethernet chip. Adapters that use this chip include the LinkSys
USB100TX. There are a few others, but I'm not certain of their
availability in the U.S. I used an ADMtek eval board for development.
Note that while the ADMtek chip is a 100Mbps device, you can't really
get 100Mbps speeds over USB. Regardless, this driver uses miibus to
allow speed and duplex mode selection as well as autonegotiation.
Building and kldloading the driver as a module is also supported.

Note that in order to make this driver work, I had to make what some
may consider an ugly hack to sys/dev/usb/usbdi.c. The usbd_transfer()
function will use tsleep() for synchronous transfers that don't complete
right away. This is a problem since there are times when we need to
do sync transfers from an interrupt context (i.e. when reading registers
from the MAC via the control endpoint), where tsleep() us a no-no.
My hack allows the driver to have the code poll for transfer completion
subject to the xfer->timeout timeout rather that calling tsleep().
This hack is controlled by a quirk entry and is only enabled for the
ADMtek device.

Now, I'm sure there are a few of you out there ready to jump on me
and suggest some other approach that doesn't involve a busy wait. The
only solution that might work is to handle the interrupts in a kernel
thread, where you may have something resembling a process context that
makes it okay to tsleep(). This is lovely, except we don't have any
mechanism like that now, and I'm not about to implement such a thing
myself since it's beyond the scope of driver development. (Translation:
I'll be damned if I know how to do it.) If FreeBSD ever aquires such
a mechanism, I'll be glad to revisit the driver to take advantage of
it. In the meantime, I settled for what I perceived to be the solution
that involved the least amount of code changes. In general, the hit
is pretty light.

Also note that my only USB test box has a UHCI controller: I haven't
I don't have a machine with an OHCI controller available.

Highlights:

- Updated usb_quirks.* to add UQ_NO_TSLEEP quirk for ADMtek part.
- Updated usbdevs and regenerated generated files
- Updated HARDWARE.TXT and RELNOTES.TXT files
- Updated sysinstall/device.c and userconfig.c
- Updated kernel configs -- device aue0 is commented out by default
- Updated /sys/conf/files
- Added new kld module directory
1999-12-28 02:01:18 +00:00
Bill Paul
c0cdcd0b3e Fix one bug and make one minor enhancement:
- In uhci_intr() check to see if sc->sc_bus.bdev is NULL, and if it is,
  ack any pending interrupts and disable them, then return. It is possible
  for interrupts to be delivered the moment a handler is set up at attach
  time in uhci_pci.c, particularly when attempting to kldload the usb.ko
  module after the system is already up. However the driver isn't ready
  to field interrupts at that time and certain pointers in the softc
  struct aren't initialized yet, and we invariably end up falling off
  the end of one of them. The effect is that kldloading the usb module
  will panic the system in uhci_intr(). This added sanity check stops
  this from happening: I can now kldload the usb.ko module without any
  problems and load/attach other USB drivers after it.

  Of course the uhci driver has no detach method, but that's another
  problem.

- In uhci_run(), set the UHCI_CMD_MAXP bit in the command register to
  allow 64-byte packets to be used for full speed bandwidth reclamation.
  Certain high speed devices (in this case the ADMtek USB ethernet
  adapter) require this bit to be set, otherwise babble errors occur
  at the end of large (between 1100 and 1500 byte) transfers. This
  should not affect other devices, although supposedly it is less efficient
  than the 32-byte setting. Unfortunately, this is a per-bus setting,
  not a per-device setting, so we can't just enable it for certain
  devices on the USB bus.
1999-12-23 05:18:58 +00:00
Kazutaka YOKOTA
7a4803c7f6 - Add a module event function to the ukbd driver and make the ukbd KLD
module work.
- Delete unnecessary #include.
1999-12-13 10:36:36 +00:00
Nick Hibma
a234661ae9 Add vendor NetChip with its device NET1080 (host-to-host adapter) 1999-12-07 01:19:51 +00:00
Matthew N. Dodd
fe0d408987 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
Nick Hibma
b47337d347 Fix the 'usb0: USB revision unknown, not supported' people have been seeing
by identifying the version in the PCI drivers.

The OHCI driver just presets this to 1.0 as it is not specified in the
PCI registers anywhere. This should be revisited once USB 2.0 is in
wide spread use.
1999-12-03 01:34:42 +00:00
Nick Hibma
1d7490cce6 In one queue all the TDs (transfer descriptor, packets) for one transfer
are queued.  Traverse the queues vertically and then horizontally.
This means that TDs for one xfer are transmitted back to back until the
first NAK or error condition. Up to now we transmitted a TD per frame
and transmitted the next TD in the next frame.

The old approach is more fair if you have the end of the queue point at
the beginning of the control transfer queue, but also a lot more overhead
due to the fact that the QHs have to be read more often.

The new approach squirts the packets down the line as fast as possible
for one transfer and then does the next one. In the current situation,
with fairly empty USB buses, this is a more sensible approach. We might
have to revisit the scheduler later however.

It speeds up large transfers (Zip drive, Host-To-Host adapters) on UHCI
by a factor of 5 and makes it as fast as OHCI on the bus.

The next problem to solve is the question why the limit is 300kb/s and
not 1000/kb/s (kb == kilobyte).
1999-12-02 16:43:18 +00:00
Nick Hibma
f8a96f1018 Commit for r1.29 of ugen.c was wrong. All the ugenX* device
entries were like the entries for ugen0* device.
1999-11-30 01:48:12 +00:00
Nick Hibma
eaa824fc37 Update de driver for the request->xfer changes.
Add a remark about how the system will panic after you've unplugged the
drive.
1999-11-28 23:55:52 +00:00
Nick Hibma
e3867a1a44 Woops, it seems to fail initialisation. Disabled while I am figuring out
how to get the USB revision from the OHCI controller.

Now where did I leave that spec? ...
1999-11-28 22:56:26 +00:00
Nick Hibma
4fe1353de0 Correct the last parameter for clalloc 1999-11-28 21:07:11 +00:00
Nick Hibma
a9909bdaab Synchronisation with NetBSD 1999/11/27
- more req[uest]->xfer changes.
- get the corresponding NetBSD Id's right

ohci.c
   - move untimeout above print statement
   - remove usb_delay that panics the system (tsleep in intr context) when
   ohcidebug > 5.

ugen.c
   - create the devices for endpoints with make_dev.

uhub.c
   - change from using usbdebug to uhubdebug
   - add more debugging statements
1999-11-28 21:01:06 +00:00
Nick Hibma
961c5779bc Add devnames, the device names the drivers attached to for usbd.
0 -> NULL changes.
Add realloc (for OpenBSD)
1999-11-28 20:55:22 +00:00
Nick Hibma
3475de90b2 Add a quirk for the Altec ASC495 speakers. They pretend to support the
audio class, but they don't
1999-11-28 20:48:08 +00:00
Nick Hibma
cf6e42a4a9 Add PCI_USBREV_1_1 1999-11-28 20:47:27 +00:00
Nick Hibma
17d98133fb Add USB revision strings and numbers. 1999-11-28 20:46:29 +00:00
Nick Hibma
66272d3701 Remove some bogus bus methods peter added. We are hardly doing
anything as a bus.
1999-11-22 03:22:43 +00:00
Nick Hibma
937791192a Addition of new fields to the usb_devinfo struct to enable the new
and shiny usbd daemon to handle events.

usb_port.h:
- Add a macro to retrieve the unit number from a USBBASEDEVICE

usb.h, usb_subr.c:
- Add fields to the device_info struct.

usb_subr.c:
- Fill in the new fields.
- Remove the notification of the event up a bit to make sure all the
  information is still available to fill the usb_devinfo struct.

This requires recompilation of usbdevs (src/usr.sbin/usbdevs) and the
ezdownload/ezupload (ports/misc/ezload) utilities in any case.
1999-11-21 17:30:42 +00:00
Nick Hibma
88ea580e34 Revoke the vnodes on detach. This avoids the crashes people have seen
when moused was still running when the mouse was detached.

Convert uhid to use make_dev while I am there. Ugen still needs to be
converted.
1999-11-21 17:25:30 +00:00
Nick Hibma
6c1119c8a5 Enclosed the arguments of binary and in brackets. 1999-11-21 17:22:30 +00:00
Nick Hibma
6c20390aa7 Make the event creation work
- Create the /dev/usb event queue device node.
- Add usbread to the cdevsw.
- Also hide the many minor() behind a USBUNIT macro.
1999-11-19 13:13:28 +00:00
Nick Hibma
5630d3135e Add usbdevs and friends. 1999-11-18 18:02:44 +00:00
Nick Hibma
3d45ad67b2 Change the clist reservation from 0 to buffer size.
Submitted by:  mmoeller@infolibria.com
1999-11-18 12:50:48 +00:00
Nick Hibma
c907e117dd Missed a name change. 1999-11-18 12:45:09 +00:00
Nick Hibma
3241be7550 Synchronisation with NetBSD as of 1999/11/16:
Cleaning up the code:
- Declare many functions static
- Change variable names to make them more self explanatory
- Change usbd_request_handle -> usbd_xfer_handle
- Syntactical changes
- Remove some unused code
- Other KNF changes

Interrupt context handling
- Change delay to usbd_delay_ms were possible (takes polling mode into
  account)
- Change detection mechanism for interrupt context

Add support for pre-allocation DMA-able memory by device driver

Add preliminary support for isochronous to the UHCI driver (not for OHCI
yet).

usb.c, uhci.c, ohci.c
- Initial attempt at detachable USB host controllers
- Handle the use_polling flag with a lttle more care and only set it if
we are cold booting.

usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c
- Make sure an aborted pipe is marked as not running.
- Start queued request in the right order.
- Insert some more DIAGNOSTIC sanity checks.
- Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.

usb.c, usb_subr.c
- Add an event mechanism so that a userland process can watch devices
  come and go.

ohci.c
- Handle the case when a USB transfer is so long that it crosses two
  page (4K) boundaries.  OHCI cannot do that with a single TD so we make
  a chain.

ulpt.c
- Use a bigger buffer when transferring data.
- Pre-allocate the DMA buffer.  This makes the driver slightly more
  efficient.
- Comment out the GET_DEVICE_ID code, because for some unknown reason it
  causes printing to fail sometimes.

usb.h
- Add a macro to extract the isoc type.
- Add a macro to check whether the routine has been entered after splusb
  and if not, complain.

usbdi.c
- Fix a glitch in dequeueing and aborting requests on interrupt pipes.
- Add a flag in the request to determine if the data copying is done by
  the driver or the usbdi layer.
1999-11-17 22:33:51 +00:00
Nick Hibma
2c15f8aa97 Add many new devicelabels
Rename a few (I wish companies would stop buying each other)

Add a quirk entry for hubs that say they are self powered but are
in fact bus powered (usage in uhub follows shortly).
1999-11-12 23:31:03 +00:00
Nick Hibma
0e46cd3e22 Fix the computation of the status of the transfers. It never saw a STALLED
condition for Short transfers.

Change the scheduling to Depth first. We now transfer as many TD's as
possible from QH before moving to the next queue (Breadth first). It should
still be verified that this does not lead to starvation in a busy system
(in the case were transfers are added to the beginning of the control
or bulk queues).
1999-11-11 22:32:55 +00:00
Nick Hibma
babd82dfa2 Avoid the usurping message 1999-11-11 17:36:33 +00:00
Nick Hibma
0b0f3f6c3d The Qtronix keyboard has a built in PS/2 port for a mouse.
It however posts a bogus button up event once in a while. Whenever
we receive dx=dy=dz=buttons=0 we postpone adding it to the queue for
50msecs with a timeout. If in the meantime something else is posted
the event is ignored.

This avoids the problem Nik Sayer reported. He noticed that X windows
would drop and pick up a window once in a while.

Thanks, Nik, for supplying me with the keyboard to fix the problem!
1999-11-08 23:58:33 +00:00
Nick Hibma
25ead8013f Add QTronix keyboard with PS/2 mouse connector 1999-11-08 23:50:00 +00:00
Nick Hibma
396f1f268d remove superfluous header include
Submitted-By:	phk
1999-11-08 23:47:34 +00:00
Nick Hibma
031911c604 Remove superfluous header file includes
Remove definition of initialiser.

Some clean up.
1999-11-08 21:12:25 +00:00
Nick Hibma
24b4921ad1 Remove superfluous header file includes.
Pushed-By:	phk
1999-11-08 21:06:21 +00:00
Poul-Henning Kamp
44d1184e81 Rename remove_dev() to destroy_dev().
Nagged about by:        msmith
1999-11-08 07:44:01 +00:00
Peter Wemm
b09ce13f07 Use cdevsw_add() explicitly as a workaround for DEV_DRIVER_MODULE().
This should be changed to use make_dev() at some point.
1999-11-08 07:24:55 +00:00
Peter Wemm
bda20b64e4 ulpt.c and ums.c already uses make_dev(), so there's no need to use the
(presently broken) DEV_DRIVER_MODULE().  Use DRIVER_MODULE() directly.
1999-11-08 07:10:48 +00:00
Nick Hibma
cd7a0684fd Move the include of device.h into the NetBSD specific section.
Submitted by:	Guy Helmer <ghelmer@scl.ameslab.gov>
1999-10-08 07:38:11 +00:00
Nick Hibma
33ccf7c7a9 Make the umodem stub compile 1999-10-07 21:09:08 +00:00
Nick Hibma
53ec492bb8 Remove a debugging printf. 1999-10-07 21:08:29 +00:00
Nick Hibma
92fc9a510e Add make_dev and remove_dev. 1999-10-07 21:06:52 +00:00
Nick Hibma
354b93e124 priorities weren't correct (old version). 1999-10-07 20:58:43 +00:00
Nick Hibma
8c895d718b Major synchronisation with the NetBSD USB stack:
- Some cleanup and improvements in the uhci and ohci drivers
- Support for plugging and unplugging devices improved
- Now available is bulk transport over OHCI controllers
- Resume and suspend have been temporarily been disabled again.  Proper
  support for it is available in the uhci.c and ohci.c files but I have
  not yet spent the brain cycles to use it.
- OpenBSD now uses the USB stack as well
- Add FreeBSD tags
1999-10-07 19:26:38 +00:00
Nick Hibma
82799545e3 remove the use of uhci_reset to wake up the controller after
resume/suspend (->resume is broken again, will be fixed properly ASAP)

style fixes
1999-10-07 18:56:10 +00:00
Nick Hibma
271ef6615e Remove last bits and pieces of NetBSD porting.
Remove the use of ukbd_disconnect and replace it with direct
calls to disable.
Change printf to DPRINTF
Remove the use of usbd_lock, change it to splusb()/splx()
1999-10-07 18:53:08 +00:00
Nick Hibma
dc73fb2b83 Remove the last bits and pieces left over from porting the driver
from NetBSD.
1999-10-07 18:50:46 +00:00
Nick Hibma
aa9b0faecb Check for a valid irq number before calling BUS_SETUP_INTR.
Requested-By:	msmith
1999-10-03 20:23:25 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Nick Hibma
2e771e0387 Typo: 'x' should be 'y' (only affects debugging output) 1999-09-01 21:37:56 +00:00
Nick Hibma
51b98897fa Only NetBSD needs sys/device.h. 1999-08-29 11:56:49 +00:00
Nick Hibma
a7fa9611ed Only NetBSD uses sys/device.h
Error-reported-by:	phk
1999-08-29 11:49:22 +00:00
Masahide MAEKAWA
52b18414f4 o fix typo 1999-08-29 02:05:12 +00:00
Masahide MAEKAWA
a0f9149b19 o synchronisation with NetBSD
Reviewed by:	Hick Hibma
Obtained from:	NetBSD
1999-08-29 01:18:32 +00:00
Nick Hibma
ca66889cf7 Correct URL's and change ifdef to if defined (following rest of style in
file)
1999-08-28 20:10:46 +00:00
Nick Hibma
805bb37eb5 Remove NetBSD specific code. USB part is trivial, and the rest is not
shared anyway.
1999-08-28 20:09:34 +00:00
Nick Hibma
d447ab3427 Thou shall do a make before commit.
[grmbl]
Fix duplicate elements in struct in previous commit.
1999-08-28 11:52:12 +00:00
Nick Hibma
d88879933b We use device_set_desc_copy, so we do not need to free the copied text
manually.
1999-08-28 11:35:36 +00:00
Nick Hibma
f748f71688 Share more between FreeBSD and NetBSD 1999-08-28 11:31:21 +00:00
Nick Hibma
7e8893c9b4 Update the list of devices from NetBSD 1999-08-28 09:39:54 +00:00
Doug Rabson
50de873b59 Fix DMA macros to work on alpha. 1999-08-26 08:41:41 +00:00
Doug Rabson
22147525d2 Don't schedule the next transaction if the pipe is being aborted. 1999-08-26 08:40:55 +00:00
Nick Hibma
0b77022752 Reset the UHCI controller when the device comes back from suspend.
This should be replaced by proper support for suspend one day (global
suspend).

Submitted-by:   Christopher Masto <chris@netmonger.net>
1999-08-23 21:00:08 +00:00
Kazutaka YOKOTA
800da3b22a - Remove cdevsw entry points in individual keyboard drivers;
instead, use generic entry points for all drivers.
- Eliminate bogus makedev().
- Eliminate softc in the lower drivers, as it is no longer necessary.

Submitted (95%) by: phk
1999-08-22 09:52:33 +00:00
Nick Hibma
25519565df 1) rename dev->self to be consistent
2) use device_printf
3) properly tear down and disable interrupts when init fails
1999-08-18 10:24:59 +00:00
Nick Hibma
6efd8273f4 - Added documentation
- fix bug in data toggle handling
1999-08-17 07:36:34 +00:00
Nick Hibma
e0f5b7a3be Protect the file interface against disconnects. 1999-08-12 18:55:41 +00:00
Matthew N. Dodd
15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
Nick Hibma
2cc20f83b3 Every reqh in an aborted pipe is given status CANCELED and the callback is
called. It might be necessary to split that routine into two parts in
which calling the callback is not done at splusb().
1999-07-27 20:22:29 +00:00
Nick Hibma
6d38342e16 Add comments, change variable names to make them consistent (r -> err,
timo_handle -> timeout_handle, p -> pipe, *pipe -> *rpipe, etc.)
1999-07-25 18:54:22 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Nick Hibma
2677b5a4db Add the semi-official Bulk protocol id 'P' 1999-07-03 22:19:41 +00:00
Nick Hibma
fd7a5fcd8e Add MultiTech Atlas modem 1999-06-27 22:28:02 +00:00
Nick Hibma
616ff839aa Remove superfluous semi-colon 1999-06-27 22:24:20 +00:00
Nick Hibma
178e4460ef Replace usbd_device_set_desc by device_set_desc_copy 1999-06-27 09:42:40 +00:00
Nick Hibma
7678b59a40 Change 'device' to 'self', to be more like the rest of the code 1999-06-26 12:55:25 +00:00
Nick Hibma
923938f93a Only print the device name once, during attach (device_quiet) 1999-06-21 21:32:15 +00:00
Nick Hibma
c1fc766d3f 1) Do not include usbdivar.h and access the interface descriptor through
usbd_get_interface_descriptor
2) remove soft reset. It's been dropped from the USB Mass Storage Bulk-Only
   Specification
3) move the clear feature halt to the reset routine.
1999-06-20 15:46:13 +00:00
Nick Hibma
f06b2abff3 Remove option USBVERBOSE
Add the options for debugging used in dev/usb/*.c

Submitted by:	Kazu
1999-06-16 17:34:36 +00:00
Nick Hibma
85dd1453b1 1) remove the soft reset after a command failed.
2) remove printing of errno and errstr
1999-06-13 22:09:14 +00:00
Nick Hibma
7b69218647 1) Add non-blocking I/O on read
2) Add checks to make sure we do not dereference the softc when not found
because the device has been removed.
1999-06-13 20:49:12 +00:00
Nick Hibma
b24ecce39c Shorten the strings a bit (remove 'Host') 1999-06-13 20:46:10 +00:00
Nick Hibma
bb32aa3960 Add remark about where bInterfaceProtocol number for USB Zip drive comes
from. 0x50 == 'P' for protoype.

Obtained from:	Pat LaVarre <LAVARRE@iomega.com> on linux-usb@suse.com
1999-06-04 12:41:42 +00:00
Nick Hibma
509a03961f USB stopped working as of the recent cdevsw cleanup. This fixes that. 1999-06-01 07:22:01 +00:00
Nick Hibma
20f81fcbbc Remove the stub driver. It's useless. 1999-06-01 07:18:53 +00:00
Nick Hibma
a0557cd697 usbd_get_request_status now only returns the value if the associated
pointer is passed.
1999-06-01 06:39:03 +00:00
Nick Hibma
114278b089 1) Remove the definition of usb_cdc_generic_descriptor_t. It is
equivalent to usb_descriptor_t

2) Rename USB_CDC_CM_CM_OVER_DATA to USB_CDC_CM_OVER_DATA
1999-05-31 22:35:55 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +00:00
Nick Hibma
6e3802969a Enable attachment of multiple drivers to a single device. 1999-05-30 18:49:17 +00:00
Nick Hibma
2eaf666111 Notify CAM of the removed device on detach. 1999-05-30 18:46:04 +00:00