Commit Graph

2888 Commits

Author SHA1 Message Date
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
lukem 456279df8f use __KERNEL_RCSID() 2007-12-11 12:29:11 +00:00
lukem 961afe5035 use __KERNEL_RCSID() instead of __RCSID() 2007-12-11 12:16:34 +00:00
jmcneill 8eeb638b73 Register with pmf 2007-12-11 03:45:57 +00:00
smb 9428ee68f7 Add Sierra 5725 miniPCI wireless card (CDMA EVDO) 2007-12-09 21:26:47 +00:00
smb 8167a34333 Correct error in 5725 commit 2007-12-09 21:24:30 +00:00
smb 38fba18e22 Add Sierra 5725 mini-PCI card 2007-12-09 21:21:21 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
pooka 4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
ad 6874e511b7 lockmgr -> mutex 2007-12-05 07:58:29 +00:00
ad 5a24480bf8 lockmgr -> mutex 2007-12-05 07:15:53 +00:00
jmcneill 490542edae aprintify, on behalf of xtraeme 2007-12-01 23:40:28 +00:00
jmcneill a0d3b0d7a8 aprintify 2007-12-01 14:35:51 +00:00
jmcneill 4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
xtraeme f59c58fb50 regen 2007-11-29 21:08:19 +00:00
xtraeme 0970ce7295 Typo in previous s/HDSPA/HSDPA/ 2007-11-29 21:07:59 +00:00
xtraeme 0976f2f104 regen 2007-11-29 18:38:43 +00:00