From owner-svn-src-head@FreeBSD.ORG Mon Feb 16 14:57:15 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB03B106564A; Mon, 16 Feb 2009 14:57:15 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA7F28FC15; Mon, 16 Feb 2009 14:57:15 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1GEvFrr059221; Mon, 16 Feb 2009 14:57:15 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1GEvFfg059220; Mon, 16 Feb 2009 14:57:15 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200902161457.n1GEvFfg059220@svn.freebsd.org> From: Scott Long Date: Mon, 16 Feb 2009 14:57:15 +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: r188671 - head/sys/cam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2009 14:57:16 -0000 Author: scottl Date: Mon Feb 16 14:57:15 2009 New Revision: 188671 URL: http://svn.freebsd.org/changeset/base/188671 Log: Fix parallel SCSI negotiation in the CAM_NEW_TRAN_CODE world order. Overzealous sanity checks were locking the sync_rate and offset values to zero, thanks to a twisty maze of recursive code. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Feb 16 14:38:52 2009 (r188670) +++ head/sys/cam/cam_xpt.c Mon Feb 16 14:57:15 2009 (r188671) @@ -6679,9 +6679,7 @@ xpt_set_transfer_settings(struct ccb_tra if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0 && (inq_data->flags & SID_Sync) == 0 && cts->type == CTS_TYPE_CURRENT_SETTINGS) - || ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) - || (spi->sync_offset == 0) - || (spi->sync_period == 0)) { + || ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0)) { /* Force async */ spi->sync_period = 0; spi->sync_offset = 0; @@ -6729,7 +6727,8 @@ xpt_set_transfer_settings(struct ccb_tra if (spi->bus_width == 0) spi->ppr_options = 0; - if ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) == 0) { + if ((spi->valid & CTS_SPI_VALID_DISC) + && ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) == 0)) { /* * Can't tag queue without disconnection. */