Commit Graph

2904 Commits

Author SHA1 Message Date
cube b1be269fbd Split device_t and softc for atapibus(4). 2008-03-24 14:44:26 +00:00
elric d670789a3d Moved USB_PRODUCT_NOVATEL2_MERLINV620 into the UNTESTED section as the
man page indicated that it is untested.  Fixed some whitespace issues.
2008-03-17 02:43:56 +00:00
elric 4b299d47e7 Made a number of modifications, including:
1.  fixed a bug where the last bulk in/out was chosen rather
	    than the first.  This got my Sierra AC 595 working,

	2.  reworked some of the match logic to include flags for the
	    matches,

	3.  defined a flag UNTESTED which causes a warning to be output,

	4.  added product/vendor IDs from other OSes (OpenBSD, FreeBSD,
	    Linux) but marked them UNTESTED.
2008-03-17 02:40:04 +00:00
elric 394d344d7a Add a number of products which will be supported in ugensa(4).
Most of these are experimental and the product/vendor IDs are
snarfed from OpenBSD, FreeBSD and Linux.
2008-03-17 02:37:51 +00:00
ws 27973cf78e Don't leak information from kernel to userland.
(Well, the first 2 changes wouldn't really be neccessary,
however, IMHO this makes it clearer why we don't leak.)
2008-03-08 18:46:18 +00:00
dyoung 9a0e417e90 Use device_t and accessors. Setup power management in the PCI
front-end (XXX needs to look more alike the Cardbus front-end).
Establish the shutdown hook using PMF.
2008-03-07 22:32:52 +00:00
dyoung 347c1a2644 Use device_t and accessors.
In ohci_{pci,cardbus}_attach, do not get the device_t by casting
the softc to void *, but use `self' instead.
2008-03-07 21:48:46 +00:00
dyoung 2e3b67d337 Register the shutdown hook using pmf_device_register1(). 2008-03-07 21:36:51 +00:00
rmind c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
rafal ba7873b58d Add TRIPPLITE2 UPS into the list of devices ignored by uhid(4) -- the UPS
software apparently wants to drive it as a ugen(4) instead.
2008-02-24 20:25:13 +00:00
rafal 570306d6b7 Regen for addition of TRIPPLITE2 UPS. 2008-02-24 20:23:38 +00:00
rafal c99a7eb6d3 Add another vendor ID for Tripp Lite and product entry for their USB UPS
interface (it appears to be a generic product ID, rather than per-model).
2008-02-24 20:22:06 +00:00
dyoung cd44c43b28 Add a method to detach child.
Cosmetic: use device_t and accessors.  Use aprint_*_dev().  Use
PMF_FN_{ARGS,CALL,PROTO}.
2008-02-22 23:04:52 +00:00
dyoung 1fa24f5705 Add method to detach children.
Temporary: use PMF_FN_PROTO, PMF_FN_ARGS.
2008-02-22 22:22:27 +00:00
rafal 976dbbc142 Make this work on a new TrippLite USB->Serial Converter Model U209-000-R.
At least rev 3.00 of the device needs the HX hack(s).
2008-02-21 04:38:43 +00:00
mlelstv f99dbc5c80 fix typo 2008-02-20 15:55:38 +00:00
drochner 33e22165c1 recognize Shantou ADM8515 2008-02-19 10:52:44 +00:00
drochner 52851a2776 regen 2008-02-19 10:51:56 +00:00
drochner 0e9e9e8505 add the Shantou ADM8515 ethernet chip which is in some
"Wintech LanCard" adapter I just got
(USB 2.0 on the label but just full-speed - what a crap)
2008-02-19 10:51:07 +00:00
dyoung 0b1dce29ae Use device_t and its accessor functions.
Register _childdetached methods with drivers that attach children.
Wait to set child references to NULL there, instead of doing that
in the detach method.

Replace many uses of USB_DECLARE_DRIVER() with CFATTACH_DECL2().
2008-02-18 05:24:24 +00:00
smb 585d42043e Patch from Jared McNeill to prevent USB interrupt storms on resume on
Thinkpad T61.  (Note: to prevent a very similar-seeming problem, T61
users should also install firmware 2.06 or later, according to thinkwiki.)
2008-02-13 00:52:44 +00:00
mlelstv 20eb004e2e Add some initialization magic from FreeBSD. This makes it work with
the more recent PL2303 revision 4.
2008-02-12 22:29:54 +00:00
drochner b399335799 add NULL power handler, so that this device doesn't block suspension 2008-02-12 19:37:51 +00:00
ichiro bb98e5cd32 regen. 2008-02-11 02:23:32 +00:00
ichiro f5c8edbfe7 add new device support to uhmodem driver
PR/37985 from Yojiro UO
2008-02-11 02:23:09 +00:00
dyoung 2ccede0a9c Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

First steps:  Make the signature of ifioctl_common() match struct
ifinet->if_ioctl.  Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
2008-02-07 01:21:52 +00:00
drochner d9459c5f21 share some code for USB root hub emulation which is common in the 3
host controller implementations, start with two little functions
which fake up string descriptors (which were inconststent, language
table fetching didn't interoperate with other code in the tree)
2008-02-03 10:57:11 +00:00
tron ce82b598ec Add support for function keys F16 to F19 as present on e.g. the new
Apple aluminum keyboard.

Patch contributed by Michael Piotrowski in PR kern/37788, reviewed
by Matthias Drochner.
2008-01-29 20:54:32 +00:00
jmcneill ef5ded9b39 No need to operate in polling mode in ehci_resume. 2008-01-28 20:58:23 +00:00
jmcneill 05b25a6836 Ensure that we don't clear the EHCI_PS_CLEAR bits by writing 1s to them
when modifying port state in ehci_suspend and ehci_resume.
2008-01-28 01:52:31 +00:00
jmcneill e4e10d4f97 Release port ownership on detach, so devices will be routed to companion
controllers. This allows 'drvctl -d ehci0' to disable USB 2.0 mode.
2008-01-28 00:47:05 +00:00
jmcneill b6294fbf32 Add some USB EHCI Legacy Support Extended CSR bit definitions. 2008-01-27 20:06:48 +00:00
ad 632e64ed4e lockmgr() not used here, remove ref to it. 2008-01-25 20:39:28 +00:00
jmcneill a06bac7d44 Speed up uhub attachment considerably. Rather than powering up each port
individually then waiting for it to become stable, power them up all
at once and then delay. Don't even bother delaying if we are a root hub,
as this is handled separately in the event thread. From OpenBSD.
2008-01-25 00:29:12 +00:00
ichiro 2e9fa9fff0 make compile 2008-01-21 12:16:31 +00:00
ichiro c6061e7174 change umass quirks logic in USB_MATCH()
PR/37687 from Yojiro UO
2008-01-21 12:11:21 +00:00
ichiro 817e003a02 add full support device driver for Huawei E220 wireless modem
PR/37692 from Yojiro UO
---
uhmodem: device driver for huawei 3G wireless modem

* what it is?

A device driver for huawei 3G wireless modem, E220 and its valiations.

The devices are very simuler to ubsa device, but they need special care
to use as modem device.
This patch introduce "uhmodem (USB Huawei modem)" for the devices.
A uhmodem device has two com devices and one USB mass strage device.
The driver enable to use all of them.

* dmesg:
uhmodem0 at uhub0 port 1 configuration 1 interface 0
uhmodem0: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2
uhmodem0: mass storage only mode, reattach to enable modem
uhmodem0: at uhub0 port 1 (addr 2) disconnected
uhmodem0 detached
uhmodem0 at uhub0 port 1 configuration 1 interface 0
uhmodem0: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2
ucom0 at uhmodem0 portno 0: modem
ucom1 at uhmodem0 portno 1: monitor
umass0 at uhub0 port 1 configuration 1 interface 2
umass0: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
cd0 at scsibus0 target 0 lun 0: <HUAWEI, Mass Storage, 2.31> cdrom removable
2008-01-21 11:36:46 +00:00
dyoung b480b62270 Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
2008-01-19 22:10:14 +00:00
is 257a88e757 Move from workqueue to an explicit kthread for setting the multicast
filter, as suggested by cube@. Actual code review by cube@.
This way, a backport of the fix to netbsd-4 is possible.
2008-01-16 12:33:54 +00:00
cube 55f21981d9 workqueue(9) has the non-evident limitation that the caller cannot reuse
the same struct work before workqueue(9) has internally started to work on
the task.

So to make sure that doesn't happen, provide a semaphore not to run the
workqueue multiple times.  It might be clearer just skip using workqueue(9)
and use a thread for about everything, but oh well, I leave that to
someone else.

Now is@ can yank his USB-to-Ethernet adapter while the interface is up.
2008-01-12 22:32:51 +00:00
gdt 1424adf410 Support FIONBIO.
Support non-blocking reads from USB printers.  With this, escputil can
query the printer model, and I can print a test page with gutenprint
5.1 and cups.   Add many comments explaining why the support is not
quite right.  (This change is quite a bit less invasive than a
"correct" fix, and thus more reasonable to pull up to netbsd-4.)

Rototill debugging, so that all DPRINTFN have a level, and so that the
message is printed if the debug level is >= the number in the source
code.  Document debug level plan.

Fix bug where only one status change would be printed (by inspection,
not tested).

Document scheme for reading/discarding data when ulpt(4) is opened for
write only.

Delete dead code.

Plan and patch posted on tech-kern without objections.
2008-01-08 00:58:09 +00:00
ad 0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
smb 0cb6d977ab Add calls to pmf_deregister on detach. 2008-01-04 03:56:47 +00:00
smb 1d2e422408 Add pmf register/deregister to ucom and ugensa. (Addtionally, let a
Sierra wireless card be recognized as a ugensa.)
2007-12-30 21:49:47 +00:00
perry b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
smb 34da33dfe3 Add missing call to pmf_deregister() in the USB_DETACH routine. 2007-12-24 14:41:19 +00:00
dyoung 6f3852fab4 Constify struct ifnet->if_sadl and every use throughout the tree.
Add if_set_sadl() that both sets the link-layer address length and
replaces the current link-layer address with a new one, and use it
throughout the tree.
2007-12-20 21:08:17 +00:00
christos f54e064ee9 add null pmf handlers. 2007-12-16 19:01:35 +00:00
mjf e3aec4fc22 Regen. 2007-12-15 12:51:59 +00:00
mjf cd86b0a3cf Add the vendor eMPIA Technology and add the built-in USB camera that is
found on the EEEpc.
2007-12-15 12:50:12 +00:00