All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Jason Yan <yanaijie@huawei.com>, <martin.petersen@oracle.com>,
	<jejb@linux.vnet.ibm.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<zhaohongjiang@huawei.com>, <hare@suse.com>,
	<dan.j.williams@intel.com>, <jthumshirn@suse.de>, <hch@lst.de>,
	<huangdaode@hisilicon.com>, <chenxiang66@hisilicon.com>,
	<xiexiuqi@huawei.com>, <tj@kernel.org>, <miaoxie@huawei.com>,
	chenqilin <chenqilin2@huawei.com>, Ewan Milne <emilne@redhat.com>,
	Tomas Henzl <thenzl@redhat.com>
Subject: Re: [PATCH 8/8] scsi: libsas: support SATA phy link rate unmatch the pathway
Date: Thu, 31 May 2018 17:05:25 +0100	[thread overview]
Message-ID: <ed533ab2-018d-0bda-568f-0034dac1e332@huawei.com> (raw)
In-Reply-To: <20180529022309.21071-9-yanaijie@huawei.com>

On 29/05/2018 03:23, Jason Yan wrote:
> If a SATA disk attached to a expander phy and it's linkrate is greater
> than the expander host phy's linkrate, the disk will failed to discover.
> The topology is like below:
>
>    +----------+           +----------+
>    |          |           |          |
>    |          |-- 3.0 G --|          |-- 6.0 G -- SAS  disk
>    |          |           |          |
>    |          |-- 3.0 G --|          |-- 6.0 G -- SAS  disk
>    |initiator |           |          |
>    | device   |-- 3.0 G --| Expander |-- 6.0 G -- SAS  disk
>    |          |           |          |
>    |          |-- 3.0 G --|          |-- 6.0 G -- SATA disk  -->failed to connect
>    |          |           |          |
>    |          |           |          |-- 6.0 G -- SATA disk  -->failed to connect
>    |          |           |          |
>    +----------+           +----------+
>
> And when we check the sas protocal spec, this scenario is described as
> this:
>
> 7.13 Rate matching
> ......
> If an expander phy attached to a SATA phy is using a physical link rate
> greater than the maximum connection rate supported by the pathway from
> an STP initiator port, a management application client should use the
> SMP PHY CONTROL function (see 10.4.3.10) to set the PROGRAMMED MAXIMUM
> PHYSICAL LINK RATE field of the expander phy to the maximum connection
> rate supported by the pathway from that STP initiator port.
>
> In order to support this scenario, checking the SATA disk's linkrate
> to see if it is greater than any phy's linkrate it may pass through.
> Remember the minimum linkrate of the pathway and set the SATA phy
> linkrate to it using the SMP PHY CONTROL function.

As we (re)discover the tree, can we keep track of the min pathway to the 
root PHY dynamically (per expander), and then take action for any SATA 
devices attached which have a negotiated linkrate greater (than the 
expanders min pathway)? This would be an alternate to your approach of 
finishing discovery and then checking the min pathway as a whole new step.

WARNING: multiple messages have this Message-ID (diff)
From: John Garry <john.garry@huawei.com>
To: Jason Yan <yanaijie@huawei.com>,
	martin.petersen@oracle.com, jejb@linux.vnet.ibm.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhaohongjiang@huawei.com, hare@suse.com,
	dan.j.williams@intel.com, jthumshirn@suse.de, hch@lst.de,
	huangdaode@hisilicon.com, chenxiang66@hisilicon.com,
	xiexiuqi@huawei.com, tj@kernel.org, miaoxie@huawei.com,
	chenqilin <chenqilin2@huawei.com>, Ewan Milne <emilne@redhat.com>,
	Tomas Henzl <thenzl@redhat.com>
Subject: Re: [PATCH 8/8] scsi: libsas: support SATA phy link rate unmatch the pathway
Date: Thu, 31 May 2018 17:05:25 +0100	[thread overview]
Message-ID: <ed533ab2-018d-0bda-568f-0034dac1e332@huawei.com> (raw)
In-Reply-To: <20180529022309.21071-9-yanaijie@huawei.com>

On 29/05/2018 03:23, Jason Yan wrote:
> If a SATA disk attached to a expander phy and it's linkrate is greater
> than the expander host phy's linkrate, the disk will failed to discover.
> The topology is like below:
>
>    +----------+           +----------+
>    |          |           |          |
>    |          |-- 3.0 G --|          |-- 6.0 G -- SAS  disk
>    |          |           |          |
>    |          |-- 3.0 G --|          |-- 6.0 G -- SAS  disk
>    |initiator |           |          |
>    | device   |-- 3.0 G --| Expander |-- 6.0 G -- SAS  disk
>    |          |           |          |
>    |          |-- 3.0 G --|          |-- 6.0 G -- SATA disk  -->failed to connect
>    |          |           |          |
>    |          |           |          |-- 6.0 G -- SATA disk  -->failed to connect
>    |          |           |          |
>    +----------+           +----------+
>
> And when we check the sas protocal spec, this scenario is described as
> this:
>
> 7.13 Rate matching
> ......
> If an expander phy attached to a SATA phy is using a physical link rate
> greater than the maximum connection rate supported by the pathway from
> an STP initiator port, a management application client should use the
> SMP PHY CONTROL function (see 10.4.3.10) to set the PROGRAMMED MAXIMUM
> PHYSICAL LINK RATE field of the expander phy to the maximum connection
> rate supported by the pathway from that STP initiator port.
>
> In order to support this scenario, checking the SATA disk's linkrate
> to see if it is greater than any phy's linkrate it may pass through.
> Remember the minimum linkrate of the pathway and set the SATA phy
> linkrate to it using the SMP PHY CONTROL function.

As we (re)discover the tree, can we keep track of the min pathway to the 
root PHY dynamically (per expander), and then take action for any SATA 
devices attached which have a negotiated linkrate greater (than the 
expanders min pathway)? This would be an alternate to your approach of 
finishing discovery and then checking the min pathway as a whole new step.

  reply	other threads:[~2018-05-31 16:06 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29  2:23 [PATCH 0/8] libsas: Support swapping disks and SATA phy link rate matching the pathway Jason Yan
2018-05-29  2:23 ` Jason Yan
2018-05-29  2:23 ` [PATCH 1/8] scsi: libsas: delete dead code in scsi_transport_sas.c Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  7:33   ` Johannes Thumshirn
2018-05-31 14:26   ` John Garry
2018-05-31 14:26     ` John Garry
2018-05-29  2:23 ` [PATCH 2/8] scsi: libsas: check the lldd callback correctly Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  7:34   ` Johannes Thumshirn
2018-05-31 14:09   ` John Garry
2018-05-31 14:09     ` John Garry
2018-06-01  0:15     ` Jason Yan
2018-06-01  0:15       ` Jason Yan
2018-05-29  2:23 ` [PATCH 3/8] scsi: libsas: always unregister the old device if going to discover new Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  7:37   ` Johannes Thumshirn
2018-05-31 15:09   ` John Garry
2018-05-31 15:09     ` John Garry
2018-06-01  0:28     ` Jason Yan
2018-06-01  0:28       ` Jason Yan
2018-05-29  2:23 ` [PATCH 4/8] scsi: libsas: trigger a new revalidation to discover the device Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  7:43   ` Johannes Thumshirn
2018-05-31 15:42   ` John Garry
2018-05-31 15:42     ` John Garry
2018-06-01  0:59     ` Jason Yan
2018-06-01  0:59       ` Jason Yan
2018-06-01 10:02       ` John Garry
2018-06-01 10:02         ` John Garry
2018-06-04  1:01         ` Jason Yan
2018-06-04  1:01           ` Jason Yan
2018-05-29  2:23 ` [PATCH 5/8] scsi: libsas: check if the same sata device when flutter Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  2:23 ` [PATCH 6/8] scsi: libsas: reset the phy state and address if discover failed Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  2:23 ` [PATCH 7/8] scsi: libsas: fix issue of swapping two sas disks Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-29  2:23 ` [PATCH 8/8] scsi: libsas: support SATA phy link rate unmatch the pathway Jason Yan
2018-05-29  2:23   ` Jason Yan
2018-05-31 16:05   ` John Garry [this message]
2018-05-31 16:05     ` John Garry
2018-06-01  1:21     ` Jason Yan
2018-06-01  1:21       ` Jason Yan
2018-06-01 10:13       ` John Garry
2018-06-01 10:13         ` John Garry

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=ed533ab2-018d-0bda-568f-0034dac1e332@huawei.com \
    --to=john.garry@huawei.com \
    --cc=chenqilin2@huawei.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=dan.j.williams@intel.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=huangdaode@hisilicon.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=miaoxie@huawei.com \
    --cc=thenzl@redhat.com \
    --cc=tj@kernel.org \
    --cc=xiexiuqi@huawei.com \
    --cc=yanaijie@huawei.com \
    --cc=zhaohongjiang@huawei.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 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.