mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	"John W. Linville" <linville@tuxdriver.com>,
	maximilian attems <max@stro.at>
Subject: [105/139] b43: fall back gracefully to PIO mode after fatal DMA errors
Date: Thu, 22 Apr 2010 12:54:42 -0700	[thread overview]
Message-ID: <20100422195415.962821799@kvm.kroah.org> (raw)
In-Reply-To: <20100422195715.GA25490@kroah.com>

2.6.33-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 9e3bd9190800e8209b4a3e1d724c35f0738dcad2 upstream.

This makes the b43 driver just automatically fall back to PIO mode when
DMA doesn't work.

The driver already told the user to do it, so rather than have the user
reload the module with a new flag, just make the driver do it
automatically. We keep the message as an indication that something is
wrong, but now just automatically fall back to the hopefully working PIO
case.

(Some post-2.6.33 merge fixups by Larry Finger <Larry.Finger@lwfinger.net>
and yours truly... -- JWL)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/b43/Kconfig |   19 +++++++++++++++++--
 drivers/net/wireless/b43/b43.h   |    7 +++++++
 drivers/net/wireless/b43/main.c  |   14 ++++++++------
 3 files changed, 32 insertions(+), 8 deletions(-)

--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -3,7 +3,6 @@ config B43
 	depends on SSB_POSSIBLE && MAC80211 && HAS_DMA
 	select SSB
 	select FW_LOADER
-	select SSB_BLOCKIO
 	---help---
 	  b43 is a driver for the Broadcom 43xx series wireless devices.
 
@@ -79,6 +78,14 @@ config B43_SDIO
 
 	  If unsure, say N.
 
+#Data transfers to the device via PIO. We want it as a fallback even
+# if we can do DMA.
+config B43_PIO
+	bool
+	depends on B43
+	select SSB_BLOCKIO
+	default y
+
 config B43_NPHY
 	bool "Pre IEEE 802.11n support (BROKEN)"
 	depends on B43 && EXPERIMENTAL && BROKEN
@@ -130,4 +137,12 @@ config B43_DEBUG
 	  for production use.
 	  Only say Y, if you are debugging a problem in the b43 driver sourcecode.
 
-
+config B43_FORCE_PIO
+	bool "Force usage of PIO instead of DMA"
+	depends on B43 && B43_DEBUG
+	---help---
+	  This will disable DMA and always enable PIO instead.
+
+	  Say N!
+	  This is only for debugging the PIO engine code. You do
+	  _NOT_ want to enable this.
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -694,6 +694,7 @@ struct b43_wldev {
 	bool radio_hw_enable;	/* saved state of radio hardware enabled state */
 	bool qos_enabled;		/* TRUE, if QoS is used. */
 	bool hwcrypto_enabled;		/* TRUE, if HW crypto acceleration is enabled. */
+	bool use_pio;			/* TRUE if next init should use PIO */
 
 	/* PHY/Radio device. */
 	struct b43_phy phy;
@@ -878,6 +879,12 @@ static inline bool b43_using_pio_transfe
 	return dev->__using_pio_transfers;
 }
 
+#ifdef CONFIG_B43_FORCE_PIO
+# define B43_PIO_DEFAULT 1
+#else
+# define B43_PIO_DEFAULT 0
+#endif
+
 /* Message printing */
 void b43info(struct b43_wl *wl, const char *fmt, ...)
     __attribute__ ((format(printf, 2, 3)));
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -102,9 +102,9 @@ int b43_modparam_verbose = B43_VERBOSITY
 module_param_named(verbose, b43_modparam_verbose, int, 0644);
 MODULE_PARM_DESC(verbose, "Log message verbosity: 0=error, 1=warn, 2=info(default), 3=debug");
 
-static int modparam_pio;
-module_param_named(pio, modparam_pio, int, 0444);
-MODULE_PARM_DESC(pio, "enable(1) / disable(0) PIO mode");
+int b43_modparam_pio = B43_PIO_DEFAULT;
+module_param_named(pio, b43_modparam_pio, int, 0644);
+MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
 
 static const struct ssb_device_id b43_ssb_tbl[] = {
 	SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5),
@@ -1793,8 +1793,9 @@ static void b43_do_interrupt_thread(stru
 			       dma_reason[4], dma_reason[5]);
 			b43err(dev->wl, "This device does not support DMA "
 			       "on your system. Please use PIO instead.\n");
-			b43err(dev->wl, "Unload the b43 module and reload "
-			       "with 'pio=1'\n");
+			/* Fall back to PIO transfers if we get fatal DMA errors! */
+			dev->use_pio = 1;
+			b43_controller_restart(dev, "DMA error");
 			return;
 		}
 		if (merged_dma_reason & B43_DMAIRQ_NONFATALMASK) {
@@ -4361,7 +4362,7 @@ static int b43_wireless_core_init(struct
 
 	if ((dev->dev->bus->bustype == SSB_BUSTYPE_PCMCIA) ||
 	    (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) ||
-	    modparam_pio) {
+	    dev->use_pio) {
 		dev->__using_pio_transfers = 1;
 		err = b43_pio_init(dev);
 	} else {
@@ -4829,6 +4830,7 @@ static int b43_one_core_attach(struct ss
 	if (!wldev)
 		goto out;
 
+	wldev->use_pio = b43_modparam_pio;
 	wldev->dev = dev;
 	wldev->wl = wl;
 	b43_set_status(wldev, B43_STAT_UNINIT);



  parent reply	other threads:[~2010-04-22 20:02 UTC|newest]

Thread overview: 142+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 19:57 [000/139] 2.6.33.3-stable review Greg KH
2010-04-22 19:52 ` [001/139] drm/edid: allow certain bogus edids to hit a fixup path rather than fail Greg KH
2010-04-22 19:52 ` [002/139] drm/radeon: add new RS880 pci id Greg KH
2010-04-22 19:53 ` [003/139] drm: remove the EDID blob stored in the EDID property when it is disconnected Greg KH
2010-04-22 19:53 ` [004/139] fat: fix buffer overflow in vfat_create_shortname() Greg KH
2010-04-22 19:53 ` [005/139] oom: fix the unsafe usage of badness() in proc_oom_score() Greg KH
2010-04-22 19:53 ` [006/139] drm/radeon/kms: never treat rs4xx as AGP Greg KH
2010-04-22 19:53 ` [007/139] drm/radeon/kms: Fix NULL pointer dereference if memory allocation failed in a simple way Greg KH
2010-04-22 19:53 ` [008/139] drm/radeon/kms: dont print error on -ERESTARTSYS Greg KH
2010-04-22 19:53 ` [009/139] drm/radeon/kms: fix pal tv-out support on legacy IGP chips Greg KH
2010-04-22 19:53 ` [010/139] drm: Return ENODEV if the inode mapping changes Greg KH
2010-04-22 19:53 ` [011/139] sh: Fix FDPIC binary loader Greg KH
2010-04-22 19:53 ` [012/139] sh: Enable the mmu in start_secondary() Greg KH
2010-04-22 19:53 ` [013/139] reiserfs: Fix locking BUG during mount failure Greg KH
2010-04-22 19:53 ` [014/139] [SCSI] libiscsi: Fix recovery slowdown regression Greg KH
2010-04-22 19:53 ` [015/139] x86,kgdb: Always initialize the hw breakpoint attribute Greg KH
2010-04-22 19:53 ` [016/139] Freezer: Fix buggy resume test for tasks frozen with cgroup freezer Greg KH
2010-04-22 19:53 ` [017/139] iwlwifi: fix regulatory Greg KH
2010-04-22 19:53 ` [018/139] iwlwifi: counting number of tfds can be free for 4965 Greg KH
2010-04-22 19:53 ` [019/139] iwlwifi: range checking issue Greg KH
2010-04-22 19:53 ` [020/139] setup correct int pipe type in ar9170_usb_exec_cmd Greg KH
2010-04-22 19:53 ` [021/139] mac80211: fix PREQ processing and one small bug Greg KH
2010-04-22 19:53 ` [022/139] mac80211: move netdev queue enabling to correct spot Greg KH
2010-04-22 19:53 ` [023/139] mac80211: tear down all agg queues when restart/reconfig hw Greg KH
2010-04-22 19:53 ` [024/139] sparc: Fix regset register window handling Greg KH
2010-04-22 19:53 ` [025/139] sunxvr500: Ignore secondary output PCI devices Greg KH
2010-04-22 19:53 ` [026/139] WATCHDOG: hpwdt - fix lower timeout limit Greg KH
2010-04-22 19:53 ` [027/139] WATCHDOG: iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs Greg KH
2010-04-22 19:53 ` [028/139] genirq: Force MSI irq handlers to run with interrupts disabled Greg KH
2010-04-22 19:53 ` [029/139] tty: release_one_tty() forgets to put pids Greg KH
2010-04-22 19:53 ` [030/139] HID: fix oops in gyration_event() Greg KH
2010-04-22 19:53 ` [031/139] raw: fsync method is now required Greg KH
2010-04-22 19:53 ` [032/139] readahead: fix NULL filp dereference Greg KH
2010-04-22 19:53 ` [033/139] include/linux/kfifo.h: fix INIT_KFIFO() Greg KH
2010-04-22 19:53 ` [034/139] ALSA: mixart: range checking proc file Greg KH
2010-04-22 19:53 ` [035/139] ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981 Greg KH
2010-04-22 19:53 ` [036/139] ALSA: hda - Add ASRock mobo to MSI blacklist Greg KH
2010-04-22 19:53 ` [037/139] ALSA: hda - Add MSI blacklist for Aopen MZ915-M Greg KH
2010-04-22 19:53 ` [038/139] backlight: mbp_nvidia_bl - add five more MacBook variants Greg KH
2010-04-22 19:53 ` [039/139] pata_via: Add VIA VX900 support Greg KH
2010-04-22 19:53 ` [040/139] libata: disable NCQ on Crucial C300 SSD Greg KH
2010-04-22 19:53 ` [041/139] [S390] s390: disable change bit override Greg KH
2010-04-22 19:53 ` [042/139] cifs: Fix a kernel BUG with remote OS/2 server (try #3) Greg KH
2010-04-22 19:53 ` [043/139] CIFS: initialize nbytes at the beginning of CIFSSMBWrite() Greg KH
2010-04-22 19:53 ` [044/139] ath9k: fix double calls to ath_radio_enable Greg KH
2010-04-22 19:53 ` [045/139] iwlwifi: need check for valid qos packet before free Greg KH
2010-04-22 19:53 ` [046/139] mac80211: Handle mesh action frames in ieee80211_rx_h_action Greg KH
2010-04-22 19:53 ` [047/139] ARM: 6031/1: fix Thumb-2 decompressor Greg KH
2010-04-22 19:53 ` [048/139] drm/edid/quirks: Envision EN2028 Greg KH
2010-04-22 19:53 ` [049/139] drm/radeon: R300 AD only has one quad pipe Greg KH
2010-04-22 19:53 ` [050/139] drm/radeon/kms: fix washed out image on legacy tv dac Greg KH
2010-04-22 19:53 ` [051/139] drm/radeon/kms/combios: verify dac_adj values are valid Greg KH
2010-04-22 19:53 ` [052/139] x86-32, resume: do a global tlb flush in S4 resume Greg KH
2010-04-22 19:53 ` [053/139] x86: Handle overlapping mptables Greg KH
2010-04-22 19:53 ` [054/139] x86, hpet: Erratum workaround for read after write of HPET comparator Greg KH
2010-04-22 19:53 ` [055/139] x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards Greg KH
2010-04-22 19:53 ` [056/139] sched: sched_getaffinity(): Allow less than NR_CPUS length Greg KH
2010-04-22 19:53 ` [057/139] sched: Fix sched_getaffinity() Greg KH
2010-04-22 19:53 ` [058/139] NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR Greg KH
2010-04-22 19:53 ` [059/139] NFSv4: fix delegated locking Greg KH
2010-04-22 19:53 ` [060/139] Input: wacom - switch mode upon system resume Greg KH
2010-04-22 19:53 ` [061/139] Input: sparse-keymap - free the right keymap on error Greg KH
2010-04-22 19:53 ` [062/139] ALSA: hda - add a quirk for Clevo M570U laptop Greg KH
2010-04-22 19:54 ` [063/139] ALSA: usb - Fix Oops after usb-midi disconnection Greg KH
2010-04-22 19:54 ` [064/139] hwmon: (sht15) Fix sht15_calc_temp interpolation function Greg KH
2010-04-22 19:54 ` [065/139] hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n Greg KH
2010-04-22 19:54 ` [066/139] drm/i915: Add no_lvds entry for the Clientron U800 Greg KH
2010-04-22 19:54 ` [067/139] drm/radeon/kms: more atom parser fixes (v2) Greg KH
2010-04-22 19:54 ` [068/139] drm/radeon/kms: disable the tv encoder when tv/cv is not in use Greg KH
2010-04-22 19:54 ` [069/139] drm/radeon/kms: fix tv dac conflict resolver Greg KH
2010-04-22 19:54 ` [070/139] drm/radeon/kms: fix rs600 tlb flush Greg KH
2010-04-22 19:54 ` [071/139] drm/radeon/kms: add FireMV 2400 PCI ID Greg KH
2010-04-22 19:54 ` [072/139] x86/amd-iommu: Pt mode fix for domain_destroy Greg KH
2010-04-22 19:54 ` [073/139] x86/amd-iommu: Use helper function to destroy domain Greg KH
2010-04-22 19:54 ` [074/139] x86/amd-iommu: enable iommu before attaching devices Greg KH
2010-04-22 19:54 ` [075/139] Revert "x86: disable IOMMUs on kernel crash" Greg KH
2010-04-22 19:54 ` [076/139] x86, lib: Add wbinvd smp helpers Greg KH
2010-04-22 19:54 ` [077/139] x86, cacheinfo: Fix disabling of L3 cache indices Greg KH
2010-04-22 19:54 ` [078/139] intel-agp: Switch to wbinvd_on_all_cpus Greg KH
2010-04-22 19:54 ` [079/139] x86, cacheinfo: Add cache index disable sysfs attrs only to L3 caches Greg KH
2010-04-22 19:54 ` [080/139] x86, cacheinfo: Calculate L3 indices Greg KH
2010-04-22 19:54 ` [081/139] x86, cacheinfo: Remove NUMA dependency, fix for AMD Fam10h rev D1 Greg KH
2010-04-22 19:54 ` [082/139] x86, cacheinfo: Enable L3 CID only on AMD Greg KH
2010-04-22 19:54 ` [083/139] dm ioctl: introduce flag indicating uevent was generated Greg KH
2010-04-22 19:54 ` [084/139] x86-32: clean up rwsem inline asm statements Greg KH
2010-04-22 19:54 ` [085/139] x86: clean up rwsem type system Greg KH
2010-04-22 19:54 ` [086/139] x86-64, rwsem: 64-bit xadd rwsem implementation Greg KH
2010-04-22 19:54 ` [087/139] x86-64: support native " Greg KH
2010-04-22 19:54 ` [088/139] x86: Fix breakage of UML from the changes in the rwsem system Greg KH
2010-04-22 19:54 ` [089/139] x86-64, rwsem: Avoid store forwarding hazard in __downgrade_write Greg KH
2010-04-22 19:54 ` [090/139] fix NFS4 handling of mountpoint stat Greg KH
2010-04-22 19:54 ` [091/139] quota: Fix possible dq_flags corruption Greg KH
2010-04-22 19:54 ` [092/139] ocfs2: set i_mode on disk during acl operations Greg KH
2010-04-22 19:54 ` [093/139] ocfs2: Change bg_chain check for ocfs2_validate_gd_parent Greg KH
2010-04-22 19:54 ` [094/139] 9p: Skip check for mandatory locks when unlocking Greg KH
2010-04-22 19:54 ` [095/139] pci: Update pci_set_vga_state() to call arch functions Greg KH
2010-04-22 19:54 ` [096/139] PCI: kill off pci_register_set_vga_state() symbol export Greg KH
2010-04-22 19:54 ` [097/139] IPoIB: Fix TX queue lockup with mixed UD/CM traffic Greg KH
2010-04-22 19:54 ` [098/139] x86/PCI: irq and pci_ids patch for Intel Cougar Point DeviceIDs Greg KH
2010-04-22 19:54 ` [099/139] ALSA: hda_intel: ALSA HD Audio " Greg KH
2010-04-22 19:54 ` [100/139] ALSA: hda - enable snoop for Intel Cougar Point Greg KH
2010-04-22 19:54 ` [101/139] ata_piix: IDE Mode SATA patch for Intel Cougar Point DeviceIDs Greg KH
2010-04-22 19:54 ` [102/139] ahci: AHCI and RAID mode " Greg KH
2010-04-22 19:54 ` [103/139] i2c-i801: Add Intel Cougar Point device IDs Greg KH
2010-04-22 19:54 ` [104/139] b43: Allow PIO mode to be selected at module load Greg KH
2010-04-22 19:54 ` Greg KH [this message]
2010-04-22 19:54 ` [106/139] ALSA: hda - Add position_fix quirk for Biostar mobo Greg KH
2010-04-22 19:54 ` [107/139] ecryptfs: fix use with tmpfs by removing d_drop from ecryptfs_destroy_inode Greg KH
2010-04-22 19:54 ` [108/139] eCryptfs: Decrypt symlink target for stat size Greg KH
2010-04-22 19:54 ` [109/139] ecryptfs: fix error code for missing xattrs in lower fs Greg KH
2010-04-22 19:54 ` [110/139] USB: cdc-acm: Update to new autopm API Greg KH
2010-04-22 19:54 ` [111/139] USB: cdc-acm: Fix stupid NULL pointer in resume() Greg KH
2010-04-22 19:54 ` [112/139] iwlwifi: clear all tx queues when firmware ready Greg KH
2010-04-22 19:54 ` [113/139] iwlwifi: fix scan race Greg KH
2010-04-22 19:54 ` [114/139] e1000e: stop cleaning when we reach tx_ring->next_to_use Greg KH
2010-04-22 19:54 ` [115/139] perf_events, x86: Implement Intel Westmere/Nehalem-EX support Greg KH
2010-04-22 19:54 ` [116/139] xfs: Non-blocking inode locking in IO completion Greg KH
2010-04-22 19:54 ` [117/139] xfs: fix locking for inode cache radix tree tag updates Greg KH
2010-04-22 19:54 ` [118/139] xfs: check for more work before sleeping in xfssyncd Greg KH
2010-04-22 19:54 ` [119/139] ACPI: EC: Allow multibyte access to EC Greg KH
2010-04-22 19:54 ` [120/139] md/raid5: allow for more than 2^31 chunks Greg KH
2010-04-22 19:54 ` [121/139] ACPI: EC: Limit burst to 64 bits Greg KH
2010-04-22 19:54 ` [122/139] modules: fix incorrect percpu usage Greg KH
2010-04-22 19:55 ` [123/139] lockdep: " Greg KH
2010-04-22 19:55 ` [124/139] module: fix __module_ref_addr() Greg KH
2010-04-22 19:55 ` [125/139] md: deal with merge_bvec_fn in component devices better Greg KH
2010-04-22 19:55 ` [126/139] powerpc: Fix SMP build with disabled CPU hotplugging Greg KH
2010-04-22 19:55 ` [127/139] ext4: fix async i/o writes beyond 4GB to a sparse file Greg KH
2010-04-22 19:55 ` [128/139] sched: Use proper type in sched_getaffinity() Greg KH
2010-04-22 19:55 ` [129/139] KVM: VMX: Update instruction length on intercepted BP Greg KH
2010-04-22 19:55 ` [130/139] KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails Greg KH
2010-04-22 19:55 ` [131/139] KVM: Dont spam kernel log when injecting exceptions due to bad cr writes Greg KH
2010-04-22 19:55 ` [132/139] KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL Greg KH
2010-04-22 19:55 ` [133/139] KVM: VMX: Save/restore rflags.vm correctly in real mode Greg KH
2010-04-22 19:55 ` [134/139] KVM: MMU: fix kvm_mmu_zap_page() and its calling path Greg KH
2010-04-22 19:55 ` [135/139] KVM: fix the handling of dirty bitmaps to avoid overflows Greg KH
2010-04-22 19:55 ` [136/139] KVM: Increase NR_IOBUS_DEVS limit to 200 Greg KH
2010-04-22 19:55 ` [137/139] KVM: x86: Fix TSS size check for 16-bit tasks Greg KH
2010-04-22 19:55 ` [138/139] x86/gart: Disable GART explicitly before initialization Greg KH
2010-04-22 19:55 ` [139/139] MIPS: Sibyte: Fix M3 TLB exception handler workaround Greg KH
2010-04-22 20:52   ` Sebastian Andrzej Siewior
2010-04-23 16:23 ` [stable] [000/139] 2.6.33.3-stable review Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100422195415.962821799@kvm.kroah.org \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=max@stro.at \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome