diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 02:14:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 02:14:24 -0400 |
commit | b19fa1fa91845234961c64dbd564671aa7c0fd27 (patch) | |
tree | efb09da87299ef503b59396b69a7667f1650e378 /drivers/net/s2io.c | |
parent | c773e847ea8f6812804e40f52399c6921a00eab1 (diff) |
net: Delete NETDEVICES_MULTIQUEUE kconfig option.
Multiple TX queue support is a core networking feature.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 47 |
1 files changed, 8 insertions, 39 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index e7a3dbec674c..51a91154125d 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -546,13 +546,10 @@ static struct pci_driver s2io_driver = { | |||
546 | static inline void s2io_stop_all_tx_queue(struct s2io_nic *sp) | 546 | static inline void s2io_stop_all_tx_queue(struct s2io_nic *sp) |
547 | { | 547 | { |
548 | int i; | 548 | int i; |
549 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
550 | if (sp->config.multiq) { | 549 | if (sp->config.multiq) { |
551 | for (i = 0; i < sp->config.tx_fifo_num; i++) | 550 | for (i = 0; i < sp->config.tx_fifo_num; i++) |
552 | netif_stop_subqueue(sp->dev, i); | 551 | netif_stop_subqueue(sp->dev, i); |
553 | } else | 552 | } else { |
554 | #endif | ||
555 | { | ||
556 | for (i = 0; i < sp->config.tx_fifo_num; i++) | 553 | for (i = 0; i < sp->config.tx_fifo_num; i++) |
557 | sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_STOP; | 554 | sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_STOP; |
558 | netif_stop_queue(sp->dev); | 555 | netif_stop_queue(sp->dev); |
@@ -561,12 +558,9 @@ static inline void s2io_stop_all_tx_queue(struct s2io_nic *sp) | |||
561 | 558 | ||
562 | static inline void s2io_stop_tx_queue(struct s2io_nic *sp, int fifo_no) | 559 | static inline void s2io_stop_tx_queue(struct s2io_nic *sp, int fifo_no) |
563 | { | 560 | { |
564 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
565 | if (sp->config.multiq) | 561 | if (sp->config.multiq) |
566 | netif_stop_subqueue(sp->dev, fifo_no); | 562 | netif_stop_subqueue(sp->dev, fifo_no); |
567 | else | 563 | else { |
568 | #endif | ||
569 | { | ||
570 | sp->mac_control.fifos[fifo_no].queue_state = | 564 | sp->mac_control.fifos[fifo_no].queue_state = |
571 | FIFO_QUEUE_STOP; | 565 | FIFO_QUEUE_STOP; |
572 | netif_stop_queue(sp->dev); | 566 | netif_stop_queue(sp->dev); |
@@ -576,13 +570,10 @@ static inline void s2io_stop_tx_queue(struct s2io_nic *sp, int fifo_no) | |||
576 | static inline void s2io_start_all_tx_queue(struct s2io_nic *sp) | 570 | static inline void s2io_start_all_tx_queue(struct s2io_nic *sp) |
577 | { | 571 | { |
578 | int i; | 572 | int i; |
579 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
580 | if (sp->config.multiq) { | 573 | if (sp->config.multiq) { |
581 | for (i = 0; i < sp->config.tx_fifo_num; i++) | 574 | for (i = 0; i < sp->config.tx_fifo_num; i++) |
582 | netif_start_subqueue(sp->dev, i); | 575 | netif_start_subqueue(sp->dev, i); |
583 | } else | 576 | } else { |
584 | #endif | ||
585 | { | ||
586 | for (i = 0; i < sp->config.tx_fifo_num; i++) | 577 | for (i = 0; i < sp->config.tx_fifo_num; i++) |
587 | sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; | 578 | sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; |
588 | netif_start_queue(sp->dev); | 579 | netif_start_queue(sp->dev); |
@@ -591,12 +582,9 @@ static inline void s2io_start_all_tx_queue(struct s2io_nic *sp) | |||
591 | 582 | ||
592 | static inline void s2io_start_tx_queue(struct s2io_nic *sp, int fifo_no) | 583 | static inline void s2io_start_tx_queue(struct s2io_nic *sp, int fifo_no) |
593 | { | 584 | { |
594 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
595 | if (sp->config.multiq) | 585 | if (sp->config.multiq) |
596 | netif_start_subqueue(sp->dev, fifo_no); | 586 | netif_start_subqueue(sp->dev, fifo_no); |
597 | else | 587 | else { |
598 | #endif | ||
599 | { | ||
600 | sp->mac_control.fifos[fifo_no].queue_state = | 588 | sp->mac_control.fifos[fifo_no].queue_state = |
601 | FIFO_QUEUE_START; | 589 | FIFO_QUEUE_START; |
602 | netif_start_queue(sp->dev); | 590 | netif_start_queue(sp->dev); |
@@ -606,13 +594,10 @@ static inline void s2io_start_tx_queue(struct s2io_nic *sp, int fifo_no) | |||
606 | static inline void s2io_wake_all_tx_queue(struct s2io_nic *sp) | 594 | static inline void s2io_wake_all_tx_queue(struct s2io_nic *sp) |
607 | { | 595 | { |
608 | int i; | 596 | int i; |
609 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
610 | if (sp->config.multiq) { | 597 | if (sp->config.multiq) { |
611 | for (i = 0; i < sp->config.tx_fifo_num; i++) | 598 | for (i = 0; i < sp->config.tx_fifo_num; i++) |
612 | netif_wake_subqueue(sp->dev, i); | 599 | netif_wake_subqueue(sp->dev, i); |
613 | } else | 600 | } else { |
614 | #endif | ||
615 | { | ||
616 | for (i = 0; i < sp->config.tx_fifo_num; i++) | 601 | for (i = 0; i < sp->config.tx_fifo_num; i++) |
617 | sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; | 602 | sp->mac_control.fifos[i].queue_state = FIFO_QUEUE_START; |
618 | netif_wake_queue(sp->dev); | 603 | netif_wake_queue(sp->dev); |
@@ -623,13 +608,10 @@ static inline void s2io_wake_tx_queue( | |||
623 | struct fifo_info *fifo, int cnt, u8 multiq) | 608 | struct fifo_info *fifo, int cnt, u8 multiq) |
624 | { | 609 | { |
625 | 610 | ||
626 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
627 | if (multiq) { | 611 | if (multiq) { |
628 | if (cnt && __netif_subqueue_stopped(fifo->dev, fifo->fifo_no)) | 612 | if (cnt && __netif_subqueue_stopped(fifo->dev, fifo->fifo_no)) |
629 | netif_wake_subqueue(fifo->dev, fifo->fifo_no); | 613 | netif_wake_subqueue(fifo->dev, fifo->fifo_no); |
630 | } else | 614 | } 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)) { | 615 | if (netif_queue_stopped(fifo->dev)) { |
634 | fifo->queue_state = FIFO_QUEUE_START; | 616 | fifo->queue_state = FIFO_QUEUE_START; |
635 | netif_wake_queue(fifo->dev); | 617 | netif_wake_queue(fifo->dev); |
@@ -4189,15 +4171,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4189 | return NETDEV_TX_LOCKED; | 4171 | return NETDEV_TX_LOCKED; |
4190 | } | 4172 | } |
4191 | 4173 | ||
4192 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
4193 | if (sp->config.multiq) { | 4174 | if (sp->config.multiq) { |
4194 | if (__netif_subqueue_stopped(dev, fifo->fifo_no)) { | 4175 | if (__netif_subqueue_stopped(dev, fifo->fifo_no)) { |
4195 | spin_unlock_irqrestore(&fifo->tx_lock, flags); | 4176 | spin_unlock_irqrestore(&fifo->tx_lock, flags); |
4196 | return NETDEV_TX_BUSY; | 4177 | return NETDEV_TX_BUSY; |
4197 | } | 4178 | } |
4198 | } else | 4179 | } 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)) { | 4180 | if (netif_queue_stopped(dev)) { |
4202 | spin_unlock_irqrestore(&fifo->tx_lock, flags); | 4181 | spin_unlock_irqrestore(&fifo->tx_lock, flags); |
4203 | return NETDEV_TX_BUSY; | 4182 | return NETDEV_TX_BUSY; |
@@ -7633,12 +7612,6 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type, | |||
7633 | DBG_PRINT(ERR_DBG, "tx fifos\n"); | 7612 | DBG_PRINT(ERR_DBG, "tx fifos\n"); |
7634 | } | 7613 | } |
7635 | 7614 | ||
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) | 7615 | if (multiq) |
7643 | *dev_multiq = multiq; | 7616 | *dev_multiq = multiq; |
7644 | 7617 | ||
@@ -7783,12 +7756,10 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7783 | pci_disable_device(pdev); | 7756 | pci_disable_device(pdev); |
7784 | return -ENODEV; | 7757 | return -ENODEV; |
7785 | } | 7758 | } |
7786 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
7787 | if (dev_multiq) | 7759 | if (dev_multiq) |
7788 | dev = alloc_etherdev_mq(sizeof(struct s2io_nic), tx_fifo_num); | 7760 | dev = alloc_etherdev_mq(sizeof(struct s2io_nic), tx_fifo_num); |
7789 | else | 7761 | else |
7790 | #endif | 7762 | dev = alloc_etherdev(sizeof(struct s2io_nic)); |
7791 | dev = alloc_etherdev(sizeof(struct s2io_nic)); | ||
7792 | if (dev == NULL) { | 7763 | if (dev == NULL) { |
7793 | DBG_PRINT(ERR_DBG, "Device allocation failed\n"); | 7764 | DBG_PRINT(ERR_DBG, "Device allocation failed\n"); |
7794 | pci_disable_device(pdev); | 7765 | pci_disable_device(pdev); |
@@ -7979,10 +7950,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7979 | dev->features |= NETIF_F_UFO; | 7950 | dev->features |= NETIF_F_UFO; |
7980 | dev->features |= NETIF_F_HW_CSUM; | 7951 | dev->features |= NETIF_F_HW_CSUM; |
7981 | } | 7952 | } |
7982 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
7983 | if (config->multiq) | 7953 | if (config->multiq) |
7984 | dev->features |= NETIF_F_MULTI_QUEUE; | 7954 | dev->features |= NETIF_F_MULTI_QUEUE; |
7985 | #endif | ||
7986 | dev->tx_timeout = &s2io_tx_watchdog; | 7955 | dev->tx_timeout = &s2io_tx_watchdog; |
7987 | dev->watchdog_timeo = WATCH_DOG_TIMEOUT; | 7956 | dev->watchdog_timeo = WATCH_DOG_TIMEOUT; |
7988 | INIT_WORK(&sp->rst_timer_task, s2io_restart_nic); | 7957 | INIT_WORK(&sp->rst_timer_task, s2io_restart_nic); |