History log of /netbsd/sys/dev/pci/if_rtw_pci.c (Results 1 – 25 of 25)
Revision Date Author Comments
# 882ffae7 25-Sep-2022 thorpej <thorpej@NetBSD.org>

Remove unnecessary include of <sys/malloc.h>.


# 79fb1406 09-Dec-2018 jdolecek <jdolecek@NetBSD.org>

use pci_intr_establish_xname() everywhere


# b8930f84 29-Mar-2014 christos <christos@NetBSD.org>

make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.


# 07c36d09 30-Sep-2012 dsl <dsl@NetBSD.org>

Fix debug build


# 601cb859 23-Sep-2012 chs <chs@NetBSD.org>

reformat product array to match openbsd.


# 9d3c07c5 26-Jul-2011 dyoung <dyoung@NetBSD.org>

Replace anonymous constants, 0x10, 0x14, ..., with PCI_BAR(0),
PCI_BAR(1), .... There was no change in the generated assembly. I used
this semantic patch:

@ mapsit @
identifier bar;
expression pact

Replace anonymous constants, 0x10, 0x14, ..., with PCI_BAR(0),
PCI_BAR(1), .... There was no change in the generated assembly. I used
this semantic patch:

@ mapsit @
identifier bar;
expression pact;
@@

(
pci_mapreg_map
|
Cardbus_mapreg_map
)(pact, bar, ...)

@ depends on mapsit @
identifier mapsit.bar;
@@
(
- #define bar 0x10
+ #define bar PCI_BAR(0)
|
- #define bar 0x14
+ #define bar PCI_BAR(1)
|
- #define bar 0x18
+ #define bar PCI_BAR(2)
|
- #define bar 0x1C
+ #define bar PCI_BAR(3)
|
- #define bar 0x20
+ #define bar PCI_BAR(4)
)

show more ...


# 74992af3 26-Jan-2011 dyoung <dyoung@NetBSD.org>

Make oodles of mainly cosmetic changes that make rtw(4)'s PCI attachment
resemble its CardBus attachment very, very closely: slightly more than
24 lines are different. Alas, I cannot commit the Card

Make oodles of mainly cosmetic changes that make rtw(4)'s PCI attachment
resemble its CardBus attachment very, very closely: slightly more than
24 lines are different. Alas, I cannot commit the CardBus part of this
change, yet, because I have to finish my overhaul of CardBus resource
handling, first.

show more ...


# 797e51d6 04-Mar-2010 dyoung <dyoung@NetBSD.org>

Make cosmetic changes in order to reduce differences with
sys/dev/cardbus/if_rtw_cardbus.c: remove an unnecessary #include.
Change a few cut & paste instances of ADM8211 to RTL8180. Make the
suspend

Make cosmetic changes in order to reduce differences with
sys/dev/cardbus/if_rtw_cardbus.c: remove an unnecessary #include.
Change a few cut & paste instances of ADM8211 to RTL8180. Make the
suspend & resume functions static, add declarations for them at the top
of the file, and move the functions themselves to the bottom.

show more ...


# c1b390d4 24-Feb-2010 dyoung <dyoung@NetBSD.org>

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

show more ...


# cd6e1fbf 08-Jan-2010 dyoung <dyoung@NetBSD.org>

Expand PMF_FN_* macros.


# 36fffd8d 16-Sep-2009 dyoung <dyoung@NetBSD.org>

In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together. Start solidifying some temporary API changes.

In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together. Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
#include it from <sys/pmf.h> instead of <sys/device.h> to break the
circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
suspend/resume call. Start to replace instances of PMF_FN_PROTO,
PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
device in suspension. More than one suspensor may hold a device
at once. A device stays suspended as long as at least one
suspensor holds it. A device resumes when the last suspensor
releases it.

Currently, the kernel defines three suspensors,

3a the system-suspensor: for system suspension, initiated
by 'sysctl -w machdep.sleep_state=3', by lid closure, by
power-button press, et cetera,

3b the drvctl-suspensor: for device suspension by /dev/drvctl
ioctl, e.g., drvctl -S sip0.

3c the system self-suspensor: for device drivers that suspend
themselves and their children. Several drivers for network
interfaces put the network device to sleep while it is not
administratively up, that is, after the kernel calls if_stop(,
1). The self-suspensor should not be used directly. See
the description of suspensor delegates, below.

A suspensor can have one or more "delegates". A suspensor can
release devices that its delegates hold suspended. Right now,
only the system self-suspensor has delegates. For each device
that a self-suspending driver attaches, it creates the device's
self-suspensor, a delegate of the system self-suspensor.

Suspensors stop a system-wide suspend/resume cycle from waking
devices that the operator put to sleep with drvctl before the cycle.
They also help self-suspension to work more simply, safely, and in
accord with expectations.

4. Add the notion of device activation level, devact_level_t,
and a routine for checking the current activation level,
device_activation(). Current activation levels are DEVACT_LEVEL_BUS,
DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
indicate that the device's bus is active, that the bus and device are
active, and that the bus, device, and the functions of the device's
class (network, audio) are active.

Suspend/resume calls can be qualified with a devact_level_t.
The power-management framework treats a devact_level_t that
qualifies a device suspension as the device's current activation
level; it only runs hooks to reduce the activation level from
the presumed current level to the fully suspended state. The
framework treats a devact_level_t qualifying device resumption
as the target activation level; it only runs hooks to raise the
activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
drivers.

6. Temporarily add an unused power-management workqueue that I will
remove or replace, soon.

show more ...


# 9444aeea 05-Sep-2009 tsutsui <tsutsui@NetBSD.org>

Invert logic around nested pmf(9) registrations for readability.

XXX: should these pmf(9) calls be moved into MI attach functions
XXX: using function pointers for suspend and resume passed via softc?


# 59717d71 06-May-2009 cegger <cegger@NetBSD.org>

struct cfdata * -> cfdata_t, no functional changes intended.


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 8ce2158b 21-Mar-2008 dyoung <dyoung@NetBSD.org>

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().


# 3df2b2fe 12-Mar-2008 dyoung <dyoung@NetBSD.org>

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().

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.

show more ...


# 1d18d804 21-Dec-2007 dyoung <dyoung@NetBSD.org>

Do not embed a struct device in rtw_softc any longer. Register
both pci and cardbus attachments with CFATTACH_DECL_NEW(). Access
the softc through the device_t using device_private().

While I'm he

Do not embed a struct device in rtw_softc any longer. Register
both pci and cardbus attachments with CFATTACH_DECL_NEW(). Access
the softc through the device_t using device_private().

While I'm here, change a couple of KASSERT()s about the Rx buffer
length to a warning.

show more ...


# a2a38285 19-Oct-2007 ad <ad@NetBSD.org>

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


# 013444d7 01-Sep-2006 dyoung <dyoung@NetBSD.org>

Remove the declaration of an unused local variable 'reg'.


# 63bbcb49 17-Jun-2006 christos <christos@NetBSD.org>

re-factor the pci powestate api. reviewed by gimpy


# 921f8287 28-Apr-2006 rpaulo <rpaulo@NetBSD.org>

Use aprint family of functions.


# 86b55997 04-Dec-2005 christos <christos@NetBSD.org>

PR/32181: Matthias-Christian Ott: Add support for the Belkin F5D6001 pci device


# 90634029 22-Jun-2005 dyoung <dyoung@NetBSD.org>

Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an

Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.

show more ...


# f31bd063 27-Feb-2005 perry <perry@NetBSD.org>

nuke trailing whitespace


# 517a54fd 26-Sep-2004 dyoung <dyoung@NetBSD.org>

Add Cardbus, PCI bus front-ends for RTL8180 802.11b MAC/baseband.