Commit Graph

1283 Commits

Author SHA1 Message Date
plunky 587a66277f convert to use pmf(9) functions 2008-04-06 18:55:33 +00:00
cegger bebbf57b68 use aprint_*_dev and device_xname 2008-04-05 21:31:23 +00:00
tsutsui d637b91d45 Split device_t/softc for more ncr5380sbc variants, with related changes. 2008-04-04 16:19:51 +00:00
tsutsui 73f476d471 Split softc/device_t for spc(4) and misc related cleanup. 2008-03-31 15:20:47 +00:00
plunky 10b824ffee use aprint_error_dev(), for clarity 2008-03-31 09:37:37 +00:00
drochner fd0ded75ed split device/softc for USB host controllers and the usb (control)
device,
this is hairy stuff, and I've only tested with uhci/ehci at pci,
please test the rest and report problems
2008-03-28 17:14:45 +00:00
uwe 5f35af71bf aprint_naive("\n"); 2008-03-28 01:37:25 +00:00
cube 7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
cube 9f2d68dedf Fix fallout from softc split. 2008-03-17 00:53:12 +00:00
cube bb192d4cfd Split device_t and softc for the ... wait for it ... [air quotes] MI
variant of fdc(4)/fd(4).  Other cosmetic changes as appropriate.
2008-03-16 00:58:56 +00:00
cube 4dccf0ae94 Split device_t and softc for opl(4). That should have been done along with
midi(4), because opl_softc embed a midi_softc.
Fixes PR#38242 by Onno van der Linden.
2008-03-15 23:14:38 +00:00
cube 607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
cube cf80f73d17 Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments.  Use device_t accessors, correct types, and ANSIfy when
appropriate.
2008-03-12 14:31:11 +00:00
dholland 88ff5802a1 Adjust a debug message. Fixes the last bit of PR 29668. (The rest seems
to have already been dealt with.)
2008-03-10 03:28:34 +00:00
dholland d02e700e66 Use NE2000_TYPE_UNKNOWN instead of just 0 in a couple places. 2008-03-09 20:32:45 +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
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
dyoung cf784f4497 Improve pci, cbb, cardslot, cardbus, and pcmcia to support detachment
of this entire device tree:

pci0 at mainbus0
        elansc0 at pci0
                gpio0 at elansc0
        cbb0 at pci0
                cardslot0 at cbb0
                        cardbus0 at cardslot0
                        pcmcia0 at cardslot0
        cbb1 at pci0
                cardslot1 at cbb1
                        cardbus1 at cardslot1
                                rtw0 at cardbus1
                        pcmcia1 at cardslot1
        sip0 at pci0
                nsphyter0 at sip0
        sip1 at pci0
                nsphyter1 at sip1

Whew!
2007-12-16 21:28:30 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
jmcneill a0d3b0d7a8 aprintify 2007-12-01 14:35:51 +00:00
plunky 736a9db087 Clean up the way that bluetooth drivers attach to the bluetooth stack,
to remove the frobbing that drivers must do in the hci_unit structure.

- driver provides a static const interface descriptor
- hci_unit is allocated by hci_attach() rather than part of softc
- statistics are compiled by driver and provided on request
- driver provides output methods and is responsible for output queue
- stack provides input methods and is responsible for input queue
- mutex is used to arbitrate device queue access
2007-11-28 20:16:11 +00:00
kiyohara a6caad5208 #ifndef-ed macro BTBC_DEFAULT_BAUDRATE. 2007-11-25 23:32:44 +00:00
plunky 7cca9485cc convert device printf() usages to aprint_xxxx() 2007-11-11 12:59:02 +00:00
plunky 0b799668fb use more device_t and device_xxx() accessors
make bluetooth stack keep device_t instead of softc pointer as
device is not necessarily part of softc, and pass device_t to
driver callbacks. hci_devname is no longer required.
2007-11-10 23:12:22 +00:00
plunky faccfc336c 'struct callout' => callout_t
don't use callout_reset()
do use callout_destroy()
2007-11-03 18:24:00 +00:00
plunky edb74239aa switch devices to using CFATTACH_DECL_NEW()
softc no longer contains 'struct device' by default
use 'device_t' instead of 'struct device *'
use device_xxx() accessor functions
remove casting of 'xxx_softc *' & 'struct device *'
use aprint_xxx_dev() routines
2007-11-03 17:41:03 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
kiyohara 3c75d069ac Whenever writing once, m_adj() is called.
Do not call m_adj() by 0 when it is "rlen==m_len" and is not empty in the
  buffer.
Must call m_adj().
2007-10-16 13:47:17 +00:00
plunky 41358e9b10 remove unused activate function 2007-10-02 05:37:50 +00:00
kiyohara 856df7f0ec Regen. 2007-09-22 20:01:21 +00:00
kiyohara 9d97e5427a Add TDK Bluetooth PC Card.
and reorder.
2007-09-22 19:59:55 +00:00
kiyohara bfdbbbaec2 No need to check the NULL, m_gethdr() was called always with M_WAIT. 2007-09-03 12:42:50 +00:00
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
dyoung f59a11881a Constify: LLADDR() -> CLLADDR(). 2007-08-29 22:33:42 +00:00
kiyohara 37899c17de Regen. 2007-08-20 00:32:38 +00:00
kiyohara 10448cd503 Add support for AnyCom BlueCard. 2007-08-20 00:29:43 +00:00
kiyohara 3f11af6413 Replace to Matthew Orgass's slhci(4).
http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
2007-08-16 02:30:22 +00:00
kiyohara 44c89c7646 Replace to Matthew Orgass's slhci(4).
http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
2007-08-15 03:53:08 +00:00
plunky cd917419d2 add detail (in comments) about S-Record format for firmware file 2007-07-23 18:08:20 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +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
ichiro 8c2cbf1a11 make tags for AX420N(NEC Infrontia) 2007-02-10 03:16:07 +00:00
ichiro cbc9432f39 regen. 2007-02-10 03:14:56 +00:00
ichiro 2507232198 add AirH pcmcia modem.
NEC Infrontia AX420N
2007-02-10 03:14:03 +00:00
cube ecacf90d2f Remove stale config(5) entries for unexistent wl(4).
Ok'd by matt@.
2007-01-09 19:19:09 +00:00
elad 211d7b1c99 Use a single kauth(9) call. 2007-01-05 16:46:27 +00:00
elad d5ebb97b46 Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 18:44:45 +00:00
itohy d796584488 Don't use esp_pcmcia_enable() before attaching chip driver (ncr53c9x),
since it touches storage allocated by the chip attach function.
The chip driver properly calls scsipi_adapter_addref() /
scsipi_adapter_delref(), and just deleting the esp_pcmcia_enable() call
and the relevant code should be OK.

Fix panic descibed in PR kern/26909.
2006-12-28 16:37:46 +00:00
dogcow be3e9fcde5 fix a (valid) "buf may be used uninitialized" warning/error in DIAGNOSTIC. 2006-12-27 22:07:17 +00:00
alc f8b0309827 CID-3821: don't leak `fh' and close the firmware properly
ok christos@
2006-12-27 18:01:45 +00:00