[oe-commits] Mario Schuknecht : linux-2.6.24: fix deadlock situation in gmac driver ( hipox machine only)

git version control git at git.openembedded.org
Thu Jul 28 13:40:54 UTC 2011


Module: openembedded.git
Branch: sledz/maintenance
Commit: 760d7080be94fe25163717b22c39187431ffe81a
URL:    http://git.openembedded.org/?p=openembedded.git&a=commit;h=760d7080be94fe25163717b22c39187431ffe81a

Author: Mario Schuknecht <m.schuknecht at dresearch.de>
Date:   Mon Jun 27 09:41:50 2011 +0000

linux-2.6.24: fix deadlock situation in gmac driver (hipox machine only)

Signed-off-by: Mario Schuknecht <m.schuknecht at dresearch.de>
Acked-by: Steffen Sledz <sledz at dresearch.de>

---

 .../linux-2.6.24/hipox/hipox-gmac-deadlock.patch   |   36 ++++++++++++++++++++
 recipes/linux/linux_2.6.24.bb                      |    5 ++-
 2 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch b/recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch
new file mode 100644
index 0000000..a566c5f
--- /dev/null
+++ b/recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch
@@ -0,0 +1,36 @@
+diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/gmac-napi.c linux-2.6.24/arch/arm/mach-hipox/gmac-napi.c
+--- linux-2.6.24.orig//arch/arm/mach-hipox/gmac-napi.c	2011-06-27 11:17:48.000000000 +0200
++++ linux-2.6.24/arch/arm/mach-hipox/gmac-napi.c	2011-06-27 11:06:20.000000000 +0200
+@@ -551,6 +551,7 @@
+ 			skb = dev_alloc_skb(priv->rx_buffer_size_ + NET_IP_ALIGN);
+ 			if (!skb) {
+ 				// Can't refill any more RX descriptor ring entries
++            			printk("%s: refill_rx_ring() dev_alloc_skb failed\n", dev->name);
+ 				break;
+ 			} else {
+ 				// Despite what the comments in the original code from Synopsys
+@@ -1476,14 +1477,18 @@
+     }
+ 
+     if (!continue_polling) {
+-        // No more received packets to process so return to interrupt mode
+-        netif_rx_complete(dev, napi);
++        if(priv->rx_gmac_desc_list_info.full_count) {
++            // No more received packets to process so return to interrupt mode
++            netif_rx_complete(dev, napi);
+ 
+-        // Enable interrupts caused by received packets that may have been
++            // Enable interrupts caused by received packets that may have been
+ 		// disabled in the ISR before entering polled mode
+-        gmac_int_en_set(priv, (1UL << DMA_INT_ENABLE_RI_BIT) |
+-                              (1UL << DMA_INT_ENABLE_RU_BIT) |
+-							   (1UL << DMA_INT_ENABLE_OV_BIT));
++            gmac_int_en_set(priv, (1UL << DMA_INT_ENABLE_RI_BIT) |
++                                  (1UL << DMA_INT_ENABLE_RU_BIT) |
++				   (1UL << DMA_INT_ENABLE_OV_BIT));
++        } else {
++            printk("%s: no input buffer, remain within poll mode\n", dev->name);
++        }
+     }
+ 
+     return work_done;
diff --git a/recipes/linux/linux_2.6.24.bb b/recipes/linux/linux_2.6.24.bb
index 4dd51ce..edd67a6 100644
--- a/recipes/linux/linux_2.6.24.bb
+++ b/recipes/linux/linux_2.6.24.bb
@@ -11,7 +11,7 @@ DEFAULT_PREFERENCE_hipox = "1"
 DEFAULT_PREFERENCE_cs-e9302 = "1"
 DEFAULT_PREFERENCE_smartq5 = "1"
 
-PR = "r45"
+PR = "r46"
 
 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2;name=kernel \
            ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.7.bz2;apply=yes;name=stablepatch \
@@ -109,7 +109,8 @@ SRC_URI_append_hipox = " \
 	file://hipox-phy.patch \
 	file://ox810-pci-read-config-fix.patch \
 	file://hipox-nand-timing.patch \
-    file://ox810-pci-abort-handler.patch \
+	file://ox810-pci-abort-handler.patch \
+	file://hipox-gmac-deadlock.patch \
 	"
 
 EXTRA_OEMAKE_smartq5 = " OBJCOPY=${OBJCOPY}"





More information about the Openembedded-commits mailing list