• Andrew Vasquez's avatar
    [PATCH] [7/18] qla2xxx: Tape command handling fixes · f3bd0993
    Andrew Vasquez authored
      Fix several tape handling issue:
    
      1) When the firmware receives the LOGO from the device, any
      active exchanges will be returned with a completion status
      of 0x29 -- this will cause the port to be marked as lost and
      request made to the DPC routine to begin a relogin attempt.
      The problem is, since we've never actually logged out of the
      device and cannot do so in interrupt context, we must be
      sure to perform the logout before the qla2x00_fabric_login()
      in the RELOGIN_NEEDED code.
    
      2) Sets the Get Port Database options to ZERO when issuing
      the call to qla2x00_get_port_database().  This consolidates
      actuall login handling in the place it should be, in the
      previous qla2x00_fabric_login() call rather than depending
      on any 'hidden' behaviour of the firmware.  If a device did
      a LOGO after the login, then any subsequent exachanges will
      be returned with an 0x29 completion status and the
      RELOGIN_NEEDED code will handle the login.
    
      3) Finally, if the master and slave state do not indicate a
      logged-in state from the Get Port Database call, then one
      cannot depend on the information returned from the firmware
      -- the firmware typically wipes out the PCB information for
      a given loopID when logged out.  So, return immediately with
      a failed status.
    Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    f3bd0993
qla_os.c 115 KB