aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c183
1 files changed, 78 insertions, 105 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index ae7b697456b4..9dae40ccf048 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -86,7 +86,7 @@
86#include "s2io.h" 86#include "s2io.h"
87#include "s2io-regs.h" 87#include "s2io-regs.h"
88 88
89#define DRV_VERSION "2.0.26.24" 89#define DRV_VERSION "2.0.26.25"
90 90
91/* S2io Driver name & version. */ 91/* S2io Driver name & version. */
92static char s2io_driver_name[] = "Neterion"; 92static char s2io_driver_name[] = "Neterion";
@@ -545,91 +545,63 @@ static struct pci_driver s2io_driver = {
545/* netqueue manipulation helper functions */ 545/* netqueue manipulation helper functions */
546static inline void s2io_stop_all_tx_queue(struct s2io_nic *sp) 546static inline void s2io_stop_all_tx_queue(struct s2io_nic *sp)
547{ 547{
548 int i; 548 if (!sp->config.multiq) {
549#ifdef CONFIG_NETDEVICES_MULTIQUEUE 549 int i;
550 if (sp->config.multiq) { 550
551 for (i = 0; i < sp->config.tx_fifo_num; i++)
552 netif_stop_subqueue(sp->dev, i);
553 } else
554#endif
555 {
556 for (i = 0; i < sp->config.tx_fifo_num; i++) 551 for (i = 0; i < sp->config.tx_fifo_num; i++)
557 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_STOP; 552 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_STOP;
558 netif_stop_queue(sp->dev);
559 } 553 }
554 netif_tx_stop_all_queues(sp->dev);
560} 555}
561 556
562static inline void s2io_stop_tx_queue(struct s2io_nic *sp, int fifo_no) 557static inline void s2io_stop_tx_queue(struct s2io_nic *sp, int fifo_no)
563{ 558{
564#ifdef CONFIG_NETDEVICES_MULTIQUEUE 559 if (!sp->config.multiq)
565 if (sp->config.multiq)
566 netif_stop_subqueue(sp->dev, fifo_no);
567 else
568#endif
569 {
570 sp->mac_control.fifos[fifo_no].queue_state = 560 sp->mac_control.fifos[fifo_no].queue_state =
571 FIFO_QUEUE_STOP; 561 FIFO_QUEUE_STOP;
572 netif_stop_queue(sp->dev); 562
573 } 563 netif_tx_stop_all_queues(sp->dev);
574} 564}
575 565
576static inline void s2io_start_all_tx_queue(struct s2io_nic *sp) 566static inline void s2io_start_all_tx_queue(struct s2io_nic *sp)
577{ 567{
578 int i; 568 if (!sp->config.multiq) {
579#ifdef CONFIG_NETDEVICES_MULTIQUEUE 569 int i;
580 if (sp->config.multiq) { 570
581 for (i = 0; i < sp->config.tx_fifo_num; i++)
582 netif_start_subqueue(sp->dev, i);
583 } else
584#endif
585 {
586 for (i = 0; i < sp->config.tx_fifo_num; i++) 571 for (i = 0; i < sp->config.tx_fifo_num; i++)
587 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; 572 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START;
588 netif_start_queue(sp->dev);
589 } 573 }
574 netif_tx_start_all_queues(sp->dev);
590} 575}
591 576
592static inline void s2io_start_tx_queue(struct s2io_nic *sp, int fifo_no) 577static inline void s2io_start_tx_queue(struct s2io_nic *sp, int fifo_no)
593{ 578{
594#ifdef CONFIG_NETDEVICES_MULTIQUEUE 579 if (!sp->config.multiq)
595 if (sp->config.multiq)
596 netif_start_subqueue(sp->dev, fifo_no);
597 else
598#endif
599 {
600 sp->mac_control.fifos[fifo_no].queue_state = 580 sp->mac_control.fifos[fifo_no].queue_state =
601 FIFO_QUEUE_START; 581 FIFO_QUEUE_START;
602 netif_start_queue(sp->dev); 582
603 } 583 netif_tx_start_all_queues(sp->dev);
604} 584}
605 585
606static inline void s2io_wake_all_tx_queue(struct s2io_nic *sp) 586static inline void s2io_wake_all_tx_queue(struct s2io_nic *sp)
607{ 587{
608 int i; 588 if (!sp->config.multiq) {
609#ifdef CONFIG_NETDEVICES_MULTIQUEUE 589 int i;
610 if (sp->config.multiq) { 590
611 for (i = 0; i < sp->config.tx_fifo_num; i++)
612 netif_wake_subqueue(sp->dev, i);
613 } else
614#endif
615 {
616 for (i = 0; i < sp->config.tx_fifo_num; i++) 591 for (i = 0; i < sp->config.tx_fifo_num; i++)
617 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; 592 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START;
618 netif_wake_queue(sp->dev);
619 } 593 }
594 netif_tx_wake_all_queues(sp->dev);
620} 595}
621 596
622static inline void s2io_wake_tx_queue( 597static inline void s2io_wake_tx_queue(
623 struct fifo_info *fifo, int cnt, u8 multiq) 598 struct fifo_info *fifo, int cnt, u8 multiq)
624{ 599{
625 600
626#ifdef CONFIG_NETDEVICES_MULTIQUEUE
627 if (multiq) { 601 if (multiq) {
628 if (cnt && __netif_subqueue_stopped(fifo->dev, fifo->fifo_no)) 602 if (cnt && __netif_subqueue_stopped(fifo->dev, fifo->fifo_no))
629 netif_wake_subqueue(fifo->dev, fifo->fifo_no); 603 netif_wake_subqueue(fifo->dev, fifo->fifo_no);
630 } else 604 } else if (cnt && (fifo->queue_state == FIFO_QUEUE_STOP)) {
631#endif
632 if (cnt && (fifo->queue_state == FIFO_QUEUE_STOP)) {
633 if (netif_queue_stopped(fifo->dev)) { 605 if (netif_queue_stopped(fifo->dev)) {
634 fifo->queue_state = FIFO_QUEUE_START; 606 fifo->queue_state = FIFO_QUEUE_START;
635 netif_wake_queue(fifo->dev); 607 netif_wake_queue(fifo->dev);
@@ -1909,8 +1881,6 @@ static int init_nic(struct s2io_nic *nic)
1909 1881
1910static int s2io_link_fault_indication(struct s2io_nic *nic) 1882static int s2io_link_fault_indication(struct s2io_nic *nic)
1911{ 1883{
1912 if (nic->config.intr_type != INTA)
1913 return MAC_RMAC_ERR_TIMER;
1914 if (nic->device_type == XFRAME_II_DEVICE) 1884 if (nic->device_type == XFRAME_II_DEVICE)
1915 return LINK_UP_DOWN_INTERRUPT; 1885 return LINK_UP_DOWN_INTERRUPT;
1916 else 1886 else
@@ -1943,7 +1913,9 @@ static void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)
1943{ 1913{
1944 struct XENA_dev_config __iomem *bar0 = nic->bar0; 1914 struct XENA_dev_config __iomem *bar0 = nic->bar0;
1945 register u64 gen_int_mask = 0; 1915 register u64 gen_int_mask = 0;
1916 u64 interruptible;
1946 1917
1918 writeq(DISABLE_ALL_INTRS, &bar0->general_int_mask);
1947 if (mask & TX_DMA_INTR) { 1919 if (mask & TX_DMA_INTR) {
1948 1920
1949 gen_int_mask |= TXDMA_INT_M; 1921 gen_int_mask |= TXDMA_INT_M;
@@ -2033,10 +2005,12 @@ static void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)
2033 gen_int_mask |= RXMAC_INT_M; 2005 gen_int_mask |= RXMAC_INT_M;
2034 do_s2io_write_bits(MAC_INT_STATUS_RMAC_INT, flag, 2006 do_s2io_write_bits(MAC_INT_STATUS_RMAC_INT, flag,
2035 &bar0->mac_int_mask); 2007 &bar0->mac_int_mask);
2036 do_s2io_write_bits(RMAC_RX_BUFF_OVRN | RMAC_RX_SM_ERR | 2008 interruptible = RMAC_RX_BUFF_OVRN | RMAC_RX_SM_ERR |
2037 RMAC_UNUSED_INT | RMAC_SINGLE_ECC_ERR | 2009 RMAC_UNUSED_INT | RMAC_SINGLE_ECC_ERR |
2038 RMAC_DOUBLE_ECC_ERR | 2010 RMAC_DOUBLE_ECC_ERR;
2039 RMAC_LINK_STATE_CHANGE_INT, 2011 if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER)
2012 interruptible |= RMAC_LINK_STATE_CHANGE_INT;
2013 do_s2io_write_bits(interruptible,
2040 flag, &bar0->mac_rmac_err_mask); 2014 flag, &bar0->mac_rmac_err_mask);
2041 } 2015 }
2042 2016
@@ -2519,6 +2493,9 @@ static void stop_nic(struct s2io_nic *nic)
2519/** 2493/**
2520 * fill_rx_buffers - Allocates the Rx side skbs 2494 * fill_rx_buffers - Allocates the Rx side skbs
2521 * @ring_info: per ring structure 2495 * @ring_info: per ring structure
2496 * @from_card_up: If this is true, we will map the buffer to get
2497 * the dma address for buf0 and buf1 to give it to the card.
2498 * Else we will sync the already mapped buffer to give it to the card.
2522 * Description: 2499 * Description:
2523 * The function allocates Rx side skbs and puts the physical 2500 * The function allocates Rx side skbs and puts the physical
2524 * address of these buffers into the RxD buffer pointers, so that the NIC 2501 * address of these buffers into the RxD buffer pointers, so that the NIC
@@ -2536,7 +2513,7 @@ static void stop_nic(struct s2io_nic *nic)
2536 * SUCCESS on success or an appropriate -ve value on failure. 2513 * SUCCESS on success or an appropriate -ve value on failure.
2537 */ 2514 */
2538 2515
2539static int fill_rx_buffers(struct ring_info *ring) 2516static int fill_rx_buffers(struct ring_info *ring, int from_card_up)
2540{ 2517{
2541 struct sk_buff *skb; 2518 struct sk_buff *skb;
2542 struct RxD_t *rxdp; 2519 struct RxD_t *rxdp;
@@ -2566,7 +2543,7 @@ static int fill_rx_buffers(struct ring_info *ring)
2566 if (block_no) 2543 if (block_no)
2567 rxd_index += (block_no * ring->rxd_count); 2544 rxd_index += (block_no * ring->rxd_count);
2568 2545
2569 if ((block_no == block_no1) && 2546 if ((block_no == block_no1) &&
2570 (off == ring->rx_curr_get_info.offset) && 2547 (off == ring->rx_curr_get_info.offset) &&
2571 (rxdp->Host_Control)) { 2548 (rxdp->Host_Control)) {
2572 DBG_PRINT(INTR_DBG, "%s: Get and Put", 2549 DBG_PRINT(INTR_DBG, "%s: Get and Put",
@@ -2612,7 +2589,7 @@ static int fill_rx_buffers(struct ring_info *ring)
2612 first_rxdp->Control_1 |= RXD_OWN_XENA; 2589 first_rxdp->Control_1 |= RXD_OWN_XENA;
2613 } 2590 }
2614 stats->mem_alloc_fail_cnt++; 2591 stats->mem_alloc_fail_cnt++;
2615 2592
2616 return -ENOMEM ; 2593 return -ENOMEM ;
2617 } 2594 }
2618 stats->mem_allocated += skb->truesize; 2595 stats->mem_allocated += skb->truesize;
@@ -2655,17 +2632,16 @@ static int fill_rx_buffers(struct ring_info *ring)
2655 skb->data = (void *) (unsigned long)tmp; 2632 skb->data = (void *) (unsigned long)tmp;
2656 skb_reset_tail_pointer(skb); 2633 skb_reset_tail_pointer(skb);
2657 2634
2658 /* AK: check is wrong. 0 can be valid dma address */ 2635 if (from_card_up) {
2659 if (!(rxdp3->Buffer0_ptr))
2660 rxdp3->Buffer0_ptr = 2636 rxdp3->Buffer0_ptr =
2661 pci_map_single(ring->pdev, ba->ba_0, 2637 pci_map_single(ring->pdev, ba->ba_0,
2662 BUF0_LEN, PCI_DMA_FROMDEVICE); 2638 BUF0_LEN, PCI_DMA_FROMDEVICE);
2663 else 2639 if (pci_dma_mapping_error(rxdp3->Buffer0_ptr))
2640 goto pci_map_failed;
2641 } else
2664 pci_dma_sync_single_for_device(ring->pdev, 2642 pci_dma_sync_single_for_device(ring->pdev,
2665 (dma_addr_t) rxdp3->Buffer0_ptr, 2643 (dma_addr_t) rxdp3->Buffer0_ptr,
2666 BUF0_LEN, PCI_DMA_FROMDEVICE); 2644 BUF0_LEN, PCI_DMA_FROMDEVICE);
2667 if (pci_dma_mapping_error(rxdp3->Buffer0_ptr))
2668 goto pci_map_failed;
2669 2645
2670 rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN); 2646 rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN);
2671 if (ring->rxd_mode == RXD_MODE_3B) { 2647 if (ring->rxd_mode == RXD_MODE_3B) {
@@ -2682,21 +2658,22 @@ static int fill_rx_buffers(struct ring_info *ring)
2682 if (pci_dma_mapping_error(rxdp3->Buffer2_ptr)) 2658 if (pci_dma_mapping_error(rxdp3->Buffer2_ptr))
2683 goto pci_map_failed; 2659 goto pci_map_failed;
2684 2660
2685 /* AK: check is wrong */ 2661 if (from_card_up) {
2686 if (!rxdp3->Buffer1_ptr)
2687 rxdp3->Buffer1_ptr = 2662 rxdp3->Buffer1_ptr =
2688 pci_map_single(ring->pdev, 2663 pci_map_single(ring->pdev,
2689 ba->ba_1, BUF1_LEN, 2664 ba->ba_1, BUF1_LEN,
2690 PCI_DMA_FROMDEVICE); 2665 PCI_DMA_FROMDEVICE);
2691 2666
2692 if (pci_dma_mapping_error(rxdp3->Buffer1_ptr)) { 2667 if (pci_dma_mapping_error
2693 pci_unmap_single 2668 (rxdp3->Buffer1_ptr)) {
2694 (ring->pdev, 2669 pci_unmap_single
2695 (dma_addr_t)(unsigned long) 2670 (ring->pdev,
2696 skb->data, 2671 (dma_addr_t)(unsigned long)
2697 ring->mtu + 4, 2672 skb->data,
2698 PCI_DMA_FROMDEVICE); 2673 ring->mtu + 4,
2699 goto pci_map_failed; 2674 PCI_DMA_FROMDEVICE);
2675 goto pci_map_failed;
2676 }
2700 } 2677 }
2701 rxdp->Control_2 |= SET_BUFFER1_SIZE_3(1); 2678 rxdp->Control_2 |= SET_BUFFER1_SIZE_3(1);
2702 rxdp->Control_2 |= SET_BUFFER2_SIZE_3 2679 rxdp->Control_2 |= SET_BUFFER2_SIZE_3
@@ -2831,7 +2808,7 @@ static void free_rx_buffers(struct s2io_nic *sp)
2831 2808
2832static int s2io_chk_rx_buffers(struct ring_info *ring) 2809static int s2io_chk_rx_buffers(struct ring_info *ring)
2833{ 2810{
2834 if (fill_rx_buffers(ring) == -ENOMEM) { 2811 if (fill_rx_buffers(ring, 0) == -ENOMEM) {
2835 DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name); 2812 DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name);
2836 DBG_PRINT(INFO_DBG, " in Rx Intr!!\n"); 2813 DBG_PRINT(INFO_DBG, " in Rx Intr!!\n");
2837 } 2814 }
@@ -2962,7 +2939,7 @@ static void s2io_netpoll(struct net_device *dev)
2962 rx_intr_handler(&mac_control->rings[i], 0); 2939 rx_intr_handler(&mac_control->rings[i], 0);
2963 2940
2964 for (i = 0; i < config->rx_ring_num; i++) { 2941 for (i = 0; i < config->rx_ring_num; i++) {
2965 if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { 2942 if (fill_rx_buffers(&mac_control->rings[i], 0) == -ENOMEM) {
2966 DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name); 2943 DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name);
2967 DBG_PRINT(INFO_DBG, " in Rx Netpoll!!\n"); 2944 DBG_PRINT(INFO_DBG, " in Rx Netpoll!!\n");
2968 break; 2945 break;
@@ -4189,15 +4166,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4189 return NETDEV_TX_LOCKED; 4166 return NETDEV_TX_LOCKED;
4190 } 4167 }
4191 4168
4192#ifdef CONFIG_NETDEVICES_MULTIQUEUE
4193 if (sp->config.multiq) { 4169 if (sp->config.multiq) {
4194 if (__netif_subqueue_stopped(dev, fifo->fifo_no)) { 4170 if (__netif_subqueue_stopped(dev, fifo->fifo_no)) {
4195 spin_unlock_irqrestore(&fifo->tx_lock, flags); 4171 spin_unlock_irqrestore(&fifo->tx_lock, flags);
4196 return NETDEV_TX_BUSY; 4172 return NETDEV_TX_BUSY;
4197 } 4173 }
4198 } else 4174 } else if (unlikely(fifo->queue_state == FIFO_QUEUE_STOP)) {
4199#endif
4200 if (unlikely(fifo->queue_state == FIFO_QUEUE_STOP)) {
4201 if (netif_queue_stopped(dev)) { 4175 if (netif_queue_stopped(dev)) {
4202 spin_unlock_irqrestore(&fifo->tx_lock, flags); 4176 spin_unlock_irqrestore(&fifo->tx_lock, flags);
4203 return NETDEV_TX_BUSY; 4177 return NETDEV_TX_BUSY;
@@ -4394,18 +4368,24 @@ static irqreturn_t s2io_msix_fifo_handle(int irq, void *dev_id)
4394 /* Nothing much can be done. Get out */ 4368 /* Nothing much can be done. Get out */
4395 return IRQ_HANDLED; 4369 return IRQ_HANDLED;
4396 4370
4397 writeq(S2IO_MINUS_ONE, &bar0->general_int_mask); 4371 if (reason & (GEN_INTR_TXPIC | GEN_INTR_TXTRAFFIC)) {
4372 writeq(S2IO_MINUS_ONE, &bar0->general_int_mask);
4398 4373
4399 if (reason & GEN_INTR_TXTRAFFIC) 4374 if (reason & GEN_INTR_TXPIC)
4400 writeq(S2IO_MINUS_ONE, &bar0->tx_traffic_int); 4375 s2io_txpic_intr_handle(sp);
4401 4376
4402 for (i = 0; i < config->tx_fifo_num; i++) 4377 if (reason & GEN_INTR_TXTRAFFIC)
4403 tx_intr_handler(&fifos[i]); 4378 writeq(S2IO_MINUS_ONE, &bar0->tx_traffic_int);
4404 4379
4405 writeq(sp->general_int_mask, &bar0->general_int_mask); 4380 for (i = 0; i < config->tx_fifo_num; i++)
4406 readl(&bar0->general_int_status); 4381 tx_intr_handler(&fifos[i]);
4407 4382
4408 return IRQ_HANDLED; 4383 writeq(sp->general_int_mask, &bar0->general_int_mask);
4384 readl(&bar0->general_int_status);
4385 return IRQ_HANDLED;
4386 }
4387 /* The interrupt was not raised by us */
4388 return IRQ_NONE;
4409} 4389}
4410 4390
4411static void s2io_txpic_intr_handle(struct s2io_nic *sp) 4391static void s2io_txpic_intr_handle(struct s2io_nic *sp)
@@ -6988,7 +6968,7 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp)
6988 &skb,(u64 *)&temp0_64, 6968 &skb,(u64 *)&temp0_64,
6989 (u64 *)&temp1_64, 6969 (u64 *)&temp1_64,
6990 (u64 *)&temp2_64, 6970 (u64 *)&temp2_64,
6991 size) == ENOMEM) { 6971 size) == -ENOMEM) {
6992 return 0; 6972 return 0;
6993 } 6973 }
6994 6974
@@ -7133,6 +7113,9 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
7133 7113
7134 s2io_rem_isr(sp); 7114 s2io_rem_isr(sp);
7135 7115
7116 /* stop the tx queue, indicate link down */
7117 s2io_link(sp, LINK_DOWN);
7118
7136 /* Check if the device is Quiescent and then Reset the NIC */ 7119 /* Check if the device is Quiescent and then Reset the NIC */
7137 while(do_io) { 7120 while(do_io) {
7138 /* As per the HW requirement we need to replenish the 7121 /* As per the HW requirement we need to replenish the
@@ -7204,7 +7187,7 @@ static int s2io_card_up(struct s2io_nic * sp)
7204 7187
7205 for (i = 0; i < config->rx_ring_num; i++) { 7188 for (i = 0; i < config->rx_ring_num; i++) {
7206 mac_control->rings[i].mtu = dev->mtu; 7189 mac_control->rings[i].mtu = dev->mtu;
7207 ret = fill_rx_buffers(&mac_control->rings[i]); 7190 ret = fill_rx_buffers(&mac_control->rings[i], 1);
7208 if (ret) { 7191 if (ret) {
7209 DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", 7192 DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n",
7210 dev->name); 7193 dev->name);
@@ -7265,17 +7248,19 @@ static int s2io_card_up(struct s2io_nic * sp)
7265 7248
7266 S2IO_TIMER_CONF(sp->alarm_timer, s2io_alarm_handle, sp, (HZ/2)); 7249 S2IO_TIMER_CONF(sp->alarm_timer, s2io_alarm_handle, sp, (HZ/2));
7267 7250
7251 set_bit(__S2IO_STATE_CARD_UP, &sp->state);
7252
7268 /* Enable select interrupts */ 7253 /* Enable select interrupts */
7269 en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS); 7254 en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS);
7270 if (sp->config.intr_type != INTA) 7255 if (sp->config.intr_type != INTA) {
7271 en_dis_able_nic_intrs(sp, TX_TRAFFIC_INTR, ENABLE_INTRS); 7256 interruptible = TX_TRAFFIC_INTR | TX_PIC_INTR;
7272 else { 7257 en_dis_able_nic_intrs(sp, interruptible, ENABLE_INTRS);
7258 } else {
7273 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; 7259 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
7274 interruptible |= TX_PIC_INTR; 7260 interruptible |= TX_PIC_INTR;
7275 en_dis_able_nic_intrs(sp, interruptible, ENABLE_INTRS); 7261 en_dis_able_nic_intrs(sp, interruptible, ENABLE_INTRS);
7276 } 7262 }
7277 7263
7278 set_bit(__S2IO_STATE_CARD_UP, &sp->state);
7279 return 0; 7264 return 0;
7280} 7265}
7281 7266
@@ -7633,12 +7618,6 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
7633 DBG_PRINT(ERR_DBG, "tx fifos\n"); 7618 DBG_PRINT(ERR_DBG, "tx fifos\n");
7634 } 7619 }
7635 7620
7636#ifndef CONFIG_NETDEVICES_MULTIQUEUE
7637 if (multiq) {
7638 DBG_PRINT(ERR_DBG, "s2io: Multiqueue support not enabled\n");
7639 multiq = 0;
7640 }
7641#endif
7642 if (multiq) 7621 if (multiq)
7643 *dev_multiq = multiq; 7622 *dev_multiq = multiq;
7644 7623
@@ -7783,12 +7762,10 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7783 pci_disable_device(pdev); 7762 pci_disable_device(pdev);
7784 return -ENODEV; 7763 return -ENODEV;
7785 } 7764 }
7786#ifdef CONFIG_NETDEVICES_MULTIQUEUE
7787 if (dev_multiq) 7765 if (dev_multiq)
7788 dev = alloc_etherdev_mq(sizeof(struct s2io_nic), tx_fifo_num); 7766 dev = alloc_etherdev_mq(sizeof(struct s2io_nic), tx_fifo_num);
7789 else 7767 else
7790#endif 7768 dev = alloc_etherdev(sizeof(struct s2io_nic));
7791 dev = alloc_etherdev(sizeof(struct s2io_nic));
7792 if (dev == NULL) { 7769 if (dev == NULL) {
7793 DBG_PRINT(ERR_DBG, "Device allocation failed\n"); 7770 DBG_PRINT(ERR_DBG, "Device allocation failed\n");
7794 pci_disable_device(pdev); 7771 pci_disable_device(pdev);
@@ -7979,10 +7956,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7979 dev->features |= NETIF_F_UFO; 7956 dev->features |= NETIF_F_UFO;
7980 dev->features |= NETIF_F_HW_CSUM; 7957 dev->features |= NETIF_F_HW_CSUM;
7981 } 7958 }
7982#ifdef CONFIG_NETDEVICES_MULTIQUEUE
7983 if (config->multiq)
7984 dev->features |= NETIF_F_MULTI_QUEUE;
7985#endif
7986 dev->tx_timeout = &s2io_tx_watchdog; 7959 dev->tx_timeout = &s2io_tx_watchdog;
7987 dev->watchdog_timeo = WATCH_DOG_TIMEOUT; 7960 dev->watchdog_timeo = WATCH_DOG_TIMEOUT;
7988 INIT_WORK(&sp->rst_timer_task, s2io_restart_nic); 7961 INIT_WORK(&sp->rst_timer_task, s2io_restart_nic);
@@ -8708,5 +8681,5 @@ static void s2io_io_resume(struct pci_dev *pdev)
8708 } 8681 }
8709 8682
8710 netif_device_attach(netdev); 8683 netif_device_attach(netdev);
8711 netif_wake_queue(netdev); 8684 netif_tx_wake_all_queues(netdev);
8712} 8685}