Commit Graph

1146 Commits

Author SHA1 Message Date
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
Josef Karthauser
93eb6f1095 MFNetBSD:
revision 1.52
    date: 2001/10/26 17:53:59;  author: augustss;  state: Exp;  lines: +8 -2
    Compare pointer with NULL instead of using them as a condition.
2002-04-07 10:31:39 +00:00
Josef Karthauser
60fb1d5b78 MFNetBSD:
revision 1.51
    date: 2001/10/24 15:30:17;  author: augustss;  state: Exp;  lines: +3 -3
    Better debug message.
2002-04-07 10:29:48 +00:00
Josef Karthauser
88f36e5813 MFNetBSD:
revision 1.107
    date: 2001/11/10 17:09:28;  author: augustss;  state: Exp;  lines: +31 -26
    Improve dump routines.
2002-04-07 10:24:52 +00:00
Josef Karthauser
138483b713 MFNetBSD:
revision 1.106
    date: 2001/11/09 15:01:57;  author: augustss;  state: Exp;  lines: +73 -57
    Fix a bug in xfer abort processing when the HC executes ahead of what
    the driver aborts.
    Don't block RHSC interrupts.
2002-04-07 10:21:16 +00:00
Josef Karthauser
f1310c18b4 MFNetBSD:
revision 1.105
    date: 2001/11/07 02:55:04;  author: augustss;  state: Exp;  lines: +17 -3
    Improve some debug messages.
2002-04-07 10:12:40 +00:00
Josef Karthauser
649e8d680c MFNetBSD: ohci.c (1.104), ohcireg.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 10:09:23 +00:00
Josef Karthauser
44f1123ff9 MFNetBSD:
revision 1.103
    date: 2001/09/11 07:00:19;  author: augustss;  state: Exp;  lines: +4 -1
    Don't go top mode OPERATIONAL (before reset) on startup even
    if BIOS claims to have initialized the controller.
2002-04-07 10:04:16 +00:00
Josef Karthauser
fbc2dfc441 MFNetBSD:
revision 1.102
    date: 2001/04/01 15:00:29;  author: augustss;  state: Exp;  lines: +3 -1
    Add two missing splx() (inside DIAGNOSTIC).  From OpenBSD.
2002-04-07 10:02:45 +00:00
Josef Karthauser
16b08d2552 MFNetBSD:
revision 1.142
	date: 2001/10/25 02:08:13;  author: augustss;  lines: +14 -16
	Change reset sequence to get status change bits set right on startup.
2002-04-07 09:57:23 +00:00
Josef Karthauser
4792bfc8f6 MFNetBSD:
revision 1.141
	date: 2001/10/24 21:04:04;  author: augustss;  Exp;  lines: +20 -4
	Some more paranoia tests when entering the interrupt routine.
2002-04-07 09:52:49 +00:00
Josef Karthauser
db3c6cb423 Iron out some obvious differences between NetBSD's and own version of
this file.
2002-04-06 22:06:16 +00:00
Josef Karthauser
8d3dd017ad Define away 'Static' when compiling with USB_DEBUG defined, to make it
easier to debug.
2002-04-06 21:46:47 +00:00
Josef Karthauser
6a69a08a22 Use the UE_GET_XFERTYPE macro. 2002-04-06 21:28:57 +00:00
Josef Karthauser
dc2aa84c92 Remove some old unused cruft. 2002-04-06 21:03:49 +00:00
Josef Karthauser
2ce84795da Another step in merging our if_aue driver with NetBSD's. 2002-04-06 20:50:21 +00:00
Josef Karthauser
396a51fb2f Rename csr_{read,write}_* to cue_csr_{read,write}_*. 2002-04-06 20:24:25 +00:00
Josef Karthauser
47c61eef1b Rename foo_gone to foo_dying, in keeping with the rest of the usb code. 2002-04-06 20:17:13 +00:00
Josef Karthauser
3d9e00aa02 Replace device_t with device_ptr_t. 2002-04-06 19:55:52 +00:00
Josef Karthauser
fc5290cfa4 Regenerate. 2002-04-06 19:35:00 +00:00
Josef Karthauser
4ad5d253df Remove a erroneous entry for HP 5400C.
Spotted by:	phk
2002-04-06 15:00:41 +00:00
Poul-Henning Kamp
86383b37c0 Fix a typo in the definition of HP1220C and add a quick entry for
broken bidir mode for at as well.
2002-04-06 13:28:02 +00:00
Josef Karthauser
28543fc9c6 Regenerate. 2002-04-06 13:07:05 +00:00
Josef Karthauser
46d8539f1c Add some more printer devices:
DeskJet 1220C		from phk
  Scanjet 5400C		from NetBSD
  Inkjet P-2000U	from NetBSD
2002-04-06 13:06:07 +00:00
Josef Karthauser
1ea26b29b6 Synchronise with NetBSD for order and formatting; no functional changes. 2002-04-06 13:01:39 +00:00
Josef Karthauser
9ad42ab594 Add a new vendor: MINOLTA, and some products by them.
Partially submitted by:	asmodai
2002-04-06 12:27:23 +00:00
Poul-Henning Kamp
e9ad04e4e6 Make LINT compile again. 2002-04-05 17:45:47 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Josef Karthauser
86cf1335d5 Back the last commit out. The network drivers need reworking first. :( 2002-04-02 14:54:52 +00:00
Josef Karthauser
920153807b 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-02 14:28:18 +00:00
Josef Karthauser
5b33e5c6be MFNetBSD:
revision 1.89
    date: 2001/11/10 17:10:42;  author: augustss;  state: Exp;  lines: +2 -1
    Abort any xfers on the control pipe before closing it on detach.
2002-04-02 14:16:06 +00:00
Josef Karthauser
54d369e6e5 MFNetBSD: usb_port.h (1.45 partial), usb_subr.c (1.88)
date: 2001/11/10 16:53:32;  author: augustss;
    Small portability improvement.
2002-04-02 14:14:14 +00:00
Josef Karthauser
e92dc1d513 MFNetBSD: usb_subr.c (1.87), usbdi.h (1.53)
date: 2001/08/15 00:04:59;  author: augustss;
    Add a little infrastructure so that individual drivers can easily check
    if thee was a vendor+product locator match.
2002-04-02 14:08:43 +00:00
Josef Karthauser
246a3f534a Reduce differences between NetBSD's version and ours.
(Should be all white space related, but there's the removal of the
odd 'register' directive also).
2002-04-02 13:26:40 +00:00
Josef Karthauser
c8d05bc5f5 Use ANSI prototypes and declarations. 2002-04-02 11:54:28 +00:00
Josef Karthauser
4e6e5105b0 Use ANSI prototypes and declarations.
Rename csr_{write|read}_* to aue_csr_* in keeping with NetBSD.
2002-04-02 11:42:57 +00:00
Josef Karthauser
548db09f32 MFNetBSD:
revision 1.50
    date: 2001/04/12 01:18:24;  author: thorpej;  state: Exp;  lines: +6 -2
    Only if __HAVE_GENERIC_SOFT_INTERRUPTS is then splusb == splsoftnet
    (because we register the interrupt with IPL_SOFTNET).  However, if
    we're using a callout, then splusb == splsoftclock (because the
    callouts happen from the softclock interrupt).

    Note that splsoftnet blocks softclock interrupts, but this is
    meant to better describe what's going on.
2002-04-02 10:53:42 +00:00
Josef Karthauser
e373532341 MFNetBSD: (partial merge, as part was already there).
revision 1.56
    date: 2001/11/13 07:55:30;  author: augustss;  state: Exp;  lines: +4 -4
    Add some #endif comments.
2002-04-02 10:48:58 +00:00
Josef Karthauser
44e0c682e0 MFNetBSD:
revision 1.54
    date: 2001/11/09 14:59:11;  author: augustss;  state: Exp;  lines: +2 -1
    Add a debug message.
2002-04-02 10:47:01 +00:00
Josef Karthauser
09f681d7b7 MFNetBSD: usb.c (1.53), usbdi.h (1.49)
date: 2001/01/23 17:04:30;  author: augustss;
    Ad function to remove a usb task.
2002-04-02 09:58:16 +00:00
Josef Karthauser
7e9590a260 MFNetBSD:
revision 1.52
    date: 2001/01/21 19:00:29;  author: augustss;  state: Exp;  lines: +5 -0
    Ad a comment.
2002-04-02 09:51:10 +00:00
Josef Karthauser
e469fe6e0a MFNetBSD: uhub.c (1.49), usb.c (1.51), usbdi.h (1.48), usbdivar.h (1.63)
date: 2001/01/21 19:00:06;  author: augustss;
    Change the operation of the USB event thread.  Before it only
    performed USB device discovery, now it can also perform (short)
    tasks for device drivers that need a process context, but don't
    have one.  This is not pretty, but better than using busy-wait
    in an interrupt context.
2002-04-02 09:49:36 +00:00
Warner Losh
f585cabf8e Make this compile again after the recent NetBSD merge 2002-04-02 03:39:33 +00:00
Josef Karthauser
8cc91a531e MFNetBSD:
revision 1.140
    date: 2001/10/24 20:20:03;  author: augustss;  state: Exp;  lines: +9 -5
    More debug.
2002-04-01 22:03:37 +00:00
Josef Karthauser
96668eef93 MFNetBSD:
revision 1.138
    date: 2001/10/02 17:59:38;  author: pooka;  state: Exp;  lines: +6 -6
    move DIAGNOSTIC-printf up one block to make it reachable
    noted by Christophe Kalt in private email
2002-04-01 21:56:42 +00:00
Josef Karthauser
657544fc48 MFNetBSD:
revision 1.136
    date: 2001/07/11 14:11:00;  author: augustss;  state: Exp;  lines: +5 -5
    Rearrange register dump when the controller is dying.  Fixes PR 13430.
2002-04-01 21:52:45 +00:00
Josef Karthauser
dd355d5455 MFNetBSD:
revision 1.135
    date: 2001/04/01 14:59:52;  author: augustss;  state: Exp;  lines: +2 -4
    Avoid a potential null pointer dereference.  From OpenBSD.
2002-04-01 21:43:53 +00:00
Josef Karthauser
cf78a5199e MFNetBSD:
revision 1.134
    date: 2001/03/25 22:52:21;  author: augustss;  state: Exp;  lines: +4 -1
    Try to make resume work on more machines.
2002-04-01 21:42:43 +00:00
Josef Karthauser
8be36692c3 MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.h
(1.39), usbdi.c (1.79), usbdi.h (1.47), usbdivar.h (1.62)

    date: 2001/01/21 02:39:52;  author: augustss;
    Add code to use soft interrupt to handle USB interrupt processing.
    Don't enable the code since it doesn't work with the kludgy Ethernet
    drivers.
2002-04-01 21:34:01 +00:00
John Baldwin
44731cab3b Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
Josef Karthauser
a4a49508b4 MFNetBSD:
revision 1.132
    date: 2001/01/20 23:36:02;  author: augustss;  state: Exp;  lines: +6 -7
    Change some splusb() to splhardusb().
2002-04-01 21:18:50 +00:00
Josef Karthauser
a011c2e7a8 MFNetBSD: Update many URLs. 2002-04-01 21:13:22 +00:00
Josef Karthauser
9aee8efbeb MFNetBSD:
revision 1.40
    date: 2000/10/10 12:37:01;  author: augustss;  state: Exp;  lines: +4 -3
    Don't free unallocated pointer in detach (can happen if detach happens
    before attach has finished).
2002-04-01 20:32:50 +00:00
Josef Karthauser
236c85a379 MFNetBSD:
revision 1.60
    date: 2000/12/28 10:40:36;  author: augustss;  state: Exp;  lines: +2 -1
    #define for USB_2_0
2002-04-01 20:26:38 +00:00
Josef Karthauser
33ad8c22ff MFNetBSD:
revision 1.58
    date: 2000/06/24 04:12:53;  author: thorpej;  state: Exp;  lines: +5 -2
    Kill SPLUSBCHECK -- it's not portable, and quite annoying on some
    platforms which otherwise function just fine.
2002-04-01 20:23:50 +00:00
Josef Karthauser
493a192aa3 MFNetBSD:
revision 1.130
    date: 2000/12/18 15:55:30;  author: tsutsui;  state: Exp;  lines: +2 -2
    Add missed le32toh() in uhci_device_isoc_abort().
2002-04-01 20:18:21 +00:00
Josef Karthauser
ce2613651f MFNetBSD:
revision 1.129
    date: 2000/12/16 16:09:24;  author: augustss;  state: Exp;  lines: +4 -3
    Don't repeat 'host controller halted' message.  From OpenBSD.
2002-04-01 20:14:23 +00:00
Josef Karthauser
5b78cc48f6 MFNetBSD:
revision 1.127
    date: 2000/11/22 05:50:59;  author: soren;  state: Exp;  lines: +5 -5
    In uhci_intr(), only warn about power state confusion if the
    interrupt was actually for us.
2002-04-01 20:04:00 +00:00
Josef Karthauser
3974e26c89 MFNetBSD: ohci.c rev 1.94, uhci.c rev 1.126
date: 2000/11/10 14:11:49;  author: augustss;
    Update frlengths after a isoc transfer.
    Suggested by Yuri <yuri@tsoft.com>
2002-04-01 20:01:41 +00:00
Josef Karthauser
273b8b7d6f MFNetBSD: ohci.c rev 1.92, uhci.c rev 1.122 (part)
date: 2000/08/08 19:51:46;  author: tv;  state: Exp;  lines: +24 -13
    %b -> bitmask_snprintf()

    Because this code is shared, add a macro for bitmask_snprintf()
    that should expand to the equivalent snprintf() on non-NetBSD
    systems. This is only used in ?HCI_DEBUG cases anyway.
2002-04-01 19:42:51 +00:00
Josef Karthauser
b74ee36d30 MFNetBSD:
revision 1.86
    date: 2001/05/16 04:50:11;  author: lukem;  state: Exp;  lines: +1 -2
    delint: remove unnecessary assignment to same objection (hidden
    in #define)
2002-04-01 19:26:36 +00:00
Josef Karthauser
a4c63369dd constify 2002-04-01 19:22:04 +00:00
Josef Karthauser
174ea84839 Use ANSI prototypes and declarations.
Update $NetBSD$ idents to better reflect reality.
2002-04-01 19:01:09 +00:00
Josef Karthauser
8271e9b194 Update $NetBSD$ idents to better reflect reality. 2002-04-01 18:31:16 +00:00
Josef Karthauser
b47a67cb20 Merge from NetBSD:
revision 1.81
    date: 2000/10/24 15:01:26;  author: augustss;  lines: +36 -10
    Add a hack to try and figure out if the TI UTUSB41 hub is bus
    powered despite claiming to be self powered (it's important to
    know so that the power budget can be met).
2002-04-01 18:22:31 +00:00
Josef Karthauser
8d6c171c25 Merge from NetBSD: revision 1.72
Part of this got merged in a previous commit, but not all.

    revision 1.72
    date: 2000/04/14 14:13:56;  author: augustss;  state: Exp;  lines: +34 -27
    Make attach of ugen work as it should so product&vendor locators
    can be used.
2002-04-01 18:03:00 +00:00
Josef Karthauser
84aa7f035a Update $NetBSD$ idents to reflect reality. 2002-04-01 17:54:07 +00:00
Josef Karthauser
cf39046c9d Merge from NetBSD: Removed unnecessary variable declaration. 2002-04-01 17:49:12 +00:00
Josef Karthauser
44b382cbc0 Synchronise with the NetBSD version of this header file for formatting. 2002-04-01 17:43:28 +00:00
Josef Karthauser
d262a59fb2 Merge from NetBSD: usbdi.c rev 1.77, usbdi.h rev 1.44
date: 2000/09/23 21:02:04;  author: augustss;
    Add a way to do control transfers on other pipes than the default pipe.
2002-04-01 17:30:24 +00:00
Josef Karthauser
b588f0eca0 Use ANSI prototypes and declarations. 2002-04-01 17:24:49 +00:00
Josef Karthauser
7b51deb455 Merge from NetBSD: Make it compile with USB_DEBUG. 2002-04-01 17:05:55 +00:00
Josef Karthauser
167145ddc0 Merge from NetBSD:
usb.c rev 1.43, usb_port.h rev 1.26, usb_subr.c rev 1.71

Some OpenBSD portability fixes.
2002-04-01 16:53:29 +00:00
Josef Karthauser
0f657c164b Merge from NetBSD:
usb.c 1.40:
    revision 1.40
    date: 2000/03/14 23:13:12;  author: augustss;  state: Exp;  lines: +4 -1
    Make sure the USB event thread discovers all devices first time
    it call usb_discover().  It should now be possible to have the
    root NFS mounted over a USB Ethernet Adapter.
2002-04-01 16:29:24 +00:00
Josef Karthauser
c0fdce4463 Merge from NetBSD:
usb_port.h (1.33), usbdi_util.c (1.32), usbdi_util.h (1.22):

    ----------------------------
    date: 2000/06/01 14:37:51;  author: augustss;
    Improve some portability items.
    ----------------------------
2002-04-01 16:09:43 +00:00
Josef Karthauser
85b64f4cea Tidy up the formatting so that it's in the style of NetBSD's copy of
this file.
2002-04-01 15:37:00 +00:00
Josef Karthauser
dd78396c46 Use ANSI prototypes and declarations. 2002-04-01 15:01:29 +00:00
Josef Karthauser
981149d059 Merge from NetBSD:
----------------------------
    revision 1.26
    date: 1999/11/28 22:49:53;  author: augustss;  state: Exp;  lines: +12 -8
    More USB_DEBUG and DIAGNOSTIC output.
    ----------------------------
2002-04-01 13:50:42 +00:00
Josef Karthauser
21034e3fc8 Merge from NetBSD:
----------------------------
    revision 1.73
    date: 2000/05/31 16:14:42;  author: augustss;  state: Exp;  lines: +19 -6
    Be more careful when setting the alternate interface so we don't
    end up with nothing set at all if it fails.
    ----------------------------
2002-04-01 13:43:02 +00:00
Josef Karthauser
04b496f565 Merge from NetBSD:
----------------------------
	revision 1.117
	date: 2000/05/30 09:26:06;  author: augustss;  lines: +7 -1
	As a safety, check that the controller is not suspended when we get
	an interrupt.
	----------------------------
2002-04-01 13:36:09 +00:00
Josef Karthauser
55b7d12d51 Merge from NetBSD:
----------------------------
	revision 1.90
	date: 2000/05/08 18:28:46;  author: thorpej;  lines: +8 -3
	Quiet some uninitialized variable warnings that do in fact
	look legitimate.
	----------------------------
2002-04-01 13:28:49 +00:00
Josef Karthauser
3b53380927 Add a clarifying comment (from NetBSD).
Update the $NetBSD$ ident to reflect reality.
2002-04-01 13:26:27 +00:00
Josef Karthauser
a5450efd66 Merge from NetBSD:
ohci.c (1.85), ohcireg.h (1.17):

	----------------------------
	date: 2000/04/01 09:27:35;  author: augustss;
	Add a delay before reading the number of ports from the controller to
	avoid getting 0 from it.
	----------------------------
2002-04-01 13:21:43 +00:00
Josef Karthauser
6688a3fdbe Merge from NetBSD:
ohci.c (1.83), ohcireg.h (1.16), ohcivar.h (1.21)

	===================================================================
	date: 2000/03/29 01:46:26;  author: augustss;
	A first stab at support for isochronous transfers.
	===================================================================
2002-04-01 13:18:11 +00:00
Josef Karthauser
d1c9105874 Regen. 2002-03-31 21:38:38 +00:00
Josef Karthauser
b730bb6d61 Add more usb adapters, from NetBSD. 2002-03-31 21:38:05 +00:00
Josef Karthauser
990e9fea48 Use usb_lookup instead of rolling our own.
Suggested by:	Lennart Augustsson <lennart@augustsson.net>
2002-03-28 12:22:58 +00:00
Josef Karthauser
fed2df0509 Remove some surplus whites. 2002-03-28 12:06:29 +00:00
Josef Karthauser
c465d35466 Move some includes around to make it more *BSD compliant.
Suggested by:	Lennart Augustsson <augustss@netbsd.org>
2002-03-27 13:32:42 +00:00
David E. O'Brien
06989891ed Fix warnings on 64-bit hosts. 2002-03-20 18:04:11 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Peter Wemm
0d87e7d007 Fix some gcc-3.1+ warnings:
warning: deprecated use of label at end of compound statement
umass.c:2626:46: multi-line string literals are deprecated
2002-03-19 23:20:21 +00:00
Josef Karthauser
2d4ac0e834 Sync the uhci_dump_foo routines with NetBSD, and remove an errant additional
uhci_dump_ii function that landed there, probably during a recent merge.

Spotted by:	alfred
2002-03-19 22:14:08 +00:00
Alfred Perlstein
67b362072d add missing semicolon. 2002-03-19 21:44:49 +00:00
Peter Wemm
9a8fa41c6f Regen; post SMC id's and also pick up a previously forgotten regen(?). 2002-03-19 10:55:39 +00:00
Peter Wemm
58b0048916 Add another SMC device ID and the hub ID that it went with. 2002-03-19 10:54:40 +00:00
Josef Karthauser
916e6e02e5 Add a USB comm driver.
Ported from NetBSD by:	akiyama
2002-03-18 18:23:42 +00:00
Josef Karthauser
3ede2e88ea Merge from NetBSD:
ohcivar.h (1.22), uhcivar.h (1.29):
	============================================================
	date: 2000/04/25 09:20:55;  author: augustss;
	Move the size of the mapped bus_space region into the bus
	independent softc.
	============================================================

ohci.c (1.88), uhci.c (1.112):
	============================================================
	date: 2000/04/25 14:28:13;  author: augustss;
	Insert (very conservative!) bus_space_barrier() calls at
	all register accesses.
	The bus_space(9) man page says you've gotta have them...
	============================================================
2002-03-16 12:44:21 +00:00
Josef Karthauser
cdd493aa00 Bump some $NetBSD$ idents for patches that have already been previously
ported.
2002-03-16 12:24:00 +00:00
Josef Karthauser
5a11d73afa Huge merge from NetBSD:
usbdi.c (1.61):
	===================================================================
	revision 1.61
	date: 2000/01/31 20:13:07;  author: augustss;  lines: +20 -4
	Change the way the HC done method is invoked a little.
	===================================================================

usbdi.c (1.65):
	===================================================================
	revision 1.65
	date: 2000/03/08 15:34:10;  author: augustss;  lines: +4 -2
	Get the status right when a polled transfer times out.
	===================================================================

ohci.c (1.79), uhci.c (1.89), uhcivar.h (1.24), usb_port.h (1.22),
usbdivar.h (1.48):
	===================================================================
	date: 2000/03/23 07:01:46;  author: thorpej;
	New callout mechanism with two major improvements over the old
	timeout()/untimeout() API:
	- Clients supply callout handle storage, thus eliminating problems of
	  resource allocation.
	- Insertion and removal of callouts is constant time, important as
	  this facility is used quite a lot in the kernel.

	The old timeout()/untimeout() API has been removed from the kernel.
	===================================================================

uhci.c (1.80), usbdi.c (1.66):
	===================================================================
	date: 2000/03/23 18:59:10;  author: thorpej;
	Shake out some bugs from the callout changes.
	===================================================================

ohci.c (1.80), uhci.c (1.91), uhcivar.h (1.25), usb_port.h (1.23),
usbdi.c (1.67), usbdivar.h (1.49):
	===================================================================
	date: 2000/03/24 22:03:30;  author: augustss;
	Some cleanup and renaming of the callouts used in USB drivers.
	===================================================================

uhci.c (1.92), uhcivar.h (1.26):
	===================================================================
	date: 2000/03/24 22:57:58;  author: augustss;
	Two major changes:

	  Make each xfer have its own intr_info.  This is necessary if we want
	  to queue multiple xfers on an endpoint.  This should get rid of the
	  (mostly harmless) DIAGNOSTICs about intr_infos (not) being done.

	  Change (again!) how xfers are aborted.  Aborting a TD is a nightmare
	  on the braindead UHCI controller.  (Unless you stop the HC, thereby
	  losing isoc traffic.)  Hopefully I got it right this time.
	===================================================================

usbdivar.h (1.50):
	===================================================================
	revision 1.50
	date: 2000/03/25 00:10:19;  author: augustss;  lines: +4 -2
	GC an unsued field and add some DIAGNOSTIC in xfer.
	===================================================================

ums.c: Use the callout functions instead of the timeout ones.

uhci.c (1.93):
	===================================================================
	revision 1.93
	date: 2000/03/25 00:11:21;  author: augustss;
	lines: +26 -1
	Add more DIAGNOSTIC when aborting isoc.
	===================================================================

uhci.c (1.94), usbdivar.h (1.51):
	===================================================================
	date: 2000/03/25 07:13:05;  author: augustss;
	More DIAGNOSTIC.
	Initialize a callout handle I forgot.
	===================================================================

uhci.c (1.95):
	===================================================================
	revision 1.95
	date: 2000/03/25 07:23:12;  author: augustss;
	Exp;  lines: +24 -7
	Improve uhci_dump_ii().
	===================================================================

ohci.c (1.81), uhci.c (1.96), uhcivar.h (1.27), usb_subr.c (1.68),
usbdi.c (1.68), usbdivar.h (1.52):
	===================================================================
	date: 2000/03/25 18:02:33;  author: augustss;
	Rename and move around callout handles to make it more sane.
	Add some DIAGNOSTIC.
	Fix buglet in isoc abort on UHCI.
	===================================================================

uhci.c (1.98):
	===================================================================
	revision 1.98
	date: 2000/03/27 07:39:48;  author: augustss;  lines: +12 -4
	Make it compile without DIAGNOSTIC.
	===================================================================

uhci.c (1.99):
	===================================================================
	revision 1.99
	date: 2000/03/27 08:01:09;  author: augustss;  lines: +1 -5
	Remove some debug nonsense.
	===================================================================

uhci.c (1.100):
	===================================================================
	revision 1.100
	date: 2000/03/27 09:41:36;  author: augustss;  lines: +13 -3
	Don't mess with QH in bulk abort for the moment.
	===================================================================

uhci.c (1.102):
	===================================================================
	revision 1.102
	date: 2000/03/27 22:42:57;  author: augustss;  lines: +66 -26
	Be a little more careful when aborting.
	Preallocate some TDs for large buffers.
	===================================================================

uhci.c (1.103):
	===================================================================
	date: 2000/03/28 09:47:10;  author: augustss;  lines: +11 -1
	Another patch for xfer abort...
	XXX The current xfer queueing and aborting semantics should really
	XXX be changed.  It cannot be implemented in a sane way on UHCI.
	XXX One day when I have lots of time I'll redesign it...
	===================================================================

uhci.c (1.104): Correct a debug message.
uhci.c (1.105): Be more defensive in a DIAGNOSTIC test.

uhci.c (1.106):
	===================================================================
	revision 1.106
	date: 2000/03/29 01:49:13;  author: augustss;  lines: +14 -309
	*SIGH*  Revert back to the old method of aborting xfers.
	I had tested the new stuff for two months now, but as soon as I commited
	it the problems started to appear.  Murphy, no doubt...
	===================================================================

usb_subr.c (1.70), usbdi.c (1.71), usbdivar.h (1.53):
	===================================================================
	revision 1.70
	date: 2000/03/29 01:45:20;  author: augustss;  lines: +2 -1
	Do not accept new xfers for queuing while a pipe is aborting.
	===================================================================
2002-03-16 12:06:01 +00:00
Alfred Perlstein
85f190e4d1 Fixes to make select/poll mpsafe.
Problem:
  selwakeup required calling pfind which would cause lock order
  reversals with the allproc_lock and the per-process filedesc lock.
Solution:
  Instead of recording the pid of the select()'ing process into the
  selinfo structure, actually record a pointer to the thread.  To
  avoid dereferencing a bad address all the selinfo structures that
  are in use by a thread are kept in a list hung off the thread
  (protected by sellock).  When a selwakeup occurs the selinfo is
  removed from that threads list, it is also removed on the way out
  of select or poll where the thread will traverse its list removing
  all the selinfos from its own list.

Problem:
  Previously the PROC_LOCK was used to provide the mutual exclusion
  needed to ensure proper locking, this couldn't work because there
  was a single condvar used for select and poll and condvars can
  only be used with a single mutex.
Solution:
  Introduce a global mutex 'sellock' which is used to provide mutual
  exclusion when recording events to wait on as well as performing
  notification when an event occurs.

Interesting note:
  schedlock is required to manipulate the per-thread TDF_SELECT
  flag, however if given its own field it would not need schedlock,
  also because TDF_SELECT is only manipulated under sellock one
  doesn't actually use schedlock for syncronization, only to protect
  against corruption.

Proc locks are no longer used in select/poll.

Portions contributed by: davidc
2002-03-14 01:32:30 +00:00
Warner Losh
a2df0b493e On FreeBSD make usb_proc_t the same as d_thred_t always. 2002-03-11 16:38:53 +00:00
Josef Karthauser
be036866cf Be more specific about when block major numbers disappeared from
the cdev switch.
2002-03-11 16:22:15 +00:00
Luigi Rizzo
7c1e1cf188 Fix one genuine bug and a potential one:
-#if defined(__FreeBSD__) && __FreeBSD_version__ >= 500023
  +#if defined(__FreeBSD__) && __FreeBSD_version >= 500023

is a genuine bug -- __FreeBSD_version__ does not exist.
The other one:

  -#if (__FreeBSD__ < 5)
  +#if (__FreeBSD_version < 500000)

pops out when you cross-compile the code:

  __FreeBSD__			is a compiler predefine,
  __FreeBSD_version		is defined in <sys/param.h> .

Given that in this case (and all others in sys/dev/usb and sys/i4b)
the goal is to adapt to a different kernel interface, and not to
a compiler feature, I believe the correct form is the second one
(in the best case the two are synonyms so the change does not break
anything anyways).
2002-03-10 08:29:53 +00:00
Alfred Perlstein
63c6b757ab Support for USB fm radio.
Submitted by: David Yeske <dyeske@yahoo.com>
2002-03-04 03:51:21 +00:00
Peter Wemm
e51c24920f Fix debug printf formats 2002-02-28 00:06:59 +00:00
Julian Elischer
ca9d2dbac9 Add a comment explaining a code change.. 2002-02-27 19:24:55 +00:00
Thomas Moestl
90ce56c287 Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):

- bwap16() and bswap32(). These have optimized implementations on some
  architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
  versa, using a naming scheme like le16toh(), htole16().
  These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
  conversion (while the normal access functions would if the bus endianess
  differs from the CPU endianess).

htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.

Make use of the new functions in a few places where local implementations
of the same functionality existed.

Reviewed by:	mike, bde
Tested on alpha by:	mike
2002-02-27 17:16:18 +00:00
Julian Elischer
13b33111fe Fix warnings that have become fatal
1/ conditionalise (#if 0) function that is not used.
 Unused code left in place for netBSD compatibility.
2/ Recode loop to convince gcc that it does initialise a variable
 (use do-while instead of for() so gcc knows that we always go through
 at least once.  Feel free to check my logic.
2002-02-27 09:16:00 +00:00
Josef Karthauser
dae0af0c83 Revert part of the last commit. A couple of defines were removed
by NetBSD because they don't use them (they've no usbd), but we do.
2002-02-26 10:00:32 +00:00
Alfred Perlstein
6f65a2bd46 in ulpt_reset() req.bmRequestType was unitialized, fix it. 2002-02-26 01:19:56 +00:00
Josef Karthauser
648b06a6ed Merge from NetBSD:
usb.h (rev 1.61):

    date: 2002/01/01 14:23:37;  author: augustss;
    Add a missing subclass definition.

usb.h (rev 1.63) and usb_port.h (rev 1.52):

    date: 2002/02/25 00:46:37;  author: augustss;
    Some portability improvement.
    Add define for usb.h version.
2002-02-26 01:15:08 +00:00
Alfred Perlstein
5bcd0580d7 Prefix structure members to protect them against clashes with eg.
c++ keywords.

This keeps us in sync with NetBSD because they actually committed
my delta first.

Ok'd by: lennard
2002-02-20 20:47:21 +00:00
Nick Hibma
dfe6efdcae Clean up some debugging output.
Add function to display the CBI command block.
2002-02-19 10:53:25 +00:00
Josef Karthauser
6f72be8e18 Merge from NetBSD:
* rev 1.47: Update a URL
* rev 1.56: Keep track of device speed for USB 2.0.
2002-02-19 02:00:27 +00:00
Josef Karthauser
a10b07e4ec Fix a formatting error. 2002-02-17 12:41:50 +00:00
Josef Karthauser
97e5881fe1 KNF style the code, ready for an MFC. 2002-02-17 12:29:39 +00:00
Josef Karthauser
1b262fd0c5 KNF style the code, ready for an MFC. 2002-02-17 11:58:58 +00:00
Josef Karthauser
4d0649fbad Merge from NetBSD:
Pave the way for USB2, by replacing 'lowspeed' with 'speed', so
that it can take the values USB_SPEED_LOW, USB_SPEED_FULL or in
time USB_SPEED_HIGH.
2002-02-16 00:51:26 +00:00
Josef Karthauser
c67fd26e98 Re-add bmaj to the cdevsw's, but don't compile it in on -current.
This makes the code more portable between -current, -stable and the
other BSDs.
2002-02-15 22:54:10 +00:00
Brian Feldman
d515a5410b Fix a bug introduced in rev.1.40 which can cause systems to crash when
detaching USB devices.  Specifically, a variable which was not meant
to be reused was, in fact, being reused.
2002-02-14 08:22:37 +00:00
Josef Karthauser
c0af27c95f Regenerate. 2002-02-14 03:03:08 +00:00
Josef Karthauser
09ecaa66fc Support the HP 5400C scanner.
PR:		kern/34783
2002-02-14 02:51:12 +00:00
Josef Karthauser
7dcd88f85f Rework revision 1.12, and wrap the bmaj entry with an #if doesn't
compile it in on FreeBSD-current, but does in all other cases
(-stable, NetBSD, OpenBSD, etc).
2002-02-14 00:35:03 +00:00
Josef Karthauser
d0d80d05a6 Reinstate revision 1.14. The empty uscannerioctl() was accidently
re-added during a recent NetBSD merge.
2002-02-14 00:32:03 +00:00
Josef Karthauser
d740688b87 Fix some bugs in the ohci driver with respect to irq setup failure.
Submitted by:	nyan
2002-02-11 14:39:57 +00:00
Josef Karthauser
d41fcbf0d0 Merge from NetBSD: revs 1.89 and 1.90.
Also, add some 'const's to supress warnings. (Submitted back to NetBSD).

The original logs from NetBSD:

	----------------------------
	revision 1.90
	date: 2001/12/03 01:47:12;  author: augustss;  lines: +4 -4
	Handle vendor/product lookup with a common routine.
	----------------------------
	revision 1.89
	date: 2001/12/02 23:25:25;  author: augustss;  lines: +18 -2
	Add a subroutine to search for a vendor/product pair.
	----------------------------
2002-02-11 10:09:29 +00:00
Josef Karthauser
f2671fcf9f Regenerate. 2002-02-11 03:36:13 +00:00
Josef Karthauser
2097055fac Merge from NetBSD.
Add lots of new scanner devices:

	AGFA SNAPSCAN1236U
	AGFA SNAPSCANE40
	AGFA SNAPSCANE50
	AGFA SNAPSCANE20
	AGFA SNAPSCANE25
	AGFA SNAPSCANE26
	AGFA SNAPSCANE52
	CANON N656U
	HP 3400CSE
	SCANLOGIC 336CX
	MUSTEK BEARPAW1200F
	MUSTEK 600USB
	MUSTEK 1200USBPLUS
	NATIONAL BEARPAW2400
	EPSON 640U
	EPSON 1650
	EPSON GT9700F
	UMAX ASTRA3400
	ULTIMA 1200UBPLUS
2002-02-11 03:35:53 +00:00
Josef Karthauser
4f26a426ab Quiet a qualifier warning. 2002-02-11 03:29:35 +00:00
Josef Karthauser
ce3eae9093 Merge from NetBSD: revs 1.55 and 1.56
Original NetBSD logs:

	----------------------------
	revision 1.56
	date: 2001/12/03 01:47:12;  author: augustss;  lines: +5 -3
	Handle vendor/product lookup with a common routine.
	----------------------------
	revision 1.55
	date: 2001/12/02 23:25:25;  author: augustss;  lines: +8 -1
	Add a subroutine to search for a vendor/product pair.
	----------------------------
2002-02-11 03:15:08 +00:00
Josef Karthauser
50a56fbebd Merge from NetBSD: revs 1.12 and 1.21 - 1.23
Original NetBSD log messages are:

	----------------------------
	revision 1.23
	date: 2001/12/12 15:48:18;  author: augustss;  lines: +132 -114
	Add a scanner quirk for keeping the pipes open between device opening.
	Idea from Enami.
	----------------------------
	revision 1.22
	date: 2001/12/03 01:47:13;  author: augustss;  lines: +8 -16
	Handle vendor/product lookup with a common routine.
	----------------------------
	revision 1.21
	date: 2001/12/01 09:42:39;  author: enami;  lines: +4 -4
	Shorten wmesg so that they can be distinguished in ps/top output.
	----------------------------
	revision 1.12
	date: 2001/01/23 14:04:14;  author: augustss;  lines: +7 -1
	Make sure driver attach/detach events are generated in a
	consistent manner.
	----------------------------

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2002-02-11 02:57:50 +00:00
Josef Karthauser
2c0634eab6 ANSIfy the function declarations, in line with NetBSD. 2002-02-11 02:25:47 +00:00
Josef Karthauser
d7b35d44a1 Merge from NetBSD: revs 1.43 + 1.45
From the NetBSD logs:

    revision 1.45
    date: 2001/11/29 11:07:12;  author: augustss;  state: Exp;  lines: +12 -2
    Plug a memory leak in an error case.
    ----------------------------
    revision 1.43
    date: 2001/10/19 15:30:25;  author: nathanw;  state: Exp;  lines: +5 -3
    Match printers that report their interface as IEEE 1284 in addition to
    bidirectional.
2002-02-11 01:04:46 +00:00
Josef Karthauser
f512ee4052 Fill in the uhci_dump_ii function (from NetBSD). 2002-02-10 15:38:47 +00:00
Julian Elischer
4ad88f2ca4 Make LINT compile after fruitless attempts to get the authors
to fix their code.

ata stuff:
Change name of ar_attach to not colide with existing ar_attach in if_ar.c.
usb stuff:
Create a dummy function to satisfy a call to it when in DEBUG mode.
2002-02-06 19:35:37 +00:00
Josef Karthauser
0a7fe9cc0b Follow NetBSD and ANSIfy the function definitions.
Remove trailing whitespaces (submitted to NetBSD).
2002-02-03 17:03:34 +00:00
Josef Karthauser
f353db9f9a Regenerate. 2002-02-02 21:12:22 +00:00
Josef Karthauser
8df3da9acc Update comments and product identifiers so that they're the same
as NetBSD's definitions.
2002-02-02 21:09:54 +00:00
Josef Karthauser
a342523198 Add some missing usb vendors (from NetBSD). 2002-02-02 21:02:13 +00:00
Josef Karthauser
c910612aa9 Sync with NetBSD's version, dropping all the 'ltd', 'corp', etc.
It's more important to keep this file easily syncable across the
BSDs, and NetBSD have stated a preference for not adding them to
theirs.
2002-02-02 20:59:43 +00:00
Maxim Sobolev
e6f56180e3 Add support of PhotoClip USB Camera (http://www.myphotoclip.com):
- Vendor&Device IDs for USB product,
- quirk for SCSI CAM.

PR:		34481
Submitted by:	Olexander Kunytsa <kunia@x-telecom.net>
MFC in:		3 days
2002-01-31 11:39:17 +00:00
Josef Karthauser
a07e9d4af3 Merge from NetBSD.
uhub.c:     revision 1.37
    usb.4:      revision 1.30
    usb.c:      revision 1.38
    usb.h:      revision 1.40
    usb_port.h: revision 1.21
    usb_subr.c: revision 1.65
    usbdi.h:    revision 1.40

Split the attach/detach events up into device, driver and controller
attach and detach events.

The commit message from NetBSD was:
        date: 2000/02/02 07:34:00;  author: augustss;  state: Exp;
        Change the USB event mechanism to include more information
        about devices and drivers.  Partly from FreeBSD.

Also rework usbd to take these new event types into account.
2002-01-28 01:03:19 +00:00
Josef Karthauser
67a2e47022 Rearrange the code in USB_DETACH, so that it's like NetBSD's. No
functional change.
2002-01-26 14:00:25 +00:00
Josef Karthauser
eb92aa3c3e Back out the last commit. I committed the wrong file by accident.
The commit message wasn't relevant to that change.  This code will
be committed later.
2002-01-26 13:57:08 +00:00
Josef Karthauser
7fac607b74 Rearrange the code in USB_DETACH, so that it's like NetBSD's.
No functional change.
2002-01-26 13:52:53 +00:00
Josef Karthauser
3d21044dd1 Update the $NetBSD$ ident. 2002-01-26 13:09:52 +00:00
Josef Karthauser
baf3f0817e Reduce the diffs between NetBSD and our version where appropriate
(comments, etc.)
2002-01-26 13:08:57 +00:00
Josef Karthauser
31c1f0005b Merge from NetBSD:
usb.c:	revision 1.39

	revision 1.39
	date: 2000/02/22 11:30:56;  author: augustss;  lines: +7 -1
	Prepare a little for having USB interrupt processing done
	outside the hard interrupt level (in a thread or a softintr).
	No real soft processing done yet.
2002-01-26 12:48:57 +00:00
Josef Karthauser
29ac7b3190 Merge from NetBSD:
usb.c:	revision 1.41

	revision 1.41
	date: 2000/03/16 00:46:38;  author: augustss;  lines: +2 -2
	Make the USB event queue longer.  Mine overflows before the
	(user-land) event handler has started.  But then I have
	about 25 devices connected. :)
2002-01-26 12:40:03 +00:00
Josef Karthauser
c2e0959f73 Update the $NetBSD$ ident to show that some patches have been applied
in the past.
2002-01-26 12:25:32 +00:00
Josef Karthauser
b7e4eb198d Merge from NetBSD:
ohci.c:	revision 1.72 and 1.73
    ohcivar.h:	revision 1.19 and 1.20
    uhci.c:	revision 1.85
    usbdi.h:	a small part of revision 1.40
    usbdivar.h:	revision 1.47

Relevant commit messages from NetBSD are:

	date: 2000/02/22 11:30:54;  author: augustss;  state: Exp;
	Prepare a little for having USB interrupt processing done
	outside the hard interrupt level (in a thread or a softintr).
	No real soft processing done yet.
	----------------------------
	date: 2000/02/01 05:42:53;  author: augustss;  state: Exp;
	Put some #ifdefs around power and shutdown hooks.
2002-01-26 12:04:22 +00:00
Josef Karthauser
46d0cbc2cd Merge from NetBSD:
usb.c:	-r1.35 - 1.37
    usb_port.h:	tiny bit of -r1.26 + an extra bit in the FreeBSD config section.

	revision 1.37
	date: 2000/01/24 18:35:51;  author: thorpej;  state: Exp;  lines: +7 -1
	Use config_pending.
	----------------------------
	revision 1.36
	date: 1999/12/22 23:54:09;  author: augustss;  state: Exp;  lines: +2 -2
	Use the flags `locator' to govern if devices are detected early or
	late during cold boot.
	----------------------------
	revision 1.35
	date: 1999/12/20 02:12:23;  author: augustss;  state: Exp;  lines: +8 -5
	Make sure tsleep() is not called during cold boot.
2002-01-24 20:21:17 +00:00
Guido van Rooij
a3e5380a47 1) Fix a debug statement by filling in its data before the printf in
stead of after
2) Honour NO_TEST_UNIT_READY quirk for atapi devices as well
3) Actually support FujiFilm FinePix 6800 camera's. Will very likely also
work for other FinePix models.

Based on a debug session about half a year ago with Nik Hibma.
MFC after:	2 weeks
2002-01-24 15:10:53 +00:00
Josef Karthauser
c3da78970e Merge from NetBSD:
ohci.c:	-r1.69 to 1.71
    ohcireg.h:	-r1.14

Some of these deltas are based upon patches that we submitted back to
NetBSD.  They got manifested slightly differently though, so I've brought
back those differences to bring our code bases closer together.

The logs from the NetBSD version of ohci.c:

	revision 1.71
	date: 2000/02/01 05:42:52;  author: augustss;  state: Exp;  lines: +13 -2
	Put some #ifdefs around power and shutdown hooks.
	----------------------------
	revision 1.70
	date: 2000/01/31 22:35:13;  author: augustss;  state: Exp;  lines: +7 -7
	Rename TAILMASK to HEADMASK, since it really masks the head pointer.
	From FreeBSD.
	----------------------------
	revision 1.69
	date: 2000/01/31 22:09:13;  author: augustss;  state: Exp;  lines: +18 -14
	Change where the has table for physical-to-virtual address translation
	is handled.  Partly from FreeBSD.
2002-01-21 05:02:21 +00:00
Josef Karthauser
851522be27 Merge from NetBSD:
ohci.c:	-r1.68
    ohcireg.h:	-r1.13

	date: 2000/01/31 20:17:25;  author: augustss;  state: Exp;
	Fiddle with over-current protect when turning on port power to make
	things work for some OHCI controllers.
2002-01-21 04:24:33 +00:00
Josef Karthauser
3bedcae34f Merge from NetBSD:
revision 1.65
	date: 2000/01/25 12:06:21;  author: augustss;  state: Exp;  lines: +10 -2
	Add done method for root control transfers.
2002-01-21 04:15:39 +00:00
Josef Karthauser
4cd5d8f292 Merge from NetBSD:
revision 1.84
	date: 2000/01/28 00:44:27;  author: augustss;  state: Exp;  lines: +9 -2
	Add uhci_root_ctrl_done() method.
2002-01-21 03:44:00 +00:00
Josef Karthauser
ed98caba5f Merge from NetBSD:
uhci.c:	-r1.82
    uhcivar.h:	-r1.22

	date: 2000/01/26 10:04:39;  author: augustss;  state: Exp;
	Try to avoid accessing the HC if it is dead.  Suggested by mycroft.
2002-01-21 03:35:55 +00:00
Josef Karthauser
a87935da55 Remove some unused code, in line with NetBSD's version. 2002-01-20 23:56:46 +00:00
Josef Karthauser
aeab0647e8 Merge from NetBSD:
revision 1.125
	date: 2000/09/23 21:00:10;  author: augustss;  state: Exp;  lines: +19 -3
	Avoid "bandwidth reclamation" for control transfers.  The kue device chokes
	on it.
2002-01-20 23:48:43 +00:00
Josef Karthauser
519461f843 Merge from NetBSD:
uhci.c:	-r1.124
    uhcireg.h:	-r1.13

	date: 2000/08/13 18:20:14;  author: augustss;  state: Exp;
	Fix race condition when unlinking xfers.  Thanks to IWAMOTO Toshihiro
	<iwamoto@sat.t.u-tokyo.ac.jp> for analyzing the problem and suggesting a fix.
	Fixes PR 10662.
2002-01-20 23:38:33 +00:00
Josef Karthauser
8e65c31988 Merge from NetBSD:
uhci.c:	-r1.123 (and a tiny bit of -r1.92)
    uhcivar.h:	-r1.32

	date: 2000/08/13 16:18:09;  author: augustss;  state: Exp;
	Implement what in Intel-speech is known as "bandwidth
	reclamation".  It means that we continously poll USB devices
	that have a pending transfer instead of polling just once
	every ms.  This speeds up some transfers at the expense of
	using more PCI bandwidth.
2002-01-20 20:12:25 +00:00
Josef Karthauser
a353e14e75 Merge from NetBSD:
uchireg.h:	-r1.12
    uchi.c:	-r1.121

    date: 2000/07/23 19:43:38;  author: augustss;  state: Exp;
    Be a little more explicit and careful about setting links in TDs and QHs.
2002-01-20 12:08:09 +00:00
Josef Karthauser
46c8c4207d Staticise a couple of things that shouldn't be leaked into the
kernel namespace.

Submitted by:	msmith
2002-01-08 10:32:33 +00:00
Julian Elischer
cd3aa54df0 unbreak -current (at least on my cvsups all today) 2002-01-03 23:33:44 +00:00
Josef Karthauser
baf99b5458 Regenerate. 2002-01-03 18:58:08 +00:00
Josef Karthauser
fdf0d9cf25 Add a new linksys ethernet adapter: USB_PRODUCT_LINKSYS_USB10TX2. 2002-01-03 18:56:35 +00:00
Josef Karthauser
fb08f9ad23 Add some missing prototypes.
Remove some diagnostics that aren't relevant yet.
2002-01-03 16:14:35 +00:00
Josef Karthauser
2ddd9bd5bd Sync with NetBSD:
* White space changes.
* Updates to comments.
* Replace some delay() calls with usb_delay_ms().
* Replace 0's with NULL's.
2002-01-03 02:10:31 +00:00
Josef Karthauser
4b2ee62a91 Merge from NetBSD:
date: 2001/08/06 15:15:08;  author: augustss;  state: Exp;
  Don't write back status bits that are cleared when written.
2002-01-03 00:46:47 +00:00
Josef Karthauser
b992262bcf Merge from NetBSD:
date: 2001/11/20 16:08:10;  author: augustss;  state: Exp;
  Use longer reset for root hubs (as told in the spec).
2002-01-03 00:37:56 +00:00
Josef Karthauser
0f24ab6fa0 Revert uio.uio_td back to uio.uio_procp, using a #define in usb_port to
do the right thing on -current.
2002-01-02 23:31:08 +00:00
Josef Karthauser
7ccc786694 Sync with NetBSD. Non-functional changes that bring this file
closer to the NetBSD version.

Reviewed by:	md5
2002-01-02 21:56:02 +00:00
Josef Karthauser
2ba633961e Sync usb.h with NetBSD, apart from usb_device_info.speed, which
requires logic changes.  For now leave it as usb_device_info.lowspeed.
It will get addressed when the usb.c code is sync'd.
2002-01-02 20:16:53 +00:00
Josef Karthauser
0b4a107145 Revert part of the last commit. UIPROTO_MASS_BBB was renamed to
UIPROTO_MASS_BULK _after_ the previous change was made in NetBSD.
2002-01-02 18:36:46 +00:00
Josef Karthauser
5440b9801c Sync with NetBSD:
date: 2000/02/29 21:37:01;  author: augustss;  state: Exp;
	Distinguish between device and interface classes.
	(I finally found a document that said that they were different.)
2002-01-02 18:28:45 +00:00
Josef Karthauser
cbeffd9e61 Remove the special casing for NetBSD and OpenBSD now that they
appear to do what we do.
2002-01-02 16:45:15 +00:00
Josef Karthauser
44ae5917e2 NetBSD have introduced usb_proc_ptr for us (they'll be needing it soon too)
to hide the distinction between struct proc and struct thread.
2002-01-02 16:33:53 +00:00
Josef Karthauser
6035292097 Synchronise with NetBSD.
In order of importance:
* Make ugen use updated frlengths.
* More tests for NULL pipes.
* Generate better error codes on bulk write.
* Error messages in general.
2001-12-31 00:52:17 +00:00
Josef Karthauser
a2036daf1c Partial sync with NetBSD:
Replace LE() macro with htole32()/le32toh().
2001-12-30 23:02:31 +00:00
Josef Karthauser
58878b8a68 Sync with NetBSD (1.16 - 1.17)
"Bring the coding style into the 80s, i.e., get rid of __P and use
 ANSI prototypes and declarations."
2001-12-29 20:37:14 +00:00
Josef Karthauser
59aba01b32 Update with missing filenames, merged from NetBSD. 2001-12-29 20:14:14 +00:00
John Baldwin
810ffc1e83 - Add a function to convert 6 byte SCSI commands for read, write, mode
sense, and mode select into their 10 byte equivalents.  Eventually the
  da(4) driver will become more intelligent about this, or at least allow
  umass(4) to pass quirks in directly.  However, this is a functional
  workaround until a better fix is implemented.
- Use the 6 to 10 conversion function to allow the ATAPI and UFI command
  sets to emulate 6 byte commands with 10 byte commands.
- Use the ATAPI command set rather than UFI for the ScanLogic SL11R-IDE
  as it supports the SYNCH_CACHE command.
- Enable ATAPI command set support.
- Pass READ/WRITE_12 commands through for UFI support as the UFI spec
  says they should be supported.
- Update a comment in the UFI translation function since we handle
  MODE_SELECT.
2001-12-18 07:55:17 +00:00
Maxim Sobolev
1f891ff9ef Add DIVA USB mp3 player.
Submitted by:	Olexander Kunytsa <kunia@x-telecom.net>
MFC after:	3 days
2001-12-12 15:58:23 +00:00
Sheldon Hearn
06aa84ddfe Regen from usbdevs rev 1.70: added some AGFA scanners 2001-12-10 11:46:23 +00:00
Sheldon Hearn
56429b663c Add some AGFA scanners:
SnapScan 1236U	SnapScan e20
	SnapScan e25	SnapScan e26
	SnapScan e40	SnapScan e50
	SnapScan e52

PR:	kern/32649
Submitted by:	"Erik H. Bakke" <ebakke@trolltech.com>
2001-12-10 11:40:38 +00:00
Mike Smith
ffb6d5ad8f The ScanLogic SL11R-IDE claims to be SCSI-compatible, but actually requires
the UFI command set.  Even with this patch, it's incredibly slow on my
laptop, but at least now it works.

Note that the drive is reported to CAM with the vendor and device IDs from
the device itself, forcing the user to patch the da(4) quirk table
manually.
2001-12-09 06:02:46 +00:00
Maxim Sobolev
97361ffaab Regen after addition of the Mustek 1200 CU Plus scanner.
Submitted by:	"Ilmar S. Habibulin" <ilmar@watson.org>
2001-11-28 12:38:15 +00:00
Maxim Sobolev
134290641e Add Mustek 1200 CU Plus scanner.
Submitted by:	"Ilmar S. Habibulin" <ilmar@watson.org>
2001-11-28 12:37:04 +00:00
Ian Dowse
1a24ca7a4b The Olympus C-1 digital camera uses a non-standard BBB command-status
signature, but otherwise behaves just like a normal USB mass-storage
device. Add a new quirk to cover this case, and enable it for C-1
cameras. The quirk enables translation from the C-1 signature to
the normal CSWSIGNATURE value.

Reviewed by:	n_hibma
2001-11-23 17:35:35 +00:00
Ian Dowse
db54406364 Regen. 2001-11-23 16:36:28 +00:00
Ian Dowse
5cffab225e Add Olympus C-1. 2001-11-23 16:35:40 +00:00
Munechika SUMIKAWA
9ef912e8ec Support MELCO LUA2-TX USB ethernet adaptor.
Actually this porting supports Pegasus II chip so I guess some other
devices supported by NetBSD also work.  But the devices list are not
included because I cannot confirm if they work.

Obtained from:	NetBSD
MFC after:	3 weeks
2001-11-19 18:47:49 +00:00
Munechika SUMIKAWA
c9fcd7dde0 Regen. 2001-11-19 18:41:35 +00:00
Munechika SUMIKAWA
b62f13198a Add Melco LUA2-TX5. 2001-11-19 18:40:17 +00:00
Peter Wemm
da73fe05e1 Add AMD766 OHCI USB controller. Remove unused VENDORID lists. 2001-11-06 23:44:03 +00:00
Peter Wemm
d5f6245f80 Add ICH3 (82801CA/CAM) and 460GX 2001-11-03 05:03:00 +00:00
Nick Hibma
9965784733 Regen. 2001-10-23 22:44:36 +00:00
Nick Hibma
2b97142db8 Add Olympus C-700 2001-10-23 22:44:03 +00:00
Poul-Henning Kamp
602150cc70 Set ulptusein = 0 so that the machine doesn't hang solid after a
printjob.

There is probably a better fix, but this at least makes USB printing
working again.
2001-10-12 11:05:58 +00:00
Jonathan Lemon
b256187110 Do not call mii_polltick() immediately after mii_tick().
Poiinted out by: wpaul
2001-09-29 19:31:29 +00:00
Alfred Perlstein
e93d0738f5 This driver can talk to the Rio600 as well, make it happen.
Hardware (and patience) provided by: Andrew J Caines <A.J.Caines@halplant.com>
2001-09-27 06:01:20 +00:00
John Baldwin
ed01445d8f Use the passed in thread to selrecord() instead of curthread. 2001-09-21 22:46:54 +00:00
Nick Hibma
dc9c72345c Regen. 2001-09-18 22:30:02 +00:00
Nick Hibma
55c883cea3 Update the header of the file with a comment on how to regenerate
the usbdevs* file correctly.

Suggested by:	phantom
2001-09-18 22:27:41 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Bill Paul
0af4c6d09f regenerate this file too (forgotten after last usbdevs update) 2001-09-09 17:00:32 +00:00
Doug White
7b832f6f75 Add support for the Accton USB320-EC Ethernet adapter.
MFC after:	14
2001-09-09 03:08:30 +00:00
Doug White
a6ac38c5f6 Regen. 2001-09-09 03:07:32 +00:00
Doug White
884896fa2f Add entry for Accton USB320-EC Ethernet adapter.
MFC after:	14
2001-09-09 03:07:15 +00:00
Nick Hibma
aa75eeda2f Only clear endpoint stall if status was USBD_STALLED.
This avoids panicing the system by unplugging a hub. The interrupt transfer
would sometimes arrive after the driver had been removed.
2001-09-02 09:26:14 +00:00
Nick Hibma
d7e53003ef First check whether the USB transfer was cancelled before starting to
use the data structures related to that keyboard.
2001-09-01 09:38:45 +00:00
Nick Hibma
2ce5d19515 Regen. 2001-09-01 09:35:46 +00:00
Nick Hibma
c2d98eeaca Spelling nit. 2001-09-01 09:33:15 +00:00
Nick Hibma
f3dfa83f4f Add safety belts. A control endpoint doesn't have an endpoint descriptor. 2001-08-30 21:45:28 +00:00
Peter Wemm
1ef4734b8a Do not printf when we get called as a result of a pci shared interrupt,
and add a comment to that effect.
2001-08-23 01:16:10 +00:00
Peter Wemm
dae6dcff3f Revert part of the last commit, as suggested by Nick. This is expected,
it is part of the way PCI shared interrupts work.
2001-08-23 01:12:35 +00:00
Peter Wemm
1408f3e993 Make these depend on the usb module so they can use its symbols if they
are loaded as seperate .ko files
2001-08-22 05:33:57 +00:00
Nick Hibma
83429be9b0 Find spurious interrupts. 2001-08-21 22:39:04 +00:00
Nick Hibma
e940cef54f Add support for the I-O DATA USB-ET/TX(USB Ethernet adapter)
PR:		27792
2001-08-21 22:20:50 +00:00
Nick Hibma
6e155c1b96 Add support for the HP 4300C scanner.
Submitted by:		Ernst de Haan <ernst@jollem.com>
2001-08-21 22:16:44 +00:00
Nick Hibma
4817ad7e09 Support for the HP 8200e CD writer. (commented out)
Submitted by:	Heath Nielson <heath@cs.byu.edu>
2001-08-21 22:03:18 +00:00
Nick Hibma
d815b123a2 Add support for the Microtech CameraMate.
Submitted by:		Phil Knaack <pknaack1@netscape.net>
Submitted by:		Jim Bryant <kc5vdj@yahoo.com>
2001-08-21 21:47:08 +00:00
Nick Hibma
924be33dc3 Deconfuse a debugging message. 2001-08-21 21:41:15 +00:00
Nick Hibma
9a9a00ec47 Regen.
National BearPaw 1200 has changed name USB_PRODUCT_NATIONAL_BEARPAW1200.
2001-08-21 21:36:58 +00:00
Nick Hibma
ff3863b777 Add Mustek, National and Ultima scanners.
Submitted by:	Henning Meier-Geinitz <hmg@gmx.de>
PR:		29777
MFC after:	1 week
2001-08-21 21:35:40 +00:00
Julian Elischer
d05a918fc3 Do NOT allocate a 1K buffer on the kernel stack.
Found by: Smashed u-area and hardware watch points.
MFC after: 1 week
2001-08-10 17:32:11 +00:00
Peter Wemm
8e5003b0ea Add the Rio 800 USB device IDs
Submitted by: Wesley Morgan <morganw@chemikals.org>
2001-08-08 23:04:31 +00:00
Kazutaka YOKOTA
764952572b Return consistent key action codes at key press and release
events. Otherwise you would see unexpected results if shift or
locking keys are defined to give different actions depending
on other shift/locking keys' state.

Please keep the ukbd module and the kernel in sync, otherwise
the USB keyboard won't work after this change.
MFC after:	10 days
2001-07-20 13:05:57 +00:00
Benno Rice
beefc79739 Set vendor string correctly for the Apple KeyLargo.
Forgotten by:	benno
Spotted by:	n_hibma
2001-07-05 12:04:19 +00:00
Nick Hibma
55e6acd71b Pull in the current version of NetBSD's ulpt.c, supporting bidirectional
communication with printers.
2001-07-05 10:15:37 +00:00
Nick Hibma
48405163d9 Regen. 2001-07-05 10:14:40 +00:00
Nick Hibma
e1f5734cbe Pull in the most recent version of usb_quirks.h and propagate the necessary
changes to the various files.

Also, pull in most of the current usb_subr.c file.
2001-07-05 10:12:59 +00:00
Nick Hibma
b74562cf03 Make the string argument a const. 2001-07-05 10:09:22 +00:00
Nick Hibma
c077cffc2e Update with NetBSD version
Remove duplicates

NOTE: USB_PRODUCT_SANDISK_IMAGEMATE has changed to
USB_PRODUCT_SANDISK_SDDR05A
2001-07-05 09:35:46 +00:00
Benno Rice
e5a44502dd Add device ID for the OHCI controller in the Apple KeyLargo chip. 2001-07-02 14:03:25 +00:00
Nick Hibma
0a40173c0c Add AboCom Systems USB to 1M HomePNA & 10M/100M Fast Ethernet Adapter.
PR:		kern/28537
Submitted by:	Hiroyuki Aizu <aizu@navi.org>
MFC after:	5 days
2001-06-30 13:49:17 +00:00
Nick Hibma
0bea5808a1 Don't free memory that has been freed already.
Null the pointer after freeing the memory.

PR:		27370
Submitted by:	Alec Barea <alec@barea.org>
MFC after:	5 days
2001-06-30 10:57:37 +00:00
Kazutaka YOKOTA
6c726162da Add the device resume method to keyboard drivers.
MFC after:	4 weeks
2001-06-30 10:02:32 +00:00
Peter Wemm
1d63bf5236 Fix warning: 128: warning: initialization makes pointer from integer
Note: this file has lots of #if __FreeBSD__ >= 4 etc which needs to be
changed to __FreeBSD_version >= 400000 etc.
2001-06-15 00:26:41 +00:00
Peter Wemm
7b77e0fa50 Activate the kthread mechanism for doing usb bus discovery. This means
that device add/remove will work without usbd running.  usbd is still
used for execing stuff, but that is all now.  Ideally it could be replaced
by a devd some day.  Until now, usbd had to be running so that the
USB_DISCOVER ioctl could be called to walk the tree when an attachment
status change was noticed.

Among the changes:
- when a detach happens, remove any pending 'attach' messages or the system
suffers from whiplash from exec moused / kill moused loops if you do lots
of attach/detach and later start usbd.
- tweaks related to kthread differences
- disable the select handler for the old interface (never return success).
I have not removed it yet or old usbd's will abort.  That can get removed
later once usbd is cleaned up and things have stabilized for a few weeks.
- get Giant in the kthread.
- a couple of minor potential bug fixes (usb_nevents vs malloc failure etc)

Pre-approved by: n_hibma (ages and ages ago)
2001-06-06 22:00:03 +00:00
Poul-Henning Kamp
3b6c05fa7f Remove the empty uscannerioctl() and use noioctl() instead. 2001-05-23 17:51:43 +00:00
Jun Kuriyama
da76f18bc6 Add description for 82801BA controller.
MFC after:	1 week
2001-05-21 01:24:14 +00:00
Mark Murray
fb919e4d5a Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
Nick Hibma
d309bc7f71 Regen. 2001-04-30 17:38:57 +00:00
Nick Hibma
eb9c76a9f0 Add 4300C Id
Submitted by:	Ernst de Haan <ernst@heinz.jollem.com>
2001-04-30 17:37:11 +00:00
Nick Hibma
be971a7240 Regen. 2001-04-17 15:53:35 +00:00
Nick Hibma
177f46f166 Add the HP scanner 3400C 2001-04-17 15:53:20 +00:00
Nick Hibma
e47670c92d Regen. 2001-04-17 15:34:44 +00:00
Nick Hibma
dacb51ca16 Lexar jumpSHOT Id.
Submitted by:	gshapiro
2001-04-17 15:34:22 +00:00
Nick Hibma
1470e6aaeb Regen. 2001-04-12 11:08:59 +00:00
Nick Hibma
47a9ad6b89 TDK ids
Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
2001-04-12 11:04:08 +00:00
Nick Hibma
426128e90b From NetBSD 2001-04-12 10:59:30 +00:00
Nick Hibma
e796578c40 Rege. 2001-04-09 18:45:32 +00:00
Nick Hibma
053a2f773b Again an ID that has been reused. Update description. 2001-04-09 18:45:02 +00:00
Nick Hibma
6e4a2c5638 Add the Abocom URE 450 ethernet adapter.
Submitted by:   dima@bog.msu.su
2001-04-09 18:44:11 +00:00
Nick Hibma
d6bbfa7387 Regen. 2001-04-09 18:26:18 +00:00
Nick Hibma
5224ce264a Update the description for the EPSON PID 0x010a. It seems to be reused in
the 8700 series.
2001-04-09 18:22:20 +00:00
Nick Hibma
0ec85a1de5 Regen. 2001-04-09 18:19:41 +00:00
Nick Hibma
b0477600ef Add the Omni 56K Plus modem
Submitted by:	kazarov@izmiran.rssi.ru
2001-04-09 18:19:20 +00:00
Nick Hibma
b9688f84b0 Add id for the IO Data ET/T
PR:		23877
Submitted by:	Makoto MATSUSHITA <matusita@jp.freebsd.org>
2001-04-07 20:47:29 +00:00
Nick Hibma
899a73c0a6 Regen. 2001-04-02 13:12:15 +00:00
Nick Hibma
d8ee57ce7d Add Agate Q-Drive.
Submitted by:	Ian Cartwright <ian351c@home.com>
2001-04-02 13:11:59 +00:00
Nick Hibma
59a42a13d5 Regen. 2001-04-02 13:02:36 +00:00
Nick Hibma
0a191eddb4 Sync with NetBSD usbdevs 2001-04-02 13:02:17 +00:00
Brian Feldman
a75c49591f Since -CURRENT requires module dependencies to actually be correct for
linking to work, have cue(4) depend on usb so it actually works.
2001-03-29 18:14:55 +00:00
Peter Wemm
32533d5ff9 Regenerate correctly. 2001-03-29 00:06:16 +00:00
Peter Wemm
e665ecb55c Hint: usbdevs_data.h and usbdevs.h are marked:
* THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
Put the Epson 1240 scanner device in the correct place.
2001-03-29 00:05:51 +00:00
Poul-Henning Kamp
3f865320ba Small patch is required to the USB susbsystem to include support for
Epson Perfection 1240U scanner.

PR:		25565
Submitted by:	Martin Machacek <m@m3a.cz>
2001-03-28 17:58:31 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
John Baldwin
19eb87d22a Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00