patch-2.3.47 linux/drivers/net/rtl8129.c

Next file: linux/drivers/net/sis900.c
Previous file: linux/drivers/net/plip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/net/rtl8129.c linux/drivers/net/rtl8129.c
@@ -787,7 +787,7 @@
 			rtl8129_interrupt(dev->irq, dev, 0);
 		}
 	}
-	if (test_bit(LINK_STATE_XOFF, &dev->state) &&
+	if (netif_queue_stopped(dev) &&
 		(jiffies - dev->trans_start) >= 2*TX_TIMEOUT)
 		rtl8129_tx_timeout(dev);
 
@@ -908,7 +908,7 @@
 
 			saved_skb[j] = rp->skb;
 			if (rp->mapping != 0) {
-				pci_unmap_single(tp->pdev, rp->mapping, rp->skb->len);
+				pci_unmap_single(tp->pdev, rp->mapping, rp->skb->len, PCI_DMA_TODEVICE);
 				rp->mapping = 0;
 			}
 		}
@@ -922,7 +922,7 @@
 					 ioaddr + TxAddr0 + i*4);
 			} else {
 				tp->tx_info[i].mapping =
-					pci_map_single(tp->pdev, skb->data, skb->len);
+					pci_map_single(tp->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
 				outl(tp->tx_info[i].mapping, ioaddr + TxAddr0 + i*4);
 			}
 			/* Note: the chip doesn't have auto-pad! */
@@ -991,7 +991,7 @@
 			 ioaddr + TxAddr0 + entry*4);
 	} else {
 		tp->tx_info[entry].mapping =
-			pci_map_single(tp->pdev, skb->data, skb->len);
+			pci_map_single(tp->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
 		outl(tp->tx_info[entry].mapping, ioaddr + TxAddr0 + entry*4);
 	}
 	/* Note: the chip doesn't have auto-pad! */
@@ -1085,7 +1085,8 @@
 				if (tp->tx_info[entry].mapping != 0) {
 					pci_unmap_single(tp->pdev,
 									 tp->tx_info[entry].mapping,
-									 tp->tx_info[entry].skb->len);
+									 tp->tx_info[entry].skb->len,
+									 PCI_DMA_TODEVICE);
 					tp->tx_info[entry].mapping = 0;
 				}
 
@@ -1315,7 +1316,7 @@
 
 		if (skb) {
 			if (mapping)
-				pci_unmap_single(tp->pdev, mapping, skb->len);
+				pci_unmap_single(tp->pdev, mapping, skb->len, PCI_DMA_TODEVICE);
 			dev_kfree_skb(skb);
 		}
 		tp->tx_info[i].skb = NULL;
@@ -1366,7 +1367,7 @@
 	struct rtl8129_private *tp = (struct rtl8129_private *)dev->priv;
 	long ioaddr = dev->base_addr;
 
-	if (test_bit(LINK_STATE_START, &dev->state)) {
+	if (netif_running(dev)) {
 		tp->stats.rx_missed_errors += inl(ioaddr + RxMissed);
 		outl(0, ioaddr + RxMissed);
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)