diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
commit | 2fca877b68b2b4fc5b94277858a1bedd46017cde (patch) | |
tree | fd02725406299ba2f26354463b3c261721e9eb6b /drivers/scsi/libata-scsi.c | |
parent | ff40c6d3d1437ecdf295b8e39adcb06c3d6021ef (diff) | |
parent | 02b3e4e2d71b6058ec11cc01c72ac651eb3ded2b (diff) |
/spare/repo/libata-dev branch 'v2.6.13'
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 5367c10e4db8..954d1bca3b2a 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -385,6 +385,7 @@ int ata_scsi_error(struct Scsi_Host *host) | |||
385 | * appropriate place | 385 | * appropriate place |
386 | */ | 386 | */ |
387 | host->host_failed--; | 387 | host->host_failed--; |
388 | INIT_LIST_HEAD(&host->eh_cmd_q); | ||
388 | 389 | ||
389 | DPRINTK("EXIT\n"); | 390 | DPRINTK("EXIT\n"); |
390 | return 0; | 391 | return 0; |
@@ -1250,8 +1251,12 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf, | |||
1250 | 1251 | ||
1251 | n_sectors--; /* ATA TotalUserSectors - 1 */ | 1252 | n_sectors--; /* ATA TotalUserSectors - 1 */ |
1252 | 1253 | ||
1253 | tmp = n_sectors; /* note: truncates, if lba48 */ | ||
1254 | if (args->cmd->cmnd[0] == READ_CAPACITY) { | 1254 | if (args->cmd->cmnd[0] == READ_CAPACITY) { |
1255 | if( n_sectors >= 0xffffffffULL ) | ||
1256 | tmp = 0xffffffff ; /* Return max count on overflow */ | ||
1257 | else | ||
1258 | tmp = n_sectors ; | ||
1259 | |||
1255 | /* sector count, 32-bit */ | 1260 | /* sector count, 32-bit */ |
1256 | rbuf[0] = tmp >> (8 * 3); | 1261 | rbuf[0] = tmp >> (8 * 3); |
1257 | rbuf[1] = tmp >> (8 * 2); | 1262 | rbuf[1] = tmp >> (8 * 2); |
@@ -1265,10 +1270,12 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf, | |||
1265 | 1270 | ||
1266 | } else { | 1271 | } else { |
1267 | /* sector count, 64-bit */ | 1272 | /* sector count, 64-bit */ |
1268 | rbuf[2] = n_sectors >> (8 * 7); | 1273 | tmp = n_sectors >> (8 * 4); |
1269 | rbuf[3] = n_sectors >> (8 * 6); | 1274 | rbuf[2] = tmp >> (8 * 3); |
1270 | rbuf[4] = n_sectors >> (8 * 5); | 1275 | rbuf[3] = tmp >> (8 * 2); |
1271 | rbuf[5] = n_sectors >> (8 * 4); | 1276 | rbuf[4] = tmp >> (8 * 1); |
1277 | rbuf[5] = tmp; | ||
1278 | tmp = n_sectors; | ||
1272 | rbuf[6] = tmp >> (8 * 3); | 1279 | rbuf[6] = tmp >> (8 * 3); |
1273 | rbuf[7] = tmp >> (8 * 2); | 1280 | rbuf[7] = tmp >> (8 * 2); |
1274 | rbuf[8] = tmp >> (8 * 1); | 1281 | rbuf[8] = tmp >> (8 * 1); |