[ep93xx] package more board specific modules:
[openwrt.git] / target / linux / leon / patches / 023-greth_handle_frame_error_interrupts.patch
1 From f62c047af910c9c9696db7b47472a3728b8100e8 Mon Sep 17 00:00:00 2001
2 From: Daniel Hellstrom <daniel@gaisler.com>
3 Date: Wed, 1 Dec 2010 11:56:22 +0100
4 Subject: [PATCH] GRETH: handle frame error interrupts
5
6 Not handling frame error interrupts are unlikly but may lead to dead
7 lock if 128 error frames are recieved in a row.
8
9 Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
10 ---
11 drivers/net/greth.c | 5 +++--
12 drivers/net/greth.h | 2 ++
13 2 files changed, 5 insertions(+), 2 deletions(-)
14
15 --- a/drivers/net/greth.c
16 +++ b/drivers/net/greth.c
17 @@ -595,11 +595,12 @@ static irqreturn_t greth_interrupt(int i
18 status = GRETH_REGLOAD(greth->regs->status);
19
20 /* Handle rx and tx interrupts through poll */
21 - if (status & (GRETH_INT_RX | GRETH_INT_TX)) {
22 + if (status & (GRETH_INT_RE | GRETH_INT_RX | GRETH_INT_TE | GRETH_INT_TX)) {
23
24 /* Clear interrupt status */
25 GRETH_REGSAVE(greth->regs->status,
26 - status & (GRETH_INT_RX | GRETH_INT_TX));
27 + status & (GRETH_INT_RE | GRETH_INT_RX |
28 + GRETH_INT_TE | GRETH_INT_TX));
29
30 retval = IRQ_HANDLED;
31
32 --- a/drivers/net/greth.h
33 +++ b/drivers/net/greth.h
34 @@ -23,6 +23,7 @@
35 #define GRETH_BD_LEN 0x7FF
36
37 #define GRETH_TXEN 0x1
38 +#define GRETH_INT_TE 0x2
39 #define GRETH_INT_TX 0x8
40 #define GRETH_TXI 0x4
41 #define GRETH_TXBD_STATUS 0x0001C000
42 @@ -35,6 +36,7 @@
43 #define GRETH_TXBD_ERR_UE 0x4000
44 #define GRETH_TXBD_ERR_AL 0x8000
45
46 +#define GRETH_INT_RE 0x1
47 #define GRETH_INT_RX 0x4
48 #define GRETH_RXEN 0x2
49 #define GRETH_RXI 0x8
This page took 0.041842 seconds and 5 git commands to generate.