rpms/kernel/F-9 linux-2.6-wireless-ath9k-dma-fixes.patch, NONE, 1.1 kernel.spec, 1.873, 1.874 linux-2.6-wireless-ath9k-check-broken-iommu.patch, 1.1, NONE

Chuck Ebbert cebbert at fedoraproject.org
Mon Dec 8 06:01:58 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20198

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-wireless-ath9k-dma-fixes.patch 
Removed Files:
	linux-2.6-wireless-ath9k-check-broken-iommu.patch 
Log Message:
Drop check for SWIOTLB in the ath9k driver.
Add ath9k patch to fail gracefully when iommu is full.

linux-2.6-wireless-ath9k-dma-fixes.patch:

--- NEW FILE linux-2.6-wireless-ath9k-dma-fixes.patch ---
From:	"Luis R. Rodriguez" <lrodriguez at atheros.com>
To:	<stable at kernel.org>
CC:	<ath9k-devel at lists.ath9k.org>, <linux-wireless at vger.kernel.org>,
	<linux-kernel at vger.kernel.org>, <sfr at canb.auug.org.au>,
	"Luis R. Rodriguez" <lrodriguez at atheros.com>
Subject: [PATCH 1/3] ath9k: Handle -ENOMEM on RX gracefully
Date:	Tue, 2 Dec 2008 12:51:22 -0800

We would get an oops on RX on -ENOMEM by passing
NULL to the hardware on ath_rx_buf_link(). The oops
would look something like this:

ath_rx_tasklet
...
RIP: ath_rx_buf_link

We correct this by handling the allocation for the next
skb we will put in our RX tail directly on the ath_rx_tasklet()
*prior* to sending up the last hardware processed
skb. If we run out of memory this gauranteees we have
skbs to work with while it simply drops new received
frames.

Signed-off-by: Luis R. Rodriguez <lrodriguez at atheros.com>
---
 drivers/net/wireless/ath9k/recv.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c
index 0941589..a4f92b2 100644
--- a/drivers/net/wireless/ath9k/recv.c
+++ b/drivers/net/wireless/ath9k/recv.c
@@ -441,18 +441,16 @@ static void ath_rx_requeue(struct ath_softc *sc, struct sk_buff *skb)
  */
 static int ath_rx_indicate(struct ath_softc *sc,
 			   struct sk_buff *skb,
+			   struct sk_buff *nskb,
 			   struct ath_recv_status *status,
 			   u16 keyix)
 {
 	struct ath_buf *bf = ATH_RX_CONTEXT(skb)->ctx_rxbuf;
-	struct sk_buff *nskb;
 	int type;
 
 	/* indicate frame to the stack, which will free the old skb. */
 	type = ath__rx_indicate(sc, skb, status, keyix);
 
-	/* allocate a new skb and queue it to for H/W processing */
-	nskb = ath_rxbuf_alloc(sc, sc->sc_rxbufsize);
 	if (nskb != NULL) {
 		bf->bf_mpdu = nskb;
 		bf->bf_buf_addr = ath_skb_map_single(sc,
@@ -741,6 +739,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
 	struct ath_desc *ds;
 	struct ieee80211_hdr *hdr;
 	struct sk_buff *skb = NULL;
+	struct sk_buff *nskb = NULL;
 	struct ath_recv_status rx_status;
 	struct ath_hal *ah = sc->sc_ah;
 	int type, rx_processed = 0;
@@ -963,6 +962,17 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
 		 */
 		if (sc->sc_rxbufsize < ds->ds_rxstat.rs_datalen)
 			goto rx_next;
+
+		/* allocate a new skb and queue it to for H/W processing */
+		nskb = ath_rxbuf_alloc(sc, sc->sc_rxbufsize);
+
+		/* Diregard current RX'd frame and reuse the old skb */
+		if (!nskb) {
+			list_move_tail(&bf->list, &sc->sc_rxbuf);
+			ath_rx_buf_link(sc, bf);
+			goto rx_next;
+		}
+
 		/*
 		 * Sync and unmap the frame.  At this point we're
 		 * committed to passing the sk_buff somewhere so
@@ -1052,7 +1062,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
 
 		/* Pass frames up to the stack. */
 
-		type = ath_rx_indicate(sc, skb,
+		type = ath_rx_indicate(sc, skb, nskb,
 			&rx_status, ds->ds_rxstat.rs_keyix);
 
 		/*
-- 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.873
retrieving revision 1.874
diff -u -r1.873 -r1.874
--- kernel.spec	8 Dec 2008 05:54:10 -0000	1.873
+++ kernel.spec	8 Dec 2008 06:01:27 -0000	1.874
@@ -675,7 +675,7 @@
 Patch681: linux-2.6-iwlagn-downgrade-BUG_ON-in-interrupt.patch
 Patch682: linux-2.6-iwl3945-ibss-tsf-fix.patch
 Patch690: linux-2.6-at76.patch
-Patch692: linux-2.6-wireless-ath9k-check-broken-iommu.patch
+Patch692: linux-2.6-wireless-ath9k-dma-fixes.patch
 
 Patch700: linux-2.6-nfs-client-mounts-hang.patch
 
@@ -1247,7 +1247,7 @@
 ApplyPatch linux-2.6-at76.patch
 
 # disable ath9k when swiotlb is in use
-ApplyPatch linux-2.6-wireless-ath9k-check-broken-iommu.patch
+ApplyPatch linux-2.6-wireless-ath9k-dma-fixes.patch
 
 # implement smarter atime updates support.
 ApplyPatch linux-2.6-smarter-relatime.patch
@@ -1898,13 +1898,17 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
-* Wed Dec 03 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-60
+* Mon Dec 08 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-61
+- Drop check for SWIOTLB in the ath9k driver.
+- Add ath9k patch to fail gracefully when iommu is full.
+
+* Mon Dec 08 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-60
 - Scheduler fixes from 2.6.28
 
-* Wed Dec 03 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-59
+* Mon Dec 08 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-59
 - Fix PCI config space size on AMD Barcelona.
 
-* Wed Dec 03 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-58
+* Mon Dec 08 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-58
 - Linux 2.6.27.8
   Dropped patches:
     linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch


--- linux-2.6-wireless-ath9k-check-broken-iommu.patch DELETED ---




More information about the fedora-extras-commits mailing list