Re: [PATCH] scsi: libsas: add transport class for ATA devices

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

 



Hi, Dan

On 2018/3/26 22:38, Dan Williams wrote:
On Mon, Mar 26, 2018 at 2:27 AM, Jason Yan <yanaijie@xxxxxxxxxx> wrote:
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.

Have you tested this with suspend / resume power management? I believe
that is what stopped me from going down this path, when I first
evaluated it.


I tested this patch with suspend/resume power management and did not
see any regressions. I don't know if this test is enough. The log is
as below:

[ 1098.226768] hns-nic HISI00C2:01 eth1: link up
[ 1183.162762] PM: suspend entry (s2idle)
[ 1183.162766] PM: Syncing filesystems ... done.
[ 1183.163224] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 1183.164710] OOM killer disabled.
[ 1183.164711] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1183.166415] Suspending console(s) (use no_console_suspend to debug)
[ 1183.166733] pci_bus 0004:88: 2-byte config write to 0004:88:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1183.166741] pci_bus 0005:00: 2-byte config write to 0005:00:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1183.166748] pci_bus 0006:c0: 2-byte config write to 0006:c0:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1183.166758] pci_bus 000a:10: 2-byte config write to 000a:10:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1183.166765] pci_bus 000c:20: 2-byte config write to 000c:20:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1183.166774] pci_bus 000d:30: 2-byte config write to 000d:30:00.0 offset 0x44 may corrupt adjacent RW1C bits
[ 1183.242586] sd 0:0:11:0: [sdl] Synchronizing SCSI cache
[ 1183.258568] sd 0:0:10:0: [sdk] Synchronizing SCSI cache
[ 1183.258699] sd 0:0:10:0: [sdk] Stopping disk
[ 1183.922568] sd 0:0:9:0: [sdj] Synchronizing SCSI cache
[ 1183.922690] sd 0:0:9:0: [sdj] Stopping disk
[ 1184.610567] sd 0:0:8:0: [sdi] Synchronizing SCSI cache
[ 1184.626567] sd 0:0:7:0: [sdh] Synchronizing SCSI cache
[ 1184.642564] sd 0:0:6:0: [sdg] Synchronizing SCSI cache
[ 1184.658567] sd 0:0:5:0: [sdf] Synchronizing SCSI cache
[ 1184.674565] sd 0:0:4:0: [sde] Synchronizing SCSI cache
[ 1184.690567] sd 0:0:3:0: [sdd] Synchronizing SCSI cache
[ 1184.706564] sd 0:0:2:0: [sdc] Synchronizing SCSI cache
[ 1184.722566] sd 0:0:1:0: [sdb] Synchronizing SCSI cache
[ 1184.738563] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1184.738844] sas: Enter sas_scsi_recover_host busy: 0 failed: 0
[ 1184.738857] sas: ata1: end_device-0:0:9: dev error handler
[ 1184.738860] sas: ata2: end_device-0:0:10: dev error handler
[ 1184.738877] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 0 tries: 1 [ 1184.739169] pci_bus 000d:30: 2-byte config write to 000d:30:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1184.739179] pci_bus 000c:20: 2-byte config write to 000c:20:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1184.739188] pci_bus 000a:10: 2-byte config write to 000a:10:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1184.739214] pci_bus 0006:c0: 2-byte config write to 0006:c0:00.0 offset 0x44 may corrupt adjacent RW1C bits
[ 1184.739334] pcieport 0002:80:00.0: can't derive routing for PCI INT A
[ 1184.739336] ixgbe 0002:81:00.0: PCI INT A: no GSI
[ 1184.758563] PM: suspend debug: Waiting for 5 second(s).
[ 1189.809010] sas: Enter sas_scsi_recover_host busy: 0 failed: 0
[ 1189.811180] sas: ata1: end_device-0:0:9: dev error handler
[ 1189.811185] sas: ata1: end_device-0:0:9: Unable to reset ata device?
[ 1189.811223] sas: ata2: end_device-0:0:10: dev error handler
[ 1189.811226] sas: ata2: end_device-0:0:10: Unable to reset ata device?
[ 1189.811474] sd 0:0:9:0: [sdj] Starting disk
[ 1189.888654] ixgbe 0002:81:00.0: Multiqueue Enabled: Rx Queue count = 63, Tx Queue count = 63 XDP Queue count = 0
[ 1189.974214] ata2.00: configured for UDMA/133
[ 1189.974285] ata1.00: configured for UDMA/133
[ 1189.974295] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 0 tries: 1
[ 1197.991137] sd 0:0:10:0: [sdk] Starting disk
[ 1210.019736] pci_generic_config_write32: 2 callbacks suppressed
[ 1210.019740] pci_bus 000d:30: 2-byte config write to 000d:30:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1210.019748] pci_bus 000c:20: 2-byte config write to 000c:20:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1210.019755] pci_bus 000a:10: 2-byte config write to 000a:10:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1210.019764] pci_bus 0006:c0: 2-byte config write to 0006:c0:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1210.019770] pci_bus 0005:00: 2-byte config write to 0005:00:00.0 offset 0x44 may corrupt adjacent RW1C bits [ 1210.019775] pci_bus 0004:88: 2-byte config write to 0004:88:00.0 offset 0x44 may corrupt adjacent RW1C bits
[ 1210.019888] OOM killer enabled.
[ 1210.019889] Restarting tasks ... done.
[ 1210.021064] PM: suspend exit


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

/sys/class/ata_link:
link1  link2

/sys/class/ata_port:
ata1  ata2
localhost:/sys/power #
localhost:/sys/power # lsscsi
[0:0:0:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sda
[0:0:1:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdb
[0:0:2:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdc
[0:0:3:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdd
[0:0:4:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sde
[0:0:5:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdf
[0:0:6:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdg
[0:0:7:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdh
[0:0:8:0]    disk    SEAGATE  ST3600057SS      0008  /dev/sdi
[0:0:9:0]    disk    ATA      HGST HUS724040AL A8B0  /dev/sdj
[0:0:10:0]   disk    ATA      HGST HUS724040AL A8B0  /dev/sdk
[0:0:11:0]   disk    SEAGATE  ST3600057SS      0008  /dev/sdl
[0:0:12:0]   enclosu 12G SAS  Expander         RevB  -


Jason






[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