From: Jeff Garzik <jgarzik@pobox.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
Luben Tuikov <ltuikov@yahoo.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: Re: [PATCH 1/5] libsas: disable scanning lun > 0 on ata devices
Date: Wed, 21 Sep 2011 22:29:19 -0400 [thread overview]
Message-ID: <4E7A9D7F.1030003@pobox.com> (raw)
In-Reply-To: <20110920221008.1094.34064.stgit@localhost6.localdomain6>
On 09/20/2011 06:10 PM, Dan Williams wrote:
> 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);
Acked-by: Jeff Garzik <jgarzik@redhat.com>
next prev parent reply other threads:[~2011-09-22 2:29 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 ` [PATCH 1/5] libsas: disable scanning lun > 0 on ata devices Dan Williams
2011-09-20 22:15 ` Christoph Hellwig
2011-09-21 12:28 ` Mark Salyzyn
2011-09-22 2:29 ` Jeff Garzik [this message]
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=4E7A9D7F.1030003@pobox.com \
--to=jgarzik@pobox.com \
--cc=JBottomley@parallels.com \
--cc=dan.j.williams@intel.com \
--cc=djwong@us.ibm.com \
--cc=jack_wang@usish.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;
as well as URLs for NNTP newsgroup(s).