aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSivakumar Subramani <sivakumar.subramani@neterion.com>2007-09-15 17:14:22 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:09 -0400
commiteaae7f72304f2cd095e68ab39629c0f32815dcf2 (patch)
tree2609437e4eeb69e4eb8084df0300d008ad8eabf3
parent8116f3cf4a2a5a4fa2335e6f32023ac50506698f (diff)
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: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/s2io.c34
-rw-r--r--drivers/net/s2io.h5
2 files changed, 17 insertions, 22 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 182643ff81e5..2ee2a2b4b272 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -1611,7 +1611,7 @@ static int init_nic(struct s2io_nic *nic)
1611 1611
1612 val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | 1612 val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) |
1613 RTI_DATA2_MEM_RX_UFC_B(0x2) ; 1613 RTI_DATA2_MEM_RX_UFC_B(0x2) ;
1614 if (nic->intr_type == MSI_X) 1614 if (nic->config.intr_type == MSI_X)
1615 val64 |= (RTI_DATA2_MEM_RX_UFC_C(0x20) | \ 1615 val64 |= (RTI_DATA2_MEM_RX_UFC_C(0x20) | \
1616 RTI_DATA2_MEM_RX_UFC_D(0x40)); 1616 RTI_DATA2_MEM_RX_UFC_D(0x40));
1617 else 1617 else
@@ -1749,7 +1749,7 @@ static int init_nic(struct s2io_nic *nic)
1749 1749
1750static int s2io_link_fault_indication(struct s2io_nic *nic) 1750static int s2io_link_fault_indication(struct s2io_nic *nic)
1751{ 1751{
1752 if (nic->intr_type != INTA) 1752 if (nic->config.intr_type != INTA)
1753 return MAC_RMAC_ERR_TIMER; 1753 return MAC_RMAC_ERR_TIMER;
1754 if (nic->device_type == XFRAME_II_DEVICE) 1754 if (nic->device_type == XFRAME_II_DEVICE)
1755 return LINK_UP_DOWN_INTERRUPT; 1755 return LINK_UP_DOWN_INTERRUPT;
@@ -3549,7 +3549,7 @@ static int s2io_set_swapper(struct s2io_nic * sp)
3549 SWAPPER_CTRL_RXF_W_FE | 3549 SWAPPER_CTRL_RXF_W_FE |
3550 SWAPPER_CTRL_XMSI_FE | 3550 SWAPPER_CTRL_XMSI_FE |
3551 SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); 3551 SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);
3552 if (sp->intr_type == INTA) 3552 if (sp->config.intr_type == INTA)
3553 val64 |= SWAPPER_CTRL_XMSI_SE; 3553 val64 |= SWAPPER_CTRL_XMSI_SE;
3554 writeq(val64, &bar0->swapper_ctrl); 3554 writeq(val64, &bar0->swapper_ctrl);
3555#else 3555#else
@@ -3572,7 +3572,7 @@ static int s2io_set_swapper(struct s2io_nic * sp)
3572 SWAPPER_CTRL_RXF_W_FE | 3572 SWAPPER_CTRL_RXF_W_FE |
3573 SWAPPER_CTRL_XMSI_FE | 3573 SWAPPER_CTRL_XMSI_FE |
3574 SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); 3574 SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);
3575 if (sp->intr_type == INTA) 3575 if (sp->config.intr_type == INTA)
3576 val64 |= SWAPPER_CTRL_XMSI_SE; 3576 val64 |= SWAPPER_CTRL_XMSI_SE;
3577 writeq(val64, &bar0->swapper_ctrl); 3577 writeq(val64, &bar0->swapper_ctrl);
3578#endif 3578#endif
@@ -3848,7 +3848,7 @@ static int s2io_open(struct net_device *dev)
3848 3848
3849 napi_enable(&sp->napi); 3849 napi_enable(&sp->napi);
3850 3850
3851 if (sp->intr_type == MSI_X) { 3851 if (sp->config.intr_type == MSI_X) {
3852 int ret = s2io_enable_msi_x(sp); 3852 int ret = s2io_enable_msi_x(sp);
3853 3853
3854 if (!ret) { 3854 if (!ret) {
@@ -3880,12 +3880,12 @@ static int s2io_open(struct net_device *dev)
3880 DBG_PRINT(ERR_DBG, 3880 DBG_PRINT(ERR_DBG,
3881 "%s: MSI-X requested but failed to enable\n", 3881 "%s: MSI-X requested but failed to enable\n",
3882 dev->name); 3882 dev->name);
3883 sp->intr_type = INTA; 3883 sp->config.intr_type = INTA;
3884 } 3884 }
3885 } 3885 }
3886 3886
3887 /* NAPI doesn't work well with MSI(X) */ 3887 /* NAPI doesn't work well with MSI(X) */
3888 if (sp->intr_type != INTA) { 3888 if (sp->config.intr_type != INTA) {
3889 if(sp->config.napi) 3889 if(sp->config.napi)
3890 sp->config.napi = 0; 3890 sp->config.napi = 0;
3891 } 3891 }
@@ -3910,7 +3910,7 @@ static int s2io_open(struct net_device *dev)
3910 3910
3911hw_init_failed: 3911hw_init_failed:
3912 napi_disable(&sp->napi); 3912 napi_disable(&sp->napi);
3913 if (sp->intr_type == MSI_X) { 3913 if (sp->config.intr_type == MSI_X) {
3914 if (sp->entries) { 3914 if (sp->entries) {
3915 kfree(sp->entries); 3915 kfree(sp->entries);
3916 sp->mac_control.stats_info->sw_stat.mem_freed 3916 sp->mac_control.stats_info->sw_stat.mem_freed
@@ -6697,18 +6697,18 @@ static int s2io_add_isr(struct s2io_nic * sp)
6697 struct net_device *dev = sp->dev; 6697 struct net_device *dev = sp->dev;
6698 int err = 0; 6698 int err = 0;
6699 6699
6700 if (sp->intr_type == MSI_X) 6700 if (sp->config.intr_type == MSI_X)
6701 ret = s2io_enable_msi_x(sp); 6701 ret = s2io_enable_msi_x(sp);
6702 if (ret) { 6702 if (ret) {
6703 DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name); 6703 DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name);
6704 sp->intr_type = INTA; 6704 sp->config.intr_type = INTA;
6705 } 6705 }
6706 6706
6707 /* Store the values of the MSIX table in the struct s2io_nic structure */ 6707 /* Store the values of the MSIX table in the struct s2io_nic structure */
6708 store_xmsi_data(sp); 6708 store_xmsi_data(sp);
6709 6709
6710 /* After proper initialization of H/W, register ISR */ 6710 /* After proper initialization of H/W, register ISR */
6711 if (sp->intr_type == MSI_X) { 6711 if (sp->config.intr_type == MSI_X) {
6712 int i, msix_tx_cnt=0,msix_rx_cnt=0; 6712 int i, msix_tx_cnt=0,msix_rx_cnt=0;
6713 6713
6714 for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) { 6714 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 printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt); 6760 printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt);
6761 printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt); 6761 printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt);
6762 } 6762 }
6763 if (sp->intr_type == INTA) { 6763 if (sp->config.intr_type == INTA) {
6764 err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED, 6764 err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
6765 sp->name, dev); 6765 sp->name, dev);
6766 if (err) { 6766 if (err) {
@@ -6777,7 +6777,7 @@ static void s2io_rem_isr(struct s2io_nic * sp)
6777 struct net_device *dev = sp->dev; 6777 struct net_device *dev = sp->dev;
6778 struct swStat *stats = &sp->mac_control.stats_info->sw_stat; 6778 struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
6779 6779
6780 if (sp->intr_type == MSI_X) { 6780 if (sp->config.intr_type == MSI_X) {
6781 int i; 6781 int i;
6782 u16 msi_control; 6782 u16 msi_control;
6783 6783
@@ -6950,7 +6950,7 @@ static int s2io_card_up(struct s2io_nic * sp)
6950 6950
6951 /* Add interrupt service routine */ 6951 /* Add interrupt service routine */
6952 if (s2io_add_isr(sp) != 0) { 6952 if (s2io_add_isr(sp) != 0) {
6953 if (sp->intr_type == MSI_X) 6953 if (sp->config.intr_type == MSI_X)
6954 s2io_rem_isr(sp); 6954 s2io_rem_isr(sp);
6955 s2io_reset(sp); 6955 s2io_reset(sp);
6956 free_rx_buffers(sp); 6956 free_rx_buffers(sp);
@@ -6964,7 +6964,7 @@ static int s2io_card_up(struct s2io_nic * sp)
6964 6964
6965 /* Enable select interrupts */ 6965 /* Enable select interrupts */
6966 en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS); 6966 en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS);
6967 if (sp->intr_type != INTA) 6967 if (sp->config.intr_type != INTA)
6968 en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS); 6968 en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS);
6969 else { 6969 else {
6970 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; 6970 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 if (rx_ring_mode == 2) 7491 if (rx_ring_mode == 2)
7492 sp->rxd_mode = RXD_MODE_3B; 7492 sp->rxd_mode = RXD_MODE_3B;
7493 7493
7494 sp->intr_type = dev_intr_type; 7494 sp->config.intr_type = dev_intr_type;
7495 7495
7496 if ((pdev->device == PCI_DEVICE_ID_HERC_WIN) || 7496 if ((pdev->device == PCI_DEVICE_ID_HERC_WIN) ||
7497 (pdev->device == PCI_DEVICE_ID_HERC_UNI)) 7497 (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 7770
7771 if (napi) 7771 if (napi)
7772 DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name); 7772 DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name);
7773 switch(sp->intr_type) { 7773 switch(sp->config.intr_type) {
7774 case INTA: 7774 case INTA:
7775 DBG_PRINT(ERR_DBG, "%s: Interrupt type INTA\n", dev->name); 7775 DBG_PRINT(ERR_DBG, "%s: Interrupt type INTA\n", dev->name);
7776 break; 7776 break;
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 1e2e72d6aad2..c01abc1d89af 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -906,11 +906,6 @@ struct s2io_nic {
906 unsigned long sending_both; 906 unsigned long sending_both;
907 u8 lro; 907 u8 lro;
908 u16 lro_max_aggr_per_sess; 908 u16 lro_max_aggr_per_sess;
909
910#define INTA 0
911#define MSI_X 2
912 u8 intr_type;
913
914 spinlock_t rx_lock; 909 spinlock_t rx_lock;
915 atomic_t isr_cnt; 910 atomic_t isr_cnt;
916 u64 general_int_mask; 911 u64 general_int_mask;