OSDN Git Service

scsi: libsas: add transport class for ATA devices
authorJason Yan <yanaijie@huawei.com>
Mon, 26 Mar 2018 09:27:41 +0000 (17:27 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Apr 2018 23:32:51 +0000 (19:32 -0400)
commitb6240a4df0186c03e5ffff6f61570ed31a1a5172
treead037bb6ad16a5ac18c1f83545ae86e90e538fcf
parentc90a0bea4f645d561b87becd2bd99f7934402510
scsi: libsas: add transport class for ATA devices

Now ata devices attached with sas controller do not have transport
class, so that we can not see any information of these ata devices in
/sys/class/ata_port(or ata_link or ata_device).

Add transport class for the ata devices attached with sas controller.
The /sys/class directory will show the infomation of the ata devices
as follows:

localhost:/sys/class # ls ata*
ata_device:
dev1.0  dev2.0

ata_link:
link1  link2

ata_port:
ata1  ata2

No functional change of the device scanning and io path. The ata
transport class was deleted when destroying the sas devices.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
CC: Dan Williams <dan.j.williams@intel.com>
CC: Tejun Heo <tj@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ata/libata-scsi.c
drivers/scsi/libsas/sas_ata.c
drivers/scsi/libsas/sas_discover.c
include/linux/libata.h