Commit 2fda096d authored by Surjit Reang's avatar Surjit Reang Committed by David S. Miller

S2io: Fixes to enable multiple transmit fifo support

Fixes to enable multiple transmit fifos (upto a maximum of eight).
  - Moved single tx_lock from struct s2io_nic to struct fifo_info.
  - Moved single ufo_in_band_v structure from struct s2io_nic to struct
    fifo_info.
  - Assign the respective interrupt number for the transmitting fifo in the
    transmit descriptor (TXD).
- Added boundary checks for number of FIFOs enabled and FIFO length.
Signed-off-by: default avatarSurjit Reang <surjit.reang@neterion.com>
Signed-off-by: default avatarSreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: default avatarRamkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc4b6b52
This diff is collapsed.
...@@ -360,6 +360,8 @@ struct stat_block { ...@@ -360,6 +360,8 @@ struct stat_block {
#define MAX_TX_FIFOS 8 #define MAX_TX_FIFOS 8
#define MAX_RX_RINGS 8 #define MAX_RX_RINGS 8
#define FIFO_DEFAULT_NUM 1
#define MAX_RX_DESC_1 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 127 ) #define MAX_RX_DESC_1 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 127 )
#define MAX_RX_DESC_2 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 ) #define MAX_RX_DESC_2 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 )
#define MAX_RX_DESC_3 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 ) #define MAX_RX_DESC_3 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 )
...@@ -719,8 +721,14 @@ struct fifo_info { ...@@ -719,8 +721,14 @@ struct fifo_info {
*/ */
struct tx_curr_get_info tx_curr_get_info; struct tx_curr_get_info tx_curr_get_info;
/* Per fifo lock */
spinlock_t tx_lock;
/* Per fifo UFO in band structure */
u64 *ufo_in_band_v;
struct s2io_nic *nic; struct s2io_nic *nic;
}; } ____cacheline_aligned;
/* Information related to the Tx and Rx FIFOs and Rings of Xena /* Information related to the Tx and Rx FIFOs and Rings of Xena
* is maintained in this structure. * is maintained in this structure.
...@@ -848,7 +856,6 @@ struct s2io_nic { ...@@ -848,7 +856,6 @@ struct s2io_nic {
atomic_t rx_bufs_left[MAX_RX_RINGS]; atomic_t rx_bufs_left[MAX_RX_RINGS];
spinlock_t tx_lock;
spinlock_t put_lock; spinlock_t put_lock;
#define PROMISC 1 #define PROMISC 1
...@@ -915,7 +922,6 @@ struct s2io_nic { ...@@ -915,7 +922,6 @@ struct s2io_nic {
volatile unsigned long state; volatile unsigned long state;
spinlock_t rx_lock; spinlock_t rx_lock;
u64 general_int_mask; u64 general_int_mask;
u64 *ufo_in_band_v;
#define VPD_STRING_LEN 80 #define VPD_STRING_LEN 80
u8 product_name[VPD_STRING_LEN]; u8 product_name[VPD_STRING_LEN];
u8 serial_num[VPD_STRING_LEN]; u8 serial_num[VPD_STRING_LEN];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment