diff options
| author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
|---|---|---|
| committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
| commit | 185a257f2f73bcd89050ad02da5bedbc28fc43fa (patch) | |
| tree | 5e32586114534ed3f2165614cba3d578f5d87307 /drivers/net/forcedeth.c | |
| parent | 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 (diff) | |
| parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) | |
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/net/forcedeth.c')
| -rw-r--r-- | drivers/net/forcedeth.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 97db910fbc8c..eea1d66c530e 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
| @@ -3789,6 +3789,12 @@ static int nv_loopback_test(struct net_device *dev) | |||
| 3789 | /* setup packet for tx */ | 3789 | /* setup packet for tx */ |
| 3790 | pkt_len = ETH_DATA_LEN; | 3790 | pkt_len = ETH_DATA_LEN; |
| 3791 | tx_skb = dev_alloc_skb(pkt_len); | 3791 | tx_skb = dev_alloc_skb(pkt_len); |
| 3792 | if (!tx_skb) { | ||
| 3793 | printk(KERN_ERR "dev_alloc_skb() failed during loopback test" | ||
| 3794 | " of %s\n", dev->name); | ||
| 3795 | ret = 0; | ||
| 3796 | goto out; | ||
| 3797 | } | ||
| 3792 | pkt_data = skb_put(tx_skb, pkt_len); | 3798 | pkt_data = skb_put(tx_skb, pkt_len); |
| 3793 | for (i = 0; i < pkt_len; i++) | 3799 | for (i = 0; i < pkt_len; i++) |
| 3794 | pkt_data[i] = (u8)(i & 0xff); | 3800 | pkt_data[i] = (u8)(i & 0xff); |
| @@ -3853,7 +3859,7 @@ static int nv_loopback_test(struct net_device *dev) | |||
| 3853 | tx_skb->end-tx_skb->data, | 3859 | tx_skb->end-tx_skb->data, |
| 3854 | PCI_DMA_TODEVICE); | 3860 | PCI_DMA_TODEVICE); |
| 3855 | dev_kfree_skb_any(tx_skb); | 3861 | dev_kfree_skb_any(tx_skb); |
| 3856 | 3862 | out: | |
| 3857 | /* stop engines */ | 3863 | /* stop engines */ |
| 3858 | nv_stop_rx(dev); | 3864 | nv_stop_rx(dev); |
| 3859 | nv_stop_tx(dev); | 3865 | nv_stop_tx(dev); |
