Commit Graph

3257 Commits

Author SHA1 Message Date
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
plunky
c672648cd8 print end of line before getting the descriptor as it sleeps 2010-02-24 17:34:56 +00:00
plunky
7e131adc8e use # for include directive, just because.. 2010-02-24 17:00:25 +00:00
kiyohara
5401ccaba6 Fix porting miss.
However this change in between #ifdef notyet and #endif.
  Thanks for fukaumi.
2010-02-24 12:29:47 +00:00
pooka
17a848cc03 printf -> aprint_normal to avoid empty linefeeds and partial messages
for AB_QUIET.
2010-02-20 14:52:22 +00:00
pooka
182993fbc7 Huawei K3765 requires another kind of magic to get it out of CD mode.
It also changes product id after being configured.  Without this
change the device just lingers in u3ginit forever.  With this change:

u3ginit0 at uhub0 port 1: Switching to 3G mode
u3ginit0: detached
u3ginit0: at uhub0 port 1 (addr 2) disconnected
u3g0 at uhub0 port 1 configuration 1 interface 0
ucom0 at u3g0 portno 0: 3G Modem
u3g1 at uhub0 port 1 configuration 1 interface 1
ucom1 at u3g1 portno 1: 3G Modem
u3g2 at uhub0 port 1 configuration 1 interface 2
ucom2 at u3g2 portno 2: 3G Modem
u3g3 at uhub0 port 1 configuration 1 interface 3
ucom3 at u3g3 portno 3: 3G Modem

(tested with rump)
2010-02-19 15:10:02 +00:00
pooka
0c9a7e023d regen: huawei K3765 2010-02-19 13:56:39 +00:00
pooka
91e54342ca Add Huawei K3765 (two id's, it changes product id after being inited). 2010-02-19 13:55:51 +00:00
pooka
3dbf8271ce Replace USB_GET_SC() instances with USB_GET_SC_OPEN(). The latter
is exactly like the former, except it returns with ENXIO if sc is
NULL instead of continuing on to use it.  Most of the time this is
handled by the fd layer and you get EBADF, but sometimes it's
possible to race into the device method for whatever reason and
you get a kernel panic.  I have no idea what the "whatever reason"
might be.
2010-02-19 12:40:47 +00:00
martin
fa65bdadb2 KNF 2010-02-13 02:16:51 +00:00
martin
667f16d7f3 Remove UMASS_QUIRK_IGNORE_RESIDUE, instead max out the expected response
size at the actual transfer length. Fixes PR kern/42225 differently.
2010-02-13 02:09:41 +00:00
sborrill
204adc86e7 Tweak comment about keyboard mapping. 2010-02-09 16:01:17 +00:00
snj
b2cd31c11a Add ZTE MF626. From Marc Vertes in PR kern/41667. 2010-02-08 20:45:43 +00:00
snj
72facffcbf Regen. 2010-02-08 20:44:01 +00:00
snj
3448c37ee6 Add ZTE MF626. From Marc Vertes in PR kern/41667. 2010-02-08 20:43:00 +00:00
tonio
9313df2220 Add uthum(4) driver from openbsd, adapted to handle both
TEMPerHUM and TEMPer devices
2010-02-06 11:17:17 +00:00
tonio
5cdb747656 Add uthum driver, ported from openbsd
Handles Tenx temperature sensors TEMPer and TEMPerHUM
and declares them to envsys
2010-02-06 11:14:41 +00:00
tonio
4557895744 regen 2010-02-06 10:15:48 +00:00
tonio
4d618aaaf1 Add TENX vendor and two devices 2010-02-06 10:11:55 +00:00
pooka
068898b44d Introduce the uhub_ubermatch variable. Setting it to 1 makes sure
than a uhub attaches even at higher priority than ugen when
ugen_override is set to 1.  This allows to probe the whole USB bus
and attach its functions with ugen.

A better infrastructure to control this would be nice ....
2010-02-02 23:18:49 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
martin
9e839480f0 Add two CTI rs485 dongles 2010-01-18 20:57:13 +00:00
martin
86b7d7433b regen 2010-01-18 20:55:37 +00:00
martin
f0b282446a Add two CTI usb-rs485 adapters 2010-01-18 20:54:22 +00:00
pooka
64da563d90 Forward declare struct bpf_if and use that as the type for bpf_if
instead of "void *".  Buys us oo times the type-safety for 0 times
the price.
(no functional change)
2010-01-17 19:45:06 +00:00
bouyer
8189b574e4 Fix leak of a usbd_xfer_handle when a interrupt pipe is aborted then
closed:
usbd_open_pipe_intr() allocates a usbd_xfer_handle for pipe->intrxfer.
Most usb device drivers using interrupt pipes call usbd_abort_pipe()
then usbd_close_pipe(), usbd_close_pipe() is supposed to free pipe->intrxfer.
But usbd_abort_pipe() calls [uoe]hci_device_intr_abort() which,
if the xfer aborted is pipe's intrxfer, sets pipe->intrxfer to NULL.
So usbd_close_pipe() can't free it and the usbd_xfer_handle is lost.

To fix this, in usbd_abort_pipe() remember the pipe->intrxfer's value
on entrie, and if it's different after usbd_ar_pipe(), call
usbd_free_xfer with the original value.
Confirmed to fix the memory leak on close() with umodem(4) and
uplcom(4).
2010-01-16 17:03:03 +00:00
matthias
1bb1b66ea8 Make ums.c work with a "Microsoft Natural Ergonomic Desktop 7000" mouse.
XXX The tilt function still doesn't work for me.
2010-01-14 09:30:39 +00:00
jakllsch
d1d4fac35a Adjust report descriptor for Logitech USB Receiver M/N C-BT44 to
more closely match what is in the report.  (This corrects the
off-by-one usages of most of the gray multimedia keys on a EX110
wireless keyboard so they can sensibly be used with libusbhid(3),
usbhidctl(1) and usbhidaction(1).)

This device also uses officially reserved usages (in the approximate
range of 0x1000 to 0x1100) in the Consumer usage page, but these
are out of the logical range the device reports as being valid.
2010-01-12 16:50:58 +00:00
jakllsch
108bad03f6 Avoid treating the Griffin PowerMate knob as a ums(4).
Should fix PR/19445.
2010-01-12 16:18:58 +00:00
jakllsch
1c4d1c8a69 regen. 2010-01-12 14:51:43 +00:00
jakllsch
1b5a2f8f7f Add Logitech C-BT44 Receiver. 2010-01-12 14:50:38 +00:00
pooka
759da0cdcf _KERNEL_POT 2010-01-11 00:18:26 +00:00
dyoung
cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
martin
df05031a59 Fix memory barrier in a debug function 2010-01-08 16:40:30 +00:00
martin
ccc11a5461 Split the u3g driver into two parts: u3ginit attaches to those devices
that only come as a umass device in the default configuration and
forces them to reinitialize in 3D mode and detach.
The u3g part attaches to individual interfaces for the 3G functionality,
leaving the umass interface(s) for that driver.
With this change I can use the MMC card in my Huawey stick (as well as
the integrated windows driver CD, which of course is pretty useless) and
the 3G modem at the same time.
Fixes PR 42577.
Code contributed anonymously, minor tweaks (and all bugs) by me.
2010-01-07 00:15:20 +00:00
martin
015458e484 Optimize for higher speeds, e.g. when used as part of a 3G modem.
Contributed anonymously.
2010-01-06 20:37:56 +00:00
jakllsch
ded5c676f3 The Dell DRAC5 gives us a zero-length report immediately following
a normal report.  Thus, ignore zero-length reports.  Move some related
report size insanity checking into the UHIDEV_DEBUG case.

Should fix PR/39911.
2009-12-30 23:42:22 +00:00
jakllsch
d1721822b6 Apply patch from Matthias Pfaller in PR/42546.
The USB HUT v1.11 document states that:
    "Typical system software will search for application
     collections tagged with either a Mouse or a Pointer usage."

This patch adjusts ums(4) to match not only on
the Mouse usage, but also on the Pointer usage.
2009-12-30 20:38:47 +00:00
jakllsch
09be3feb9e Implement monitoring of CTS and RI lines. Use UCDC_N_SERIAL_* instead
of RSAQ_STATUS_*, the Linux driver shows that with the exception of CTS,
the PL2303 uses USB CDC bits at byte offset 8 of the interrupt transfer.

To-Do: Handle the other bits, such as BREAK.
2009-12-25 03:13:43 +00:00
jakllsch
75bfe4c1bd defflag UGEN_BULK_RA_WB is no more.
Hi pooka
2009-12-24 01:32:22 +00:00
pooka
bb27c3b9ac unifdef -D UGEN_BULK_RA_WB
Default behaviour unchanged, the feature must still be explicitly
enabled for a ugen fd.
2009-12-23 01:04:45 +00:00
pooka
e46bf87952 Don't impose a compile-time dependency on the kernel containing
ohci/uhci just for the sake of setting a debug variable.
2009-12-19 11:41:56 +00:00
cherry
313960fcf1 regen properly for usbdevs, 1.538, _after_ commit 2009-12-12 14:30:59 +00:00
cherry
add5aa6f98 Add ID for Qualcomminc AC8700 as found in "ZTE, Incorporated ZTE CDMA Tech, rev 1.10/0.00, Works with BSNL (http://www.bsnl.co.in) EVDO service 2009-12-12 14:18:27 +00:00
cherry
a4f53c53d6 regen from usbdevs 1.538
> Add product IDs for Qualcomm RWT FCT-CDMA 2000 1xRTT Modem, ZTE Storage and CDMA 1xEVDO Modem
> From $FreeBSD: head/sys/dev/usb/usbdevs 199331 2009-11-16 20:35:16Z thompsa $
2009-12-12 14:03:48 +00:00
cherry
a67abb9cbe Add product IDs for Qualcomm RWT FCT-CDMA 2000 1xRTT Modem, ZTE Storage and CDMA 1xEVDO Modem
From $FreeBSD: head/sys/dev/usb/usbdevs 199331 2009-11-16 20:35:16Z thompsa $
2009-12-12 14:01:54 +00:00
jakllsch
a52500257f It's not an error for a Ethernet interface to have a link-layer address.
hi cube
2009-12-08 20:38:16 +00:00
dyoung
efc6bfe74a Simplify device-activation hooks. 2009-12-06 21:40:31 +00:00
dyoung
7a2bcc8004 Delete the device-activation hook, it doesn't do anything useful. 2009-12-06 21:39:45 +00:00
dyoung
110a4ba3b4 Simplify several device-activation hooks. 2009-12-06 20:20:12 +00:00