• Christof Schmitt's avatar
    [SCSI] zfcp: Handle WWPN mismatch in PLOGI payload · 934aeb58
    Christof Schmitt authored
    For ports, zfcp gets the DID from the FC nameserver and tries to open
    the port. If the open succeeds, zfcp compares the WWPN from the
    nameserver with the WWPN in the PLOGI payload. In case of a mismatch,
    zfcp assumes that the DID of the port just changed and we opened the
    wrong port. This means that zfcp has to forget the DID, lookup the DID
    again and retry.
    
    This error case had a problem that zfcp forgets the DID, but never
    looks up a new one, stalling the ERP in this case. Fix this by
    triggering the DID lookup and properly exit from the ERP. The DID
    lookup will trigger a new ERP action.
    
    Also ensure when trying to open the port again with the new DID, first
    close the open port, even in the NOESC case.
    Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
    934aeb58
zfcp_fc.c 23.7 KB