|
@@ -247,11 +247,12 @@ static int tg3_open(struct net_device *dev)
|
247
|
247
|
return err;
|
248
|
248
|
|
249
|
249
|
tpr->rx_std_iob_cnt = 0;
|
250
|
|
- tg3_refill_prod_ring(tp);
|
251
|
250
|
|
252
|
251
|
err = tg3_init_hw(tp, 1);
|
253
|
252
|
if (err != 0)
|
254
|
253
|
DBGC(tp->dev, "tg3_init_hw failed: %s\n", strerror(err));
|
|
254
|
+ else
|
|
255
|
+ tg3_refill_prod_ring(tp);
|
255
|
256
|
|
256
|
257
|
return err;
|
257
|
258
|
}
|
|
@@ -301,7 +302,6 @@ static int tg3_transmit(struct net_device *dev, struct io_buffer *iob)
|
301
|
302
|
struct tg3 *tp = netdev_priv(dev);
|
302
|
303
|
u32 len, entry;
|
303
|
304
|
dma_addr_t mapping;
|
304
|
|
- u32 bmsr;
|
305
|
305
|
|
306
|
306
|
if (tg3_tx_avail(tp) < 1) {
|
307
|
307
|
DBGC(dev, "Transmit ring full\n");
|
|
@@ -323,14 +323,10 @@ static int tg3_transmit(struct net_device *dev, struct io_buffer *iob)
|
323
|
323
|
/* Packets are ready, update Tx producer idx local and on card. */
|
324
|
324
|
tw32_tx_mbox(tp->prodmbox, entry);
|
325
|
325
|
|
326
|
|
- writel(entry, tp->regs + MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW);
|
327
|
|
-
|
328
|
326
|
tp->tx_prod = entry;
|
329
|
327
|
|
330
|
328
|
mb();
|
331
|
329
|
|
332
|
|
- tg3_readphy(tp, MII_BMSR, &bmsr);
|
333
|
|
-
|
334
|
330
|
return 0;
|
335
|
331
|
}
|
336
|
332
|
|
|
@@ -422,8 +418,10 @@ static void tg3_refill_prod_ring(struct tg3 *tp)
|
422
|
418
|
tpr->rx_std_iob_cnt++;
|
423
|
419
|
}
|
424
|
420
|
|
425
|
|
- tpr->rx_std_prod_idx = idx;
|
426
|
|
- tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, idx);
|
|
421
|
+ if ((u32)idx != tpr->rx_std_prod_idx) {
|
|
422
|
+ tpr->rx_std_prod_idx = idx;
|
|
423
|
+ tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, idx);
|
|
424
|
+ }
|
427
|
425
|
}
|
428
|
426
|
|
429
|
427
|
static void tg3_rx_complete(struct net_device *dev)
|
|
@@ -469,7 +467,10 @@ static void tg3_rx_complete(struct net_device *dev)
|
469
|
467
|
tpr->rx_std_iob_cnt--;
|
470
|
468
|
}
|
471
|
469
|
|
472
|
|
- tp->rx_rcb_ptr = sw_idx;
|
|
470
|
+ if (tp->rx_rcb_ptr != sw_idx) {
|
|
471
|
+ tw32_rx_mbox(tp->consmbox, sw_idx);
|
|
472
|
+ tp->rx_rcb_ptr = sw_idx;
|
|
473
|
+ }
|
473
|
474
|
|
474
|
475
|
tg3_refill_prod_ring(tp);
|
475
|
476
|
}
|
|
@@ -480,7 +481,9 @@ static void tg3_poll(struct net_device *dev)
|
480
|
481
|
struct tg3 *tp = netdev_priv(dev);
|
481
|
482
|
|
482
|
483
|
/* ACK interrupts */
|
483
|
|
- tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00);
|
|
484
|
+ /*
|
|
485
|
+ *tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00);
|
|
486
|
+ */
|
484
|
487
|
tp->hw_status->status &= ~SD_STATUS_UPDATED;
|
485
|
488
|
|
486
|
489
|
tg3_poll_link(tp);
|
|
@@ -905,6 +908,7 @@ static struct pci_device_id tg3_nics[] = {
|
905
|
908
|
PCI_ROM(0x14e4, 0x1684, "14e4-1684", "14e4-1684", 0),
|
906
|
909
|
PCI_ROM(0x14e4, 0x165b, "14e4-165b", "14e4-165b", 0),
|
907
|
910
|
PCI_ROM(0x14e4, 0x1681, "14e4-1681", "14e4-1681", 0),
|
|
911
|
+ PCI_ROM(0x14e4, 0x1682, "14e4-1682", "14e4-1682", 0),
|
908
|
912
|
PCI_ROM(0x14e4, 0x1680, "14e4-1680", "14e4-1680", 0),
|
909
|
913
|
PCI_ROM(0x14e4, 0x1688, "14e4-1688", "14e4-1688", 0),
|
910
|
914
|
PCI_ROM(0x14e4, 0x1689, "14e4-1689", "14e4-1689", 0),
|