Skip to contentSkip to conversation

b43: Remove PIO support

PATCH In review Michael Buesch 3 participants 3 messages Dec 26, 2007 – Jan 10, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: Remove PIO support

Remove b43 PIO support.
DMA works well on all supported devices. There's no reason to use PIO. Additionally, new devices don't support PIO in hardware anymore. b43 PIO support is dead and unused code.

After applying this patch please do
git rm drivers/net/wireless/b43/pio.h
git rm drivers/net/wireless/b43/pio.c
to remove the main PIO support code.

drivers/net/wireless/b43/Kconfig +0 -48
Index: wireless-2.6/drivers/net/wireless/b43/Kconfig
===================================================================
@@ -83,51 +83,3 @@ config B43_DEBUG
 
 	  Say Y, if you want to find out why the driver does not
 	  work for you.
-
-config B43_DMA
-	bool
-	depends on B43
-config B43_PIO
-	bool
-	depends on B43
-
-choice
-	prompt "Broadcom 43xx data transfer mode"
-	depends on B43
-	default B43_DMA_AND_PIO_MODE
-
-config B43_DMA_AND_PIO_MODE
-	bool "DMA + PIO"
-	select B43_DMA
-	select B43_PIO
-	---help---
-	  Include both, Direct Memory Access (DMA) and Programmed I/O (PIO)
-	  data transfer modes.
-	  The actually used mode is selectable through the module
-	  parameter "pio". If the module parameter is pio=0, DMA is used.
-	  Otherwise PIO is used. DMA is default.
-
-	  If unsure, choose this option.
-
-config B43_DMA_MODE
-	bool "DMA (Direct Memory Access) only"
-	select B43_DMA
-	---help---
-	  Only include Direct Memory Access (DMA).
-	  This reduces the size of the driver module, by omitting the PIO code.
-
-config B43_PIO_MODE
-	bool "PIO (Programmed I/O) only"
-	select B43_PIO
-	---help---
-	  Only include Programmed I/O (PIO).
-	  This reduces the size of the driver module, by omitting the DMA code.
-	  Please note that PIO transfers are slow (compared to DMA).
-
-	  Also note that not all devices of the 43xx series support PIO.
-	  The 4306 (Apple Airport Extreme and others) supports PIO, while
-	  the 4318 is known to _not_ support PIO.
-
-	  Only use PIO, if DMA does not work for you.
-
-endchoice
drivers/net/wireless/b43/Makefile +1 -8
Index: wireless-2.6/drivers/net/wireless/b43/Makefile
===================================================================
@@ -1,4 +1,3 @@
-# b43 core
 b43-y				+= main.o
 b43-y				+= tables.o
 b43-y				+= phy.o
@@ -6,16 +5,10 @@ b43-y				+= sysfs.o
 b43-y				+= xmit.o
 b43-y				+= lo.o
 b43-y				+= wa.o
-# b43 RFKILL button support
+b43-y				+= dma.o
 b43-$(CONFIG_B43_RFKILL)	+= rfkill.o
-# b43 LED support
 b43-$(CONFIG_B43_LEDS)		+= leds.o
-# b43 PCMCIA support
 b43-$(CONFIG_B43_PCMCIA)	+= pcmcia.o
-# b43 debugging
 b43-$(CONFIG_B43_DEBUG)		+= debugfs.o
-# b43 DMA and PIO
-b43-$(CONFIG_B43_DMA)		+= dma.o
-b43-$(CONFIG_B43_PIO)		+= pio.o
 
 obj-$(CONFIG_B43)		+= b43.o
drivers/net/wireless/b43/b43.h +3 -42

75 lines not on this page · raw message

drivers/net/wireless/b43/debugfs.c +0 -1
Index: wireless-2.6/drivers/net/wireless/b43/debugfs.c
===================================================================
@@ -34,7 +34,6 @@
 #include "main.h"
 #include "debugfs.h"
 #include "dma.h"
-#include "pio.h"
 #include "xmit.h"
 
 
drivers/net/wireless/b43/dma.c +5 -14
Index: wireless-2.6/drivers/net/wireless/b43/dma.c
===================================================================
@@ -915,11 +915,7 @@ static void b43_destroy_dmaring(struct b
 
 void b43_dma_free(struct b43_wldev *dev)
 {
-	struct b43_dma *dma;
-
-	if (b43_using_pio(dev))
-		return;
-	dma = &dev->dma;
+	struct b43_dma *dma = &dev->dma;
 
 	b43_destroy_dmaring(dma->rx_ring3);
 	dma->rx_ring3 = NULL;
@@ -954,16 +950,11 @@ int b43_dma_init(struct b43_wldev *dev)
 
 	err = ssb_dma_set_mask(dev->dev, dmamask);
 	if (err) {
-#ifdef B43_PIO
-		b43warn(dev->wl, "DMA for this device not supported. "
-			"Falling back to PIO\n");
-		dev->__using_pio = 1;
-		return -EAGAIN;
-#else
-		b43err(dev->wl, "DMA for this device not supported and "
-		       "no PIO support compiled in\n");
+		b43err(dev->wl, "The machine/kernel does not support "
+		       "the required DMA mask (0x%08X%08X)\n",
+		       (unsigned int)((dmamask & 0xFFFFFFFF00000000ULL) >> 32),
+		       (unsigned int)(dmamask & 0x00000000FFFFFFFFULL));
 		return -EOPNOTSUPP;
-#endif
 	}
 
 	err = -ENOMEM;
drivers/net/wireless/b43/main.c +8 -76

156 lines not on this page · raw message

drivers/net/wireless/b43/xmit.c +4 -13
Index: wireless-2.6/drivers/net/wireless/b43/xmit.c
===================================================================
@@ -30,7 +30,7 @@
 #include "xmit.h"
 #include "phy.h"
 #include "dma.h"
-#include "pio.h"
+
 
 /* Extract the bitrate out of a CCK PLCP header. */
 static u8 b43_plcp_get_bitrate_cck(struct b43_plcp_hdr6 *plcp)
@@ -593,10 +593,7 @@ void b43_handle_txstatus(struct b43_wlde
 			dev->wl->ieee_stats.dot11RTSSuccessCount++;
 	}
 
-	if (b43_using_pio(dev))
-		b43_pio_handle_txstatus(dev, status);
-	else
-		b43_dma_handle_txstatus(dev, status);
+	b43_dma_handle_txstatus(dev, status);
 }
 
 /* Handle TX status report as received through DMA/PIO queues */
@@ -625,19 +622,13 @@ void b43_handle_hwtxstatus(struct b43_wl
 /* Stop any TX operation on the device (suspend the hardware queues) */
 void b43_tx_suspend(struct b43_wldev *dev)
 {
-	if (b43_using_pio(dev))
-		b43_pio_freeze_txqueues(dev);
-	else
-		b43_dma_tx_suspend(dev);
+	b43_dma_tx_suspend(dev);
 }
 
 /* Resume any TX operation on the device (resume the hardware queues) */
 void b43_tx_resume(struct b43_wldev *dev)
 {
-	if (b43_using_pio(dev))
-		b43_pio_thaw_txqueues(dev);
-	else
-		b43_dma_tx_resume(dev);
+	b43_dma_tx_resume(dev);
 }
 
 #if 0
drivers/net/wireless/b43/dma.h +0 -50

60 lines not on this page · raw message

maintainer
#1 lore raw

John,

Quoted 4 lines · Michael Buesch

Remove b43 PIO support.
DMA works well on all supported devices. There's no reason to use PIO. Additionally, new devices don't support PIO in hardware anymore. b43 PIO support is dead and unused code.

You merged this patch, but

Quoted 4 lines

After applying this patch please do
git rm drivers/net/wireless/b43/pio.h
git rm drivers/net/wireless/b43/pio.c
to remove the main PIO support code.

forgot this.

johannes

#2 lore raw
Quoted 8 lines · Johannes Berg

John,

Quoted 4 lines · Michael Buesch

Remove b43 PIO support.
DMA works well on all supported devices. There's no reason to use PIO. Additionally, new devices don't support PIO in hardware anymore. b43 PIO support is dead and unused code.

Quoted 8 lines

You merged this patch, but

Quoted 4 lines

After applying this patch please do
git rm drivers/net/wireless/b43/pio.h
git rm drivers/net/wireless/b43/pio.c
to remove the main PIO support code.

forgot this.

You're right -- thanks for the reminder!

Signature · 2 lines
John W. Linville
[email protected]