Commit Graph

20 Commits

Author SHA1 Message Date
dyoung dcd8923429 Change a bazillion occurrences of code resembling this,
error = (cmd == SIOCADDMULTI) ?
	    ether_addmulti(ifr, &sc->sc_ec) :
	    ether_delmulti(ifr, &sc->sc_ec);

	if (error == ENETRESET) {

to this,

	if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number.  This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
2007-09-01 07:32:22 +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
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
david f68eabdfe8 Free allocated memory if attach fails.
From Coverity CID 2329
2006-03-19 22:30:56 +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
augustss 65ee9092eb Abuse types a little less. 2005-11-10 12:05:01 +00:00
tron f55fe966f7 Apply big endian fixes submitted by Garrett D'Amore in PR kern/32032. 2005-11-10 10:00:19 +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
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +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 547cfc9779 Protect MII reads and writes properly against multiple access.
Set full duplex mode when status tells us to.
(I can now get 4Mbyte/s instead of 20kbyte/s rx speed.)
2004-10-26 17:20:47 +00:00
augustss f8968198b1 Dont use lockmgr() from interrupt context. 2004-10-24 12:53:26 +00:00
augustss 3f908f7bc3 Get rid of an oddly placed assert(). 2004-10-24 08:49:13 +00:00
augustss e1c26273a8 Alphabetize. 2004-10-23 14:01:41 +00:00
augustss 00b535e7c0 Both FreeBSD and OpenBSD use Bill Paul axe driver instead of my uax
driver.  Maybe because it actually works on with hardware besides mine? :)
So we switch to axe too.
2004-10-23 13:38:26 +00:00