From: Dan Williams <dan.j.williams@intel.com>
To: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: Luben Tuikov <ltuikov@yahoo.com>,
jgarzik@pobox.com, JBottomley@parallels.com,
Jack Wang <jack_wang@usish.com>,
Xiangliang Yu <yuxiangl@marvell.com>,
Mark Salyzyn <msalyzyn@us.xyratex.com>,
Darrick Wong <djwong@us.ibm.com>
Subject: [PATCH 1/5] libsas: disable scanning lun > 0 on ata devices
Date: Tue, 20 Sep 2011 15:10:19 -0700 [thread overview]
Message-ID: <20110920221008.1094.34064.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110920220819.1094.12265.stgit@localhost6.localdomain6>
Currently mvsas and pm8001 have custom ->slave_alloc implementations to
achieve this. Uplevel it for all libsas drivers as isci encounters problems
with atapi devices when scanning past lun0.
Just do what Darrick suggested [1], and limit the scan for ata devices.
[1] http://marc.info/?l=linux-scsi&m=116604101119861&w=2
Cc: Darrick Wong <djwong@us.ibm.com>
Cc: Xiangliang Yu <yuxiangl@marvell.com>
Cc: Jack Wang <jack_wang@usish.com>
Cc: Mark Salyzyn <msalyzyn@us.xyratex.com>
Cc: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/scsi/scsi_transport_sas.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index c6fcf76..9d9330a 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -1545,8 +1545,14 @@ int sas_rphy_add(struct sas_rphy *rphy)
if (identify->device_type == SAS_END_DEVICE &&
rphy->scsi_target_id != -1) {
- scsi_scan_target(&rphy->dev, 0,
- rphy->scsi_target_id, SCAN_WILD_CARD, 0);
+ int lun;
+
+ if (identify->target_port_protocols & SAS_PROTOCOL_SSP)
+ lun = SCAN_WILD_CARD;
+ else
+ lun = 0;
+
+ scsi_scan_target(&rphy->dev, 0, rphy->scsi_target_id, lun, 0);
}
return 0;
next prev parent reply other threads:[~2011-09-20 22:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 22:10 [PATCH 0/5] libsas fixes discovered via isci-atapi enabling effort Dan Williams
2011-09-20 22:10 ` Dan Williams [this message]
2011-09-20 22:15 ` [PATCH 1/5] libsas: disable scanning lun > 0 on ata devices Christoph Hellwig
2011-09-21 12:28 ` Mark Salyzyn
2011-09-22 2:29 ` Jeff Garzik
2011-09-20 22:10 ` [PATCH 2/5] libsas: fix ->change_queue_{depth|type} for sata devices Dan Williams
2011-09-20 22:16 ` Christoph Hellwig
2011-09-21 12:27 ` Mark Salyzyn
2011-09-22 2:30 ` Jeff Garzik
2011-09-20 22:10 ` [RFC PATCH 3/5] libsas: dynamic queue depth Dan Williams
2011-09-20 22:18 ` Christoph Hellwig
2011-09-21 1:17 ` Jack Wang
2011-09-21 12:37 ` Mark Salyzyn
2011-09-22 1:38 ` Jack Wang
2011-09-20 22:10 ` [PATCH 4/5] mvsas: remove mvs_slave_{alloc|configure} Dan Williams
2011-09-22 2:26 ` Xiangliang Yu
2011-09-22 2:31 ` Jeff Garzik
2011-09-22 3:17 ` Williams, Dan J
2011-09-22 3:19 ` Xiangliang Yu
2011-09-20 22:11 ` [PATCH 5/5] pm8001: remove pm8001_slave_{alloc|configure} Dan Williams
2011-09-21 1:13 ` [PATCH 0/5] libsas fixes discovered via isci-atapi enabling effort Jack Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110920221008.1094.34064.stgit@localhost6.localdomain6 \
--to=dan.j.williams@intel.com \
--cc=JBottomley@parallels.com \
--cc=djwong@us.ibm.com \
--cc=jack_wang@usish.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ltuikov@yahoo.com \
--cc=msalyzyn@us.xyratex.com \
--cc=yuxiangl@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox