diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2007-06-14 19:12:23 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:45 -0400 |
commit | e65bbf13dd6ca8c0a4fc35028742c8c85f39c02b (patch) | |
tree | d285397fc72ff1c3775eb129c1fa2ec3a630a765 /drivers | |
parent | 57a9f236ebe76be6fe1c85b5f7b3cea842e44177 (diff) |
spidernet: Replace literal with const
Replace literal with const; add bit definitions.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/spider_net.c | 2 | ||||
-rw-r--r-- | drivers/net/spider_net.h | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 9d3ae35767b4..f5abb5279d4d 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1235,7 +1235,7 @@ spider_net_decode_one_descr(struct spider_net_card *card) | |||
1235 | goto bad_desc; | 1235 | goto bad_desc; |
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | if (hwdescr->dmac_cmd_status & 0xfcf4) { | 1238 | if (hwdescr->dmac_cmd_status & SPIDER_NET_DESCR_BAD_STATUS) { |
1239 | dev_err(&card->netdev->dev, "bad status, cmd_status=x%08x\n", | 1239 | dev_err(&card->netdev->dev, "bad status, cmd_status=x%08x\n", |
1240 | hwdescr->dmac_cmd_status); | 1240 | hwdescr->dmac_cmd_status); |
1241 | pr_err("buf_addr=x%08x\n", hw_buf_addr); | 1241 | pr_err("buf_addr=x%08x\n", hw_buf_addr); |
diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h index 04007d7b0e41..dbbdb8cee3c6 100644 --- a/drivers/net/spider_net.h +++ b/drivers/net/spider_net.h | |||
@@ -354,6 +354,18 @@ enum spider_net_int2_status { | |||
354 | #define SPIDER_NET_DMAC_UDP 0x00030000 | 354 | #define SPIDER_NET_DMAC_UDP 0x00030000 |
355 | #define SPIDER_NET_TXDCEST 0x08000000 | 355 | #define SPIDER_NET_TXDCEST 0x08000000 |
356 | 356 | ||
357 | #define SPIDER_NET_DESCR_RXFDIS 0x00000001 | ||
358 | #define SPIDER_NET_DESCR_RXDCEIS 0x00000002 | ||
359 | #define SPIDER_NET_DESCR_RXDEN0IS 0x00000004 | ||
360 | #define SPIDER_NET_DESCR_RXINVDIS 0x00000008 | ||
361 | #define SPIDER_NET_DESCR_RXRERRIS 0x00000010 | ||
362 | #define SPIDER_NET_DESCR_RXFDCIMS 0x00000100 | ||
363 | #define SPIDER_NET_DESCR_RXDCEIMS 0x00000200 | ||
364 | #define SPIDER_NET_DESCR_RXDEN0IMS 0x00000400 | ||
365 | #define SPIDER_NET_DESCR_RXINVDIMS 0x00000800 | ||
366 | #define SPIDER_NET_DESCR_RXRERRMIS 0x00001000 | ||
367 | #define SPIDER_NET_DESCR_UNUSED 0x077fe0e0 | ||
368 | |||
357 | #define SPIDER_NET_DESCR_IND_PROC_MASK 0xF0000000 | 369 | #define SPIDER_NET_DESCR_IND_PROC_MASK 0xF0000000 |
358 | #define SPIDER_NET_DESCR_COMPLETE 0x00000000 /* used in rx and tx */ | 370 | #define SPIDER_NET_DESCR_COMPLETE 0x00000000 /* used in rx and tx */ |
359 | #define SPIDER_NET_DESCR_RESPONSE_ERROR 0x10000000 /* used in rx and tx */ | 371 | #define SPIDER_NET_DESCR_RESPONSE_ERROR 0x10000000 /* used in rx and tx */ |
@@ -364,6 +376,13 @@ enum spider_net_int2_status { | |||
364 | #define SPIDER_NET_DESCR_NOT_IN_USE 0xF0000000 | 376 | #define SPIDER_NET_DESCR_NOT_IN_USE 0xF0000000 |
365 | #define SPIDER_NET_DESCR_TXDESFLG 0x00800000 | 377 | #define SPIDER_NET_DESCR_TXDESFLG 0x00800000 |
366 | 378 | ||
379 | #define SPIDER_NET_DESCR_BAD_STATUS (SPIDER_NET_DESCR_RXDEN0IS | \ | ||
380 | SPIDER_NET_DESCR_RXRERRIS | \ | ||
381 | SPIDER_NET_DESCR_RXDEN0IMS | \ | ||
382 | SPIDER_NET_DESCR_RXINVDIMS | \ | ||
383 | SPIDER_NET_DESCR_RXRERRMIS | \ | ||
384 | SPIDER_NET_DESCR_UNUSED) | ||
385 | |||
367 | /* Descriptor, as defined by the hardware */ | 386 | /* Descriptor, as defined by the hardware */ |
368 | struct spider_net_hw_descr { | 387 | struct spider_net_hw_descr { |
369 | u32 buf_addr; | 388 | u32 buf_addr; |