Commit Graph

2289 Commits

Author SHA1 Message Date
augustss 4430265c68 Use new functions for getting descriptors. 2004-10-23 13:28:26 +00:00
augustss 67f0f483bd Make an iterator abstraction for looping through all descriptors.
Move usb_get_string() and make it public.
2004-10-23 13:26:33 +00:00
augustss c1d4463c05 Add Ethernet descriptor. 2004-10-23 13:24:24 +00:00
kent 1b1a5c5dba assign AudioNlfe to UATO_SUBWOOFER
assign "phone" to telephony terimnal types.  The label "phone" is used
in ac97 though it is not defined as AudioN* macro.
2004-10-22 17:00:22 +00:00
kent 4f3a6c3aa2 style fixes
- consistent folding in function declarations
 - define a function as Static if the function is declared as Static
2004-10-22 16:01:49 +00:00
kent aaf8d890f0 enclose debug macros with do {...} while (0)
from OpenBSD
2004-10-22 15:36:30 +00:00
kent ed036bef2a fix wrong realloc() usage.
from OpenBSD
2004-10-22 15:34:04 +00:00
kent 89affe1894 fix typos in comments.
add open/close code of sync pipe (not enabled)
2004-10-22 15:25:56 +00:00
augustss efe84c1097 Add a driver for Communication Data Class Ethernet devices. From the very
prolific Bill Paul for FreeBSD, via OpenBSD.
XXX Untested, since I don't have any such devices.
2004-10-22 13:08:23 +00:00
augustss 4eb781d843 Print information for high speed hubs about the number of TTs.
Print a message when low/full speed devices are ignored on high speed hubs.
2004-10-22 12:03:21 +00:00
augustss 2c051a4b85 Add interrupt transfers. From OpenBSD.
Having interrupt transfers enables some more device types to be used,
most notably USB2 hubs.  USB2 hubs still cannot handle anything but
USB2 devices, because there is node code to handle hub Transaction Translation
yet.
XXX This code doesn't do good bw scheduling, but it's certainly better than
nothing. :)
2004-10-22 10:38:17 +00:00
augustss 6f9df049df Insert from ifdefs for soft interrupt related stuff. From OpenBSD. 2004-10-22 09:58:00 +00:00
augustss 19ddd8a315 Add 3 devices. From OpenBSD. 2004-10-22 09:47:21 +00:00
augustss cb0eb4bacc Add a device. From OpenBSD. 2004-10-22 09:41:01 +00:00
augustss d7eeed3a45 Add 2 devices. From OpenBSD. 2004-10-22 09:39:06 +00:00
augustss 14186a69e1 Regen (previous commit was a mistake). 2004-10-22 09:35:55 +00:00
augustss 86d1561830 Merge a lot of devices from OpenBSD. 2004-10-22 09:34:55 +00:00
rjs 9003fc0a5c Regen. 2004-10-21 21:01:50 +00:00
rjs 89c80e4674 Add definitions for Dell X3 and X30 PDAs. 2004-10-21 21:00:31 +00:00
augustss 176f75ee37 A little portability stuff. 2004-10-21 18:14:40 +00:00
xtraeme d16bfcc7a2 Fix typo in comment: compolicated -> complicated. 2004-10-21 16:18:42 +00:00
kent ff827d1c72 make mixer names compatible with other audio devices
patch provided by Kazuhito HONDA in PR#15441
2004-10-21 12:41:07 +00:00
augustss ab7b7be2f8 Add suspend/resume support.
From OpenBSD.
2004-10-21 11:18:21 +00:00
augustss d9b55687d2 Use do .. while wrappers for debug print.
From OpenBSD.
2004-10-21 11:14:26 +00:00
augustss 00128db76d Match function names in debug messages with real name.
From OpenBSD.
2004-10-21 11:11:19 +00:00
augustss cc7b9783ea ANSIfy. 2004-10-21 11:05:39 +00:00
kent 3f642d7b30 mixer item for a selctor should start with "sel" not "fea" 2004-10-20 13:48:32 +00:00
kent e61cc9d9a5 add code to recognize sync-pipe audio stream.
The code is not enabled yet.
2004-10-16 18:08:50 +00:00
jmmv c6d18895ed Regen after addition of another vendor identifier for AIPTEK International
and the product identifier for AIPTEK International PenCam Mega 1.3.
2004-10-11 15:28:00 +00:00
jmmv e97dc76a93 Add another vendor identifier for AIPTEK International.
Add product identifier for AIPTEK International PenCam Mega 1.3.
2004-10-11 15:26:53 +00:00
kent 913cd88b5e add source selector support. The patch was provided by Kazuhito HONDA.
PR#26538
2004-10-03 06:01:09 +00:00
kent fe459b3125 - add some debug prints
- no parameter names in prototypes
- use const pointers if dereferenced object should not be modified
2004-10-02 19:14:54 +00:00
yamt 22399b45d0 change some members of struct buf from long to int.
ride on 2.0H.
2004-09-18 16:40:11 +00:00
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
yamt 4c7a64e02d make this compile with OHCI_DEBUG without EHCI_DEBUG. 2004-09-17 10:55:07 +00:00
drochner 96b589fc18 a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
 config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
 on "locators.h"
2004-09-13 12:55:47 +00:00
christos 392086fb66 bind the scrolling keys by default. 2004-09-11 04:47:43 +00:00
drochner 57cc3c5e5e remove a redundant check 2004-09-08 19:59:15 +00:00
thorpej e975b9caee - Add an (*ata_reset_channel)() member to ata_bustype.
- Add an ata_reset_channel() function that performs the common parts
  of resetting an ATA channel, which uses the (*ata_reset_channel)()
  callback to do the heavy lifting.  Adjust callers to use ata_reset_channel()
  instead of wdc_reset_channel().

This removes the last wdc-specific code from ata.c!
2004-08-20 23:26:53 +00:00
thorpej ce56a7e194 Also set the AT_XFDONE bit as appropriate. 2004-08-20 17:37:16 +00:00
thorpej 9167731c79 Rename some constants:
WDC_COMPLETE -> ATACMD_COMPLETE
WDC_QUEUED -> ATACMD_QUEUED
WDC_TRY_AGAIN -> ATACMD_TRY_AGAIN
2004-08-12 05:02:50 +00:00
thorpej 3ddac9b2da Rename "struct wdc_command" to "struct ata_command". 2004-08-12 04:57:19 +00:00
drochner 7f3933adae typo in comment 2004-07-22 18:45:40 +00:00
mycroft 584d70dbc1 Avoid touching the xfer after calling usb_transfer_complete(), as the
driver callback may have recycled it.  From PR 25960.
2004-07-17 20:24:15 +00:00
mycroft ab236698f0 ugen_isoc_rintr() may recycle the xfer immediately. Therefore, we avoid
touching the xfer after calling the callback in usb_transfer_complete().
From PR 25960.
2004-07-17 20:16:13 +00:00
mycroft c206d4cf15 hcpriv is not actually used here. Remove references to it. 2004-07-17 20:12:02 +00:00
mycroft 30533d66ac AUOPEN_* != AUMODE_*. Duh. Make unidirectional devices work again. 2004-07-16 22:39:23 +00:00
mycroft 68e6b1d115 The previous change was not complete. /brick me 2004-07-16 20:08:23 +00:00
mycroft c3cc87104d Whoops! Don't try to set parameters for a direction that doesn't exist.
(audio_set_defaults() can do this.)
2004-07-09 18:08:00 +00:00
mycroft e3694d0dc1 Adjust some silliness that was causing us to do extra work for "frame list
rollover" interrupts, which we pretty much ignore.
2004-07-09 05:07:06 +00:00
mycroft 005f3f7095 Clean up a little. 2004-07-09 02:57:48 +00:00
rumble bbbaf17cc4 The MCT advertises both the interrupt and bulkin endpoints as
interrupts. Go from assuming that the first enumerated interrupt
is the bulkin (since this may not be the case) to assuming that
the true interrupt endpoint will have a 0x2 wMaxPacketSize.

From FreeBSD's umct.c, ok'd by mycroft@, closes PR25959.
2004-07-08 00:54:21 +00:00
mycroft 7c36059937 Previous fix was not right. Also fix a couple of other problems -- we were
never actually setting the mode if using audioctl.
2004-07-07 22:04:28 +00:00
mycroft 0d1387f79f Regen. 2004-07-07 21:54:38 +00:00
mycroft b236e06a7b GREENHOUSE2_USBKR100 -> REALTEK_RTL8150L, per PR 20425. 2004-07-07 21:54:21 +00:00
mycroft bd6daf04d5 Regen. 2004-07-07 21:31:24 +00:00
mycroft b4d61283e6 Add another Zire device, from PR 25929. 2004-07-07 21:11:02 +00:00
mycroft d9e25c2ba9 Rearrange to fix a potential crash when changing parameters with audioctl and
the device is closed.  Reported in PR 24066.
2004-07-07 20:21:06 +00:00
mycroft b48bbc8b8a Fix an error in a printf() format.
Swap the order that two items are written; possibly fixes a race condition
that would affect isoc transfers.
2004-07-06 04:53:09 +00:00
mycroft 3ad4dd10ca Fix a byte order error. 2004-07-06 04:18:05 +00:00
mycroft 81ff095ed7 Remove the call to ulpt_reset(). Although this *shouldn't* cause printers to
disconnect, it does, and this is *not* what the "prime" behavior was for in
lpt.
2004-07-03 19:33:15 +00:00
mycroft 2d24a9bd14 When starting a bulk-only transfer, punt early if the device is going away. 2004-06-30 05:53:46 +00:00
mycroft 9f98e14be5 Fix an endianness problem (EHCI_NULL was being double-swapped). 2004-06-30 03:11:56 +00:00
mycroft 658b1114e7 Ignore a port error that happens to come in at the same time as a connect
status change.  Some root hubs seem to report both.
2004-06-29 06:30:05 +00:00
mycroft ac575d2a58 Make one message dependent on ohcidebug, so it doesn't interfere with polled
operation; e.g. when entering a root device or in DDB.
2004-06-29 03:56:04 +00:00
mycroft 00188614f1 Fix some UMATCH values. 2004-06-28 07:49:16 +00:00
mycroft f9fd558bdc Tracy's Clie reports that it's SFF-8070 when it's really UFI. Bah. 2004-06-28 06:47:48 +00:00
mycroft 173e7d6ab6 Do not do a CBI reset before returning STATUS_CMD_FAILED. This causes any
sense information to be thrown away, and is therefore nonsensical.
2004-06-26 02:17:00 +00:00
mycroft c9c4a2d0bb Fix usage of incorrect buffer in CBI, possibly causing general failure to
transfer data correctly.  See PR 25676.
2004-06-25 14:14:34 +00:00
mycroft 7b51844a76 Do not return STATUS_WIRE_FAILED in response to a CBI stall. This is perfectly
normal, and is used to report errors.  Instead, use STATUS_CMD_FAILED, which
causes us to do a REQUEST SENSE.  Should address PR 22960.
2004-06-25 14:07:27 +00:00
mycroft d27abec08f Add a comment explaining quirk table policy. 2004-06-25 13:23:55 +00:00
mycroft b15cb82a2d Further cleanup of toggle handling. Now that we use EHCI_QH_DTC, we don't
need to fiddle with the TOGGLE bit in the overlay descriptor, so minimize
how much we fuss with it.
2004-06-23 06:45:56 +00:00
mycroft dbee7a2507 In the "seemed like a good idea until I found the fatal flaw" department...
Attempting to read a maximum-size string descriptor causes my kue device to go
completely apeshit.  So, go back to the original method, but allow the device
to return a shorter string than it claimed.
2004-06-23 06:27:54 +00:00
mycroft 1bce39942b Whoops, use the correct value for the maximum string descriptor length. 2004-06-23 05:23:19 +00:00
mycroft ef77780b63 Yes, some devices return incorrect lengths in their string descriptors. Rather
than losing, do what Windows does: just request the maximum size, and allow a
shorter response.  Obsoletes the need for UQ_NO_STRINGS, and therefore these
"quirks" are removed.
2004-06-23 02:30:52 +00:00
mycroft a20e630437 Fix an error in a debug printf(). 2004-06-22 22:00:11 +00:00
mycroft 7c3a6504d0 Adjust a couple of comments to make it clear WTF is going on. 2004-06-22 18:27:46 +00:00
mycroft 60208395fd Update comment. 2004-06-22 18:05:18 +00:00
mycroft a995be9908 Fix a printf() error. 2004-06-22 12:21:04 +00:00
mycroft a31a65fb9f Remove comment about the data toggle being borked. 2004-06-22 09:46:46 +00:00
enami 8bafaf56a7 As the ehci_idone() now uses the variable `epipe' unconditionally, always
declare it (in other words, make this file compile w/o EHCI_DEBUG).
2004-06-22 09:16:56 +00:00
mycroft 7a2cdd24f9 Fix a stupid bug in ehci_check_intr() that caused use to try to complete a
transaction that was still running.  Now ehci can handle multiple devices
being active at once.
2004-06-22 08:55:25 +00:00
mycroft 4114710563 Oops. Remove a couple of printf()s. 2004-06-22 07:40:19 +00:00
mycroft 941901b304 Failure to properly mask off UE_DIR_IN from the endpoint address was causing
OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather
interesting lossage.

Suddenly I get MUCH better performance with ehci...
2004-06-22 07:20:35 +00:00
mycroft 46d9c14fee Set the data toggle correctly, and use EHCI_QTD_DTC. This fixes problems with
my ALi-based drive enclosure (it works now, rather than failing to attach).
Also seems to work with a GL811-based enclosure and an ASUS enclosure with a
CD-RW, on both Intel and NEC controllers.

Note: The ALi enclosure is currently very SLOW, due to some issue with taking
too long to notice that the QTD is complete.  This requires more investigation.
2004-06-22 05:25:10 +00:00
augustss 79295fa58d Remove change accidentally committed by tls. 2004-06-14 13:52:55 +00:00
tsarna 4605dd7457 Add calibration support to uep driver.
Untested, still need a userland utility to calibrate with.
2004-06-12 17:52:41 +00:00
mycroft 738ef9dc5d Fix an unimportant typo. 2004-06-12 16:02:42 +00:00
petrov 3936b06424 Initialize restartcnt. from FreeBSD. 2004-06-11 17:25:47 +00:00
jdolecek 849c8f1904 attach to Sitecom USB to serial cable
patch submitted in PR kern/25510
2004-06-05 08:41:43 +00:00
jdolecek 3173ee1a05 regen:
add Sitecom USB to serial cable
info submitted in PR kern/25510
2004-06-05 08:40:10 +00:00
jdolecek 80ce2a5588 add Sitecom USB to serial cable
info submitted in PR kern/25510
2004-06-05 08:39:31 +00:00
grant 52620d764c regen 2004-05-30 09:28:48 +00:00
grant cd624764ba add 2nd vendor ID for Chicony Electronics (0x0c45) and add Chicony
TwinkleCam USB camera (0x600d).
2004-05-30 09:27:56 +00:00
tsarna 6cf367d31d "uep" a driver for USB eGalax touch-panels. These are commonly found on
Xenarc, Liliput, etc. small touchpanel LCD displays.

TODO:
- manpage
- calibration support (make hpc's tpcalib stuff more MI?)
- On i386 and other xfree-ish xservers, (currently-uncomitted) patches
  are needed for X to honor wscons absolute mouse position events.
2004-05-24 23:48:36 +00:00
tsarna b20d882c63 regen 2004-05-24 19:02:19 +00:00
tsarna a0645ac0f8 Add IDs for eGalax USB touchpanel controllers.
Descriptions are not very good because the only documentation I have
says "the VID and PID may be one of these combinations", without any
additional information about the differences or even model names.
2004-05-24 19:00:42 +00:00
martin 16cb7d6f69 Make sure that we call uplcom_set_line_state() to get consistent state
between our idea of flow controll settings and the chips one.
In uplcom_set_line_state use the same value as the manufacturer suggests,
since the previously used (umodem based) values do not seem to work.
It is not completely clear what happened here - either the "not calling
uplcom_set_line_state" due to luck prevented the non working state to
be discovered or there are variants of the chip that need the old values.
During testing none such chips have been found - if they ever apear we
might have to make this function more intelligent, depending on the chip
in use.
2004-05-20 09:23:33 +00:00
jdolecek 958daa19cd add support for USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctls,
with same meaning as for ugen(4)
2004-05-08 11:41:19 +00:00
itojun 300aa0dcd5 use bounded string ops (snprintf, strl*) 2004-04-23 17:25:25 +00:00