From owner-svn-src-all@FreeBSD.ORG Sun Jun 12 18:52:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47958106566B; Sun, 12 Jun 2011 18:52:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3018FC21; Sun, 12 Jun 2011 18:52:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5CIqeav036967; Sun, 12 Jun 2011 18:52:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5CIqdJR036964; Sun, 12 Jun 2011 18:52:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201106121852.p5CIqdJR036964@svn.freebsd.org> From: Alexander Motin Date: Sun, 12 Jun 2011 18:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223019 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2011 18:52:40 -0000 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) {