Commit Graph

3257 Commits

Author SHA1 Message Date
tsutsui
47f87355eb Add a driver for DisplayLink DL-1x0/1x5 based USB LCDs and USB-VGA adaptors.
Ported by FUKAUMI Naoki from OpenBSD with many modification.
No particular comments (except from me) on tech-kern@.

There are still many TODO even in MI wscons(4) API to handle this device:

 * No detach function for wsdisplay(9).
   Unpluging a device causes a panic. (should be trivial?)

 * ioctl() for X server support is currently commented out. ("notyet")
   OpenBSD allows device depedent ioctl()s and they introduced
   UDLIO_DAMAGE ioctl for the damage extension ops of X servers for udl(4).
   Before blindly pulling such ioctl(), probably we should discuss
   how such specific operations should be handled in MI wscons(4) API.

 * Screen text of wsemul tty could be mangled during large scroll ops.
   All tty output operations are invoked via ttstart() with the giant
   tty_lock mutex held, so we can't call cv_wait(9) to wait resources
   for data xfers via usbdi(9).h, then text output is silently discarded
   on resource shortage. To handle this without tty_lock reorganization,
   we have to change wsdisplay(9) APIs (especially wsdisplaystart()) to
   return a number of actually handled characters as OpenBSD does, but
   it may require whole API changes around child rasops(9) etc.

 * No MI API definition to convert mmap(9) cookie to physical address.
   The conversion is required to create a cookie which will be passed to
   pmap_phys_address(9) in uvm/uvm_device.c:udv_fault(). Most other
   drivers use bus_dmamem_mmap(9) or bus_space_mmap(9), but udl(4) uses
   kmem_alloc(9)'ed memory for bitmap data.
   Furthermore, pmap(9) man page says about pmap_phys_address(9):

     "This function is provided to accommodate systems which have
      physical address spaces larger than can be directly addressed
      by the platform's paddr_t type. The existence of this function is
      highly dubious, and it is expected that this function will be
      removed from the pmap API in a future release of NetBSD."

   As the man page says we have already had split paddr_t and vaddr_t,
   so it's time to remove such old ugly cookie and change all mmap(4)
   functions (mostly in MD bus_dma(9) and bus_space(9) APIs) to return
   simple physical address in paddr_t?

 * We need proper device names for wsdisplay1 (and more devices).
   Currently wsdisplay0 uses ttyE0 through ttyE253 (minor 0 to 253)
   for screens, ttyEstat (254) for status, and ttyEcfg (255) for config.
   The next wsdisplay1 will use 256 through 509 for screens, 510 for stat,
   and 511 for config but what names should we use for them? ttyFxxx?

 * How to handle multiple sets of wskbd/wsdisplay on a single machine.
   rc.d/wscons doesn't provide method to specify wscons control devices.
   There is no proper interface to specify which keyboard should be connected
   to which wsdisplay, etc.

 * And maybe more...
2009-11-30 16:18:34 +00:00
mbalmer
8a44b5e050 Add support for USB HID devices that report absolute coordinates instead
of relative movement data, i.e. touchpanels.  Please note that calibration
must be done outside the wsons(4) driver for now.
2009-11-27 08:35:05 +00:00
tsutsui
6bccdb1af3 Regen from usbdevs rev 1.537:
> Add IDs for DisplayLink DL-1x0/1x5 based USB LCDs and USB-VGA adaptors.
> Info from FUKAUMI Naoki's udl(4) driver patch.
2009-11-15 17:34:32 +00:00
tsutsui
dd10c2525c Add IDs for DisplayLink DL-1x0/1x5 based USB LCDs and USB-VGA adaptors.
Info from FUKAUMI Naoki's udl(4) driver patch.
2009-11-15 17:33:28 +00:00
uebayasi
3e92dd482c Sprinkle static. 2009-11-14 17:06:12 +00:00
dyoung
af7d639aad Re-order operations in usb_detach() so that if a usb(4) instance's
children will not detach, the instance is not left in an inconsistent
state.

If uhub(4) port is disconnected, forcefully detach the children on
that port.

Simplify detachment hooks.  (sc_dying must die!)

Pass along and respect detachment flags, esp. DETACH_FORCE,
throughout.
2009-11-12 20:11:35 +00:00
dyoung
f611b6f9fc Simplify activation hooks. (sc_dying must die!) 2009-11-12 19:58:27 +00:00
dyoung
edcba9e1df Simplify activation hook. (sc_dying must die!)
unifdef -D__NetBSD__ -U__FreeBSD__ -U__OpenBSD__.
2009-11-12 19:53:56 +00:00
dyoung
8f3030b535 Simplify activation hook. (sc_dying must die!) 2009-11-12 19:53:14 +00:00
dyoung
189c253b00 Remove superfluous activation hook. 2009-11-12 19:52:14 +00:00
dyoung
8d5198657e Simplify activation hooks. (sc_dying must die!) 2009-11-12 19:51:44 +00:00
dyoung
43acd4eaa8 Simplify activation hook. (sc_dying must die!)
s/device_ptr_t/device_t/.
2009-11-12 19:50:01 +00:00
dyoung
ed1618c692 Simplify activation hook. (sc_dying must die!)
unifdef -D__NetBSD__ -U__FreeBSD__ -U__OpenBSD__.
2009-11-12 19:49:03 +00:00
dyoung
8488e3e07c Simplify activation hook.
(sc_dying must die!)
2009-11-12 19:46:01 +00:00
uebayasi
49fdab3079 Comment & whitespace. 2009-11-12 08:54:00 +00:00
uebayasi
024d1252f2 Style. 2009-11-12 08:41:49 +00:00
uebayasi
4a2c3ae0e4 Whitespace & style. 2009-11-12 08:32:57 +00:00
uebayasi
4633367fa2 usbd_do_request_flags(..., 0, 0, USBD_CONFIG_TIMEOUT) is equivalent to
usbd_do_request(...).  Remove an unneeded cast.  No functional changes.
2009-11-12 08:28:31 +00:00
uebayasi
f3b7685602 Indent. 2009-11-12 08:16:50 +00:00
uebayasi
0ee2b2ae9b Typo in a debug printf. 2009-11-12 07:58:32 +00:00
pooka
db8264b1d5 be a little more verbose in DIAGNOSTIC printf 2009-11-11 15:49:05 +00:00
ghen
a4951d8ac9 Add missing 102nd key for European keyboards. 2009-11-08 15:32:52 +00:00
rafal
4e042dc0d8 Fix kern/41737 -- add quirks to make MS Wireless Laser Mouse 6000 work. 2009-11-06 04:42:27 +00:00
rafal
c90efca2b1 Regen for MS Wireless 2.4Ghz Xmitter (for wireless mice, etc.) 2009-11-05 03:46:12 +00:00
rafal
21861f5135 Add Microsoft's Wireless 2.4Ghz transmitter (used for e.g. wireless mice). 2009-11-05 03:44:50 +00:00
uebayasi
280c33f72b EHCI_NULL is already little-endian. No htole32() needed. Pointed out by
Tsubai Masanari.
2009-11-01 13:26:50 +00:00
uebayasi
ecc465882d Fix some whitespaces. 2009-11-01 07:23:13 +00:00
uebayasi
38f40b7b62 Update referencial URLs. 2009-11-01 06:36:44 +00:00
is
57766df4d3 regenerate:
Quirk to regenerate residue for borken UMASS devices; needed (at least)
for Supertop IDE bridge. From Matthias Kretschmer, PR 42225.
2009-10-30 16:25:46 +00:00
is
5886aca913 Quirk to regenerate residue for borken UMASS devices; needed (at least)
for Supertop IDE bridge. From Matthias Kretschmer, PR 42225.
2009-10-30 16:22:32 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
enami
c210965a47 Since the aprint_normal_dev() several lines above prints a space
after the device name, no need to prepend the space here.
2009-10-16 00:45:26 +00:00
wiz
2dfcea5de5 Add quirk for Meizu M6, which doesn't like synchronize cache;
addresses PR 40442.

Idea for quirk from FreeBSD/hps.
2009-10-12 23:43:05 +00:00
wiz
9ed0c95351 regen 2009-10-12 22:29:16 +00:00
wiz
79a9d356f7 Fix typo in comment. 2009-10-12 22:28:47 +00:00
wiz
b00fb4bb91 Add vendor and product ID for Meizu M6. 2009-10-12 22:28:15 +00:00
pooka
2a1f8823f5 add another vid for fujitsu 2009-10-02 14:40:36 +00:00
pooka
7c544ae12a Attach DWA-111.
XXX: Adapter seems to be generally functional, but at least on -nb5
WPA didn't work very well (managed to get authenticated and sometimes
an address via dhcp, but that's it).  I can't currently test non-wpa
networks, so don't know if it's an issue only with wpa or with the
connectivity in general.
2009-09-28 10:22:07 +00:00
pooka
e7c7b79434 regen 2009-09-28 10:18:04 +00:00
pooka
2b68978a91 +DWA-111 2009-09-28 10:16:30 +00:00
pooka
86e98a0103 Add a simple kvm integer toggle to control ugen priority and override
the autoconf flags value.  This helps to change the priority at
runtime.  (XXX: is there a better way to do this?)
2009-09-24 22:33:04 +00:00
pooka
2cb5577c50 ugen_get_cdesc() can return NULL. When this happens, return the
karmic EINVAL error instead of crashing.
2009-09-24 15:36:59 +00:00
plunky
5fab894c54 fix up USB drivers printing of autoconf information
1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
   newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
   allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.
2009-09-23 19:07:19 +00:00
dyoung
01dd38b17c Nothing else handles DVACT_ACTIVATE, so why should umass(4)? Get
rid of the DVACT_ACTIVATE case in umass_activate().  This eliminates
the only call to config_activate() in the entire tree.
2009-09-16 22:44:19 +00:00
dyoung
ac13fdbe53 Expand some definitions from <dev/usb/usb_port.h>. 2009-09-04 18:14:41 +00:00
dyoung
1ef37665bc Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.
2009-09-04 18:10:08 +00:00
dyoung
b6c920694a Extract some definitions from usb_port.h and put them into usb.h. 2009-09-04 17:55:48 +00:00
dyoung
786bda7e17 Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1). 2009-09-04 17:53:12 +00:00
dyoung
143e684e6a There's no need to #include <dev/usb/usb_port.h> after #including
<dev/usb/usb.h>.
2009-09-04 17:01:29 +00:00
dyoung
50dc868367 Stop #including <dev/usb/usb_port.h>, this time more gracefully:
#include <dev/usb/usb.h>, instead.  We're certain to get all of
the #definitions we need that way.
2009-09-04 16:54:32 +00:00
dyoung
b16b5cbe1d Stop #including <dev/usb/usb_port.h>. 2009-09-04 16:52:24 +00:00
dyoung
5cebfe910a KNF: compare a pointer with NULL instead of evaluating its "truth." 2009-09-04 16:42:38 +00:00
jmcneill
6277e8688d Enable UVC-style headers and use them to help detect stream errors. 2009-09-04 11:26:54 +00:00
dyoung
628c492598 Expand some of the portability macros from sys/dev/usb/usb_port.h.
There is no change in the generated assembly.
2009-09-03 20:54:03 +00:00
jmcneill
1706b83ae7 aprint-ify. 2009-09-01 21:46:07 +00:00
plunky
ca9e57b2e6 (perhaps) fix a long standing issue that I came across recently. If
you repeatedly enable/disable a ubt device it sometimes hangs in
the bluetooth initialisation where the device responses never arrive,
but if you interrupt and try again it works fine.

additionally aborting the default pipe on shutdown seems to fix that
2009-08-30 18:35:53 +00:00
jmcneill
ae08d7634d Print devinfo on the same line as locators, and make the transfer mode
output aprint_verbose
2009-08-23 19:03:18 +00:00
jmcneill
39177e11e5 s/PLAYSTATION/PlayStation/ 2009-08-19 13:38:26 +00:00
drochner
652d1aa912 rename a macro which is used to typecast constant strings from "U"
to "UC" -- there is a draft paper (ISO/IEC DTR 19769) which defines
that U"xxxx" is a UTF-32 literal, and gcc-4.4.1 implements this
with -std=gnu99
2009-08-18 11:08:37 +00:00
tron
3ff8faf2b6 Add support for the Openmoko Freerunner to cdce(4) ported from FreeBSD.
The patch was supplied by Pierre Pronchery in PR kern/40049.
2009-08-16 14:18:49 +00:00
martin
7867c1b262 Use a separately defined USBD_CONFIG_TIMEOUT when requesting a device
descriptor. I have a USB ATA device that spins up it's (removable) hard
disk and only returns the real descriptor if the disk is present - this
takes too long with the default 5 seconds timeout, so we were unable to
properly attach this device.
2009-08-16 13:20:40 +00:00
martin
9c8005a99c If we are attaching a high speed device, request a full size descriptor
block - we know the device will be able to handle it already.
This fixes a strange failure mode when attaching a (apparently non standard
conformant) USB ATA device I have, and *should* not cause any harm.
Apparently the device in question answered with the full descriptor despite
our short request - a failure mode not handled gracefully, leading to a
port reset. From Jeremy Morse.
2009-08-16 13:06:32 +00:00
skrll
61b95b459d Make ucycomstart use usbd_setup_xfer and a callback so that it doesn't
(attempt to) sleep in interrupt context.

From David Howland in PR 36276 with changes from me.

XXX Still losing data on input.
2009-08-06 07:07:30 +00:00
tshiozak
591b8c1e16 add Melco(Buffalo) WLI-UC-G 11b/11g wifi adaptor (rt2573).
This works fine for 11b, but unstable for 11g.
2009-08-02 20:55:45 +00:00
tshiozak
50333a0e5c regen. 2009-08-02 20:53:41 +00:00
tshiozak
a84f8b4d14 add Melco(Buffalo) WLI-UC-G 11b/11g wifi adaptor (rt2573) 2009-08-02 20:52:26 +00:00
skrll
19e6624025 typo in comment. 2009-07-30 19:57:07 +00:00
jakllsch
aadbdc69dd Without UQ_ASSUME_CM_OVER_DATA, the PANTECH UM175 has a
non-working bulk-in endpoint
2009-07-29 16:04:14 +00:00
jakllsch
14641e0bcc Regenerate. 2009-07-29 15:47:26 +00:00
jakllsch
c5b6c26047 Add entries for some Hyundai CuriTel (Audiovox, Pantech) products, from OpenBSD. 2009-07-29 15:45:17 +00:00
sketch
1d9fe50b80 Wrap ehcidebug in EHCI_DEBUG, not USB_DEBUG. 2009-07-27 14:41:19 +00:00
skrll
7a56aed863 spaces to tab. 2009-07-24 06:58:24 +00:00
skrll
eaffbb9ed5 Remove trailing whitespace 2009-07-24 06:54:10 +00:00
skrll
aa9f2831e1 Wrap some long lines.
Whitespace.
2009-07-24 06:50:40 +00:00
jakllsch
edeb84e77a Fix WSKBD_RAW mode ukbd -> pckbd translation for Pause/Break and
Print Screen/Sys Req keys so xf86-input-keyboard can figure out
what we want.

Additionally, fix dead URL, and add a note that this emulation
is not completely identical to a real pckbd.
2009-07-11 18:26:58 +00:00
mbalmer
5c2d18cdea regen. 2009-06-28 10:46:37 +00:00
mbalmer
81170a7797 Add some vendor/product IDs for radio clocks. 2009-06-28 10:45:24 +00:00
dyoung
72ca52eed5 Use &zn->ni instead of (struct ieee80211_node *)zn because it is
concise and safe.
2009-06-26 00:15:23 +00:00
dyoung
c3a668892b Compilable, untested fix to zyd(4) lossage reported by Matthias-Christian
Ott: every ioctl but SIOCSIFFLAGS fails with ENXIO (Device not
configured).  Let ioctls complete even if initialization is not
complete (!sc->attached).  Do exit immediately from zyd_newstate
with ENXIO if !sc->attached, however:  zyd_newstate tries to call
some USB routines for which it is probably not ready.
2009-06-26 00:14:09 +00:00
dyoung
ed0e4d4d36 Expand more macros from usb_port.h. 2009-06-26 00:06:27 +00:00
dyoung
c97ab81b59 Expand several definitions from usb_port.h. 2009-06-26 00:01:25 +00:00
mrg
bf40ad8b96 port the MOSCHIP MCS7703 driver from openbsd, based on changes between
openbsd uvscom and netbsd uvscom as a guide.

XXX: it only attaches one of the two ucom's on this device currently.

XXX: needs moscom.4.
2009-06-19 01:16:23 +00:00
mrg
a0e195499c regenerate for new MOSCHIP devices. 2009-06-19 01:15:02 +00:00
mrg
aa276e62a5 add a couple of MOSCHIP usb serial devices. 2009-06-19 01:14:27 +00:00
dyoung
7fdb86195d Use device_t instead of device_ptr_t. Stop using USB_MATCH() and
USB_ATTACH().
2009-06-16 19:42:44 +00:00
plunky
78fb2cc482 add missing NetBSD RCS ID tags 2009-05-29 18:49:21 +00:00
nisimura
2f739d6166 add VID 0x6011 case to match FT4232H chip. 2009-05-25 11:38:49 +00:00
nisimura
7384fe89d2 regen to sync with new usbdevs file. 2009-05-25 11:36:52 +00:00
nisimura
0a1e3a4113 add VID 0x6011 for FT4232H quad channel chip. 2009-05-25 11:35:10 +00:00
nisimura
44dbe1e84c - detect FTDI chiptype from bcdDevice field to determine the number of
channels.
- tested on 232BM, 232RL and 2232D chips.
- now capable of quad channel FT4232H.
- minor format nit and legacy title comment removal.
- non UART type bit stream (!= ucom) support is under planning.
2009-05-24 16:24:25 +00:00
cegger
d16a259fe3 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 13:15:24 +00:00
martin
1e54487f2a Correct previous: detaching uhubN makes the bus pointer NULL 2009-05-02 22:28:41 +00:00
martin
9b2932709e If we are unlucky, during detach of child devices, after a uhub has detached,
our uhci_poll_hub callout might strike. The detaching of the uhub has left
the device member in the pipe NULL, so make sure we do not dereference it.

We could halt the callout before detaching child devices, but it this
would likely interfere with proper servicing the child devices while
they are still around.
2009-05-02 22:09:39 +00:00
jakllsch
abf7e840eb Add Microchip PICkit 1 to HID blacklist. 2009-04-24 14:16:50 +00:00
jakllsch
e75d76046a regen. 2009-04-24 14:07:36 +00:00
jakllsch
1cdfeda3ef Add Microchip Technology vendor ID and two PICkit device IDs thereof. 2009-04-24 14:06:22 +00:00
cube
418489f555 Regen. 2009-04-21 16:36:06 +00:00
cube
25c5d062fb Add a number of products that use Realtek's RTL8187 802.11 chip. 2009-04-21 16:34:41 +00:00
taca
aa7979227e Add support for USB serial adapter REX-USB60F which I tested. 2009-04-21 16:26:01 +00:00
taca
90b2a1c26b Regen. 2009-04-21 16:24:37 +00:00