diff options
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index cc36b75b2b39..5845e334941b 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -3750,7 +3750,12 @@ struct l2_fhdr { | |||
3750 | #define DMA_READ_CHANS 5 | 3750 | #define DMA_READ_CHANS 5 |
3751 | #define DMA_WRITE_CHANS 3 | 3751 | #define DMA_WRITE_CHANS 3 |
3752 | 3752 | ||
3753 | #define BCM_PAGE_BITS 12 | 3753 | /* Use CPU native page size up to 16K for the ring sizes. */ |
3754 | #if (PAGE_SHIFT > 14) | ||
3755 | #define BCM_PAGE_BITS 14 | ||
3756 | #else | ||
3757 | #define BCM_PAGE_BITS PAGE_SHIFT | ||
3758 | #endif | ||
3754 | #define BCM_PAGE_SIZE (1 << BCM_PAGE_BITS) | 3759 | #define BCM_PAGE_SIZE (1 << BCM_PAGE_BITS) |
3755 | 3760 | ||
3756 | #define TX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct tx_bd)) | 3761 | #define TX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct tx_bd)) |
@@ -3773,7 +3778,7 @@ struct l2_fhdr { | |||
3773 | 3778 | ||
3774 | #define RX_RING_IDX(x) ((x) & bp->rx_max_ring_idx) | 3779 | #define RX_RING_IDX(x) ((x) & bp->rx_max_ring_idx) |
3775 | 3780 | ||
3776 | #define RX_RING(x) (((x) & ~MAX_RX_DESC_CNT) >> 8) | 3781 | #define RX_RING(x) (((x) & ~MAX_RX_DESC_CNT) >> (BCM_PAGE_BITS - 4)) |
3777 | #define RX_IDX(x) ((x) & MAX_RX_DESC_CNT) | 3782 | #define RX_IDX(x) ((x) & MAX_RX_DESC_CNT) |
3778 | 3783 | ||
3779 | /* Context size. */ | 3784 | /* Context size. */ |