diff options
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 45c5a33daf49..31693bc24444 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Filesystem request handling methods | 4 | * Filesystem request handling methods |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/ata.h> | ||
7 | #include <linux/hdreg.h> | 8 | #include <linux/hdreg.h> |
8 | #include <linux/blkdev.h> | 9 | #include <linux/blkdev.h> |
9 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
@@ -267,7 +268,7 @@ aoecmd_ata_rw(struct aoedev *d) | |||
267 | writebit = 0; | 268 | writebit = 0; |
268 | } | 269 | } |
269 | 270 | ||
270 | ah->cmdstat = WIN_READ | writebit | extbit; | 271 | ah->cmdstat = ATA_CMD_PIO_READ | writebit | extbit; |
271 | 272 | ||
272 | /* mark all tracking fields and load out */ | 273 | /* mark all tracking fields and load out */ |
273 | buf->nframesout += 1; | 274 | buf->nframesout += 1; |
@@ -362,10 +363,10 @@ resend(struct aoedev *d, struct aoetgt *t, struct frame *f) | |||
362 | switch (ah->cmdstat) { | 363 | switch (ah->cmdstat) { |
363 | default: | 364 | default: |
364 | break; | 365 | break; |
365 | case WIN_READ: | 366 | case ATA_CMD_PIO_READ: |
366 | case WIN_READ_EXT: | 367 | case ATA_CMD_PIO_READ_EXT: |
367 | case WIN_WRITE: | 368 | case ATA_CMD_PIO_WRITE: |
368 | case WIN_WRITE_EXT: | 369 | case ATA_CMD_PIO_WRITE_EXT: |
369 | put_lba(ah, f->lba); | 370 | put_lba(ah, f->lba); |
370 | 371 | ||
371 | n = f->bcnt; | 372 | n = f->bcnt; |
@@ -812,8 +813,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
812 | d->htgt = NULL; | 813 | d->htgt = NULL; |
813 | n = ahout->scnt << 9; | 814 | n = ahout->scnt << 9; |
814 | switch (ahout->cmdstat) { | 815 | switch (ahout->cmdstat) { |
815 | case WIN_READ: | 816 | case ATA_CMD_PIO_READ: |
816 | case WIN_READ_EXT: | 817 | case ATA_CMD_PIO_READ_EXT: |
817 | if (skb->len - sizeof *hin - sizeof *ahin < n) { | 818 | if (skb->len - sizeof *hin - sizeof *ahin < n) { |
818 | printk(KERN_ERR | 819 | printk(KERN_ERR |
819 | "aoe: %s. skb->len=%d need=%ld\n", | 820 | "aoe: %s. skb->len=%d need=%ld\n", |
@@ -823,8 +824,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
823 | return; | 824 | return; |
824 | } | 825 | } |
825 | memcpy(f->bufaddr, ahin+1, n); | 826 | memcpy(f->bufaddr, ahin+1, n); |
826 | case WIN_WRITE: | 827 | case ATA_CMD_PIO_WRITE: |
827 | case WIN_WRITE_EXT: | 828 | case ATA_CMD_PIO_WRITE_EXT: |
828 | ifp = getif(t, skb->dev); | 829 | ifp = getif(t, skb->dev); |
829 | if (ifp) { | 830 | if (ifp) { |
830 | ifp->lost = 0; | 831 | ifp->lost = 0; |
@@ -838,7 +839,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
838 | goto xmit; | 839 | goto xmit; |
839 | } | 840 | } |
840 | break; | 841 | break; |
841 | case WIN_IDENTIFY: | 842 | case ATA_CMD_ID_ATA: |
842 | if (skb->len - sizeof *hin - sizeof *ahin < 512) { | 843 | if (skb->len - sizeof *hin - sizeof *ahin < 512) { |
843 | printk(KERN_INFO | 844 | printk(KERN_INFO |
844 | "aoe: runt data size in ataid. skb->len=%d\n", | 845 | "aoe: runt data size in ataid. skb->len=%d\n", |
@@ -914,7 +915,7 @@ aoecmd_ata_id(struct aoedev *d) | |||
914 | 915 | ||
915 | /* set up ata header */ | 916 | /* set up ata header */ |
916 | ah->scnt = 1; | 917 | ah->scnt = 1; |
917 | ah->cmdstat = WIN_IDENTIFY; | 918 | ah->cmdstat = ATA_CMD_ID_ATA; |
918 | ah->lba3 = 0xa0; | 919 | ah->lba3 = 0xa0; |
919 | 920 | ||
920 | skb->dev = t->ifp->nd; | 921 | skb->dev = t->ifp->nd; |