Loading drivers/block/aoe/aoecmd.c +12 −11 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ * Filesystem request handling methods * Filesystem request handling methods */ */ #include <linux/ata.h> #include <linux/hdreg.h> #include <linux/hdreg.h> #include <linux/blkdev.h> #include <linux/blkdev.h> #include <linux/skbuff.h> #include <linux/skbuff.h> Loading Loading @@ -267,7 +268,7 @@ aoecmd_ata_rw(struct aoedev *d) writebit = 0; writebit = 0; } } ah->cmdstat = WIN_READ | writebit | extbit; ah->cmdstat = ATA_CMD_PIO_READ | writebit | extbit; /* mark all tracking fields and load out */ /* mark all tracking fields and load out */ buf->nframesout += 1; buf->nframesout += 1; Loading Loading @@ -362,10 +363,10 @@ resend(struct aoedev *d, struct aoetgt *t, struct frame *f) switch (ah->cmdstat) { switch (ah->cmdstat) { default: default: break; break; case WIN_READ: case ATA_CMD_PIO_READ: case WIN_READ_EXT: case ATA_CMD_PIO_READ_EXT: case WIN_WRITE: case ATA_CMD_PIO_WRITE: case WIN_WRITE_EXT: case ATA_CMD_PIO_WRITE_EXT: put_lba(ah, f->lba); put_lba(ah, f->lba); n = f->bcnt; n = f->bcnt; Loading Loading @@ -812,8 +813,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) d->htgt = NULL; d->htgt = NULL; n = ahout->scnt << 9; n = ahout->scnt << 9; switch (ahout->cmdstat) { switch (ahout->cmdstat) { case WIN_READ: case ATA_CMD_PIO_READ: case WIN_READ_EXT: case ATA_CMD_PIO_READ_EXT: if (skb->len - sizeof *hin - sizeof *ahin < n) { if (skb->len - sizeof *hin - sizeof *ahin < n) { printk(KERN_ERR printk(KERN_ERR "aoe: %s. skb->len=%d need=%ld\n", "aoe: %s. skb->len=%d need=%ld\n", Loading @@ -823,8 +824,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) return; return; } } memcpy(f->bufaddr, ahin+1, n); memcpy(f->bufaddr, ahin+1, n); case WIN_WRITE: case ATA_CMD_PIO_WRITE: case WIN_WRITE_EXT: case ATA_CMD_PIO_WRITE_EXT: ifp = getif(t, skb->dev); ifp = getif(t, skb->dev); if (ifp) { if (ifp) { ifp->lost = 0; ifp->lost = 0; Loading @@ -838,7 +839,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) goto xmit; goto xmit; } } break; break; case WIN_IDENTIFY: case ATA_CMD_ID_ATA: if (skb->len - sizeof *hin - sizeof *ahin < 512) { if (skb->len - sizeof *hin - sizeof *ahin < 512) { printk(KERN_INFO printk(KERN_INFO "aoe: runt data size in ataid. skb->len=%d\n", "aoe: runt data size in ataid. skb->len=%d\n", Loading Loading @@ -914,7 +915,7 @@ aoecmd_ata_id(struct aoedev *d) /* set up ata header */ /* set up ata header */ ah->scnt = 1; ah->scnt = 1; ah->cmdstat = WIN_IDENTIFY; ah->cmdstat = ATA_CMD_ID_ATA; ah->lba3 = 0xa0; ah->lba3 = 0xa0; skb->dev = t->ifp->nd; skb->dev = t->ifp->nd; Loading Loading
drivers/block/aoe/aoecmd.c +12 −11 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ * Filesystem request handling methods * Filesystem request handling methods */ */ #include <linux/ata.h> #include <linux/hdreg.h> #include <linux/hdreg.h> #include <linux/blkdev.h> #include <linux/blkdev.h> #include <linux/skbuff.h> #include <linux/skbuff.h> Loading Loading @@ -267,7 +268,7 @@ aoecmd_ata_rw(struct aoedev *d) writebit = 0; writebit = 0; } } ah->cmdstat = WIN_READ | writebit | extbit; ah->cmdstat = ATA_CMD_PIO_READ | writebit | extbit; /* mark all tracking fields and load out */ /* mark all tracking fields and load out */ buf->nframesout += 1; buf->nframesout += 1; Loading Loading @@ -362,10 +363,10 @@ resend(struct aoedev *d, struct aoetgt *t, struct frame *f) switch (ah->cmdstat) { switch (ah->cmdstat) { default: default: break; break; case WIN_READ: case ATA_CMD_PIO_READ: case WIN_READ_EXT: case ATA_CMD_PIO_READ_EXT: case WIN_WRITE: case ATA_CMD_PIO_WRITE: case WIN_WRITE_EXT: case ATA_CMD_PIO_WRITE_EXT: put_lba(ah, f->lba); put_lba(ah, f->lba); n = f->bcnt; n = f->bcnt; Loading Loading @@ -812,8 +813,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) d->htgt = NULL; d->htgt = NULL; n = ahout->scnt << 9; n = ahout->scnt << 9; switch (ahout->cmdstat) { switch (ahout->cmdstat) { case WIN_READ: case ATA_CMD_PIO_READ: case WIN_READ_EXT: case ATA_CMD_PIO_READ_EXT: if (skb->len - sizeof *hin - sizeof *ahin < n) { if (skb->len - sizeof *hin - sizeof *ahin < n) { printk(KERN_ERR printk(KERN_ERR "aoe: %s. skb->len=%d need=%ld\n", "aoe: %s. skb->len=%d need=%ld\n", Loading @@ -823,8 +824,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) return; return; } } memcpy(f->bufaddr, ahin+1, n); memcpy(f->bufaddr, ahin+1, n); case WIN_WRITE: case ATA_CMD_PIO_WRITE: case WIN_WRITE_EXT: case ATA_CMD_PIO_WRITE_EXT: ifp = getif(t, skb->dev); ifp = getif(t, skb->dev); if (ifp) { if (ifp) { ifp->lost = 0; ifp->lost = 0; Loading @@ -838,7 +839,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) goto xmit; goto xmit; } } break; break; case WIN_IDENTIFY: case ATA_CMD_ID_ATA: if (skb->len - sizeof *hin - sizeof *ahin < 512) { if (skb->len - sizeof *hin - sizeof *ahin < 512) { printk(KERN_INFO printk(KERN_INFO "aoe: runt data size in ataid. skb->len=%d\n", "aoe: runt data size in ataid. skb->len=%d\n", Loading Loading @@ -914,7 +915,7 @@ aoecmd_ata_id(struct aoedev *d) /* set up ata header */ /* set up ata header */ ah->scnt = 1; ah->scnt = 1; ah->cmdstat = WIN_IDENTIFY; ah->cmdstat = ATA_CMD_ID_ATA; ah->lba3 = 0xa0; ah->lba3 = 0xa0; skb->dev = t->ifp->nd; skb->dev = t->ifp->nd; Loading