• James Smart's avatar
    [SCSI] lpfc 8.3.26: Fix SYSFS interface issues · f7a919b4
    James Smart authored
    Fix SYSFS interface issues.
    
    - In the lpfc_sli4_pdev_status_reg_wait() routine, after initial 100ms delay
      following write to PHYSDEV_CONTROL register for the firmware reaction, check
      the RN bit and ERR bit of the SLIPORT_STATUS register. If none of them
      became 1, the previous PHYSDEV_CONTROL register should be considered failed
      due to lack of privilege and error for no permission should be returned
      immediately without getting into the wait for RDY bits on the SLIPORT_STATUS
      register.
    - Remove the driver check on dev->is_physfn before proceed to perform the
      PHYSDEV_CONTROL register write, and let the PCI function's privilege
      setting and driver handling of PHYSDEV_CONTROL register write failure to
      handle the reset-ability through the SLI port.
    - Added key to ctlreg_write to prevent unauthorized or unexpected write to
      the control register.
    - Change return to EACCES for sysfs access that are failed because hba_reset
      is disabled.
    Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
    Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
    Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    f7a919b4
lpfc_attr.c 150 KB