Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

b43: Remove PIO RX workqueue

This removes the PIO RX work. It's not needed anymore, because
we can sleep in the threaded interrupt handler.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Michael Buesch and committed by
John W. Linville
77ca07ff 637dae3f

+11 -38
-1
drivers/net/wireless/b43/main.c
··· 3883 3883 while (skb_queue_len(&wl->tx_queue)) 3884 3884 dev_kfree_skb(skb_dequeue(&wl->tx_queue)); 3885 3885 3886 - b43_pio_stop(dev); 3887 3886 b43_mac_suspend(dev); 3888 3887 free_irq(dev->dev->irq, dev); 3889 3888 b43dbg(wl, "Wireless interface stopped\n");
+11 -33
drivers/net/wireless/b43/pio.c
··· 32 32 #include <linux/delay.h> 33 33 34 34 35 - static void b43_pio_rx_work(struct work_struct *work); 36 - 37 - 38 35 static u16 generate_cookie(struct b43_pio_txqueue *q, 39 36 struct b43_pio_txpacket *pack) 40 37 { ··· 179 182 q->rev = dev->dev->id.revision; 180 183 q->mmio_base = index_to_pioqueue_base(dev, index) + 181 184 pio_rxqueue_offset(dev); 182 - INIT_WORK(&q->rx_work, b43_pio_rx_work); 183 185 184 186 /* Enable Direct FIFO RX (PIO) on the engine. */ 185 187 b43_dma_direct_fifo_rx(dev, index, 1); ··· 241 245 destroy_queue_tx(pio, tx_queue_AC_VI); 242 246 destroy_queue_tx(pio, tx_queue_AC_BE); 243 247 destroy_queue_tx(pio, tx_queue_AC_BK); 244 - } 245 - 246 - void b43_pio_stop(struct b43_wldev *dev) 247 - { 248 - if (!b43_using_pio_transfers(dev)) 249 - return; 250 - cancel_work_sync(&dev->pio.rx_queue->rx_work); 251 248 } 252 249 253 250 int b43_pio_init(struct b43_wldev *dev) ··· 734 745 return 1; 735 746 } 736 747 737 - /* RX workqueue. We can sleep, yay! */ 738 - static void b43_pio_rx_work(struct work_struct *work) 739 - { 740 - struct b43_pio_rxqueue *q = container_of(work, struct b43_pio_rxqueue, 741 - rx_work); 742 - unsigned int budget = 50; 743 - bool stop; 744 - 745 - do { 746 - mutex_lock(&q->dev->wl->mutex); 747 - stop = (pio_rx_frame(q) == 0); 748 - mutex_unlock(&q->dev->wl->mutex); 749 - cond_resched(); 750 - if (stop) 751 - break; 752 - } while (--budget); 753 - } 754 - 755 - /* Called with IRQs disabled. */ 756 748 void b43_pio_rx(struct b43_pio_rxqueue *q) 757 749 { 758 - /* Due to latency issues we must run the RX path in 759 - * a workqueue to be able to schedule between packets. */ 760 - ieee80211_queue_work(q->dev->wl->hw, &q->rx_work); 750 + unsigned int count = 0; 751 + bool stop; 752 + 753 + while (1) { 754 + stop = (pio_rx_frame(q) == 0); 755 + if (stop) 756 + break; 757 + cond_resched(); 758 + if (WARN_ON_ONCE(++count > 10000)) 759 + break; 760 + } 761 761 } 762 762 763 763 static void b43_pio_tx_suspend_queue(struct b43_pio_txqueue *q)
-4
drivers/net/wireless/b43/pio.h
··· 104 104 struct b43_wldev *dev; 105 105 u16 mmio_base; 106 106 107 - /* Work to reduce latency issues on RX. */ 108 - struct work_struct rx_work; 109 - 110 107 /* Shortcut to the 802.11 core revision. This is to 111 108 * avoid horrible pointer dereferencing in the fastpaths. */ 112 109 u8 rev; ··· 157 160 158 161 159 162 int b43_pio_init(struct b43_wldev *dev); 160 - void b43_pio_stop(struct b43_wldev *dev); 161 163 void b43_pio_free(struct b43_wldev *dev); 162 164 163 165 int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb);