1. 29 Apr, 2019 6 commits
    • Manish Rangankar's avatar
      scsi: qedi: Adjust termination and offload ramrod timers · 3252688f
      Manish Rangankar authored
      Whenever offload ramrod is issued, firmware wants driver to wait for max 5
      secs, otherwise driver can initiate further corrective action. Similarly,
      when termination ramrod is issued, irrespective of abortive or non-abortive
      termination, driver should wait for 60 sec * max TCP-RT timeout.
      
      [mkp: typos]
      Signed-off-by: default avatarManish Rangankar <mrangankar@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      3252688f
    • Manish Rangankar's avatar
      scsi: qedi: Abort ep termination if offload not scheduled · f848bfd8
      Manish Rangankar authored
      Sometimes during connection recovery when there is a failure to resolve
      ARP, and offload connection was not issued, driver tries to flush pending
      offload connection work which was not queued up.
      
      kernel: WARNING: CPU: 19 PID: 10110 at kernel/workqueue.c:3030 __flush_work.isra.34+0x19c/0x1b0
      kernel: CPU: 19 PID: 10110 Comm: iscsid Tainted: G W 5.1.0-rc4 #11
      kernel: Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 2.9.1 12/04/2018
      kernel: RIP: 0010:__flush_work.isra.34+0x19c/0x1b0
      kernel: Code: 8b fb 66 0f 1f 44 00 00 31 c0 eb ab 48 89 ef c6 07 00 0f 1f 40 00 fb 66 0f 1f 44 00 00 31 c0 eb 96 e8 08 16 fe ff 0f 0b eb 8d <0f> 0b 31 c0 eb 87 0f 1f 40 00 66 2e 0f 1
      f 84 00 00 00 00 00 0f 1f
      kernel: RSP: 0018:ffffa6b4054dba68 EFLAGS: 00010246
      kernel: RAX: 0000000000000000 RBX: ffff91df21c36fc0 RCX: 0000000000000000
      kernel: RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff91df21c36fc0
      kernel: RBP: ffff91df21c36ef0 R08: 0000000000000000 R09: 0000000000000000
      kernel: R10: 0000000000000038 R11: ffffa6b4054dbd60 R12: ffffffffc05e72c0
      kernel: R13: ffff91db10280820 R14: 0000000000000048 R15: 0000000000000000
      kernel: FS:  00007f5d83cc1740(0000) GS:ffff91df2f840000(0000) knlGS:0000000000000000
      kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      kernel: CR2: 0000000001cc5000 CR3: 0000000465450002 CR4: 00000000001606e0
      kernel: Call Trace:
      kernel: ? try_to_del_timer_sync+0x4d/0x80
      kernel: qedi_ep_disconnect+0x3b/0x410 [qedi]
      kernel: ? 0xffffffffc083c000
      kernel: ? klist_iter_exit+0x14/0x20
      kernel: ? class_find_device+0x93/0xf0
      kernel: iscsi_if_ep_disconnect.isra.18+0x58/0x70 [scsi_transport_iscsi]
      kernel: iscsi_if_recv_msg+0x10e2/0x1510 [scsi_transport_iscsi]
      kernel: ? copyout+0x22/0x30
      kernel: ? _copy_to_iter+0xa0/0x430
      kernel: ? _cond_resched+0x15/0x30
      kernel: ? __kmalloc_node_track_caller+0x1f9/0x270
      kernel: iscsi_if_rx+0xa5/0x1e0 [scsi_transport_iscsi]
      kernel: netlink_unicast+0x17f/0x230
      kernel: netlink_sendmsg+0x2d2/0x3d0
      kernel: sock_sendmsg+0x36/0x50
      kernel: ___sys_sendmsg+0x280/0x2a0
      kernel: ? timerqueue_add+0x54/0x80
      kernel: ? enqueue_hrtimer+0x38/0x90
      kernel: ? hrtimer_start_range_ns+0x19f/0x2c0
      kernel: __sys_sendmsg+0x58/0xa0
      kernel: do_syscall_64+0x5b/0x180
      kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9
      Signed-off-by: default avatarManish Rangankar <mrangankar@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f848bfd8
    • Varun Prakash's avatar
      scsi: csiostor: create per port irq affinity mask set · e95a5e4b
      Varun Prakash authored
      csiostor driver allocates per port num_online_cpus() irq vectors, so create
      per-port irq affinity mask set to spread irq vectors evenly.
      Signed-off-by: default avatarVarun Prakash <varun@chelsio.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      e95a5e4b
    • Himanshu Madhani's avatar
      scsi: qla2xxx: Silence Successful ELS IOCB message · a1f9ab48
      Himanshu Madhani authored
      ELS IOCB done message should be moved to verbose logging to prevent
      confusion about the error case v/s successful submission case.
      
      [mkp: typos]
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a1f9ab48
    • Quinn Tran's avatar
      scsi: qla2xxx: Fix device staying in blocked state · 2137490f
      Quinn Tran authored
      This patch fixes issue reported by some of the customers, who discovered
      that after cable pull scenario the devices disappear and path seems to
      remain in blocked state. Once the device reappears, driver does not seem to
      update path to online. This issue appears because of the defer flag
      creating race condition where the same session reappears.  This patch fixes
      this issue by indicating SCSI-ML of device lost when
      qlt_free_session_done() is called from qlt_unreg_sess().
      
      Fixes: 41dc529a ("qla2xxx: Improve RSCN handling in driver")
      Signed-off-by: default avatarQuinn Tran <qtran@marvell.com>
      Cc: stable@vger.kernel.org #4.19
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      2137490f
    • Christoph Hellwig's avatar
      scsi: aic7xxx: improve the Kconfig entry · c6bcc592
      Christoph Hellwig authored
      There is no old vs new driver anymore.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      c6bcc592
  2. 19 Apr, 2019 5 commits
  3. 16 Apr, 2019 18 commits
  4. 15 Apr, 2019 6 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
    • John Garry's avatar
      scsi: libsas: Improve vague log in SAS rediscovery · a5b38d31
      John Garry authored
      When an expander PHY which was part of a wideport disconnects, we would see
      a log like this from sas_rediscover():
      
      [   39.695554] sas: phy20 part of wide port with phy16
      
      Here, phy20 is the PHY that disconnected, and phy16 is the lowest indexed
      member PHY of the wideport.
      
      The log implies the phy20 is still part of the wideport with phy16, so is
      misleading or, at least, vague.
      
      Improve the logs in SAS rediscovery by removing this log and adding a log
      in sas_rediscover_dev() to tell what's really going on.
      
      While we're at it, also make the logs in sas_find_bcast_dev() more
      informative (and more consistent with the reset of the expander logs).
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a5b38d31
    • John Garry's avatar
      scsi: libsas: Try to retain programmed min linkrate for SATA min pathway unmatch fixing · f7ddb43e
      John Garry authored
      Currently for fixing the linkrate matching during discovery such that the
      linkrate of a SATA PHY does not exceed min pathway to initiator, we set the
      SATA PHY programmed min linkrate to the same value as the programmed max
      linkrate.
      
      This is unnecessary, and we should be able to keep the same programmed min
      linkrate if it is already lower than this new max programmed linkrate.
      
      This patch makes that change.
      
      In effect, this will not make much difference since we generally will
      negotiate a linkrate at the programmed max linkrate, and the programmed min
      linkrate will have no impact.
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f7ddb43e
    • John Garry's avatar
      scsi: libsas: Stop hardcoding SAS address length · 7b27c5fe
      John Garry authored
      Many times we use 8 for SAS address length, while we already have a macro
      for this - SAS_ADDR_SIZE.
      
      Replace instances of this with the macro. However, don't touch the SAS
      address array sizes sas.h, as these are defined according to the SAS spec.
      
      Some missing whitespaces are also added, and whitespace indentation
      in sas_hash_addr() is also fixed (see sas_hash_addr()).
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      7b27c5fe
  5. 13 Apr, 2019 5 commits