rd: support XIP
[powerpc.git] / drivers / block / aoe / aoedev.c
index abf1d3c..51f5071 100644 (file)
@@ -88,7 +88,7 @@ aoedev_newdev(ulong nframes)
                        kfree(d);
                return NULL;
        }
-       INIT_WORK(&d->work, aoecmd_sleepwork, d);
+       INIT_WORK(&d->work, aoecmd_sleepwork);
        spin_lock_init(&d->lock);
        init_timer(&d->timer);
        d->timer.data = (ulong) d;
@@ -119,8 +119,9 @@ aoedev_downdev(struct aoedev *d)
                bio = buf->bio;
                if (--buf->nframesout == 0) {
                        mempool_free(buf, d->bufpool);
-                       bio_endio(bio, bio->bi_size, -EIO);
+                       bio_endio(bio, -EIO);
                }
+               skb_shinfo(f->skb)->nr_frags = f->skb->data_len = 0;
        }
        d->inprocess = NULL;
 
@@ -129,7 +130,7 @@ aoedev_downdev(struct aoedev *d)
                list_del(d->bufq.next);
                bio = buf->bio;
                mempool_free(buf, d->bufpool);
-               bio_endio(bio, bio->bi_size, -EIO);
+               bio_endio(bio, -EIO);
        }
 
        if (d->gd)
@@ -155,7 +156,7 @@ aoedev_by_sysminor_m(ulong sysminor, ulong bufcnt)
                d = aoedev_newdev(bufcnt);
                if (d == NULL) {
                        spin_unlock_irqrestore(&devlist_lock, flags);
-                       printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n");
+                       printk(KERN_INFO "aoe: aoedev_newdev failure.\n");
                        return NULL;
                }
                d->sysminor = sysminor;