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.c48
1 files changed, 19 insertions, 29 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 5f0fcb04afff..9dae40ccf048 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -545,63 +545,53 @@ 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 if (sp->config.multiq) { 549 int i;
550 for (i = 0; i < sp->config.tx_fifo_num; i++) 550
551 netif_stop_subqueue(sp->dev, i);
552 } else {
553 for (i = 0; i < sp->config.tx_fifo_num; i++) 551 for (i = 0; i < sp->config.tx_fifo_num; i++)
554 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_STOP; 552 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_STOP;
555 netif_stop_queue(sp->dev);
556 } 553 }
554 netif_tx_stop_all_queues(sp->dev);
557} 555}
558 556
559static 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)
560{ 558{
561 if (sp->config.multiq) 559 if (!sp->config.multiq)
562 netif_stop_subqueue(sp->dev, fifo_no);
563 else {
564 sp->mac_control.fifos[fifo_no].queue_state = 560 sp->mac_control.fifos[fifo_no].queue_state =
565 FIFO_QUEUE_STOP; 561 FIFO_QUEUE_STOP;
566 netif_stop_queue(sp->dev); 562
567 } 563 netif_tx_stop_all_queues(sp->dev);
568} 564}
569 565
570static inline void s2io_start_all_tx_queue(struct s2io_nic *sp) 566static inline void s2io_start_all_tx_queue(struct s2io_nic *sp)
571{ 567{
572 int i; 568 if (!sp->config.multiq) {
573 if (sp->config.multiq) { 569 int i;
574 for (i = 0; i < sp->config.tx_fifo_num; i++) 570
575 netif_start_subqueue(sp->dev, i);
576 } else {
577 for (i = 0; i < sp->config.tx_fifo_num; i++) 571 for (i = 0; i < sp->config.tx_fifo_num; i++)
578 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; 572 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START;
579 netif_start_queue(sp->dev);
580 } 573 }
574 netif_tx_start_all_queues(sp->dev);
581} 575}
582 576
583static 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)
584{ 578{
585 if (sp->config.multiq) 579 if (!sp->config.multiq)
586 netif_start_subqueue(sp->dev, fifo_no);
587 else {
588 sp->mac_control.fifos[fifo_no].queue_state = 580 sp->mac_control.fifos[fifo_no].queue_state =
589 FIFO_QUEUE_START; 581 FIFO_QUEUE_START;
590 netif_start_queue(sp->dev); 582
591 } 583 netif_tx_start_all_queues(sp->dev);
592} 584}
593 585
594static inline void s2io_wake_all_tx_queue(struct s2io_nic *sp) 586static inline void s2io_wake_all_tx_queue(struct s2io_nic *sp)
595{ 587{
596 int i; 588 if (!sp->config.multiq) {
597 if (sp->config.multiq) { 589 int i;
598 for (i = 0; i < sp->config.tx_fifo_num; i++) 590
599 netif_wake_subqueue(sp->dev, i);
600 } else {
601 for (i = 0; i < sp->config.tx_fifo_num; i++) 591 for (i = 0; i < sp->config.tx_fifo_num; i++)
602 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; 592 sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START;
603 netif_wake_queue(sp->dev);
604 } 593 }
594 netif_tx_wake_all_queues(sp->dev);
605} 595}
606 596
607static inline void s2io_wake_tx_queue( 597static inline void s2io_wake_tx_queue(
@@ -8691,5 +8681,5 @@ static void s2io_io_resume(struct pci_dev *pdev)
8691 } 8681 }
8692 8682
8693 netif_device_attach(netdev); 8683 netif_device_attach(netdev);
8694 netif_wake_queue(netdev); 8684 netif_tx_wake_all_queues(netdev);
8695} 8685}