Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 May 2012 07:08:04 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r234915 - stable/8/sys/cam/ata
Message-ID:  <201205020708.q42784vL070506@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed May  2 07:08:04 2012
New Revision: 234915
URL: http://svn.freebsd.org/changeset/base/234915

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

Modified:
  stable/8/sys/cam/ata/ata_all.c
  stable/8/sys/cam/ata/ata_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/cam/ata/ata_all.c
==============================================================================
--- stable/8/sys/cam/ata/ata_all.c	Wed May  2 07:05:20 2012	(r234914)
+++ stable/8/sys/cam/ata/ata_all.c	Wed May  2 07:08:04 2012	(r234915)
@@ -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: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Wed May  2 07:05:20 2012	(r234914)
+++ stable/8/sys/cam/ata/ata_xpt.c	Wed May  2 07:08:04 2012	(r234915)
@@ -1596,12 +1596,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;
@@ -1651,7 +1653,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?201205020708.q42784vL070506>