HEADS UP: More CAM fixes.

From: Scott Long <scottl_at_samsco.org>
Date: Mon, 16 Feb 2009 08:09:35 -0700
FWI.  I need lots of testing on this.  Only real SCSI controllers, 
please, not RAID controllers (except for MPT-SCSI with integrated 
mirroring).  So Adaptec, LSI, Symbios, Buslogic, Tekram, SME, etc,
users, please try this and get back to me.  The patch should apply
to FreeBSD 7 as well.  FreeBSD 6 is only affected by this problem
when CAM_NEW_TRAN_CODE is enabled.

Scott


-------- Original Message --------
Subject: svn commit: r188671 - head/sys/cam
Date: Mon, 16 Feb 2009 14:57:15 +0000 (UTC)
From: Scott Long <scottl_at_FreeBSD.org>
To: src-committers_at_FreeBSD.org, svn-src-all_at_FreeBSD.org, 
svn-src-head_at_FreeBSD.org

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)
_at__at_ -6679,9 +6679,7 _at__at_ 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;
_at__at_ -6729,7 +6727,8 _at__at_ 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.
  			 */
Received on Mon Feb 16 2009 - 14:09:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC