aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux
diff options
context:
space:
mode:
authorMario Schuknecht <m.schuknecht@dresearch.de>2011-06-27 09:41:50 +0000
committerSteffen Sledz <sledz@dresearch-fe.de>2011-07-28 15:36:49 +0200
commit6786333d52c1b012f72c97ed7d81b7f626ae936a (patch)
tree395dd4788bbfdffd582f06153fcd59dab8e9dfcf /recipes/linux
parent7712977b6e28e80b9de0c2b25248fe2798bf5576 (diff)
downloadopenembedded-6786333d52c1b012f72c97ed7d81b7f626ae936a.tar.gz
linux-2.6.24: fix deadlock situation in gmac driver (hipox machine only)
Signed-off-by: Mario Schuknecht <m.schuknecht@dresearch.de> Acked-by: Steffen Sledz <sledz@dresearch.de>
Diffstat (limited to 'recipes/linux')
-rw-r--r--recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch36
-rw-r--r--recipes/linux/linux_2.6.24.bb5
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 0000000000..a566c5f9b7
--- /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 4dd51ce025..edd67a6e35 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}"