diff options
Diffstat (limited to 'drivers/scsi/sata_vsc.c')
-rw-r--r-- | drivers/scsi/sata_vsc.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 5af05fdf8544..54273e0063c7 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -153,16 +153,24 @@ static void vsc_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) | |||
153 | static void vsc_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf) | 153 | static void vsc_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf) |
154 | { | 154 | { |
155 | struct ata_ioports *ioaddr = &ap->ioaddr; | 155 | struct ata_ioports *ioaddr = &ap->ioaddr; |
156 | u16 nsect, lbal, lbam, lbah; | 156 | u16 nsect, lbal, lbam, lbah, feature; |
157 | 157 | ||
158 | nsect = tf->nsect = readw(ioaddr->nsect_addr); | 158 | tf->command = ata_check_status(ap); |
159 | lbal = tf->lbal = readw(ioaddr->lbal_addr); | ||
160 | lbam = tf->lbam = readw(ioaddr->lbam_addr); | ||
161 | lbah = tf->lbah = readw(ioaddr->lbah_addr); | ||
162 | tf->device = readw(ioaddr->device_addr); | 159 | tf->device = readw(ioaddr->device_addr); |
160 | feature = readw(ioaddr->error_addr); | ||
161 | nsect = readw(ioaddr->nsect_addr); | ||
162 | lbal = readw(ioaddr->lbal_addr); | ||
163 | lbam = readw(ioaddr->lbam_addr); | ||
164 | lbah = readw(ioaddr->lbah_addr); | ||
165 | |||
166 | tf->feature = feature; | ||
167 | tf->nsect = nsect; | ||
168 | tf->lbal = lbal; | ||
169 | tf->lbam = lbam; | ||
170 | tf->lbah = lbah; | ||
163 | 171 | ||
164 | if (tf->flags & ATA_TFLAG_LBA48) { | 172 | if (tf->flags & ATA_TFLAG_LBA48) { |
165 | tf->hob_feature = readb(ioaddr->error_addr); | 173 | tf->hob_feature = feature >> 8; |
166 | tf->hob_nsect = nsect >> 8; | 174 | tf->hob_nsect = nsect >> 8; |
167 | tf->hob_lbal = lbal >> 8; | 175 | tf->hob_lbal = lbal >> 8; |
168 | tf->hob_lbam = lbam >> 8; | 176 | tf->hob_lbam = lbam >> 8; |