]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/aoe/aoecmd.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-omap-h63xx.git] / drivers / block / aoe / aoecmd.c
index 01fbdd38e3be21979027538b64b5cd56dc516f0c..4d59d5057734ab41686a37a7abb148ab361ee285 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 #include <linux/genhd.h>
+#include <net/net_namespace.h>
 #include <asm/unaligned.h>
 #include "aoe.h"
 
@@ -119,7 +120,7 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f)
 
        /* initialize the headers & frame */
        skb = f->skb;
-       h = aoe_hdr(skb);
+       h = (struct aoe_hdr *) skb_mac_header(skb);
        ah = (struct aoe_atahdr *) (h+1);
        skb_put(skb, sizeof *h + sizeof *ah);
        memset(h, 0, skb->len);
@@ -194,7 +195,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail)
        sl = sl_tail = NULL;
 
        read_lock(&dev_base_lock);
-       for_each_netdev(ifp) {
+       for_each_netdev(&init_net, ifp) {
                dev_hold(ifp);
                if (!is_aoe_netif(ifp))
                        goto cont;
@@ -208,7 +209,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail)
                skb->dev = ifp;
                if (sl_tail == NULL)
                        sl_tail = skb;
-               h = aoe_hdr(skb);
+               h = (struct aoe_hdr *) skb_mac_header(skb);
                memset(h, 0, sizeof *h + sizeof *ch);
 
                memset(h->dst, 0xff, sizeof h->dst);
@@ -303,7 +304,7 @@ rexmit(struct aoedev *d, struct frame *f)
        aoechr_error(buf);
 
        skb = f->skb;
-       h = aoe_hdr(skb);
+       h = (struct aoe_hdr *) skb_mac_header(skb);
        ah = (struct aoe_atahdr *) (h+1);
        f->tag = n;
        h->tag = cpu_to_be32(n);
@@ -532,7 +533,7 @@ aoecmd_ata_rsp(struct sk_buff *skb)
        char ebuf[128];
        u16 aoemajor;
 
-       hin = aoe_hdr(skb);
+       hin = (struct aoe_hdr *) skb_mac_header(skb);
        aoemajor = be16_to_cpu(get_unaligned(&hin->major));
        d = aoedev_by_aoeaddr(aoemajor, hin->minor);
        if (d == NULL) {
@@ -564,7 +565,7 @@ aoecmd_ata_rsp(struct sk_buff *skb)
        calc_rttavg(d, tsince(f->tag));
 
        ahin = (struct aoe_atahdr *) (hin+1);
-       hout = aoe_hdr(f->skb);
+       hout = (struct aoe_hdr *) skb_mac_header(f->skb);
        ahout = (struct aoe_atahdr *) (hout+1);
        buf = f->buf;
 
@@ -652,7 +653,7 @@ aoecmd_ata_rsp(struct sk_buff *skb)
                        disk_stat_add(disk, sectors[rw], n_sect);
                        disk_stat_add(disk, io_ticks, duration);
                        n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
-                       bio_endio(buf->bio, buf->bio->bi_size, n);
+                       bio_endio(buf->bio, n);
                        mempool_free(buf, d->bufpool);
                }
        }
@@ -698,7 +699,7 @@ aoecmd_ata_id(struct aoedev *d)
 
        /* initialize the headers & frame */
        skb = f->skb;
-       h = aoe_hdr(skb);
+       h = (struct aoe_hdr *) skb_mac_header(skb);
        ah = (struct aoe_atahdr *) (h+1);
        skb_put(skb, sizeof *h + sizeof *ah);
        memset(h, 0, skb->len);
@@ -729,7 +730,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
        enum { MAXFRAMES = 16 };
        u16 n;
 
-       h = aoe_hdr(skb);
+       h = (struct aoe_hdr *) skb_mac_header(skb);
        ch = (struct aoe_cfghdr *) (h+1);
 
        /*