diff options
author | Jason Yan <yanaijie@huawei.com> | 2018-03-26 11:27:41 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-19 01:32:51 +0200 |
commit | b6240a4df0186c03e5ffff6f61570ed31a1a5172 (patch) | |
tree | ad037bb6ad16a5ac18c1f83545ae86e90e538fcf /drivers/scsi/libsas/sas_discover.c | |
parent | scsi: hisi_sas: remove some unneeded structure members (diff) | |
download | linux-b6240a4df0186c03e5ffff6f61570ed31a1a5172.tar.xz linux-b6240a4df0186c03e5ffff6f61570ed31a1a5172.zip |
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>
Diffstat (limited to 'drivers/scsi/libsas/sas_discover.c')
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index a0fa7ef3a071..1ffca28fe6a8 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c @@ -314,6 +314,7 @@ void sas_free_device(struct kref *kref) kfree(dev->ex_dev.ex_phy); if (dev_is_sata(dev) && dev->sata_dev.ap) { + ata_sas_tport_delete(dev->sata_dev.ap); ata_sas_port_destroy(dev->sata_dev.ap); dev->sata_dev.ap = NULL; } |