1. 27 Jun, 2019 5 commits
    • Chad Dupuis's avatar
      scsi: bnx2fc: Only put reference to io_req in bnx2fc_abts_cleanup if cleanup times out · a92ac6ee
      Chad Dupuis authored
      In certain tests where the SCSI error handler issues an abort that is
      already outstanding, we will cleanup the command so that the SCSI error
      handler can proceed.  In some of these cases we were seeing a command
      mismatch:
      
       kernel: scsi host2: bnx2fc: xid:0x42b eh_abort - refcnt = 2
       kernel: bnx2fc: eh_abort: io_req (xid = 0x42b) already in abts processing
       kernel: scsi host2: bnx2fc: xid:0x42b Entered bnx2fc_initiate_cleanup
       kernel: scsi host2: bnx2fc: xid:0x42b CLEANUP io_req xid = 0x80b
       kernel: scsi host2: bnx2fc: xid:0x80b cq_compl- cleanup resp rcvd
       kernel: scsi host2: bnx2fc: xid:0x42b complete - rx_state = 9
       kernel: scsi host2: bnx2fc: xid:0x42b Entered process_cleanup_compl refcnt = 2, cmd_type = 1
       kernel: scsi host2: bnx2fc: xid:0x42b scsi_done. err_code = 0x7
       kernel: scsi host2: bnx2fc: xid:0x42b sc=ffff8807f93dfb80, result=0x7, retries=0, allowed=5
       kernel: ------------[ cut here ]------------
       kernel: WARNING: at /root/rpmbuild/BUILD/netxtreme2-7.14.43/obj/default/bnx2fc-2.12.1/driver/bnx2fc_io.c:1347 bnx2fc_eh_abort+0x56f/0x680 [bnx2fc]()
       kernel: xid=0x42b refcount=-1
       kernel: Modules linked in:
       kernel: nls_utf8 isofs sr_mod cdrom tcp_lp dm_round_robin xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun bridge ebtable_filter ebtables fuse ip6table_filter ip6_tables iptable_filter bnx2fc(OE) cnic(OE) uio fcoe libfcoe 8021q libfc garp mrp scsi_transport_fc stp llc scsi_tgt vfat fat dm_service_time intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd ses enclosure ipmi_ssif i2c_core hpilo hpwdt wmi sg ipmi_devintf pcspkr ipmi_si ipmi_msghandler shpchp acpi_power_meter dm_multipath nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs sd_mod crc_t10dif
       kernel: crct10dif_generic bnx2x(OE) crct10dif_pclmul crct10dif_common crc32c_intel mdio ptp pps_core libcrc32c smartpqi scsi_transport_sas fjes uas usb_storage dm_mirror dm_region_hash dm_log dm_mod
       kernel: CPU: 9 PID: 2012 Comm: scsi_eh_2 Tainted: G        W  OE  ------------   3.10.0-514.el7.x86_64 #1
       kernel: Hardware name: HPE Synergy 480 Gen10/Synergy 480 Gen10 Compute Module, BIOS I42 03/21/2018
       kernel: ffff8807f25a3d98 0000000015e7fa0c ffff8807f25a3d50 ffffffff81685eac
       kernel: ffff8807f25a3d88 ffffffff81085820 ffff8807f8e39000 ffff880801ff7468
       kernel: ffff880801ff7610 0000000000002002 ffff8807f8e39014 ffff8807f25a3df0
       kernel: Call Trace:
       kernel: [<ffffffff81685eac>] dump_stack+0x19/0x1b
       kernel: [<ffffffff81085820>] warn_slowpath_common+0x70/0xb0
       kernel: [<ffffffff810858bc>] warn_slowpath_fmt+0x5c/0x80
       kernel: [<ffffffff8168d842>] ? _raw_spin_lock_bh+0x12/0x50
       kernel: [<ffffffffa0549e6f>] bnx2fc_eh_abort+0x56f/0x680 [bnx2fc]
       kernel: [<ffffffff814570af>] scsi_error_handler+0x59f/0x8b0
       kernel: [<ffffffff81456b10>] ? scsi_eh_get_sense+0x250/0x250
       kernel: [<ffffffff810b052f>] kthread+0xcf/0xe0
       kernel: [<ffffffff810b0460>] ? kthread_create_on_node+0x140/0x140
       kernel: [<ffffffff81696418>] ret_from_fork+0x58/0x90
       kernel: [<ffffffff810b0460>] ? kthread_create_on_node+0x140/0x140
       kernel: ---[ end trace 42deb88f2032b111 ]---
      
      The reason that there was a mismatch is that the SCSI command is actual
      returned from the cleanup handler.  In previous testing, the type of
      cleanup notification we'd get from the CQE did not trigger the code that
      returned the SCSI command.  To overcome the previous behavior we would put
      a reference in bnx2fc_abts_cleanup() to account for the SCSI command.
      However, in cases where the SCSI command is actually off, we end up with an
      extra put.
      
      The fix for this is to only take the extra put in bnx2fc_abts_cleanup if
      the completion for the cleanup times out.
      Signed-off-by: default avatarChad Dupuis <cdupuis@marvell.com>
      Signed-off-by: default avatarSaurav Kashyap <skashyap@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a92ac6ee
    • Chad Dupuis's avatar
      scsi: bnx2fc: Redo setting source FCoE MAC · 4adb451c
      Chad Dupuis authored
      For bnx2fc, the source FCoE MAC is stored in the fcoe_port struct in the
      data_src_mac field.  Currently this is set in fcoe_ctlr_recv_flogi which
      ends up setting it by simply using fc_fcoe_set_mac() which only uses the
      default FCF-MAC.  We still want to store the source FCoE MAC in
      port->data_src_mac but we want to snoop the FLOGI response payload so as to
      set it in the following method:
      
      1. If a granted_mac is found, use that.
      
      2. If not granted_mac is there but there is a FCF-MAP from the FCF then
         create the MAC from the FCF-MAP and the destination ID from the frame.
      
      3. If there is no FCF-MAP the use the spec. default FCF-MAP and the
         destination ID from the frame.
      Signed-off-by: default avatarChad Dupuis <cdupuis@marvell.com>
      Signed-off-by: default avatarSaurav Kashyap <skashyap@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      4adb451c
    • Adrian Hunter's avatar
      scsi: ufshdc-pci: Add Intel PCI IDs for EHL · 8c09d752
      Adrian Hunter authored
      Add more Intel PCI IDs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8c09d752
    • Bean Huo's avatar
      scsi: ufs-bsg: complete ufs-bsg job only if no error · b13a3539
      Bean Huo authored
      In the case of UPIU/DME request execution failed in UFS device,
      ufs_bsg_request() will complete the failed bsg job by calling
      bsg_job_done(). Meanwhile, it returns this error status to blk-mq layer,
      then triggers blk-mq completing this request again, this will cause the
      following panic.
      
      Call trace:
      ll_sc___cmpxchg_case_acq_32+0x4/0x20
      complete+0x28/0x70
      blk_end_sync_rq+0x24/0x30
      blk_mq_end_request+0xb8/0x118
      bsg_job_put+0x4c/0x58
      bsg_complete+0x20/0x30
      blk_done_softirq+0xb4/0xe8
      do_softirq+0x154/0x3f0
      run_ksoftirqd+0x4c/0x68
      smpboot_thread_fn+0x22c/0x268
      kthread+0x130/0x138
      ret_from_fork+0x10/0x1c
      Code: f84107fe d65f03c0 d503201f f9800011 (885ffc10)
      ---[ end trace d92825bff6326e66 ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      
      This patch is to fix this issue. The solution is to complete the ufs-bsg
      job only if no error happened.
      
      [mkp: commit description tweak]
      
      Fixes: df032bf2 (scsi: ufs: Add a bsg endpoint that supports UPIUs)
      Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
      Reviewed-by: default avatarAvri Altman <Avri.Altman@wdc.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      b13a3539
    • Bean Huo's avatar
      scsi: ufs-bsg: fix typo in ufs_bsg_request · c870d65f
      Bean Huo authored
      Correct dev_dbg to dev_err, so as to print out the error information in
      case of DME command failed.
      Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
      Reviewed-by: default avatarAvri Altman <Avri.Altman@wdc.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      c870d65f
  2. 20 Jun, 2019 21 commits
  3. 18 Jun, 2019 14 commits