aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 2926a2a7ee70..172b6b0a5704 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1302,7 +1302,7 @@ lpfc_##attr##_init(struct lpfc_vport *vport, int val) \
1302 return 0;\ 1302 return 0;\
1303 }\ 1303 }\
1304 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \ 1304 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
1305 "0449 lpfc_"#attr" attribute cannot be set to %d, "\ 1305 "0423 lpfc_"#attr" attribute cannot be set to %d, "\
1306 "allowed range is ["#minval", "#maxval"]\n", val); \ 1306 "allowed range is ["#minval", "#maxval"]\n", val); \
1307 vport->cfg_##attr = default;\ 1307 vport->cfg_##attr = default;\
1308 return -EINVAL;\ 1308 return -EINVAL;\
@@ -1334,7 +1334,7 @@ lpfc_##attr##_set(struct lpfc_vport *vport, int val) \
1334 return 0;\ 1334 return 0;\
1335 }\ 1335 }\
1336 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \ 1336 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
1337 "0450 lpfc_"#attr" attribute cannot be set to %d, "\ 1337 "0424 lpfc_"#attr" attribute cannot be set to %d, "\
1338 "allowed range is ["#minval", "#maxval"]\n", val); \ 1338 "allowed range is ["#minval", "#maxval"]\n", val); \
1339 return -EINVAL;\ 1339 return -EINVAL;\
1340} 1340}
@@ -1803,7 +1803,7 @@ lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val)
1803 vport->cfg_nodev_tmo = vport->cfg_devloss_tmo; 1803 vport->cfg_nodev_tmo = vport->cfg_devloss_tmo;
1804 if (val != LPFC_DEF_DEVLOSS_TMO) 1804 if (val != LPFC_DEF_DEVLOSS_TMO)
1805 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, 1805 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
1806 "0402 Ignoring nodev_tmo module " 1806 "0407 Ignoring nodev_tmo module "
1807 "parameter because devloss_tmo is " 1807 "parameter because devloss_tmo is "
1808 "set.\n"); 1808 "set.\n");
1809 return 0; 1809 return 0;
@@ -2030,7 +2030,7 @@ lpfc_restrict_login_init(struct lpfc_vport *vport, int val)
2030{ 2030{
2031 if (val < 0 || val > 1) { 2031 if (val < 0 || val > 1) {
2032 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, 2032 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
2033 "0449 lpfc_restrict_login attribute cannot " 2033 "0422 lpfc_restrict_login attribute cannot "
2034 "be set to %d, allowed range is [0, 1]\n", 2034 "be set to %d, allowed range is [0, 1]\n",
2035 val); 2035 val);
2036 vport->cfg_restrict_login = 1; 2036 vport->cfg_restrict_login = 1;
@@ -2065,7 +2065,7 @@ lpfc_restrict_login_set(struct lpfc_vport *vport, int val)
2065{ 2065{
2066 if (val < 0 || val > 1) { 2066 if (val < 0 || val > 1) {
2067 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, 2067 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
2068 "0450 lpfc_restrict_login attribute cannot " 2068 "0425 lpfc_restrict_login attribute cannot "
2069 "be set to %d, allowed range is [0, 1]\n", 2069 "be set to %d, allowed range is [0, 1]\n",
2070 val); 2070 val);
2071 vport->cfg_restrict_login = 1; 2071 vport->cfg_restrict_login = 1;
@@ -2249,7 +2249,7 @@ lpfc_link_speed_init(struct lpfc_hba *phba, int val)
2249 return 0; 2249 return 0;
2250 } 2250 }
2251 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 2251 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
2252 "0454 lpfc_link_speed attribute cannot " 2252 "0405 lpfc_link_speed attribute cannot "
2253 "be set to %d, allowed values are " 2253 "be set to %d, allowed values are "
2254 "["LPFC_LINK_SPEED_STRING"]\n", val); 2254 "["LPFC_LINK_SPEED_STRING"]\n", val);
2255 phba->cfg_link_speed = 0; 2255 phba->cfg_link_speed = 0;
@@ -2787,17 +2787,15 @@ sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr,
2787 /* If HBA encountered an error attention, allow only DUMP 2787 /* If HBA encountered an error attention, allow only DUMP
2788 * or RESTART mailbox commands until the HBA is restarted. 2788 * or RESTART mailbox commands until the HBA is restarted.
2789 */ 2789 */
2790 if ((phba->pport->stopped) && 2790 if (phba->pport->stopped &&
2791 (phba->sysfs_mbox.mbox->mb.mbxCommand != 2791 phba->sysfs_mbox.mbox->mb.mbxCommand != MBX_DUMP_MEMORY &&
2792 MBX_DUMP_MEMORY && 2792 phba->sysfs_mbox.mbox->mb.mbxCommand != MBX_RESTART &&
2793 phba->sysfs_mbox.mbox->mb.mbxCommand != 2793 phba->sysfs_mbox.mbox->mb.mbxCommand != MBX_WRITE_VPARMS &&
2794 MBX_RESTART && 2794 phba->sysfs_mbox.mbox->mb.mbxCommand != MBX_WRITE_WWN)
2795 phba->sysfs_mbox.mbox->mb.mbxCommand != 2795 lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX,
2796 MBX_WRITE_VPARMS)) { 2796 "1259 mbox: Issued mailbox cmd "
2797 sysfs_mbox_idle(phba); 2797 "0x%x while in stopped state.\n",
2798 spin_unlock_irq(&phba->hbalock); 2798 phba->sysfs_mbox.mbox->mb.mbxCommand);
2799 return -EPERM;
2800 }
2801 2799
2802 phba->sysfs_mbox.mbox->vport = vport; 2800 phba->sysfs_mbox.mbox->vport = vport;
2803 2801