aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r--drivers/net/e100.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 24253c807e55..31ac001f5517 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -598,8 +598,8 @@ static void e100_enable_irq(struct nic *nic)
598 598
599 spin_lock_irqsave(&nic->cmd_lock, flags); 599 spin_lock_irqsave(&nic->cmd_lock, flags);
600 writeb(irq_mask_none, &nic->csr->scb.cmd_hi); 600 writeb(irq_mask_none, &nic->csr->scb.cmd_hi);
601 spin_unlock_irqrestore(&nic->cmd_lock, flags);
602 e100_write_flush(nic); 601 e100_write_flush(nic);
602 spin_unlock_irqrestore(&nic->cmd_lock, flags);
603} 603}
604 604
605static void e100_disable_irq(struct nic *nic) 605static void e100_disable_irq(struct nic *nic)
@@ -608,8 +608,8 @@ static void e100_disable_irq(struct nic *nic)
608 608
609 spin_lock_irqsave(&nic->cmd_lock, flags); 609 spin_lock_irqsave(&nic->cmd_lock, flags);
610 writeb(irq_mask_all, &nic->csr->scb.cmd_hi); 610 writeb(irq_mask_all, &nic->csr->scb.cmd_hi);
611 spin_unlock_irqrestore(&nic->cmd_lock, flags);
612 e100_write_flush(nic); 611 e100_write_flush(nic);
612 spin_unlock_irqrestore(&nic->cmd_lock, flags);
613} 613}
614 614
615static void e100_hw_reset(struct nic *nic) 615static void e100_hw_reset(struct nic *nic)
@@ -1582,8 +1582,8 @@ static void e100_watchdog(unsigned long data)
1582 * interrupt mask bit and the SW Interrupt generation bit */ 1582 * interrupt mask bit and the SW Interrupt generation bit */
1583 spin_lock_irq(&nic->cmd_lock); 1583 spin_lock_irq(&nic->cmd_lock);
1584 writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); 1584 writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi);
1585 spin_unlock_irq(&nic->cmd_lock);
1586 e100_write_flush(nic); 1585 e100_write_flush(nic);
1586 spin_unlock_irq(&nic->cmd_lock);
1587 1587
1588 e100_update_stats(nic); 1588 e100_update_stats(nic);
1589 e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex); 1589 e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex);
@@ -2154,6 +2154,9 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
2154 2154
2155 msleep(10); 2155 msleep(10);
2156 2156
2157 pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr,
2158 RFD_BUF_LEN, PCI_DMA_FROMDEVICE);
2159
2157 if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), 2160 if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd),
2158 skb->data, ETH_DATA_LEN)) 2161 skb->data, ETH_DATA_LEN))
2159 err = -EAGAIN; 2162 err = -EAGAIN;
@@ -2161,8 +2164,8 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
2161err_loopback_none: 2164err_loopback_none:
2162 mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); 2165 mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0);
2163 nic->loopback = lb_none; 2166 nic->loopback = lb_none;
2164 e100_hw_init(nic);
2165 e100_clean_cbs(nic); 2167 e100_clean_cbs(nic);
2168 e100_hw_reset(nic);
2166err_clean_rx: 2169err_clean_rx:
2167 e100_rx_clean_list(nic); 2170 e100_rx_clean_list(nic);
2168 return err; 2171 return err;