summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2009-02-16 14:57:15 +0000
committerscottl <scottl@FreeBSD.org>2009-02-16 14:57:15 +0000
commite663138071eaf2b1281723f8c374110660ea2d89 (patch)
treee70ba52d4a2fa6458ad2d2b90bd17b11ec962c46 /sys/cam
parent15b6385737c2928ff5bc5e8956d0c5d6309e4409 (diff)
downloadFreeBSD-src-e663138071eaf2b1281723f8c374110660ea2d89.zip
FreeBSD-src-e663138071eaf2b1281723f8c374110660ea2d89.tar.gz
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.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_xpt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index fc03125..b3be9e5 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -6679,9 +6679,7 @@ xpt_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
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_trans_settings *cts, struct cam_ed *device,
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.
*/
OpenPOWER on IntegriCloud