aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunqe.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-29 22:38:01 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-29 22:38:01 -0400
commit49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch)
tree253801ebf57e0a23856a2c7be129c2c178f62fdf /drivers/net/sunqe.c
parent34f6d749c0a328817d5e36274e53121c1db734dc (diff)
parentb9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff)
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/net/sunqe.c')
-rw-r--r--drivers/net/sunqe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 7874eb1ef043..fa70e0b78af7 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -437,7 +437,6 @@ static void qe_rx(struct sunqe *qep)
437 drops++; 437 drops++;
438 qep->net_stats.rx_dropped++; 438 qep->net_stats.rx_dropped++;
439 } else { 439 } else {
440 skb->dev = qep->dev;
441 skb_reserve(skb, 2); 440 skb_reserve(skb, 2);
442 skb_put(skb, len); 441 skb_put(skb, len);
443 eth_copy_and_sum(skb, (unsigned char *) this_qbuf, 442 eth_copy_and_sum(skb, (unsigned char *) this_qbuf,
@@ -593,7 +592,7 @@ static int qe_start_xmit(struct sk_buff *skb, struct net_device *dev)
593 /* Avoid a race... */ 592 /* Avoid a race... */
594 qep->qe_block->qe_txd[entry].tx_flags = TXD_UPDATE; 593 qep->qe_block->qe_txd[entry].tx_flags = TXD_UPDATE;
595 594
596 memcpy(txbuf, skb->data, len); 595 skb_copy_from_linear_data(skb, txbuf, len);
597 596
598 qep->qe_block->qe_txd[entry].tx_addr = txbuf_dvma; 597 qep->qe_block->qe_txd[entry].tx_addr = txbuf_dvma;
599 qep->qe_block->qe_txd[entry].tx_flags = 598 qep->qe_block->qe_txd[entry].tx_flags =
@@ -845,6 +844,8 @@ static int __init qec_ether_init(struct sbus_dev *sdev)
845 if (!dev) 844 if (!dev)
846 return -ENOMEM; 845 return -ENOMEM;
847 846
847 memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
848
848 qe = netdev_priv(dev); 849 qe = netdev_priv(dev);
849 850
850 i = of_getintprop_default(sdev->ofdev.node, "channel#", -1); 851 i = of_getintprop_default(sdev->ofdev.node, "channel#", -1);
@@ -960,7 +961,7 @@ static int __devexit qec_sbus_remove(struct of_device *dev)
960 struct sunqe *qp = dev_get_drvdata(&dev->dev); 961 struct sunqe *qp = dev_get_drvdata(&dev->dev);
961 struct net_device *net_dev = qp->dev; 962 struct net_device *net_dev = qp->dev;
962 963
963 unregister_netdevice(net_dev); 964 unregister_netdev(net_dev);
964 965
965 sbus_iounmap(qp->qcregs, CREG_REG_SIZE); 966 sbus_iounmap(qp->qcregs, CREG_REG_SIZE);
966 sbus_iounmap(qp->mregs, MREGS_REG_SIZE); 967 sbus_iounmap(qp->mregs, MREGS_REG_SIZE);