linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Gwendal Grignou <gwendal@google.com>
Cc: 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: Fri, 28 Sep 2012 14:27:10 +0800	[thread overview]
Message-ID: <20120928062709.GA2091@mint-spring.sh.intel.com> (raw)
In-Reply-To: <1348772644-12486-1-git-send-email-gwendal@google.com>

On Thu, Sep 27, 2012 at 12:04:01PM -0700, Gwendal Grignou 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/ata1/link1/dev1.0/target0:0:0/0:0:0:0
                         ~~~~
Should be port1 :-)

> 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/ata6/link6.4/dev6.4.0/target5:4:0/5:4:0:0

Same here.

Thanks,
Aaron

> 
> Gwendal Grignou (3):
>   Revert "ata: make ata port as parent device of scsi host"
>   scsi: Allow devices to have arbitrary parent
>   libata: Change transport topology layout
> 
>  drivers/ata/libata-core.c      |   13 ++++++-------
>  drivers/ata/libata-scsi.c      |    4 ++--
>  drivers/ata/libata-transport.c |    2 +-
>  drivers/firewire/sbp2.c        |    3 ++-
>  drivers/message/i2o/i2o_scsi.c |    4 ++--
>  drivers/scsi/scsi_scan.c       |    9 +++++----
>  include/scsi/scsi_device.h     |    2 +-
>  7 files changed, 19 insertions(+), 18 deletions(-)
> 
> -- 
> 1.7.7.3
> 

  reply	other threads:[~2012-09-28  6:27 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 [this message]
2012-10-01 18:22             ` Gwendal Grignou
2012-10-01 19:14               ` Dan Williams
2012-10-04 16:56                 ` Gwendal Grignou
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=20120928062709.GA2091@mint-spring.sh.intel.com \
    --to=aaron.lu@intel.com \
    --cc=gwendal@google.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).