mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-08-25 10:12:25 +03:00
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25139 3c298f89-4303-0410-b956-a3cf2f4a3e73
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
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
|