diff options
author | James Smart <james.smart@emulex.com> | 2010-04-06 14:49:03 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 14:44:55 -0400 |
commit | 15672319e3da68bb3f710e724185f4524722a6fa (patch) | |
tree | 456c11ff9a9bb435bfbc57460ecdc18d2ebd6f5c /drivers/scsi/lpfc | |
parent | b19a061a785db22401b62cc4ee2baf95d5c7e2e7 (diff) |
[SCSI] lpfc 8.3.12: Miscellaneous Changes
- Prevent log message 1801 during vport delete.
- Enable NPIV by default.
- Display correct value for max Vports on SLI4 HBAs.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 18 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 4 |
2 files changed, 15 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 5df15c65b35b..2e5f376d9ccc 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -869,6 +869,7 @@ lpfc_get_hba_info(struct lpfc_hba *phba, | |||
869 | LPFC_MBOXQ_t *pmboxq; | 869 | LPFC_MBOXQ_t *pmboxq; |
870 | MAILBOX_t *pmb; | 870 | MAILBOX_t *pmb; |
871 | int rc = 0; | 871 | int rc = 0; |
872 | uint32_t max_vpi; | ||
872 | 873 | ||
873 | /* | 874 | /* |
874 | * prevent udev from issuing mailbox commands until the port is | 875 | * prevent udev from issuing mailbox commands until the port is |
@@ -916,11 +917,17 @@ lpfc_get_hba_info(struct lpfc_hba *phba, | |||
916 | if (axri) | 917 | if (axri) |
917 | *axri = bf_get(lpfc_mbx_rd_conf_xri_count, rd_config) - | 918 | *axri = bf_get(lpfc_mbx_rd_conf_xri_count, rd_config) - |
918 | phba->sli4_hba.max_cfg_param.xri_used; | 919 | phba->sli4_hba.max_cfg_param.xri_used; |
920 | |||
921 | /* Account for differences with SLI-3. Get vpi count from | ||
922 | * mailbox data and subtract one for max vpi value. | ||
923 | */ | ||
924 | max_vpi = (bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) > 0) ? | ||
925 | (bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) - 1) : 0; | ||
926 | |||
919 | if (mvpi) | 927 | if (mvpi) |
920 | *mvpi = bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config); | 928 | *mvpi = max_vpi; |
921 | if (avpi) | 929 | if (avpi) |
922 | *avpi = bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) - | 930 | *avpi = max_vpi - phba->sli4_hba.max_cfg_param.vpi_used; |
923 | phba->sli4_hba.max_cfg_param.vpi_used; | ||
924 | } else { | 931 | } else { |
925 | if (mrpi) | 932 | if (mrpi) |
926 | *mrpi = pmb->un.varRdConfig.max_rpi; | 933 | *mrpi = pmb->un.varRdConfig.max_rpi; |
@@ -1925,13 +1932,12 @@ MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" | |||
1925 | " 2 - select SLI-2 even on SLI-3 capable HBAs," | 1932 | " 2 - select SLI-2 even on SLI-3 capable HBAs," |
1926 | " 3 - select SLI-3"); | 1933 | " 3 - select SLI-3"); |
1927 | 1934 | ||
1928 | int lpfc_enable_npiv = 0; | 1935 | int lpfc_enable_npiv = 1; |
1929 | module_param(lpfc_enable_npiv, int, 0); | 1936 | module_param(lpfc_enable_npiv, int, 0); |
1930 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); | 1937 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); |
1931 | lpfc_param_show(enable_npiv); | 1938 | lpfc_param_show(enable_npiv); |
1932 | lpfc_param_init(enable_npiv, 1, 0, 1); | 1939 | lpfc_param_init(enable_npiv, 1, 0, 1); |
1933 | static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, | 1940 | static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL); |
1934 | lpfc_enable_npiv_show, NULL); | ||
1935 | 1941 | ||
1936 | /* | 1942 | /* |
1937 | # lpfc_suppress_link_up: Bring link up at initialization | 1943 | # lpfc_suppress_link_up: Bring link up at initialization |
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index ffd575c379f3..ab91359bde20 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -763,7 +763,9 @@ lpfc_create_vport_work_array(struct lpfc_hba *phba) | |||
763 | spin_lock_irq(&phba->hbalock); | 763 | spin_lock_irq(&phba->hbalock); |
764 | list_for_each_entry(port_iterator, &phba->port_list, listentry) { | 764 | list_for_each_entry(port_iterator, &phba->port_list, listentry) { |
765 | if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) { | 765 | if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) { |
766 | lpfc_printf_vlog(port_iterator, KERN_WARNING, LOG_VPORT, | 766 | if (!(port_iterator->load_flag & FC_UNLOADING)) |
767 | lpfc_printf_vlog(port_iterator, KERN_ERR, | ||
768 | LOG_VPORT, | ||
767 | "1801 Create vport work array FAILED: " | 769 | "1801 Create vport work array FAILED: " |
768 | "cannot do scsi_host_get\n"); | 770 | "cannot do scsi_host_get\n"); |
769 | continue; | 771 | continue; |