Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2011 18:52:39 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223019 - head/sys/cam/ata
Message-ID:  <201106121852.p5CIqdJR036964@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Jun 12 18:52:39 2011
New Revision: 223019
URL: http://svn.freebsd.org/changeset/base/223019

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

Modified:
  head/sys/cam/ata/ata_all.c
  head/sys/cam/ata/ata_xpt.c

Modified: head/sys/cam/ata/ata_all.c
==============================================================================
--- head/sys/cam/ata/ata_all.c	Sun Jun 12 18:46:48 2011	(r223018)
+++ head/sys/cam/ata/ata_all.c	Sun Jun 12 18:52:39 2011	(r223019)
@@ -270,6 +270,7 @@ ata_print_ident(struct ata_params *ident
 		   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) {

Modified: head/sys/cam/ata/ata_xpt.c
==============================================================================
--- head/sys/cam/ata/ata_xpt.c	Sun Jun 12 18:46:48 2011	(r223018)
+++ head/sys/cam/ata/ata_xpt.c	Sun Jun 12 18:52:39 2011	(r223019)
@@ -1583,12 +1583,14 @@ ata_device_transport(struct cam_path *pa
 	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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106121852.p5CIqdJR036964>