Douglas Gilbert wrote:
Jeff Garzik wrote:
@@ -1093,28 +1189,54 @@
unsigned int buflen)
{
u8 *scsicmd = args->cmd->cmnd, *p, *last;
- unsigned int page_control, six_byte, output_len;
+ const u8 sat_blk_desc[] = {0, 0, 0, 0, 0, 0, 0x2, 0x0};
+ /* 512 byte blocks, number of blocks = 0, (sat-r05) */
NOTE: don't hardcode 512, since that will change very soon in SATA.
So put ATA_SECT_SIZE in there for the time being?
Yes.
1K ATA devices are just around the corner.
@@ -1570,11 +1737,6 @@
ata_scsi_rbuf_fill(&args, ata_scsiop_mode_sense);
break;
- case MODE_SELECT: /* unconditionally return */
- case MODE_SELECT_10: /* bad-field-in-cdb */
- ata_bad_cdb(cmd, done);
- break;
-
case READ_CAPACITY:
ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
break;
At this point in the patch series, you should not be removing this code
AFAICS.
It is a trick and an error correction. In this version
of libata MODE SELECT commands don't have "invalid field
in cdb" as the ata_bad_cmd() sets, but "invalid command
operation code" which is what the default case sets.
Since they are required commands, I tend to prefer "invalid field in
CDB" as a temporary return code.
Of course we could just solve this by getting your MODE SELECT code in
there ;)
Jeff
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html