From: Gwendal Grignou <gwendal@google.com>
To: Dan Williams <djbw@fb.com>
Cc: aaron.lu@intel.com, minggr@gmail.com, tj@kernel.org,
jgarzik@pobox.com, james.bottomley@hansenpartnership.com,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 0/3] Insert ATA transport objects in SCSI syfs topology.
Date: Thu, 4 Oct 2012 09:56:25 -0700 [thread overview]
Message-ID: <CAMHSBOV8ghAV_RCRMPMHW0Gk8ugX6zWTp+aNnWUJ9tmiFeN8pg@mail.gmail.com> (raw)
In-Reply-To: <CAA9_cmdWHRLBru6hN1ibGK75rw3ZQbQ9TULRe-bU=3q4-fb+qw@mail.gmail.com>
On Mon, Oct 1, 2012 at 12:14 PM, Dan Williams <djbw@fb.com> wrote:
> On Mon, Oct 1, 2012 at 11:22 AM, Gwendal Grignou <gwendal@google.com> wrote:
>> This set of patches improve ATA transport classes integration with SCSI
>> objects.
>>
>> Before [2.6.x]
>>
>> Ata and scsi transport class where separated:
>> `--0000:09:00.0
>> | `--ata1
>> | | `--port_port
>> | | `--link1
>> | | | `--dev1.0
>> | | | `--dev1.1
>> | `--ata2
>> | ...
>> | `--host0
>> | | `--scsi_host
>> | | | `--host0
>> | | `--target0:0:0
>> | | | `--0:0:0:0
>> | | | | `--block
>> | | | | | `--sda
>> | | | | | | `--sda1
>>
>> In 3.2, Lin - in commit 9a6d6a2ddabbd32c07f6a38b659e5f3db319fa5a - addressed
>> the issue of linking the ata port with the scsi host object by placing the
>> scsi_host object under ata port objects.
>>
>> However to be more consistent with other transport, this patch does the opposite:
>>
>> For instance, with SAS transport, We have
>> `--0000:0b:00.0
>> | `--host6
>> | | `--phy-6:0
>> | | `--phy-6:1
>> ...
>> | | `--port-6:0
>> | | | `--end_device-6:0
>> | | | | `--sas_device
>> | | | | | `--end_device-6:0
>> | | | | `--sas_end_device
>> | | | | | `--end_device-6:0
>> | | | | `--target6:0:0
>> | | | | | `--6:0:0:0
>> | | | | | | `--block
>> | | | | | | | `--sdb
>> ...
>> | | `--port-6:1
>> | | | `--end_device-6:1
>> ...
>> phy and port have to be separated, sas_port are created dynamically.
>>
>> For ata, all objects are created at initialization time, so the layout is:
>> `--0000:09:00.0
>> | `--host0
>> | | `--port1
>> | | | `--link1
>> | | | | `--dev1.0
>> | | | | | `--target0:0:0
>> | | | | | | `--0:0:0:0
>> | | | | | | | `--block
>> | | | | | | | | `--sda
>>
>> If we have a port multiplier, more links are created.
>> `--0000:09:00.0
>> ...
>> | `--host4
>> | | `--port5
>> | | | `--link5
>> | | | | `--dev5.0
>> [device for the port multiplier]
>> | | | `--link5.0
>> | | | | `--dev5.0.0
>> | | | | | `--target4:0:0
>> | | | | | | `--4:0:0:0
>> | | | | | | | `--block
>> | | | | | | | | `--sdc
>> [disk in port 0 of the port multiplier]
>> ...
>> | | | `--link5.2
>> | | | | `--dev5.2.0
>> | | | | | `--target4:2:0
>> | | | | | | `--4:2:0:0
>> | | | | | | | `--block
>> | | | | | | | | `--sde
>> [disk in port 2 of the port multiplier]
>>
>> In consequence, the path of a scsi device becomes:
>> .../0000:00:1f.2/host0/port1/link1/dev1.0/target0:0:0/0:0:0:0
>> dev1.0 indicates the master device [0] in ata port 1.
>> ata1 being under host0, we know the reliationships between the scsi_host id and
>> ata port id.
>>
>> or when a port multiplier is present: for instance the device in port 4 of the
>> port multiplier:
>> .../0000:00:06.0/0000:09:00.0/host5/port6/link6.4/dev6.4.0/target5:4:0/5:4:0:0
>
> What's the benefit of this?
+ To unify ata transport sysfs topology with other scsi transport.
+ To easily map a ata_port with its associated scsi_host structure.
> From a PM perspective now it seems we'll
> have the parent hardware port suspended before all the scsi_hosts on
> that port,
There is a one to one mapping between ata port and scsi-host, so it works.
All ata ports must be suspended before the parent hardware is.
Gwendal.
> which defeats the original purpose of putting the ata_port
> in the PM hierarchy.
>
> --
> Dan
next prev parent reply other threads:[~2012-10-04 16:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 20:02 Change in sysfs topology for libata Gwendal Grignou
2012-09-12 20:07 ` Gwendal Grignou
2012-09-13 15:38 ` Lin Ming
2012-09-20 0:48 ` Gwendal Grignou
2012-09-20 2:01 ` Aaron Lu
2012-09-27 19:04 ` [PATCH 0/3] Insert ATA transport objects in SCSI syfs topology Gwendal Grignou
2012-09-28 6:27 ` Aaron Lu
2012-10-01 18:22 ` Gwendal Grignou
2012-10-01 19:14 ` Dan Williams
2012-10-04 16:56 ` Gwendal Grignou [this message]
2012-10-07 23:13 ` Dan Williams
2012-09-27 19:04 ` [PATCH 1/3] Revert "ata: make ata port as parent device of scsi host" Gwendal Grignou
2012-09-29 17:08 ` Sergei Shtylyov
2012-10-01 18:22 ` Gwendal Grignou
2012-10-01 18:22 ` [PATCH 2/3] scsi: Allow devices to have arbitrary parent Gwendal Grignou
2012-10-01 18:22 ` [PATCH 3/3] libata: Change transport topology layout Gwendal Grignou
2012-09-27 19:04 ` [PATCH 2/3] scsi: Allow devices to have arbitrary parent Gwendal Grignou
2012-09-27 19:04 ` [PATCH 3/3] libata: Change transport topology layout Gwendal Grignou
2012-09-28 6:38 ` Aaron Lu
2012-10-04 0:49 ` Gwendal Grignou
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=CAMHSBOV8ghAV_RCRMPMHW0Gk8ugX6zWTp+aNnWUJ9tmiFeN8pg@mail.gmail.com \
--to=gwendal@google.com \
--cc=aaron.lu@intel.com \
--cc=djbw@fb.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=minggr@gmail.com \
--cc=tj@kernel.org \
/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).