aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tg3.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 3dccc58e649..d169337bc7e 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -145,8 +145,6 @@
145#define TG3_RX_JMB_BUFF_RING_SIZE \ 145#define TG3_RX_JMB_BUFF_RING_SIZE \
146 (sizeof(struct ring_info) * TG3_RX_JUMBO_RING_SIZE) 146 (sizeof(struct ring_info) * TG3_RX_JUMBO_RING_SIZE)
147 147
148#define TG3_RSS_MIN_NUM_MSIX_VECS 2
149
150/* Due to a hardware bug, the 5701 can only DMA to memory addresses 148/* Due to a hardware bug, the 5701 can only DMA to memory addresses
151 * that are at least dword aligned when used in PCIX mode. The driver 149 * that are at least dword aligned when used in PCIX mode. The driver
152 * works around this bug by double copying the packet. This workaround 150 * works around this bug by double copying the packet. This workaround
@@ -8797,9 +8795,9 @@ static bool tg3_enable_msix(struct tg3 *tp)
8797 } 8795 }
8798 8796
8799 rc = pci_enable_msix(tp->pdev, msix_ent, tp->irq_cnt); 8797 rc = pci_enable_msix(tp->pdev, msix_ent, tp->irq_cnt);
8800 if (rc != 0) { 8798 if (rc < 0) {
8801 if (rc < TG3_RSS_MIN_NUM_MSIX_VECS) 8799 return false;
8802 return false; 8800 } else if (rc != 0) {
8803 if (pci_enable_msix(tp->pdev, msix_ent, rc)) 8801 if (pci_enable_msix(tp->pdev, msix_ent, rc))
8804 return false; 8802 return false;
8805 netdev_notice(tp->dev, "Requested %d MSI-X vectors, received %d\n", 8803 netdev_notice(tp->dev, "Requested %d MSI-X vectors, received %d\n",
@@ -8807,16 +8805,18 @@ static bool tg3_enable_msix(struct tg3 *tp)
8807 tp->irq_cnt = rc; 8805 tp->irq_cnt = rc;
8808 } 8806 }
8809 8807
8810 tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;
8811
8812 for (i = 0; i < tp->irq_max; i++) 8808 for (i = 0; i < tp->irq_max; i++)
8813 tp->napi[i].irq_vec = msix_ent[i].vector; 8809 tp->napi[i].irq_vec = msix_ent[i].vector;
8814 8810
8815 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { 8811 tp->dev->real_num_tx_queues = 1;
8816 tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS; 8812 if (tp->irq_cnt > 1) {
8817 tp->dev->real_num_tx_queues = tp->irq_cnt - 1; 8813 tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;
8818 } else 8814
8819 tp->dev->real_num_tx_queues = 1; 8815 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
8816 tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS;
8817 tp->dev->real_num_tx_queues = tp->irq_cnt - 1;
8818 }
8819 }
8820 8820
8821 return true; 8821 return true;
8822} 8822}