[PATCH 0/3] Insert ATA transport objects in SCSI syfs topology.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
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

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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux