1. 20 11月, 2020 8 次提交
  2. 23 9月, 2020 1 次提交
  3. 16 9月, 2020 1 次提交
    • B
      scsi: ibmvfc: Avoid link down on FS9100 canister reboot · 4b29cb61
      Brian King 提交于
      When a canister on a FS9100, or similar storage, running in NPIV mode, is
      rebooted, its WWPNs will fail over to another canister. When this occurs,
      we see a WWPN going away from the fabric at one N-Port ID, and, a short
      time later, the same WWPN appears at a different N-Port ID.  When the
      canister is fully operational again, the WWPNs fail back to the original
      canister. If there is any I/O outstanding to the target when this occurs,
      it will result in the implicit logout the ibmvfc driver issues before
      removing the rport to fail. When the WWPN then shows up at a different
      N-Port ID, and we issue a PLOGI to it, the VIOS will see that it still has
      a login for this WWPN at the old N-Port ID, which results in the VIOS
      simulating a link down / link up sequence to the client, in order to get
      the VIOS and client LPAR in sync.
      
      The patch below improves the way we handle this scenario so as to avoid the
      link bounce, which affects all targets under the virtual host adapter. The
      change is to utilize the Move Login MAD, which will work even when I/O is
      outstanding to the target. The change only alters the target state machine
      for the case where the implicit logout fails prior to deleting the rport.
      If this implicit logout fails, we defer deleting the ibmvfc_target object
      after calling fc_remote_port_delete. This enables us to later retry the
      implicit logout after terminate_rport_io occurs, or to issue the Move Login
      request if a WWPN shows up at a new N-Port ID prior to this occurring.
      
      This has been tested by IBM's storage interoperability team on a FS9100,
      forcing the failover to occur. With debug tracing enabled in the ibmvfc
      driver, we confirmed the move login was sent in this scenario and confirmed
      the link bounce no longer occurred.
      
      [mkp: fix checkpatch warnings]
      
      Link: https://lore.kernel.org/r/1599859706-8505-1-git-send-email-brking@linux.vnet.ibm.comSigned-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      4b29cb61
  4. 10 9月, 2020 1 次提交
  5. 24 8月, 2020 1 次提交
  6. 16 6月, 2020 1 次提交
  7. 28 4月, 2020 1 次提交
    • B
      scsi: ibmvfc: Don't send implicit logouts prior to NPIV login · 66bb7fa8
      Brian King 提交于
      Commit ed830385 ("scsi: ibmvfc: Avoid loss of all paths during SVC node
      reboot") introduced a regression where when the client resets or re-enables
      its CRQ with the hypervisor there is a chance that if the server side
      doesn't issue its INIT handshake quick enough the client can issue an
      Implicit Logout prior to doing an NPIV Login. The server treats this
      scenario as a protocol violation and closes the CRQ on its end forcing the
      client through a reset that gets the client host state and next host action
      out of agreement leading to a BUG assert.
      
      ibmvfc 30000003: Partner initialization complete
      ibmvfc 30000002: Partner initialization complete
      ibmvfc 30000002: Host partner adapter deregistered or failed (rc=2)
      ibmvfc 30000002: Partner initialized
      ------------[ cut here ]------------
      kernel BUG at ../drivers/scsi/ibmvscsi/ibmvfc.c:4489!
      Oops: Exception in kernel mode, sig: 5 [#1]
      LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
      Supported: No, Unreleased kernel
      CPU: 16 PID: 1290 Comm: ibmvfc_0 Tainted: G           OE  X   5.3.18-12-default
      NIP:  c00800000d84a2b4 LR: c00800000d84a040 CTR: c00800000d84a2a0
      REGS: c00000000cb57a00 TRAP: 0700   Tainted: G           OE  X    (5.3.18-12-default)
      MSR:  800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE>  CR: 24000848  XER: 00000001
      CFAR: c00800000d84a070 IRQMASK: 1
      GPR00: c00800000d84a040 c00000000cb57c90 c00800000d858e00 0000000000000000
      GPR04: 0000000000000000 0000000000000000 0000000000000000 00000000000000a0
      GPR08: c00800000d84a074 0000000000000001 0000000000000014 c00800000d84d7d0
      GPR12: 0000000000000000 c00000001ea28200 c00000000016cd98 0000000000000000
      GPR16: c00800000d84b7b8 0000000000000000 0000000000000000 c00000542c706d68
      GPR20: 0000000000000005 c00000542c706d88 5deadbeef0000100 5deadbeef0000122
      GPR24: 000000000000000c 000000000000000b c00800000d852180 0000000000000001
      GPR28: 0000000000000000 c00000542c706da0 c00000542c706860 c00000542c706828
      NIP [c00800000d84a2b4] ibmvfc_work+0x3ac/0xc90 [ibmvfc]
      LR [c00800000d84a040] ibmvfc_work+0x138/0xc90 [ibmvfc]
      
      This scenario can be prevented by rejecting any attempt to send an Implicit
      Logout if the client adapter is not logged in yet.
      
      Link: https://lore.kernel.org/r/20200427214824.6890-1-tyreld@linux.ibm.com
      Fixes: ed830385 ("scsi: ibmvfc: Avoid loss of all paths during SVC node reboot")
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NTyrel Datwyler <tyreld@linux.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      66bb7fa8
  8. 12 3月, 2020 2 次提交
  9. 08 8月, 2019 1 次提交
    • G
      scsi: ibmvfc: Mark expected switch fall-throughs · 4c735987
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_npiv_login_done':
      drivers/scsi/ibmvscsi/ibmvfc.c:4022:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         ibmvfc_retry_host_init(vhost);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/ibmvscsi/ibmvfc.c:4023:2: note: here
        case IBMVFC_MAD_DRIVER_FAILED:
        ^~~~
      drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_request':
      drivers/scsi/ibmvscsi/ibmvfc.c:1830:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
         port_id = (bsg_request->rqst_data.h_els.port_id[0] << 16) |
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          (bsg_request->rqst_data.h_els.port_id[1] << 8) |
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          bsg_request->rqst_data.h_els.port_id[2];
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/ibmvscsi/ibmvfc.c:1833:2: note: here
        case FC_BSG_RPT_ELS:
        ^~~~
      drivers/scsi/ibmvscsi/ibmvfc.c:1838:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
         port_id = (bsg_request->rqst_data.h_ct.port_id[0] << 16) |
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          (bsg_request->rqst_data.h_ct.port_id[1] << 8) |
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          bsg_request->rqst_data.h_ct.port_id[2];
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/ibmvscsi/ibmvfc.c:1841:2: note: here
        case FC_BSG_RPT_CT:
        ^~~~
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Acked-by: NTyrel Datwyler <tyreld@linux.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      4c735987
  10. 24 7月, 2019 1 次提交
    • T
      scsi: ibmvfc: fix WARN_ON during event pool release · 5578257c
      Tyrel Datwyler 提交于
      While removing an ibmvfc client adapter a WARN_ON like the following
      WARN_ON is seen in the kernel log:
      
      WARNING: CPU: 6 PID: 5421 at ./include/linux/dma-mapping.h:541
      ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc]
      CPU: 6 PID: 5421 Comm: rmmod Tainted: G            E     4.17.0-rc1-next-20180419-autotest #1
      NIP:  d00000000290328c LR: d00000000290325c CTR: c00000000036ee20
      REGS: c000000288d1b7e0 TRAP: 0700   Tainted: G            E      (4.17.0-rc1-next-20180419-autotest)
      MSR:  800000010282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]>  CR: 44008828  XER: 20000000
      CFAR: c00000000036e408 SOFTE: 1
      GPR00: d00000000290325c c000000288d1ba60 d000000002917900 c000000289d75448
      GPR04: 0000000000000071 c0000000ff870000 0000000018040000 0000000000000001
      GPR08: 0000000000000000 c00000000156e838 0000000000000001 d00000000290c640
      GPR12: c00000000036ee20 c00000001ec4dc00 0000000000000000 0000000000000000
      GPR16: 0000000000000000 0000000000000000 00000100276901e0 0000000010020598
      GPR20: 0000000010020550 0000000010020538 0000000010020578 00000000100205b0
      GPR24: 0000000000000000 0000000000000000 0000000010020590 5deadbeef0000100
      GPR28: 5deadbeef0000200 d000000002910b00 0000000000000071 c0000002822f87d8
      NIP [d00000000290328c] ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc]
      LR [d00000000290325c] ibmvfc_free_event_pool+0xfc/0x1f0 [ibmvfc]
      Call Trace:
      [c000000288d1ba60] [d00000000290325c] ibmvfc_free_event_pool+0xfc/0x1f0 [ibmvfc] (unreliable)
      [c000000288d1baf0] [d000000002909390] ibmvfc_abort_task_set+0x7b0/0x8b0 [ibmvfc]
      [c000000288d1bb70] [c0000000000d8c68] vio_bus_remove+0x68/0x100
      [c000000288d1bbb0] [c0000000007da7c4] device_release_driver_internal+0x1f4/0x2d0
      [c000000288d1bc00] [c0000000007da95c] driver_detach+0x7c/0x100
      [c000000288d1bc40] [c0000000007d8af4] bus_remove_driver+0x84/0x140
      [c000000288d1bcb0] [c0000000007db6ac] driver_unregister+0x4c/0xa0
      [c000000288d1bd20] [c0000000000d6e7c] vio_unregister_driver+0x2c/0x50
      [c000000288d1bd50] [d00000000290ba0c] cleanup_module+0x24/0x15e0 [ibmvfc]
      [c000000288d1bd70] [c0000000001dadb0] sys_delete_module+0x220/0x2d0
      [c000000288d1be30] [c00000000000b284] system_call+0x58/0x6c
      Instruction dump:
      e8410018 e87f0068 809f0078 e8bf0080 e8df0088 2fa30000 419e008c e9230200
      2fa90000 419e0080 894d098a 794a07e0 <0b0a0000> e9290008 2fa90000 419e0028
      
      This is tripped as a result of irqs being disabled during the call to
      dma_free_coherent() by ibmvfc_free_event_pool(). At this point in the code path
      we have quiesced the adapter and its overly paranoid anyways to be holding the
      host lock.
      Reported-by: NAbdul Haleem <abdhalee@linux.vnet.ibm.com>
      Signed-off-by: NTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      5578257c
  11. 31 5月, 2019 1 次提交
  12. 28 3月, 2019 4 次提交
  13. 19 12月, 2018 1 次提交
  14. 20 6月, 2018 1 次提交
  15. 15 3月, 2018 1 次提交
    • B
      scsi: ibmvfc: Avoid unnecessary port relogin · 09dd15e0
      Brian King 提交于
      Following an RSCN, ibmvfc will issue an ADISC to determine if the
      underlying target has changed, comparing the SCSI ID, WWPN, and WWNN to
      determine how to handle the rport in discovery. However, the comparison
      of the WWPN and WWNN was performing a memcmp between a big endian field
      against a CPU endian field, which resulted in the wrong answer on LE
      systems. This was observed as unexpected errors getting logged at boot
      time as targets were getting relogins when not needed.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      09dd15e0
  16. 23 1月, 2018 1 次提交
  17. 02 11月, 2017 1 次提交
  18. 26 8月, 2017 2 次提交
  19. 02 7月, 2017 1 次提交
  20. 19 4月, 2017 1 次提交
  21. 07 2月, 2017 1 次提交
  22. 18 11月, 2016 6 次提交
  23. 20 9月, 2016 1 次提交