Commit Graph

1117 Commits

Author SHA1 Message Date
Josef Karthauser
f4e618b499 Regen 2003-01-20 00:51:19 +00:00
Josef Karthauser
6ee4bee25a Support for the "Seiko Epson Perfection 1260 scanner".
Submitted by:	Michael Lestinsky <michael@lestinsky.de>
MFC After:	3 days
2003-01-20 00:41:30 +00:00
Josef Karthauser
e22514406d Some USB devices are not prepared to deal with a single byte string
descriptor request, which usbd_get_string_desc() uses to get the
length of a descriptor.  One device for instance returns a full 8
byte long packet instead which confuses the rest of the stack and
leads to the USB port being reset.  The fix is to instead request
two bytes, but not to complain if we only get one.

Submitted by:	kan
MFC after:	3 days
2003-01-14 23:07:43 +00:00
Warner Losh
26b6ab4e45 Make compile cleanly when USB_DEBUG is defined. 2003-01-12 08:28:14 +00:00
Warner Losh
52b019b3ed Merge from NetBSD and arrange for FreeBSD's slight differences in
ucom.

This gets my Sanyo SCP-4900 working.

Approved by: joe
2003-01-09 04:24:28 +00:00
David Xu
ce5c58974a Retry to get full device descriptor, this let my slow CD Tower device work. 2003-01-08 05:03:35 +00:00
Warner Losh
3225a9881d Update to correct NetBSD Id 2003-01-02 04:22:44 +00:00
Warner Losh
d77b690ff6 Sync to 1.104 of usbdevs 2003-01-02 04:21:38 +00:00
Warner Losh
cb33fc95b9 Add NEODIO TURBOCONNECT (from NetBSD) 2003-01-02 04:21:04 +00:00
Warner Losh
1732632481 MFNetBSD through 1.42 (to be committed in a moment by me).
o Whitespace nits
o NEODIO added
2003-01-02 04:15:55 +00:00
Alexander Kabaev
851d388443 Do not print the value of sc pointer before is has been ininialized. 2003-01-02 02:46:13 +00:00
Alexander Kabaev
64fe778489 Create debug sysctl nodes if USB_DEBUG is defined.
UBSA_DEBUG is inconsistent with other drivers.
2003-01-02 02:38:57 +00:00
Warner Losh
82e10e2428 It appears that the SANYO SCP-4900 needs similar quirks to the
Metricom Ricochet GS modem.  Add them here.

# A new umodem appears to be needed to make the sanyo phone work, but that's
# more extensive and will come after coordination.
2003-01-01 20:21:48 +00:00
Warner Losh
4dac02c8db Sync to usbdevs 1.103 2003-01-01 20:18:58 +00:00
Warner Losh
4cce0eba8d Add Sanyo SCP-4900 phone. It needs quirks. 2003-01-01 20:18:15 +00:00
Warner Losh
f56d03c008 Now that we've 'branched' 5.0, desupport FreeBSD 3.x in this driver. It
appears that NetBSD has already done this in their tree.
2003-01-01 20:15:42 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Ian Dowse
326b4d74c4 When resuming after a system suspend, re-issue the UHCI_CMD_MAXP
command in case this setting was not saved. Since bandwidth reclamation
(-current only) often results in bus activity continuing to the end
of every frame, most transfers would fail with IOERROR if this
setting is missed.

Reviewed by:	n_hibma
MFC after:	1 week
2002-12-26 13:25:57 +00:00
Matthew Dillon
6c82636572 Revert part of the last commit. Do not fake-up the cylinders to make
the sectors fit (at least, don't fake them up any more then they are
already faked up).
2002-12-22 04:46:44 +00:00
Matthew Dillon
cc7bab9032 Modify the fake cylinders calculation so it is >= the size of the device,
not < the size of the device.  This avoids geom complaints.

Fix a serious bug in the handling of the RS_NO_CLEAR_UA quirk.  When we
go and insert the test-unit-ready command the umass_cam_quirk_cb() function
sets the status as if the READ_CAPACITY command suceeded when, in fact, it
did not.  This leads to the CAM layer trying to use garbage in the return
buffer and panicing the system (or doing other bad things).

Add a quirk entry for MSYSTEMS DISK-ON-KEY, which is sold under the Sony
brand as a solid state disk-on-key usb device.  This device requires
several quirks to work properly.

Note that the disk-on-key device will not work properly until CAM also
gets a quirk entry for it, which has been submitted to the CAM maintainer,
and you may have to temporarily uncomment the DELAY() as well.  -current
does not properly wait for devices to power up so you may also have
to temporarily uncomment the DELAY(300000) to make your device work.
A solution must be found to that issue.

MFC after:	3 days
X-MFC note:	the quirk support must MFCd before this patch can be
2002-12-20 18:56:55 +00:00
Matthew Dillon
698df1f738 Fix two bugs in the DMA chaining code for OHCI. The first bug is that
the dataphysend calculation could only possibly work if the virtual buffer
is also physically contiguous.  Calculate dataphysend by calculating the
ending virtual address first, then converting to a physical address.

The second bug applies only to NetBSD and OpenBSD and involves the curlen
calculation in the two-contiguous-physical-pages case (which we don't support).

Also cleanup the use of the OHIC_PAGE() macro on dataphysend and add a panic
if len goes negative (meaning we lost the physical page translation
representing the end of the buffer).

IMHO the dataphysend is still bokered since it might be misrepresented
by shared userland page mappings.  The whole section needs to be rewritten
to use the virtual address range.

MFC after:	3 days
2002-12-20 18:47:39 +00:00
Dag-Erling Smørgrav
f0d91fb7ea Ignore IEEE1284 descriptors when looking for bidirectional mode. We don't
really know how to talk IEEE1284, so attaching to that interface makes the
printer unusable.

Approved by:	joe
2002-12-16 14:22:59 +00:00
Dag-Erling Smørgrav
6ed6884063 MFNetBSD: 1.52-1.55
Mostly OpenBSD-related changes.  Remove newline from panic string.  Remove
an unreachable break statement.
2002-12-16 14:20:26 +00:00
Bernd Walter
765187cac7 The uftdi driver runs with multiple instances.
Remove a comment claiming the opposite.

Approved by: re (rwatson)
             gallatin (Mentor)
MFC after: 1 week
2002-12-12 19:03:43 +00:00
Josef Karthauser
85105890c2 MFNetBSD: (partial 1.133)
- In ohci_close_pipe, wait 1ms after removing an ED to avoid possible race
  condition.

Approved by:	re (rwatson)
2002-12-09 01:41:24 +00:00
Josef Karthauser
2c123d54ee MFNetBSD:
date: 2002/09/29 20:59:30;  author: augustss;  state: Exp;  lines: +2 -7
    Remove extra call to ohci_rem_ed().  From kern/18448, Takeshi Nakayama.

Approved by:	re (rwatson)
2002-12-09 01:39:32 +00:00
Josef Karthauser
317cca359c Don't corrupt the ED list whilst removing an entry.
Submitted by:	Bernd Walter <ticso@cicely8.cicely.de>
Approved by:	re (rwatson)
2002-12-09 00:55:50 +00:00
Josef Karthauser
11f314d4cb Apply some fixups in the driver_t's.
Submitted by:	akiyama
MFC after:	3 days
2002-11-17 14:22:37 +00:00
Josef Karthauser
97764f126a Use a sysctl for controlling the debugging output.
Submitted by:	akiyama
2002-11-17 14:08:48 +00:00
Josef Karthauser
263de9cd60 Fix a typo in a console message.
Submitted by:	akiyama
MFC after:	3 days
2002-11-17 13:33:55 +00:00
Sam Leffler
673d91916d network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets
  up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls

Reviewed by:	many
Approved by:	re
2002-11-14 23:54:55 +00:00
Michael Reifenberger
ad59e7ecbd Reviewed by: n_hibma
MFC after:	2 weeks
fix XPT_CALC_GEOMETRY to fill in some reasonable values.
Inspired by aic/sbp.
2002-11-08 07:57:42 +00:00
John Baldwin
9cbe11ea18 Cast a ptrdiff_t value to an int to quiet a warning since we don't support
%t in the kernel printf yet.
2002-11-07 21:34:21 +00:00
Josef Karthauser
8ecdcb3ff3 Packed structures are defined differently in older gcc's, like the one
currently in -stable.  Put the exception into usb.h instead of having it
hard coded in the sound code.
2002-11-06 21:37:21 +00:00
Josef Karthauser
cfccb34a24 There's no need for a locally defined usb_proc_t when we've got
usb_proc_ptr that does the same thing.
2002-11-06 14:29:27 +00:00
Ian Dowse
9ce4f7a0f0 Specify the correct protocol for the Olympus C-1 camera. It appears
that this entry was accidentally given the wrong protocol in revision
1.61.

PR:		kern/42417
Submitted by:	"Moriki, Toshiomi" <toshiomi@whi.m-net.ne.jp>
2002-11-01 01:13:20 +00:00
Ian Dowse
8a7562d079 Check for errors and zero-length transfers in the ulpt_input() input
pipe callback function, and just return if these cases are detected.
Without these checks, the ulpt driver may cause an infinite loop
of failing USB transfers that can hang the whole machine. This makes
printing work for me on a HP DJ950C printer.
2002-10-30 01:18:58 +00:00
Alexander Kabaev
87e89c7595 Whitespace fixes per style(9)
Approved by:	obrien
2002-10-19 21:58:11 +00:00
Alexander Kabaev
7d59efa9a8 Add device driver for Belkin F5U103 and compatible USB-to-serial adapters.
Reviewed by:	n_hibma
Approved by:	obrien
2002-10-08 03:09:57 +00:00
Alexander Kabaev
139b2d67cd Regen after usbdevs rev. 1.102.
Reviewed by:	n_hibma
Approved by:	obrien
2002-10-08 03:04:14 +00:00
Alexander Kabaev
469f01ba8c Add entries for:
Belkin F5U103
	Belkin F5U120-PC Hub
	GoHubs GoCOM232
	Peracom single port
USB-to-serial adapters.

Reviewed by:	n_hibma
Approved by:	obrien
2002-10-08 03:00:37 +00:00
Scott Long
316ec49abd Some kernel threads try to do significant work, and the default KSTACK_PAGES
doesn't give them enough stack to do much before blowing away the pcb.
This adds MI and MD code to allow the allocation of an alternate kstack
who's size can be speficied when calling kthread_create.  Passing the
value 0 prevents the alternate kstack from being created.  Note that the
ia64 MD code is missing for now, and PowerPC was only partially written
due to the pmap.c being incomplete there.
Though this patch does not modify anything to make use of the alternate
kstack, acpi and usb are good candidates.

Reviewed by:	jake, peter, jhb
2002-10-02 07:44:29 +00:00
Josef Karthauser
854add2319 Gremlins ate my comment!
Submitted by:	Clive Lin <clive@tongi.org>
2002-09-30 19:12:43 +00:00
Josef Karthauser
fe74650816 In rev 1.51 of usb_port.h I switched over to using the USB_USE_SOFTINTR
code path to fix a bug in the non USB_USE_SOFTINTR path that caused
the usb bus to hang and generally misbehave when devices were unplugged.
In the process though it also reduced the throughput of usb devices because
of a less than optimal implementation under FreeBSD.

This commit fixes the non USB_USE_SOFTINTR code in uhci and ohci
so that it works again, and switches back to using this code path.

The uhci code has been tested, but the ohci code hasn't.  It's
essentially the same anyway and so I don't envisage any difficulties.

Code for uhci submitted by:	Maksim Yevmenkin <myevmenk@exodus.net>
2002-09-30 17:50:18 +00:00
Josef Karthauser
0fbf938869 MFNetBSD: Increasre the reset recovery time. (rev 1.69) 2002-09-27 19:55:37 +00:00
Josef Karthauser
33e8332333 MFNetBSD: Update class codes. (rev 1.68) 2002-09-27 19:52:42 +00:00
Josef Karthauser
8bca50af6b MFNetBSD: Add Bluetooth related classes etc. (rev 1.67) 2002-09-27 19:45:37 +00:00
Josef Karthauser
fef80c2cba MFNetBSD: revision 1.66
Get rid of trailing white space.
2002-09-27 19:42:29 +00:00
Alfred Perlstein
ebc82cbbf0 s/__attribute__((__packed__))/__packed/g 2002-09-23 06:25:08 +00:00
Josef Karthauser
56c4ff5427 Deprecate the USB_SETDEBUG IOCTL as debug levels can now be set
using sysctl.
2002-09-15 22:35:58 +00:00
Josef Karthauser
9f1c775798 Add a device description for Intel 82801CA/CAM (ICH3) USB controller
USB-C.

PR:	kern/41963
2002-08-28 20:24:49 +00:00
Philippe Charnier
93b0017f88 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
Archie Cobbs
4a6a94d8d8 Replace (ab)uses of "NULL" where "0" is really meant. 2002-08-22 21:24:01 +00:00
Josef Karthauser
24177c6cb0 Use uhci_pci_match to return the device description and rework the
vendor description code.
2002-08-18 11:52:47 +00:00
Josef Karthauser
f992fafdd7 Add a comment to remind that uhci_pci_match will never return NULL.
Don't display the "New UHCI DeviceId" message unless booting verbosely.
Use a switch statement for the vendor match code.
2002-08-18 11:42:11 +00:00
Josef Karthauser
8f5fc1b728 Consolidate the device recognition code. 2002-08-18 00:24:03 +00:00
Josef Karthauser
1e03ff6cf0 MFNetBSD: 1.51
Move a quirk tests so the message printed about directionality is
right.
2002-08-16 12:16:07 +00:00
Josef Karthauser
a6103a945a MFNetBSD: (1.50) Get rid of trailing white space. 2002-08-16 12:13:26 +00:00
Josef Karthauser
3a89188b79 MFNetBSD:
revision 1.127
	date: 2002/08/07 20:03:19;  author: augustss;  lines: +4 -8
	Fix some braindead calls to free memory (only encountered
	under low memory conditions).  From OpenBSD.
2002-08-16 09:10:43 +00:00
Josef Karthauser
c5849647cc UHCI_DEBUG -> USB_DEBUG. 2002-08-15 22:41:20 +00:00
Josef Karthauser
31f48889ad Add the uftdi ucom driver which supports the following adapters:
Inland UAS111
	QVS USC-1000
	HP USB-Serial adapter shipped with some HP laptops

Submitted by:	takawata
MFC After:	7 days
2002-08-11 23:32:33 +00:00
Josef Karthauser
0d7655be61 Regen 2002-08-11 21:19:18 +00:00
Josef Karthauser
4910ddcf3f Add Palm M515.
Submitted by:	Luiz Eduardo Roncato Cordeiro <cordeiro@nic.br>
2002-08-11 21:11:14 +00:00
Josef Karthauser
3b7efc56d0 Use the hw.usb sysctl tree instead of debug.usb.
Requested by:	imp
2002-08-08 12:05:51 +00:00
Josef Karthauser
528d1a7fbc Replace the FOO_DEBUG definitions with USB_DEBUG, and switch the
debugging levels to off by default.  Now that debug levels can be
tweaked by sysctl we don't need to go through hoops to get the
different usb parts to produce debug data.
2002-07-31 14:34:36 +00:00
Josef Karthauser
163ddd953b Wake up Joe! It would help if I included sys/sysctl.h. 2002-07-31 14:20:07 +00:00
Josef Karthauser
140d7e756f Add a sysctl (debug.usb.uhub) for tweaking the uhub debug levels. 2002-07-31 13:58:15 +00:00
Josef Karthauser
0e6b196686 Get bored with hard coded debug level variables and introduce a debug.usb
sysctl tree for tweaking them real-time.

Reviewed by:	iedowse
2002-07-31 13:33:55 +00:00
Josef Karthauser
5e33115f05 It should be "ucom", not "usio". 2002-07-31 10:52:46 +00:00
Josef Karthauser
39db6f7ae0 Regen 2002-07-31 10:05:58 +00:00
Josef Karthauser
0919ca4bc4 MFNetBSD: uvisor.c (1.14, 1.15)
Add support for Palm (M500, M505, M125) and Sony devices (Clie 4.0 and 4.1).
2002-07-31 10:05:26 +00:00
Josef Karthauser
34b549fdf3 Remove trailing white spaces
Obtained from: NetBSD (1.16)
2002-07-31 09:24:41 +00:00
Josef Karthauser
f8d314e7c6 Regen 2002-07-31 09:09:50 +00:00
Josef Karthauser
1dc3ed04a2 Add the HP ScanJet 2200C. 2002-07-31 09:07:56 +00:00
Josef Karthauser
7ab45e978a Enable the HP 2200C and Visioneer Scanport 3000 scanners, and remove
some trailing spaces whilst I'm here.

Obtained from:	NetBSD.
2002-07-31 09:05:52 +00:00
Josef Karthauser
b2dd67bba5 Add the Primax (Visioneer) 6200 scanner.
Obtained from:	OpenBSD (via NetBSD)
2002-07-31 08:51:32 +00:00
Josef Karthauser
7ebe6f9e2f Regen 2002-07-30 23:30:56 +00:00
Josef Karthauser
3fc6710b56 Add support for a couple of network adapters; the 3Com 3C460B and
the Belkin USB2LAN.

Obtained from:	NetBSD
2002-07-30 23:30:15 +00:00
Ian Dowse
b4dc6ff9bc Remove some strange code that allocates memory and then immediately
frees it again. The idea was to perform M_WAITOK allocations in a
process context to reduce the risk of later interrupt-context
M_NOWAIT allocations failing, but in fact this code can be called
from contexts where it is not desirable to sleep (e.g. if_start
routines), so it causes lots of witness "could sleep" warnings.
2002-07-30 23:26:22 +00:00
Josef Karthauser
ca095220db Commit a version of the uvisor driver for connecting Handspring
Visors via USB.

Submitted by:	Chia-liang Kao <clkao@clkao.org>
2002-07-30 17:44:28 +00:00
Maxim Sobolev
3c7d68acc8 Regen after usbdevs rev.1.95. 2002-07-30 11:03:50 +00:00
Maxim Sobolev
b8d95a688e Add ID for Luwen EasyDisk USB flash memory drive.
PR:		41081
Submitted by:	demon
MFC after:	5 days
2002-07-30 11:02:35 +00:00
Takanori Watanabe
2e673adddb Regen. 2002-07-25 14:16:47 +00:00
Takanori Watanabe
86b3064d09 MFNetBSD: FTDI USB-serial converter chips description. 2002-07-25 14:15:49 +00:00
John Baldwin
d6ac80d12f Add PCI IDs for the A, B, and C UHCI controllers in the ICH4.
Sponsored by:	The Weather Channel
2002-07-19 22:17:02 +00:00
Ian Dowse
417d8f25fc Re-fetch the interface handle after setting the config number,
because the previous interface handle gets freed when the config
number is set. This fixes a problem where memory could be accessed
after it was freed when the interface was ifconfig'd up.

Reviewed by:	n_hibma
2002-07-15 14:37:36 +00:00
Hajimu UMEMOTO
767f578267 Correct module name of my previous commit. 2002-07-15 11:22:37 +00:00
Hajimu UMEMOTO
ad85ae6de1 When usb is kld, ucom and uplcom were failed to load because of
usbd_abort_pipe undefined.
2002-07-13 10:41:35 +00:00
Josef Karthauser
04b401aa8a It's not "usio" anymore, it's "ucom".
Submitted by:	nsayer
2002-07-10 01:42:25 +00:00
Josef Karthauser
f411925536 Improve detach operation.
Submitted by:	akiyama
2002-07-10 00:52:16 +00:00
Josef Karthauser
d365977464 Include the bmaj entry in the cdevsw for versions of FreeBSD that need it. 2002-07-10 00:46:44 +00:00
Josef Karthauser
c2dc904947 Regen. 2002-07-10 00:43:50 +00:00
Josef Karthauser
92e19cc17e Add another ucom device (ELECOM UC-SGT).
Submitted by:	akiyama
2002-07-10 00:43:10 +00:00
Josef Karthauser
455a6759e8 Regen for SMC 2206USB/ETH EZ Connect adapter. 2002-07-09 16:46:31 +00:00
Josef Karthauser
7109e2c4df MFNetBSD: Add support for the SMC 2206USB/ETH EZ Connect adapter (Pegasus II) 2002-07-09 16:45:03 +00:00
Josef Karthauser
7db8d4d987 Delay the creation of the ugenX device node until we're certain
that the attach succeeded.  (Fixes a potential panic for devices
that fail to attach properly and are subsquently unplugged and then
plugged back in again.)
2002-07-09 01:01:25 +00:00
Nick Hibma
d8880ad0bd Avoid reprobing on loading a driver. This does not work as the ivars set
during the previous probe are stale.

What really should be done is route the probe through
device_probe_and_attach bit this is one of those ICBBATIASS (I can't be
bothered as there is a simpler solution). The user can easily replug the
device after kldloading a new device driver.
2002-06-17 20:57:54 +00:00
Nick Hibma
3a6a5935a8 Set the ivars _after_ checking that the bdev was correctly created instead
of before.
2002-06-17 20:52:26 +00:00
Nick Hibma
1a283dd436 clean up some KASSERTS. 2002-06-17 20:44:37 +00:00
Nick Hibma
eb38329015 Rewrite the probe routine. This makes adding drives and quirks more easy.
While there change a few names to less confusing ones.
2002-06-16 20:53:35 +00:00
Alfred Perlstein
058dc44ca0 Should have been part of recent commit:
Fix GCC warnings caused by initializing a zero length array. In the process,
  simply things a bit by getting rid of 'struct ng_parse_struct_info' which
  was useless because it only contained one field.
But now I'm unbreaking compilation by adjusting these files to the recent
netgraph change.
2002-06-01 07:18:32 +00:00
Alfred Perlstein
fa900b3699 Call destroy_dev in detach routine to cleanup properly otherwise we
panic because of a repeat make_dev if/when the device is reattached
to the system.

Remove an "#if __FreeBSD__" in code that's nested under a "#if __NetBSD__"
(*sigh*)

Reported by: Seth Hettich <sjh@whiskey.ucf.ics.uci.edu>
Tested by: Seth Hettich <sjh@whiskey.ucf.ics.uci.edu>
2002-06-01 06:23:47 +00:00
Josef Karthauser
43c6b63e82 NetBSD have adopted our usage of the DMAADDR macro:
date: 2002/05/28 12:42:39;  author: augustss;
    Change DMAADDR macro slightly.

Update the $NetBSD$ tags to reflect this and make slight changes to
usb_mem.h so that we're in sync with each other.
2002-05-28 20:51:43 +00:00
Josef Karthauser
ca3971124e Regen. 2002-05-27 00:01:21 +00:00
Josef Karthauser
b826a68b7f Add a couple of new aue ethernet adapters from NetBSD:
ELECOM LDUSBLTX
	IODATA USBETTXS
2002-05-27 00:00:48 +00:00
Josef Karthauser
12d2a2a729 Use aue_lookup for looking up devices. 2002-05-26 23:54:37 +00:00
Josef Karthauser
5908b50130 Correct the usage of DMAADDR in a piece of '#if 0'd code. (The compiler
didn't pick it up.)
2002-05-26 22:13:09 +00:00
Josef Karthauser
cc12206976 MFNetBSD:
revision 1.124
    date: 2002/05/26 03:10:02;  author: minoura;  state: Exp;  lines: +3 -3
    Clear done_head in the HCCA *before* acknoledging the interrupt.
    Driver lost some completed transfers under heavy loads.
2002-05-26 22:11:34 +00:00
Josef Karthauser
883d14d6c6 MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100)
date: 2002/05/19 06:24:31;  author: augustss;  state: Exp;
    Update dma memory access API a little.

NetBSD have adopted our way of using the KERNADDR macro.  Update
the revision tags to show that we're in sync, and remove the casts
that they did in their adaptation.
2002-05-26 22:00:06 +00:00
Josef Karthauser
4de1678702 Fix a panic by allocating the iface structure locally in the attach
function instead of in usb_probe_and_attach.
2002-05-23 00:36:14 +00:00
Josef Karthauser
0f19b0d03a Reflect some changes in the NetBSD code path, and sligh adjustments to ours.
(Non-functional changes).
2002-05-23 00:26:06 +00:00
Josef Karthauser
a257364105 Sync with NetBSD. (Non functional changes). 2002-05-22 23:01:13 +00:00
Josef Karthauser
1acba7451d Fix a bug: Use USBD_DEFAULT_INTERVAL instead of USBD_DEFAULT_TIMEOUT
in a call to usbd_open_pipe_ival.
2002-05-22 22:58:38 +00:00
Maxim Sobolev
a88c5d84d1 Regen after changing Device ID string for DaisyTech devices.
MFC after:	1 week
2002-05-20 12:02:54 +00:00
Maxim Sobolev
b42df94a61 Change Device ID string for DaisyTech devices.
Submitted by:	Olexander Kunytsa <kunia@istc.kiev.ua>
MFC after:	1 week
2002-05-20 12:01:58 +00:00
Josef Karthauser
f737c3ae0a MFNetBSD: Bring in the most recent NetBSD and OpenBSD parts. 2002-05-09 21:55:47 +00:00
Peter Wemm
7cca309311 Use usb_callout_init() instead of directly calling callout_init() with
NetBSD's expected arguments.  This unbreaks the kernel compile.

Pointy hat to: joe
2002-05-09 21:08:34 +00:00
Josef Karthauser
4722fea82e MFNetBSD:
revision 1.43
    date: 2001/04/12 01:39:04;  author: thorpej;  state: Exp;  lines: +2 -2
    Switch to USB_USE_SOFTINTR.  The callout hack does indeed work
    fine for systems without generic soft interrupts, even if it is
    a little sub-optimal.  Consider it a penalty for ports not
    implementing a kernel API.

    Addresses kern/11957.  The PR has been open for 4 months, and
    I have work blocked on the continued existence of splimp() in
    the networking code.

The NetBSD patch only switches it on for NetBSD, but I've also
switched it on for FreeBSD in this commit.
2002-05-09 12:49:25 +00:00
Josef Karthauser
567f4af63d MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),
usbdi.h (1.60)
	  (and local changes compatibility changes to ufm.c and urio.c)

    date: 2002/02/11 15:11:49;  author: augustss;
    Give usbd_do_request_flags() an extra argument for the timeout.
2002-05-06 18:23:36 +00:00
Josef Karthauser
38c162edb3 MFNetBSD:
revision 1.94
    date: 2001/12/30 20:26:59;  author: augustss;  state: Exp;  lines: +5 -2
    Make sure we don't have any pending softintrs when entering polling mode.
    Thanks to Darrin for finding and fixing this problem when using USB
    keyboards in DDB.
2002-05-02 22:47:37 +00:00
Josef Karthauser
8a7a68b108 Some non-functional changes to make the differences between NetBSD's
and our version clear to see.
2002-04-29 16:23:14 +00:00
Maxim Sobolev
f4b27e80b3 Regen after rev.1.89 of usbdevs. 2002-04-29 15:02:30 +00:00
Maxim Sobolev
daa77b45ce Change Device ID string for DaisyTech devices to be more sensible.
PR:		37197
Submitted by:	Olexander Kunytsa <kunia@istc.kiev.ua>
2002-04-29 15:01:35 +00:00
Mike Barcroft
a30d4b3270 Move the new byte order function prototypes from <sys/param.h> to
<sys/endian.h>.  This puts us in line with NetBSD and OpenBSD.
2002-04-26 22:48:23 +00:00
Josef Karthauser
c628479a57 Add a power exceeded debug message.
Update the $NetBSD$ ident to match reality.
2002-04-25 12:58:30 +00:00
Josef Karthauser
8e0c4b3892 MFNetBSD:
revision 1.96
    date: 2001/11/22 21:59:33;  author: augustss;  state: Exp;  lines: +3 -3
    Correct a comment.
2002-04-25 12:51:08 +00:00
Josef Karthauser
9206cd4c25 MFNetBSD:
revision 1.95
    date: 2001/11/20 16:09:01;  author: augustss;  state: Exp;  lines: +39 -6
    Sanity check max packet lengths.
2002-04-25 12:49:38 +00:00
Josef Karthauser
cafee33353 MFNetBSD:
revision 1.94
    date: 2001/11/20 13:50:07;  author: augustss;  state: Exp;  lines: +16 -9
    Update for new speed handling.
2002-04-25 12:37:55 +00:00
Josef Karthauser
865fe6dbe4 Revert part of revision 1.49 which was supposed to be white space
only.  In the device probe we don't want to match unless there is
an iface structure already set up.
2002-04-17 12:03:20 +00:00
John Baldwin
3aa68913bc Make this compile again when UMASS_DEBUG isn't defined. 2002-04-11 21:09:41 +00:00
Nick Hibma
b2f485ca0d Delay umass_cam_rescan by 200 ms to make sure attach is finished by the
time we tell CAM to rescan the bus. Together with the previous patch
this should avoid the problem where the devices would wedge because they
got spoken to over two different pipes.

Tested by:	Tomas Pluskal <plusik@pohoda.cz>
2002-04-11 10:34:15 +00:00
Nick Hibma
380ee390fd Postpone I/O to the device until attach has finished. This fixes
attachment after boot in some cases where the device gets confused if
spoken to over two different pipes simultaneously (resulting in TIMEOUT
errors on requesting INQUIRY data).

This solution is far from perfect, as after umass_attach has returned
the USB stack fetches the string descriptors in order for creating the
event that is sent to userland. It just makes the chances of collisions
less likely.

Tested by: 	Tomas Pluskal <plusik@pohoda.cz>
2002-04-10 13:22:12 +00:00
Josef Karthauser
242fcd8d18 Slight tidy up to reduce the differences between our version and NetBSD's.
(No functional changes).
2002-04-09 12:55:46 +00:00
Josef Karthauser
0ad441b80d Lock down Giant in the usb_task_thread() kthread. 2002-04-08 18:13:21 +00:00
Josef Karthauser
64503575e3 Regenerate. 2002-04-08 10:17:19 +00:00
Josef Karthauser
43de0d9175 Add an entry for HP LaserJet 1200. 2002-04-08 10:16:19 +00:00
Josef Karthauser
c9627c73b3 General white space cleanup, to synchronise with NetBSD. 2002-04-07 18:33:12 +00:00
Josef Karthauser
40367ccba9 MFNetBSD:
revision 1.157
    date: 2002/03/16 16:13:41;  author: tsutsui;  state: Exp;  lines: +4 -4
    Fix a couple of typo:
    - s/ehci/uhci/ (in unused arg of macro)
    - s/ohci/uhci/ (in panic message)
2002-04-07 18:15:37 +00:00
Josef Karthauser
24c73fed01 MFNetBSD:
revision 1.156
    date: 2002/03/04 00:53:33;  author: augustss;  state: Exp;  lines: +3 -3
    Use the correct pointer for the timeout abort.
2002-04-07 18:14:08 +00:00
Josef Karthauser
d5b41c2348 MFNetBSD:
revision 1.155
    date: 2002/02/27 12:42:41;  author: augustss;  state: Exp;  lines: +8 -8
    Move the interrupt bailout when a cancelled ii is found.
2002-04-07 18:13:16 +00:00
Josef Karthauser
88bda4a206 MFNetBSD:
revision 1.154
    date: 2002/02/27 12:12:45;  author: augustss;  state: Exp;  lines: +14 -9
    Remove spurious splusb().
    Lower abort hardware wait.
2002-04-07 18:10:10 +00:00
Josef Karthauser
b146ba499d MFNetBSD: uhcireg.h (1.15), uhcivar.h (1.33)
date: 2002/02/11 11:41:30;  author: augustss;
    Switch to new abort mechanism.
2002-04-07 18:06:34 +00:00
Josef Karthauser
7080df5183 MFNetBSD:
revision 1.153
    date: 2002/02/11 11:40:33;  author: augustss;  state: Exp;  lines: +67 -26
    Switch to the same abort mechanism as in [eo]hci; it should be more
    robust.
2002-04-07 18:03:45 +00:00
Josef Karthauser
de36d7b363 MFNetBSD:
revision 1.151
    date: 2002/01/27 23:00:34;  author: augustss;  state: Exp;  lines: +3 -3
    Use M_WAITOK instead of M_NOWAIT when allocating extra descriptors.
    Spotted by OpenBSD.
2002-04-07 17:55:16 +00:00
Josef Karthauser
3ccc9447a9 MFNetBSD: hid.c (1.22), uhci.c (1.150), usb_subr.c (1.97)
date: 2002/01/14 13:23:37;  author: tsutsui;
    Call malloc(9) with M_ZERO flag instead of memset() after malloc().
2002-04-07 17:53:58 +00:00
Josef Karthauser
8c8cd21069 MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)
date: 2001/10/26 17:58:21;  author: augustss;
    s/usbd_alloc_report_desc/usbd_read_report_desc/
2002-04-07 17:13:00 +00:00
Josef Karthauser
5de3d8b11f MFNetBSD:
revision 1.44
    date: 2001/09/15 16:16:28;  author: yamt;  state: Exp;  lines: +3 -3
    correct debug messages.
2002-04-07 17:05:50 +00:00
Josef Karthauser
a0864e3a2a MFNetBSD: uhid.c (1.42 & 1.43), ugraphire_rdesc.h (1.1)
date: 2000/12/29 01:47:49;  author: augustss;
    Supply our own report descriptor (from Nick Hibma) for the Wacom Graphire.
    The descriptor it reports is broken.
    XXX Not tested, because I don't have the device.

    date: 2001/08/15 00:06:49;  author: augustss;  state: Exp;  lines: +3 -1
    If there was a vendor+product locator match return a higher match value.
    Rationale, if you have a device (e.g., a mouse) with a more specific
    driver but want to recognize it with the more generic driver you can
    do that by supplying vendor and product locators for the generic one.
2002-04-07 17:04:01 +00:00
Josef Karthauser
3aebbbbc02 Update $NetBSD$ idents. 2002-04-07 17:02:25 +00:00
Josef Karthauser
cea1dfbfb8 MFNetBSD:
revision 1.148
    date: 2001/11/21 12:25:55;  author: augustss;  state: Exp;  lines: +3 -3
    Fix typo in comment.
2002-04-07 16:38:14 +00:00
Josef Karthauser
9933dd4a4d Remove the overt differences between ours and NetBSD's version of this file. 2002-04-07 16:36:30 +00:00
Josef Karthauser
192ed2a524 Re-add the definitions of htole32(x) and le32toh(x) for OpenBSD. 2002-04-07 15:41:45 +00:00
Josef Karthauser
c82c28223c MFNetBSD:
revision 1.121
    date: 2002/03/16 16:11:18;  author: tsutsui;  state: Exp;  lines: +4 -4
    Fix a couple of typo:
    - s/ehci/ohci/ (in unused arg of macro)
    - s/uhci/ohci/ (in debug message)
2002-04-07 15:18:00 +00:00
Josef Karthauser
041ed0fb76 MFNetBSD: ohci.c (1.119), ohcivar.h (1.30)
date: 2001/12/31 12:20:35;  author: augustss;
    Change xfer abort to wait for the softintr to run.
2002-04-07 15:16:31 +00:00
Josef Karthauser
d9a23dc02c MFNetBSD:
revision 1.118
    date: 2001/12/27 18:48:28;  author: augustss;  state: Exp;  lines: +24 -5
    Add some DIAGNOSTIC stuf that I forgot.  From Nate Williams.
2002-04-07 15:12:07 +00:00
Josef Karthauser
1c6db1a232 MFNetBSD:
revision 1.117
    date: 2001/12/27 11:27:11;  author: augustss;  state: Exp;  lines: +5 -3
    Update a comment.
2002-04-07 15:08:39 +00:00
Josef Karthauser
daae4fc6d9 MFNetBSD:
revision 1.116
    date: 2001/11/21 08:18:40;  author: augustss;  state: Exp;  lines: +30 -3
    Pay more attention to if the HC is being unplugged.
2002-04-07 15:07:23 +00:00
Josef Karthauser
8f3c17c9ba MFNetBSD:
revision 1.27
    date: 2001/02/21 10:19:30;  author: minoura;  state: Exp;  lines: +2 -3
    There is no reason to exclude FreeBSD :).
2002-04-07 15:01:01 +00:00
Josef Karthauser
cc29ac735d MFNetBSD: ohci.c (1.114), ohcivar.h (1.29)
date: 2001/11/21 02:41:18;  author: augustss;
    Use a task to perform the timeout abort so we have a process context when
    sleeping.
2002-04-07 14:57:31 +00:00
Josef Karthauser
4e006c4cde MFNetBSD:
revision 1.113
    date: 2001/11/21 02:39:31;  author: augustss;  state: Exp;  lines: +10 -4
    Some more debug stuff.
2002-04-07 14:53:52 +00:00
Josef Karthauser
a19ddcb74b MFNetBSD: ohci.c (1.112), uhci.c (1.147)
date: 2001/11/21 02:38:35;  author: augustss;
    Cast some args to bitmask_snprintf().
2002-04-07 14:49:14 +00:00
Josef Karthauser
0f077873fe MFNetBSD: ohci.c (1.111), uhci.c (1.146)
date: 2001/11/20 21:12:46;  author: augustss;
    Don't bother with interrupts when being disconnected.
2002-04-07 14:45:38 +00:00
Josef Karthauser
dc6d4959c0 MFNetBSD: ohci.c (1.101), ohcivar.h (1.26)
revision 1.101
    date: 2001/02/20 15:20:32;  author: minoura;
    Re-initialize some registers after resuming from suspend.
    Some APM BIOSes do not restore them.
    Reviewd by augustss.
2002-04-07 14:40:15 +00:00
Josef Karthauser
916f3fce33 MFNetBSD:
revision 1.97
    date: 2000/12/31 14:29:54;  author: augustss;  state: Exp;  lines: +17 -3
    Make the controller survive suspend/resume.  Thanks to Steve Woodford
    <steve@mctavish.co.uk> for testing.
2002-04-07 14:34:23 +00:00
Josef Karthauser
0f3cf7038b MFNetBSD:
revision 1.95
    date: 2000/12/13 03:09:06;  author: augustss;  state: Exp;  lines: +19 -3
    Make the ohci driver not hang suspend/resume.  It still doesn't resume
    correctly.  From itohy@netbsd.org (ITOH Yasufumi) PR kern/11714.
2002-04-07 14:31:03 +00:00
Josef Karthauser
daad38f29f MFNetBSD: ohci.c (1.100), ohcivar.h (1.25)
ohci.c
    revision 1.100
    date: 2001/01/28 16:18:09;  author: augustss;  state: Exp;  lines: +7 -2
    Put a rate limiter on the scheduling overrun message.

ohcivar.h:
    revision 1.25
    date: 2001/01/28 19:01:20;  author: augustss;  state: Exp;  lines: +4 -1
    Commit second half of rate limit change.
2002-04-07 14:25:02 +00:00
Josef Karthauser
3119539124 MFNetBSD:
revision 1.58
    date: 2001/11/20 23:53:26;  author: augustss;  state: Exp;  lines: +61 -33
    Create a special kernel thread to run the usb short lived tasks (instead
    of using the device discovery threads).
2002-04-07 14:21:32 +00:00
Josef Karthauser
0f349fb04e MFNetBSD:
revision 1.65
    date: 2002/01/03 22:20:45;  author: augustss;  state: Exp;  lines: +9 -2
    Add a DIAGNOSTIC check.  From FreeBSD.

(Just wrap these changes, that we already had, with a #ifdef DIAGNOSTIC).
2002-04-07 14:12:56 +00:00
Josef Karthauser
00955db9e4 MFNetBSD:
revision 1.62
    date: 2002/01/02 20:55:58;  author: augustss;  state: Exp;  lines: +11 -10
    Some more usb_proc_ptr changes.
    Also some minor stylistic changes.

    revision 1.63
    date: 2002/01/02 20:58:12;  author: augustss;  state: Exp;  lines: +4 -4
    Fix typo in last commit.

    revision 1.64
    date: 2002/01/02 22:44:44;  author: augustss;  state: Exp;  lines: +7 -4
    Add a comment.

The usb_proc_ptr changes were introduced in 1.62 and backed out in 1.64.
2002-04-07 14:10:52 +00:00
Josef Karthauser
0af822462a MFNetBSD:
revision 1.61
    date: 2001/12/31 15:55:51;  author: augustss;  state: Exp;  lines: +3 -5
    Delay bus enumeration a little in case the controller is a companion
    controller.  This way the main controller can gain ownership of the port
    before enumeration starts.
2002-04-07 14:02:31 +00:00
Josef Karthauser
9a7693dbe2 MFNetBSD:
revision 1.59
    date: 2001/11/26 20:16:55;  author: augustss;  state: Exp;  lines: +3 -3
    Change wchan name for usb task thread.
2002-04-07 13:59:32 +00:00
Josef Karthauser
c47378c38f MFNetBSD: usb.c (1.58)
date: 2001/11/20 23:53:26;  author: augustss;  state: Exp;  lines: +61 -33
    Create a special kernel thread to run the usb short lived tasks (instead
    of using the device discovery threads).

The change to usb_port.h is a little hack whilst I address an issue
with NetBSD.
2002-04-07 13:58:06 +00:00
Nick Hibma
147fb5d0ca Regen. 2002-04-07 13:47:19 +00:00
Nick Hibma
c5c0113fd8 Add Scanlogic SL11R IDE Adapter. 2002-04-07 13:45:24 +00:00
Josef Karthauser
6d4cdfa024 Synchronise the code style with NetBSD. (No functional changes). 2002-04-07 13:37:46 +00:00
Josef Karthauser
47f7268805 MFNetBSD:
revision 1.69
    date: 2001/12/27 18:43:46;  author: augustss;  state: Exp;  lines: +3 -3
    Change some DIAGNOSTIC #defines.
2002-04-07 13:27:56 +00:00
Josef Karthauser
c6b0a4ae15 MFNetBSD:
revision 1.68
    date: 2001/12/24 21:36:16;  author: augustss;  state: Exp;  lines: +2 -1
    Add some more DIAGNOSTIC tests.
    Make usb_match_device() match on USB_PRODUCT_ANY.
2002-04-07 13:26:59 +00:00
Josef Karthauser
be55f9a1f2 MFNetBSD:
revision 1.67
    date: 2001/11/21 13:44:47;  author: augustss;  state: Exp;  lines: +3 -1
    Wrap dump routine prototypes in #ifdef USB_DEBUG
2002-04-07 13:20:26 +00:00
Josef Karthauser
7c21b0290d MFNetBSD: ukbd.c (1.52), usbdi.c (1.54), usbdi.h (1.35)
date: 2000/01/16 09:37:18;  author: augustss;
    Let usbd_set_polling() work on a usbd_device_handle instead of
    a usbd_interface_handle.
2002-04-07 13:16:18 +00:00
Josef Karthauser
58af1b84da MFNetBSD: usbdi.c (1.93), usbdi.h (1.59)
date: 2001/12/24 21:36:15;  author: augustss;
    Add some more DIAGNOSTIC tests.
    Make usb_match_device() match on USB_PRODUCT_ANY.
2002-04-07 12:42:18 +00:00
Josef Karthauser
4d20078c4a MFNetBSD:
revision 1.92
    date: 2001/12/12 15:38:58;  author: augustss;  state: Exp;  lines: +7 -3
    Some more paranoia checks when DIAGNOSTIC.
2002-04-07 12:38:16 +00:00
Josef Karthauser
59b1ccec79 Move a function to a different place in the source so that we match
NetBSD.
2002-04-07 12:32:55 +00:00
Josef Karthauser
f7f4bdbbcb Update $NetBSD$ ident. 2002-04-07 12:29:55 +00:00
Josef Karthauser
0de7764a0a MFNetBSD:
revision 1.88
    date: 2001/11/22 04:31:01;  author: augustss;  state: Exp;  lines: +3 -3
    Improve dump routine slightly.
2002-04-07 12:25:55 +00:00
Josef Karthauser
081d87cd07 MFNetBSD:
revision 1.87
    date: 2001/11/21 15:37:41;  author: augustss;  state: Exp;  lines: +5 -5
    Fix indentation and typos.
2002-04-07 12:24:55 +00:00
Josef Karthauser
906e5d2c1b We not long need to use USBD_NO_TSLEEP. 2002-04-07 12:19:50 +00:00
Josef Karthauser
f046c9272a MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)
date: 2001/04/13 11:19:58;  author: augustss;
    Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
2002-04-07 12:18:52 +00:00
Josef Karthauser
3847d1fda8 MFNetBSD: if_aue.c (1.26), if_auereg.h (1.6), if_cue.c (1.10),
if_cuereg.h (1.5), if_kue.c (1.11), if_kuereg.h (1.5)

    date: 2000/03/02 12:37:51;  author: augustss;
    Use ratecheck() to limit error messages on disconnect.
    Break out some common functionality.
2002-04-07 12:04:02 +00:00
Josef Karthauser
dfdec0c69e MFNetBSD: usbdi.c (1.63), usbdi.h (1.41)
date: 2000/03/02 12:37:51;  author: augustss;
    Use ratecheck() to limit error messages on disconnect.
    Break out some common functionality.

We don't have ratecheck() in our kernel yet, so I've hardcoded
usb_ratecheck() to return true always.
2002-04-07 11:56:19 +00:00
Josef Karthauser
7f31496b8f MFNetBSD:
revision 1.110
    date: 2001/11/20 16:08:10;  author: augustss;  state: Exp;  lines: +5 -4
    Use longer reset for root hubs (as told in the spec).
2002-04-07 11:42:39 +00:00
Josef Karthauser
9bf191c521 MFNetBSD: ohci.c (1.104), ohcivar.h (1.28)
date: 2001/09/28 23:57:21;  author: augustss;
    Reenable RHSC interrupt after one second so hot plugging works.
    (From OpenBSD.)
2002-04-07 11:33:55 +00:00
Josef Karthauser
b6955189b1 Reduce the difference between our version and NetBSD's. (No
functional changes.)
2002-04-07 11:29:31 +00:00
Josef Karthauser
896b2b5334 MFNetBSD:
revision 1.57
    date: 2001/11/20 16:08:37;  author: augustss;  state: Exp;  lines: +3 -2
    Add a comment.
2002-04-07 11:20:41 +00:00
Josef Karthauser
05f37aafc4 MFNetBSD: ohci.c (1.109), uhci.c (1.144), uhub.c (1.56), usb.c (1.57),
usbdi.c (1.86), usbdivar.h (1.66)
	  [Some partial, because most of this was merged in a while ago]

    date: 2001/11/20 13:48:03;  author: augustss;
    Keep track of device speed for USB 2.0.
2002-04-07 11:19:05 +00:00
Josef Karthauser
3b0f6960df MFNetBSD:
revision 1.55
    date: 2001/11/16 02:21:54;  author: augustss;  state: Exp;  lines: +4 -4
    Better error message.
2002-04-07 10:59:02 +00:00
Josef Karthauser
bcfc7cc136 MFNetBSD: uhub.c (1.54), usb_subr.c (1.92)
date: 2001/11/16 01:57:47;  author: augustss;
    Handle devices that disappear during reset gracefully.
2002-04-07 10:57:42 +00:00
Josef Karthauser
05172ec004 MFNetBSD: usbdi.c (1.85), usbdi.h (1.54), usbdi_util.c (1.37)
date: 2001/11/15 15:15:59;  author: augustss;
    usbd_interface2device_handle() cannot fail.
2002-04-07 10:50:41 +00:00
Josef Karthauser
2bffc02359 MFNetBSD: usbdi.c (1.82), usbdivar.h (1.64)
date: 2001/11/10 16:54:56;  author: augustss;
    Add some dump routines for debugging.
2002-04-07 10:41:51 +00:00
Josef Karthauser
264bb28fd4 MFNetBSD:
revision 1.81
    date: 2001/04/17 00:05:33;  author: augustss;  state: Exp;  lines: +7 -1
    Add a DIAGNOSTIC.
2002-04-07 10:38:07 +00:00
Josef Karthauser
eaf587ef2b MFNetBSD: usb_subr.c (1.90), usbdi.c (1.83), usbdivar.h (1.65)
date: 2001/11/10 17:11:38;  author: augustss;  state: Exp;  lines: +1 -2
    Get rid of unused abort_handle.
2002-04-07 10:36:15 +00:00