Commit eaae7f72 authored by Sivakumar Subramani's avatar Sivakumar Subramani Committed by David S. Miller

S2io: Cleanup - removed unused variable intr_type

- Removed the unused variable, intr_type, in device private structure.

[ Resolve conflicts with napi_struct changes... -DaveM ]
Signed-off-by: default avatarSivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: default avatarSantosh Rastapur <santosh.rastapur@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 8116f3cf
...@@ -1611,7 +1611,7 @@ static int init_nic(struct s2io_nic *nic) ...@@ -1611,7 +1611,7 @@ static int init_nic(struct s2io_nic *nic)
val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) |
RTI_DATA2_MEM_RX_UFC_B(0x2) ; RTI_DATA2_MEM_RX_UFC_B(0x2) ;
if (nic->intr_type == MSI_X) if (nic->config.intr_type == MSI_X)
val64 |= (RTI_DATA2_MEM_RX_UFC_C(0x20) | \ val64 |= (RTI_DATA2_MEM_RX_UFC_C(0x20) | \
RTI_DATA2_MEM_RX_UFC_D(0x40)); RTI_DATA2_MEM_RX_UFC_D(0x40));
else else
...@@ -1749,7 +1749,7 @@ static int init_nic(struct s2io_nic *nic) ...@@ -1749,7 +1749,7 @@ static int init_nic(struct s2io_nic *nic)
static int s2io_link_fault_indication(struct s2io_nic *nic) static int s2io_link_fault_indication(struct s2io_nic *nic)
{ {
if (nic->intr_type != INTA) if (nic->config.intr_type != INTA)
return MAC_RMAC_ERR_TIMER; return MAC_RMAC_ERR_TIMER;
if (nic->device_type == XFRAME_II_DEVICE) if (nic->device_type == XFRAME_II_DEVICE)
return LINK_UP_DOWN_INTERRUPT; return LINK_UP_DOWN_INTERRUPT;
...@@ -3549,7 +3549,7 @@ static int s2io_set_swapper(struct s2io_nic * sp) ...@@ -3549,7 +3549,7 @@ static int s2io_set_swapper(struct s2io_nic * sp)
SWAPPER_CTRL_RXF_W_FE | SWAPPER_CTRL_RXF_W_FE |
SWAPPER_CTRL_XMSI_FE | SWAPPER_CTRL_XMSI_FE |
SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);
if (sp->intr_type == INTA) if (sp->config.intr_type == INTA)
val64 |= SWAPPER_CTRL_XMSI_SE; val64 |= SWAPPER_CTRL_XMSI_SE;
writeq(val64, &bar0->swapper_ctrl); writeq(val64, &bar0->swapper_ctrl);
#else #else
...@@ -3572,7 +3572,7 @@ static int s2io_set_swapper(struct s2io_nic * sp) ...@@ -3572,7 +3572,7 @@ static int s2io_set_swapper(struct s2io_nic * sp)
SWAPPER_CTRL_RXF_W_FE | SWAPPER_CTRL_RXF_W_FE |
SWAPPER_CTRL_XMSI_FE | SWAPPER_CTRL_XMSI_FE |
SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);
if (sp->intr_type == INTA) if (sp->config.intr_type == INTA)
val64 |= SWAPPER_CTRL_XMSI_SE; val64 |= SWAPPER_CTRL_XMSI_SE;
writeq(val64, &bar0->swapper_ctrl); writeq(val64, &bar0->swapper_ctrl);
#endif #endif
...@@ -3848,7 +3848,7 @@ static int s2io_open(struct net_device *dev) ...@@ -3848,7 +3848,7 @@ static int s2io_open(struct net_device *dev)
napi_enable(&sp->napi); napi_enable(&sp->napi);
if (sp->intr_type == MSI_X) { if (sp->config.intr_type == MSI_X) {
int ret = s2io_enable_msi_x(sp); int ret = s2io_enable_msi_x(sp);
if (!ret) { if (!ret) {
...@@ -3880,12 +3880,12 @@ static int s2io_open(struct net_device *dev) ...@@ -3880,12 +3880,12 @@ static int s2io_open(struct net_device *dev)
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"%s: MSI-X requested but failed to enable\n", "%s: MSI-X requested but failed to enable\n",
dev->name); dev->name);
sp->intr_type = INTA; sp->config.intr_type = INTA;
} }
} }
/* NAPI doesn't work well with MSI(X) */ /* NAPI doesn't work well with MSI(X) */
if (sp->intr_type != INTA) { if (sp->config.intr_type != INTA) {
if(sp->config.napi) if(sp->config.napi)
sp->config.napi = 0; sp->config.napi = 0;
} }
...@@ -3910,7 +3910,7 @@ static int s2io_open(struct net_device *dev) ...@@ -3910,7 +3910,7 @@ static int s2io_open(struct net_device *dev)
hw_init_failed: hw_init_failed:
napi_disable(&sp->napi); napi_disable(&sp->napi);
if (sp->intr_type == MSI_X) { if (sp->config.intr_type == MSI_X) {
if (sp->entries) { if (sp->entries) {
kfree(sp->entries); kfree(sp->entries);
sp->mac_control.stats_info->sw_stat.mem_freed sp->mac_control.stats_info->sw_stat.mem_freed
...@@ -6697,18 +6697,18 @@ static int s2io_add_isr(struct s2io_nic * sp) ...@@ -6697,18 +6697,18 @@ static int s2io_add_isr(struct s2io_nic * sp)
struct net_device *dev = sp->dev; struct net_device *dev = sp->dev;
int err = 0; int err = 0;
if (sp->intr_type == MSI_X) if (sp->config.intr_type == MSI_X)
ret = s2io_enable_msi_x(sp); ret = s2io_enable_msi_x(sp);
if (ret) { if (ret) {
DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name); DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name);
sp->intr_type = INTA; sp->config.intr_type = INTA;
} }
/* Store the values of the MSIX table in the struct s2io_nic structure */ /* Store the values of the MSIX table in the struct s2io_nic structure */
store_xmsi_data(sp); store_xmsi_data(sp);
/* After proper initialization of H/W, register ISR */ /* After proper initialization of H/W, register ISR */
if (sp->intr_type == MSI_X) { if (sp->config.intr_type == MSI_X) {
int i, msix_tx_cnt=0,msix_rx_cnt=0; int i, msix_tx_cnt=0,msix_rx_cnt=0;
for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) { for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) {
...@@ -6760,7 +6760,7 @@ static int s2io_add_isr(struct s2io_nic * sp) ...@@ -6760,7 +6760,7 @@ static int s2io_add_isr(struct s2io_nic * sp)
printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt); printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt);
printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt); printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt);
} }
if (sp->intr_type == INTA) { if (sp->config.intr_type == INTA) {
err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED, err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
sp->name, dev); sp->name, dev);
if (err) { if (err) {
...@@ -6777,7 +6777,7 @@ static void s2io_rem_isr(struct s2io_nic * sp) ...@@ -6777,7 +6777,7 @@ static void s2io_rem_isr(struct s2io_nic * sp)
struct net_device *dev = sp->dev; struct net_device *dev = sp->dev;
struct swStat *stats = &sp->mac_control.stats_info->sw_stat; struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
if (sp->intr_type == MSI_X) { if (sp->config.intr_type == MSI_X) {
int i; int i;
u16 msi_control; u16 msi_control;
...@@ -6950,7 +6950,7 @@ static int s2io_card_up(struct s2io_nic * sp) ...@@ -6950,7 +6950,7 @@ static int s2io_card_up(struct s2io_nic * sp)
/* Add interrupt service routine */ /* Add interrupt service routine */
if (s2io_add_isr(sp) != 0) { if (s2io_add_isr(sp) != 0) {
if (sp->intr_type == MSI_X) if (sp->config.intr_type == MSI_X)
s2io_rem_isr(sp); s2io_rem_isr(sp);
s2io_reset(sp); s2io_reset(sp);
free_rx_buffers(sp); free_rx_buffers(sp);
...@@ -6964,7 +6964,7 @@ static int s2io_card_up(struct s2io_nic * sp) ...@@ -6964,7 +6964,7 @@ static int s2io_card_up(struct s2io_nic * sp)
/* Enable select interrupts */ /* Enable select interrupts */
en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS); en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS);
if (sp->intr_type != INTA) if (sp->config.intr_type != INTA)
en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS); en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS);
else { else {
interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
...@@ -7491,7 +7491,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ...@@ -7491,7 +7491,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
if (rx_ring_mode == 2) if (rx_ring_mode == 2)
sp->rxd_mode = RXD_MODE_3B; sp->rxd_mode = RXD_MODE_3B;
sp->intr_type = dev_intr_type; sp->config.intr_type = dev_intr_type;
if ((pdev->device == PCI_DEVICE_ID_HERC_WIN) || if ((pdev->device == PCI_DEVICE_ID_HERC_WIN) ||
(pdev->device == PCI_DEVICE_ID_HERC_UNI)) (pdev->device == PCI_DEVICE_ID_HERC_UNI))
...@@ -7770,7 +7770,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ...@@ -7770,7 +7770,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
if (napi) if (napi)
DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name); DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name);
switch(sp->intr_type) { switch(sp->config.intr_type) {
case INTA: case INTA:
DBG_PRINT(ERR_DBG, "%s: Interrupt type INTA\n", dev->name); DBG_PRINT(ERR_DBG, "%s: Interrupt type INTA\n", dev->name);
break; break;
......
...@@ -906,11 +906,6 @@ struct s2io_nic { ...@@ -906,11 +906,6 @@ struct s2io_nic {
unsigned long sending_both; unsigned long sending_both;
u8 lro; u8 lro;
u16 lro_max_aggr_per_sess; u16 lro_max_aggr_per_sess;
#define INTA 0
#define MSI_X 2
u8 intr_type;
spinlock_t rx_lock; spinlock_t rx_lock;
atomic_t isr_cnt; atomic_t isr_cnt;
u64 general_int_mask; u64 general_int_mask;
......
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