diff options
Diffstat (limited to 'drivers/net/tehuti.h')
-rw-r--r-- | drivers/net/tehuti.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h index 4fc875e5dcdd..cff98d07cba8 100644 --- a/drivers/net/tehuti.h +++ b/drivers/net/tehuti.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/firmware.h> | 32 | #include <linux/firmware.h> |
33 | #include <asm/byteorder.h> | 33 | #include <asm/byteorder.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | /* Compile Time Switches */ | 37 | /* Compile Time Switches */ |
37 | /* start */ | 38 | /* start */ |
@@ -76,8 +77,6 @@ | |||
76 | #define FIFO_SIZE 4096 | 77 | #define FIFO_SIZE 4096 |
77 | #define FIFO_EXTRA_SPACE 1024 | 78 | #define FIFO_EXTRA_SPACE 1024 |
78 | 79 | ||
79 | #define MIN(x, y) ((x) < (y) ? (x) : (y)) | ||
80 | |||
81 | #if BITS_PER_LONG == 64 | 80 | #if BITS_PER_LONG == 64 |
82 | # define H32_64(x) (u32) ((u64)(x) >> 32) | 81 | # define H32_64(x) (u32) ((u64)(x) >> 32) |
83 | # define L32_64(x) (u32) ((u64)(x) & 0xffffffff) | 82 | # define L32_64(x) (u32) ((u64)(x) & 0xffffffff) |
@@ -531,28 +530,34 @@ struct txd_desc { | |||
531 | 530 | ||
532 | /* Debugging Macros */ | 531 | /* Debugging Macros */ |
533 | 532 | ||
534 | #define ERR(fmt, args...) printk(KERN_ERR fmt, ## args) | 533 | #define DBG2(fmt, args...) \ |
535 | #define DBG2(fmt, args...) \ | 534 | pr_err("%s:%-5d: " fmt, __func__, __LINE__, ## args) |
536 | printk(KERN_ERR "%s:%-5d: " fmt, __func__, __LINE__, ## args) | ||
537 | 535 | ||
538 | #define BDX_ASSERT(x) BUG_ON(x) | 536 | #define BDX_ASSERT(x) BUG_ON(x) |
539 | 537 | ||
540 | #ifdef DEBUG | 538 | #ifdef DEBUG |
541 | 539 | ||
542 | #define ENTER do { \ | 540 | #define ENTER \ |
543 | printk(KERN_ERR "%s:%-5d: ENTER\n", __func__, __LINE__); \ | 541 | do { \ |
542 | pr_err("%s:%-5d: ENTER\n", __func__, __LINE__); \ | ||
544 | } while (0) | 543 | } while (0) |
545 | 544 | ||
546 | #define RET(args...) do { \ | 545 | #define RET(args...) \ |
547 | printk(KERN_ERR "%s:%-5d: RETURN\n", __func__, __LINE__); \ | 546 | do { \ |
548 | return args; } while (0) | 547 | pr_err("%s:%-5d: RETURN\n", __func__, __LINE__); \ |
548 | return args; \ | ||
549 | } while (0) | ||
549 | 550 | ||
550 | #define DBG(fmt, args...) \ | 551 | #define DBG(fmt, args...) \ |
551 | printk(KERN_ERR "%s:%-5d: " fmt, __func__, __LINE__, ## args) | 552 | pr_err("%s:%-5d: " fmt, __func__, __LINE__, ## args) |
552 | #else | 553 | #else |
553 | #define ENTER do { } while (0) | 554 | #define ENTER do { } while (0) |
554 | #define RET(args...) return args | 555 | #define RET(args...) return args |
555 | #define DBG(fmt, args...) do { } while (0) | 556 | #define DBG(fmt, args...) \ |
557 | do { \ | ||
558 | if (0) \ | ||
559 | pr_err(fmt, ##args); \ | ||
560 | } while (0) | ||
556 | #endif | 561 | #endif |
557 | 562 | ||
558 | #endif /* _BDX__H */ | 563 | #endif /* _BDX__H */ |