Do not report CFA devices as ATAPI, even though IDENTIFY data look alike.

This commit is contained in:
Alexander Motin 2011-06-12 18:52:39 +00:00
parent 9420dc62cd
commit 8e6cab54e8
2 changed files with 8 additions and 3 deletions

View File

@ -270,6 +270,7 @@ ata_print_ident(struct ata_params *ident_data)
sizeof(revision));
printf("<%s %s> %s-%d",
product, revision,
(ident_data->config == ATA_PROTO_CFA) ? "CFA" :
(ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA",
ata_version(ident_data->version_major));
if (ident_data->satacapabilities && ident_data->satacapabilities != 0xffff) {

View File

@ -1583,12 +1583,14 @@ ata_device_transport(struct cam_path *path)
cts.proto_specific.valid = 0;
if (ident_buf) {
if (path->device->transport == XPORT_ATA) {
cts.xport_specific.ata.atapi =
cts.xport_specific.ata.atapi =
(ident_buf->config == ATA_PROTO_CFA) ? 0 :
((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 :
((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0;
cts.xport_specific.ata.valid = CTS_ATA_VALID_ATAPI;
} else {
cts.xport_specific.sata.atapi =
cts.xport_specific.sata.atapi =
(ident_buf->config == ATA_PROTO_CFA) ? 0 :
((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 :
((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0;
cts.xport_specific.sata.valid = CTS_SATA_VALID_ATAPI;
@ -1638,7 +1640,9 @@ ata_action(union ccb *start_ccb)
uint16_t p =
device->ident_data.config & ATA_PROTO_MASK;
maxlen = (p == ATA_PROTO_ATAPI_16) ? 16 :
maxlen =
(device->ident_data.config == ATA_PROTO_CFA) ? 0 :
(p == ATA_PROTO_ATAPI_16) ? 16 :
(p == ATA_PROTO_ATAPI_12) ? 12 : 0;
}
if (start_ccb->csio.cdb_len > maxlen) {