Commit Graph

34 Commits

Author SHA1 Message Date
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
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
cube
3624455eba Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral.  I tested umass myself.
2008-05-24 16:40:58 +00:00
cegger
395c8c3fd3 use aprint_*_dev and device_xname 2008-04-05 16:35:35 +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
dyoung
f59a11881a Constify: LLADDR() -> CLLADDR(). 2007-08-29 22:33:42 +00:00
xtraeme
7479c7d76e Use rw_destroy() in the detach function. Spotted by rmind@. 2007-08-27 17:49:54 +00:00
xtraeme
87186fcca6 Use rwlock(9) rather than lockmgr(9). 2007-08-27 15:57:13 +00:00
drochner
8258b792b7 Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
 stage, but did configuration again. I've converted them to match
 in the device stage.
ustir, utoppy: matched in the interface stage, but only against
 vendor/device information, and used any configuration/interface
 without checking. Changed to match in device stage, and added
 some simple code to configure and use the first interface.
If you have one of those devices, please test!
2007-03-13 13:51:53 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
drochner
af0d6b7f5e change some commented-out code to use the interrupt descriptor's polling
interval instead of an own (which isn't even defined)
2006-12-01 20:56:42 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
joerg
8934eeb830 Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.
2006-10-31 20:43:31 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow
f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
wiz
1ad8067cb3 Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
2006-02-25 00:58:34 +00:00
augustss
911fb919e4 Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context.  From kern/32172 by darkstar@city-net.com.
2005-11-28 13:31:09 +00:00
christos
a9cf21849d - const poisoning
- eliminate variable shadowing
2005-05-30 04:21:39 +00:00
augustss
834327c847 Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.
2005-05-11 10:02:28 +00:00
itojun
4bb7e85761 OQO ether port confirmed to be working 2005-03-03 08:10:01 +00:00
itojun
99b78187d5 OQO device still unstable on attach/whatever, so comment those entries out 2005-03-02 11:35:07 +00:00
itojun
3ea088e9f4 add OQO model 01 devices 2005-03-01 03:18:52 +00:00
thorpej
e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
augustss
d7eeed3a45 Add 2 devices. From OpenBSD. 2004-10-22 09:39:06 +00:00
mycroft
b236e06a7b GREENHOUSE2_USBKR100 -> REALTEK_RTL8150L, per PR 20425. 2004-07-07 21:54:21 +00:00
itojun
300aa0dcd5 use bounded string ops (snprintf, strl*) 2004-04-23 17:25:25 +00:00
tsutsui
4189ddf652 Remove advertising clauses from code written by Shingo WATANABE.
He has kindly consented it.
2003-09-04 15:17:38 +00:00
bouyer
2d7b577657 When padding to URL_MIN_FRAME_LEN, memset the extra buffer space used. 2003-01-15 22:40:34 +00:00
martin
a531f18275 Plug memory leak. From OpenBSD via PR kern/18457. 2002-09-29 10:19:21 +00:00
augustss
86650920c9 Get rid of trailing white space. 2002-07-11 21:14:24 +00:00
augustss
5059a3264c s/__FUNCTION__/__func__/ 2002-07-08 17:46:23 +00:00
augustss
4c3acbe183 Two minor fixes from OpenBSD. 2002-05-13 12:10:04 +00:00
ichiro
b66fc78bc0 URL_DEBUG was related to usb_port.h 2002-03-28 21:49:19 +00:00
ichiro
b3064f4907 add driver for Realtek RL8150L USB ethernet adapter
distribute from Shingo WATANABE <nabe@nabechan.org>
2002-03-28 21:09:10 +00:00