1. 29 Apr, 2019 14 commits
  2. 19 Apr, 2019 5 commits
  3. 16 Apr, 2019 18 commits
  4. 15 Apr, 2019 3 commits
    • John Garry's avatar
      scsi: libsas: Print expander PHY indexes in decimal · 3c236f8c
      John Garry authored
      Currently we print expander PHY indexes in a mix of decimal and hex.
      
      It is more consistent and also more convenient to read decimal, so
      make this change.
      
      We use width of 2 for expander and 1 for root PHYs prints.
      
      Some lines which were needlessly spilling multiple lines are unified.
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      3c236f8c
    • John Garry's avatar
      scsi: libsas: Do discovery on empty PHY to update PHY info · d8649fc1
      John Garry authored
      When we discover the PHY is empty in sas_rediscover_dev(), the PHY
      information (like negotiated linkrate) is not updated.
      
      As such, for a user examining sysfs for that PHY, they would see
      incorrect values:
      
      root@(none)$ cd /sys/class/sas_phy/phy-0:0:20
      root@(none)$ more negotiated_linkrate
      3.0 Gbit
      root@(none)$ echo 0 > enable
      root@(none)$ more negotiated_linkrate
      3.0 Gbit
      
      So fix this, simply discover the PHY again, even though we know it's empty;
      in the above example, this gives us:
      
      root@(none)$ more negotiated_linkrate
      Phy disabled
      
      We must do this after unregistering the device associated with the PHY
      (in sas_unregister_devs_sas_addr()).
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      d8649fc1
    • John Garry's avatar
      scsi: libsas: Inject revalidate event for root port event · 085f104a
      John Garry authored
      According to the SAS spec, an expander device shall transmit BROADCAST
      (CHANGE) from at least one phy in each expander port other than the
      expander port that is the cause for transmitting BROADCAST (CHANGE).
      
      As such, for when the link is lost for a root PHY attached to an expander
      PHY, we get no broadcast event.
      
      This causes an issue for libsas, in that we will not revalidate the domain
      for these events.
      
      As a solution, for when a root PHY is formed or deformed from a root port,
      insert a broadcast event to trigger a domain revalidation.
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      085f104a