Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202680
b: refs/heads/master
c: 2430b03
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Jun 7, 2010
1 parent a9b237f commit 24ab38f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2601d8a0049c8b5d29cd5adb844a305a804e505f
refs/heads/master: 2430b031be8d3eb57f22f2df6fb3784564109db0
24 changes: 12 additions & 12 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@
#define TG3_RX_JMB_BUFF_RING_SIZE \
(sizeof(struct ring_info) * TG3_RX_JUMBO_RING_SIZE)

#define TG3_RSS_MIN_NUM_MSIX_VECS 2

/* Due to a hardware bug, the 5701 can only DMA to memory addresses
* that are at least dword aligned when used in PCIX mode. The driver
* works around this bug by double copying the packet. This workaround
Expand Down Expand Up @@ -8797,26 +8795,28 @@ static bool tg3_enable_msix(struct tg3 *tp)
}

rc = pci_enable_msix(tp->pdev, msix_ent, tp->irq_cnt);
if (rc != 0) {
if (rc < TG3_RSS_MIN_NUM_MSIX_VECS)
return false;
if (rc < 0) {
return false;
} else if (rc != 0) {
if (pci_enable_msix(tp->pdev, msix_ent, rc))
return false;
netdev_notice(tp->dev, "Requested %d MSI-X vectors, received %d\n",
tp->irq_cnt, rc);
tp->irq_cnt = rc;
}

tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;

for (i = 0; i < tp->irq_max; i++)
tp->napi[i].irq_vec = msix_ent[i].vector;

if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS;
tp->dev->real_num_tx_queues = tp->irq_cnt - 1;
} else
tp->dev->real_num_tx_queues = 1;
tp->dev->real_num_tx_queues = 1;
if (tp->irq_cnt > 1) {
tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;

if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS;
tp->dev->real_num_tx_queues = tp->irq_cnt - 1;
}
}

return true;
}
Expand Down

0 comments on commit 24ab38f

Please sign in to comment.