linux-stable/drivers
John W. Linville fec59a711e [PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it
Some PCI devices (e.g. 3c905B, 3c556B) lose all configuration
(including BARs) when transitioning from D3hot->D0.  This leaves such
a device in an inaccessible state.  The patch below causes the BARs
to be restored when enabling such a device, so that its driver will
be able to access it.

The patch also adds pci_restore_bars as a new global symbol, and adds a
correpsonding EXPORT_SYMBOL_GPL for that.

Some firmware (e.g. Thinkpad T21) leaves devices in D3hot after a
(re)boot.  Most drivers call pci_enable_device very early, so devices
left in D3hot that lose configuration during the D3hot->D0 transition
will be inaccessible to their drivers.

Drivers could be modified to account for this, but it would
be difficult to know which drivers need modification.  This is
especially true since often many devices are covered by the same
driver.  It likely would be necessary to replicate code across dozens
of drivers.

The patch below should trigger only when transitioning from D3hot->D0
(or at boot), and only for devices that have the "no soft reset" bit
cleared in the PM control register.  I believe it is safe to include
this patch as part of the PCI infrastructure.

The cleanest implementation of pci_restore_bars was to call
pci_update_resource.  Unfortunately, that does not currently exist
for the sparc64 architecture.  The patch below includes a null
implemenation of pci_update_resource for sparc64.

Some have expressed interest in making general use of the the
pci_restore_bars function, so that has been exported to GPL licensed
modules.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-04 21:32:46 -07:00
..
acorn [PATCH] I2C: Kill address ranges in non-sensors i2c chip drivers 2005-06-21 21:51:48 -07:00
acpi Merge master.kernel.org:/pub/scm/linux/kernel/git/lenb/to-linus 2005-08-04 10:36:25 -07:00
atm [ATM]: zatm: mailbox converted to pci_alloc_consistent() 2005-07-20 12:01:46 -07:00
base [ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc... 2005-07-12 17:21:56 -04:00
block [PATCH] cfq-iosched: fix problem with barriers and max_depth == 1 2005-08-02 11:19:18 -07:00
bluetooth [NET]: Transform skb_queue_len() binary tests into skb_queue_empty() 2005-07-08 14:57:23 -07:00
cdrom [PATCH] Update CREDITS entry and listings in source files for Jesper Juhl 2005-07-27 16:26:20 -07:00
char [PATCH] ARM: 2833/2: Remove support for WDIOF_MAGICCLOSE from sa1100-wdt 2005-08-03 20:34:52 +01:00
cpufreq Here are two possible cleanups in cpufreq.c: 2005-07-28 09:43:56 -07:00
crypto [CRYPTO] Update IV correctly for Padlock CBC encryption 2005-07-06 13:54:09 -07:00
dio [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
eisa [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
fc4 [SCSI] fc4 warning fix 2005-07-30 09:47:53 -05:00
firmware [PATCH] PCDP: if PCDP contains parity information, use it 2005-07-28 08:39:02 -07:00
hwmon [PATCH] I2C: use time_after in 3 chip drivers 2005-07-29 13:12:50 -07:00
i2c [PATCH] i2c-mpc.c: revert duplicate patch 2005-08-01 19:13:59 -07:00
ide [PATCH] ide: fix kmalloc_node breakage in ide driver 2005-08-04 13:00:53 -07:00
ieee1394 [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
infiniband [PATCH] [IPoIB] Handle sending of unicast RARP responses 2005-07-28 13:17:26 -07:00
input Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2005-07-29 09:48:34 -07:00
isdn [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
macintosh [PATCH] ppc64: hide CONFIG_ADB 2005-07-27 16:25:57 -07:00
mca [PATCH] unexport mca_find_device_by_slot 2005-06-25 16:24:56 -07:00
md [PATCH] dm-raid locking fix 2005-08-04 13:00:55 -07:00
media [PATCH] v4l: oopsfix for BTTV on badly behaved PCI chipsets 2005-08-04 13:00:54 -07:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-07-26 13:28:47 -07:00
misc [PATCH] IBM_ASM Kconfig corrections 2005-07-12 16:01:02 -07:00
mmc [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
mtd [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
net [PATCH] silence cs89x0 2005-08-01 19:14:01 -07:00
nubus
oprofile [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
parisc [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add 2005-06-27 21:52:39 -07:00
parport [PATCH] pcmcia: remove references to pcmcia/version.h 2005-07-07 18:24:07 -07:00
pci [PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it 2005-08-04 21:32:46 -07:00
pcmcia [PATCH] Obvious bugfix for yenta resource allocation 2005-08-02 08:28:48 -07:00
pnp [PATCH] drivers/pnp/pnpbios/rsparser.c: fix compile error with PCI=n 2005-07-27 16:25:50 -07:00
s390 [PATCH] s390: device recognition 2005-07-29 15:01:14 -07:00
sbus [SPARC]: Fix __KERNEL_SYSCALLS__ defining in envctrl.c and bbc_envctrl.c 2005-07-24 19:35:08 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-08-04 13:08:29 -07:00
serial [PATCH] serial: add MMIO support to 8250_pnp 2005-07-29 15:01:13 -07:00
sh [PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
sn [PATCH] ioc4: PCI bus speed detection 2005-06-21 18:46:32 -07:00
tc
telephony [PATCH] pcmcia: remove references to pcmcia/version.h 2005-07-07 18:24:07 -07:00
usb [PATCH] USB: hidinput_hid_event() oops fix 2005-07-29 13:12:54 -07:00
video [PATCH] tridentfb: Fix scrolling artifacts during disk IO 2005-08-01 10:07:53 -07:00
w1 [PATCH] w1: kconfig/Makefile fix. 2005-07-29 13:12:51 -07:00
zorro [PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6 2005-07-12 15:54:36 -07:00
Makefile [PATCH] I2C: Move hwmon drivers (1/3) 2005-07-11 14:14:31 -07:00