Commit Graph

5994 Commits

Author SHA1 Message Date
kiyohara
b5ce3aaf20 Split device_t/softc. 2008-03-28 02:40:19 +00:00
jmcneill
2003399300 Missed in previous device_t/softc split commit for esa, pointed out by
xtraeme@
2008-03-27 14:13:34 +00:00
jmcneill
289793f78f Split device_t and softc 2008-03-27 12:04:43 +00:00
jmcneill
d7e505a90f Split device_t and softc, aprintify 2008-03-27 11:58:18 +00:00
kiyohara
010b86ace4 Split device_t/softc. 2008-03-27 10:47:14 +00:00
xtraeme
0ab2da71ce Split device_t/softc for mpu(4) and its attachments, plus other
related cosmetic changes.

Reviewed by cube@.
2008-03-27 10:22:00 +00:00
xtraeme
701c2ae0a3 Split device_t/softc for joy(4) and all its attachments. Also
use device_lookup_private() and related cosmetic changes.

Reviewed by cube@.
2008-03-26 18:27:07 +00:00
matt
595211a098 split device_t/softc. Use aprint_*_dev and device_xname.
switch to device_lookup_private.
2008-03-26 17:50:32 +00:00
cube
6495be5eed Split device_t and softc, and related cosmetic changes. 2008-03-26 14:46:21 +00:00
jmcneill
e72a19155e PR#38301: Add support for SMBus controllers for ATI SB600, SB700, SB800
chipsets, from Christoph Egger.
2008-03-26 11:14:33 +00:00
jmcneill
1b7a201c53 Regen for PR#38301 2008-03-26 11:13:30 +00:00
jmcneill
b564cf1560 PR#38301: Add support for SMBus controllers for ATI SB600, SB700, SB800
chipsets, from Christoph Egger
2008-03-26 11:12:43 +00:00
elad
b2b4fb68be Introduce two missing KAUTH_GENERIC_ISSUSER check in the voodoo and machfb
mmap() code.

This and similar requests will be replaced Soon, but these two in
particular should be pulled up to netbsd-4, and to allow doing that
smoothly, we're first introducing the "issuser" version.

Discussed with and okay macallan@.
2008-03-24 14:16:04 +00:00
cube
55ee8b25d0 Split device_t and softc for pci(4). 2008-03-23 16:40:12 +00:00
xtraeme
79f06cdde2 Don't forget to set the atac dev pointer in the softc; ahcisata at jmide
works again after that.

Also use CFATTACH_DECL_NEW, device_t and related changes for the NJMAHCI
block.
2008-03-21 08:25:38 +00:00
dyoung
935a45a6fb Use aprint_*_dev() instead of accessing struct device member dv_xname
directly.
2008-03-21 08:20:04 +00:00
dyoung
5c37160f8b Use aprint_*_dev(), and device_xname(). Constify a bit. 2008-03-21 08:17:30 +00:00
dyoung
8ce2158b0c pci_activate() expects for its void * argument to be a device_t,
so change the type of the argument to device_t.  Update each use
of pci_activate().

Use device_t and accessors.  Use aprint_*_dev().
2008-03-21 07:47:43 +00:00
cube
ee39397d84 Fix previous. *Sigh* 2008-03-20 16:15:57 +00:00
cube
4137b5c813 Don't forget to se the device_t back pointer in the softc. 2008-03-20 16:00:16 +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
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
d293cfca1a Split device_t and softc for all attachments of vga(4). 2008-03-14 22:12:08 +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
taca
3a86ada98a Reflect change of PMF_FN_ARGS. 2008-03-13 16:29:48 +00:00
dyoung
edb53ad207 Use device_t and accessors. 2008-03-12 18:26:58 +00:00
phx
f04ba7d138 Make console drivers support PCI_IOC_CFGREAD/WRITE ioctls. This is useful for
XFree86, which can alternatively find the graphics card through /dev/ttyE0.
Approved by macallan.
2008-03-12 18:11:38 +00:00
dyoung
3df2b2feb5 Use device_t and its accessors throughout. Use aprint_*_dev().
Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.
2008-03-12 18:02:21 +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
dyoung
d347ff7717 Prepare for PMF self-suspension: in the if_stop() methods, clear
IFF_UP and IFF_RUNNING before running the 'disable' step, instead
of after.  Soon I will handle the 'disable' step by calling into
PMF, which may call if_stop(, 0).  Ordinarily, that is harmless.
This change lets the if_stop() routines exit early when they find
on entry that IFF_RUNNING is not set.
2008-03-11 23:58:06 +00:00
dyoung
7f0a735df6 Use device_t and accessors. 2008-03-11 22:26:14 +00:00
dyoung
78a6c4d71a pci_disable_retry() is now a no-op, so don't call it any more. 2008-03-11 20:55:32 +00:00
dyoung
db4f43a7cd pci_disable_retry() is now a no-op, so don't call it any more. 2008-03-11 20:45:04 +00:00
dyoung
0dddb5735e Finish the job: pci_disable_retry() is now a no-op, so don't call
it any more.
2008-03-11 20:41:35 +00:00
dyoung
5f07fde2c9 pci_disable_retry() is now a no-op, so don't call it any more. 2008-03-11 20:40:51 +00:00
dyoung
e33cbf5cfc pci_disable_retry() is now a no-op, so don't call it any more. 2008-03-11 20:39:24 +00:00
joerg
a7e72b4b2f Avoid unaligned pci_conf_read. 2008-03-11 13:36:14 +00:00
mjacob
0e65dd74d1 Checkpoint of some fairly major isp(4) rototilling.
Reintroduce more of a 'channel' concept in preparation for NP-IV support.
This gets rid of the chanA/chanB concept as the 2400 can have up to 128
virtual channels. Actually, with MID firmware you can also have the 2200
and 2300 support 'channels, but they do it with an FL-Port topology.
Because FC cards can now have 'channels', just about every support
function for fibre channel had to be redone to have a channel index
as well.  Rototill isp_ioctl.h for channel stuff as well.

Pick up a lot of work about fabric management (hopefully better) and keep
work in place that will allow for dynamic attachment/detachment of devices
(if I can figure out how to make the midlayer support it).

Merge the target code with external trees. Eventually it might even
be sorted out on NetBSD.

Update some firmware stuff.
2008-03-11 05:33:30 +00:00
sketch
5c1ec14909 Fix console output. 2008-03-10 21:18:08 +00:00
phx
7bca1efe39 Do not attach genfb when the frame buffer is not flagged as being console
(e.g. when a serial console is used).
Approved by macallan.
2008-03-09 20:32:30 +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
365ad33516 In ath_pci_detach(), only disestablish the interrupt handler if it
is established.
2008-03-07 22:17:03 +00:00
dyoung
dd9279e27b Use device_t and accessors. 2008-03-07 22:05:47 +00:00
dyoung
81f7f6b3f2 Use device_t and its accessors. In uhci_{pci,cardbus}_attach, use
`self' instead of casting the softc to void *.
2008-03-07 21:57:56 +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
cube
8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00
xtraeme
e75fa1bd1d Split device_t/softc and other related cosmetic changes. 2008-03-05 15:42:07 +00:00
xtraeme
3294fa721e Split device_t/softc, and other related cosmetic changes. 2008-03-05 15:03:36 +00:00
dyoung
11e3712cc6 Check device_has_power() instead of device_is_active() in pccbbintr(),
since the driver must acknowledge some interrupts while it leaves
the suspended state.  This protects against an interrupt storm that
will hang the system while I resume rtw0 at cardbus1.
2008-03-04 22:15:16 +00:00