diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-10-04 08:48:17 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-04 08:48:17 -0400 |
commit | 9d5b13021375cad2d64d56105e5f4b5f1509ced2 (patch) | |
tree | 58277dc135251c84cd0e7b858a5100a2886d4807 /drivers/scsi/libata-scsi.c | |
parent | 3aef52311bcb1f88aa5c786302f1ae14a787f61e (diff) |
[libata scsi] add CHS support to ata_scsi_start_stop_xlat()
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 22434e0d4e75..4982e6eff700 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -435,10 +435,21 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc, | |||
435 | return 1; /* power conditions not supported */ | 435 | return 1; /* power conditions not supported */ |
436 | if (scsicmd[4] & 0x1) { | 436 | if (scsicmd[4] & 0x1) { |
437 | tf->nsect = 1; /* 1 sector, lba=0 */ | 437 | tf->nsect = 1; /* 1 sector, lba=0 */ |
438 | tf->lbah = 0x0; | 438 | |
439 | tf->lbam = 0x0; | 439 | if (qc->dev->flags & ATA_DFLAG_LBA) { |
440 | tf->lbal = 0x0; | 440 | qc->tf.flags |= ATA_TFLAG_LBA; |
441 | tf->device |= ATA_LBA; | 441 | |
442 | tf->lbah = 0x0; | ||
443 | tf->lbam = 0x0; | ||
444 | tf->lbal = 0x0; | ||
445 | tf->device |= ATA_LBA; | ||
446 | } else { | ||
447 | /* CHS */ | ||
448 | tf->lbal = 0x1; /* sect */ | ||
449 | tf->lbam = 0x0; /* cyl low */ | ||
450 | tf->lbah = 0x0; /* cyl high */ | ||
451 | } | ||
452 | |||
442 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ | 453 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ |
443 | } else { | 454 | } else { |
444 | tf->nsect = 0; /* time period value (0 implies now) */ | 455 | tf->nsect = 0; /* time period value (0 implies now) */ |