diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-11-16 16:32:55 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-11-16 16:32:55 +0000 |
commit | a4c205011b62f45e116eb26c974fa3bd771ce194 (patch) | |
tree | 123b05cb192785d0fc45c1f0acd0e6f8cba68144 /target/linux/leon/patches-2.6.36/023-greth_handle_frame_error_interrupts.patch | |
parent | 974b9f5c9a7322424d5127dbe45236a0658c69ba (diff) | |
download | master-31e0f0ae-a4c205011b62f45e116eb26c974fa3bd771ce194.tar.gz master-31e0f0ae-a4c205011b62f45e116eb26c974fa3bd771ce194.tar.bz2 master-31e0f0ae-a4c205011b62f45e116eb26c974fa3bd771ce194.zip |
move patches to patches-2.6.36
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 34220
Diffstat (limited to 'target/linux/leon/patches-2.6.36/023-greth_handle_frame_error_interrupts.patch')
-rw-r--r-- | target/linux/leon/patches-2.6.36/023-greth_handle_frame_error_interrupts.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/leon/patches-2.6.36/023-greth_handle_frame_error_interrupts.patch b/target/linux/leon/patches-2.6.36/023-greth_handle_frame_error_interrupts.patch new file mode 100644 index 0000000000..12bfb1c01f --- /dev/null +++ b/target/linux/leon/patches-2.6.36/023-greth_handle_frame_error_interrupts.patch @@ -0,0 +1,49 @@ +From f62c047af910c9c9696db7b47472a3728b8100e8 Mon Sep 17 00:00:00 2001 +From: Daniel Hellstrom <daniel@gaisler.com> +Date: Wed, 1 Dec 2010 11:56:22 +0100 +Subject: [PATCH] GRETH: handle frame error interrupts + +Not handling frame error interrupts are unlikly but may lead to dead +lock if 128 error frames are recieved in a row. + +Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> +--- + drivers/net/greth.c | 5 +++-- + drivers/net/greth.h | 2 ++ + 2 files changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/net/greth.c ++++ b/drivers/net/greth.c +@@ -595,11 +595,12 @@ static irqreturn_t greth_interrupt(int i + status = GRETH_REGLOAD(greth->regs->status); + + /* Handle rx and tx interrupts through poll */ +- if (status & (GRETH_INT_RX | GRETH_INT_TX)) { ++ if (status & (GRETH_INT_RE | GRETH_INT_RX | GRETH_INT_TE | GRETH_INT_TX)) { + + /* Clear interrupt status */ + GRETH_REGSAVE(greth->regs->status, +- status & (GRETH_INT_RX | GRETH_INT_TX)); ++ status & (GRETH_INT_RE | GRETH_INT_RX | ++ GRETH_INT_TE | GRETH_INT_TX)); + + retval = IRQ_HANDLED; + +--- a/drivers/net/greth.h ++++ b/drivers/net/greth.h +@@ -23,6 +23,7 @@ + #define GRETH_BD_LEN 0x7FF + + #define GRETH_TXEN 0x1 ++#define GRETH_INT_TE 0x2 + #define GRETH_INT_TX 0x8 + #define GRETH_TXI 0x4 + #define GRETH_TXBD_STATUS 0x0001C000 +@@ -35,6 +36,7 @@ + #define GRETH_TXBD_ERR_UE 0x4000 + #define GRETH_TXBD_ERR_AL 0x8000 + ++#define GRETH_INT_RE 0x1 + #define GRETH_INT_RX 0x4 + #define GRETH_RXEN 0x2 + #define GRETH_RXI 0x8 |