git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
drivers
/
block
/
aoe
/
aoenet.c
diff --git
a/drivers/block/aoe/aoenet.c
b/drivers/block/aoe/aoenet.c
index
4be9769
..
9626e0f
100644
(file)
--- a/
drivers/block/aoe/aoenet.c
+++ b/
drivers/block/aoe/aoenet.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 200
4
Coraid, Inc. See COPYING for GPL terms. */
+/* Copyright (c) 200
6
Coraid, Inc. See COPYING for GPL terms. */
/*
* aoenet.c
* Ethernet portion of AoE driver
/*
* aoenet.c
* Ethernet portion of AoE driver
@@
-74,7
+74,7
@@
set_aoe_iflist(const char __user *user_str, size_t size)
return -EINVAL;
if (copy_from_user(aoe_iflist, user_str, size)) {
return -EINVAL;
if (copy_from_user(aoe_iflist, user_str, size)) {
- printk(KERN_INFO "aoe:
%s: copy from user failed\n", __FUNCTION__
);
+ printk(KERN_INFO "aoe:
copy from user failed\n"
);
return -EFAULT;
}
aoe_iflist[size] = 0x00;
return -EFAULT;
}
aoe_iflist[size] = 0x00;
@@
-92,18
+92,6
@@
mac_addr(char addr[6])
return __be64_to_cpu(n);
}
return __be64_to_cpu(n);
}
-static struct sk_buff *
-skb_check(struct sk_buff *skb)
-{
- if (skb_is_nonlinear(skb))
- if ((skb = skb_share_check(skb, GFP_ATOMIC)))
- if (skb_linearize(skb, GFP_ATOMIC) < 0) {
- dev_kfree_skb(skb);
- return NULL;
- }
- return skb;
-}
-
void
aoenet_xmit(struct sk_buff *sl)
{
void
aoenet_xmit(struct sk_buff *sl)
{
@@
-125,14
+113,13
@@
aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
struct aoe_hdr *h;
u32 n;
struct aoe_hdr *h;
u32 n;
- skb = skb_
check(skb
);
- if (
!skb
)
+ skb = skb_
share_check(skb, GFP_ATOMIC
);
+ if (
skb == NULL
)
return 0;
return 0;
-
+ if (skb_linearize(skb))
+ goto exit;
if (!is_aoe_netif(ifp))
goto exit;
if (!is_aoe_netif(ifp))
goto exit;
-
- //skb->len += ETH_HLEN; /* (1) */
skb_push(skb, ETH_HLEN); /* (1) */
h = (struct aoe_hdr *) skb->mac.raw;
skb_push(skb, ETH_HLEN); /* (1) */
h = (struct aoe_hdr *) skb->mac.raw;
@@
-145,8
+132,7
@@
aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
if (n > NECODES)
n = 0;
if (net_ratelimit())
if (n > NECODES)
n = 0;
if (net_ratelimit())
- printk(KERN_ERR "aoe: aoenet_rcv: error packet from %d.%d; "
- "ecode=%d '%s'\n",
+ printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n",
be16_to_cpu(h->major), h->minor,
h->err, aoe_errlist[n]);
goto exit;
be16_to_cpu(h->major), h->minor,
h->err, aoe_errlist[n]);
goto exit;
@@
-160,7
+146,7
@@
aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
aoecmd_cfg_rsp(skb);
break;
default:
aoecmd_cfg_rsp(skb);
break;
default:
- printk(KERN_INFO "aoe:
aoenet_rcv:
unknown cmd %d\n", h->cmd);
+ printk(KERN_INFO "aoe: unknown cmd %d\n", h->cmd);
}
exit:
dev_kfree_skb(skb);
}
exit:
dev_kfree_skb(skb);