From: James Bottomley <jejb@linux.vnet.ibm.com>
To: Johannes Thumshirn <jthumshirn@suse.de>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>,
Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org, #@suse.de, v4.5+@suse.de
Subject: Re: [PATCH] SAS: use sas_rphy instead of sas_end_device to obtain address.
Date: Thu, 11 Aug 2016 08:09:35 -0700 [thread overview]
Message-ID: <1470928175.2334.9.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <1470902352-96734-1-git-send-email-jthumshirn@suse.de>
On Thu, 2016-08-11 at 09:59 +0200, Johannes Thumshirn wrote:
> Since commit 3f8d6f2a0 ('ses: fix discovery of SATA devices in SAS
> enclosures') ses_match_to_enclosure() is calling sas_get_address(),
> which is coming from commit bcf508c13385 ('scsi_transport_sas: add
> function to get SAS endpoint address'). sas_get_address() itself
> calls sas_sdev_to_rdev() which BUG_ON()s if a given scsi_device's
> rphy is not a SAS_END_DEVICE.
Is the BUG_ON the problem? you're supposed to gate this call with
is_sas_attached().
> As SAS Enclosure is a SAS expander device,
This isn't necessarily true. There are several separated enclosure
chips even in the SAS world (although most of the new ones are
integrated).
> we really shouldn't tie the lookup of a SAS address to the SAS End
> Device but the sas_rphy, which holds the address information.
This is conceptually wrong. A wide end device may have many rphys
forming a port. In that case the end device address is likely to be
only one of the rphy addresses ... how do you know this code picks the
right one?
> Fixes: 3f8d6f2a0 ('ses: fix discovery of SATA devices in SAS
> enclosures')
> Cc: stable@vger.kernel.org # v4.5+
What's the actual bug being fixed here?
James
next prev parent reply other threads:[~2016-08-11 15:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 7:59 [PATCH] SAS: use sas_rphy instead of sas_end_device to obtain address Johannes Thumshirn
2016-08-11 15:09 ` James Bottomley [this message]
2016-08-11 16:43 ` Johannes Thumshirn
2016-08-11 16:43 ` Johannes Thumshirn
2016-08-11 18:00 ` James Bottomley
2016-08-12 10:08 ` Johannes Thumshirn
2016-08-12 10:08 ` Johannes Thumshirn
2016-08-12 13:11 ` Johannes Thumshirn
2016-08-12 13:11 ` Johannes Thumshirn
2016-08-12 14:34 ` James Bottomley
2016-08-12 14:39 ` Hannes Reinecke
2016-08-12 14:39 ` Hannes Reinecke
2016-08-12 14:54 ` James Bottomley
2016-08-12 14:56 ` Johannes Thumshirn
2016-08-12 14:56 ` Johannes Thumshirn
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=1470928175.2334.9.camel@linux.vnet.ibm.com \
--to=jejb@linux.vnet.ibm.com \
--cc=#@suse.de \
--cc=hare@suse.de \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=v4.5+@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.