Commit 6a9c52cf authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.5: fix sysfs parameters, vport creation and other bugs and update logging

This patch include the following fixes and changes:
- Fix crash when "error" is echoed to board_mode sysfs parameter
- Fix FCoE Parameter parsing in regions 23
- Fix driver crash when creating vport with large number of targets on SLI4
- Fix bug with npiv message being logged when it is not supported by the adapter
- Fix a potential dereferencing mailbox structure after free bug
- Fix firmware crash after vport create with high target count
- Error out requests to set board_mode to warm restart via sysfs on SLI4 HBAs
- Fix Block guard logging
- Fix a memory corruption issue during GID_FT IO prep
- Fix crash while processing unsolicited FC frames
- Fix failed to allocate XRI message is not a critical failure
- Update and fix formatting in some log messages
- Fix missing new line characters in log messages
- Removed the use of the locally defined FC transport layer related macros
- Check the rsplen in lpfc_handle_fcp_err function before using rsplen
Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 6669f9bb
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h> #include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport_fc.h> #include <scsi/scsi_transport_fc.h>
#include <scsi/fc/fc_fs.h>
#include "lpfc_hw4.h" #include "lpfc_hw4.h"
#include "lpfc_hw.h" #include "lpfc_hw.h"
...@@ -762,8 +763,14 @@ lpfc_board_mode_store(struct device *dev, struct device_attribute *attr, ...@@ -762,8 +763,14 @@ lpfc_board_mode_store(struct device *dev, struct device_attribute *attr,
} else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) } else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0)
status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
else if (strncmp(buf, "warm", sizeof("warm") - 1) == 0) else if (strncmp(buf, "warm", sizeof("warm") - 1) == 0)
if (phba->sli_rev == LPFC_SLI_REV4)
return -EINVAL;
else
status = lpfc_do_offline(phba, LPFC_EVT_WARM_START); status = lpfc_do_offline(phba, LPFC_EVT_WARM_START);
else if (strncmp(buf, "error", sizeof("error") - 1) == 0) else if (strncmp(buf, "error", sizeof("error") - 1) == 0)
if (phba->sli_rev == LPFC_SLI_REV4)
return -EINVAL;
else
status = lpfc_do_offline(phba, LPFC_EVT_KILL); status = lpfc_do_offline(phba, LPFC_EVT_KILL);
else else
return -EINVAL; return -EINVAL;
...@@ -2846,7 +2853,7 @@ LPFC_ATTR_R(multi_ring_support, 1, 1, 2, "Determines number of primary " ...@@ -2846,7 +2853,7 @@ LPFC_ATTR_R(multi_ring_support, 1, 1, 2, "Determines number of primary "
# identifies what rctl value to configure the additional ring for. # identifies what rctl value to configure the additional ring for.
# Value range is [1,0xff]. Default value is 4 (Unsolicated Data). # Value range is [1,0xff]. Default value is 4 (Unsolicated Data).
*/ */
LPFC_ATTR_R(multi_ring_rctl, FC_UNSOL_DATA, 1, LPFC_ATTR_R(multi_ring_rctl, FC_RCTL_DD_UNSOL_DATA, 1,
255, "Identifies RCTL for additional ring configuration"); 255, "Identifies RCTL for additional ring configuration");
/* /*
...@@ -2854,7 +2861,7 @@ LPFC_ATTR_R(multi_ring_rctl, FC_UNSOL_DATA, 1, ...@@ -2854,7 +2861,7 @@ LPFC_ATTR_R(multi_ring_rctl, FC_UNSOL_DATA, 1,
# identifies what type value to configure the additional ring for. # identifies what type value to configure the additional ring for.
# Value range is [1,0xff]. Default value is 5 (LLC/SNAP). # Value range is [1,0xff]. Default value is 5 (LLC/SNAP).
*/ */
LPFC_ATTR_R(multi_ring_type, FC_LLC_SNAP, 1, LPFC_ATTR_R(multi_ring_type, FC_TYPE_IP, 1,
255, "Identifies TYPE for additional ring configuration"); 255, "Identifies TYPE for additional ring configuration");
/* /*
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <scsi/scsi_transport_fc.h> #include <scsi/scsi_transport_fc.h>
#include <scsi/scsi_bsg_fc.h> #include <scsi/scsi_bsg_fc.h>
#include <scsi/fc/fc_fs.h>
#include "lpfc_hw4.h" #include "lpfc_hw4.h"
#include "lpfc_hw.h" #include "lpfc_hw.h"
...@@ -148,8 +149,8 @@ lpfc_bsg_rport_ct(struct fc_bsg_job *job) ...@@ -148,8 +149,8 @@ lpfc_bsg_rport_ct(struct fc_bsg_job *job)
cmd->ulpCommand = CMD_GEN_REQUEST64_CR; cmd->ulpCommand = CMD_GEN_REQUEST64_CR;
cmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); cmd->un.genreq64.w5.hcsw.Fctl = (SI | LA);
cmd->un.genreq64.w5.hcsw.Dfctl = 0; cmd->un.genreq64.w5.hcsw.Dfctl = 0;
cmd->un.genreq64.w5.hcsw.Rctl = FC_UNSOL_CTL; cmd->un.genreq64.w5.hcsw.Rctl = FC_RCTL_DD_UNSOL_CTL;
cmd->un.genreq64.w5.hcsw.Type = FC_COMMON_TRANSPORT_ULP; cmd->un.genreq64.w5.hcsw.Type = FC_TYPE_CT;
cmd->ulpBdeCount = 1; cmd->ulpBdeCount = 1;
cmd->ulpLe = 1; cmd->ulpLe = 1;
cmd->ulpClass = CLASS3; cmd->ulpClass = CLASS3;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <scsi/scsi_device.h> #include <scsi/scsi_device.h>
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <scsi/scsi_transport_fc.h> #include <scsi/scsi_transport_fc.h>
#include <scsi/fc/fc_fs.h>
#include "lpfc_hw4.h" #include "lpfc_hw4.h"
#include "lpfc_hw.h" #include "lpfc_hw.h"
...@@ -336,8 +337,8 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, ...@@ -336,8 +337,8 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp,
/* Fill in rest of iocb */ /* Fill in rest of iocb */
icmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); icmd->un.genreq64.w5.hcsw.Fctl = (SI | LA);
icmd->un.genreq64.w5.hcsw.Dfctl = 0; icmd->un.genreq64.w5.hcsw.Dfctl = 0;
icmd->un.genreq64.w5.hcsw.Rctl = FC_UNSOL_CTL; icmd->un.genreq64.w5.hcsw.Rctl = FC_RCTL_DD_UNSOL_CTL;
icmd->un.genreq64.w5.hcsw.Type = FC_COMMON_TRANSPORT_ULP; icmd->un.genreq64.w5.hcsw.Type = FC_TYPE_CT;
if (!tmo) { if (!tmo) {
/* FC spec states we need 3 * ratov for CT requests */ /* FC spec states we need 3 * ratov for CT requests */
...@@ -395,9 +396,14 @@ lpfc_ct_cmd(struct lpfc_vport *vport, struct lpfc_dmabuf *inmp, ...@@ -395,9 +396,14 @@ lpfc_ct_cmd(struct lpfc_vport *vport, struct lpfc_dmabuf *inmp,
outmp = lpfc_alloc_ct_rsp(phba, cmdcode, bpl, rsp_size, &cnt); outmp = lpfc_alloc_ct_rsp(phba, cmdcode, bpl, rsp_size, &cnt);
if (!outmp) if (!outmp)
return -ENOMEM; return -ENOMEM;
/*
* Form the CT IOCB. The total number of BDEs in this IOCB
* is the single command plus response count from
* lpfc_alloc_ct_rsp.
*/
cnt += 1;
status = lpfc_gen_req(vport, bmp, inmp, outmp, cmpl, ndlp, 0, status = lpfc_gen_req(vport, bmp, inmp, outmp, cmpl, ndlp, 0,
cnt+1, 0, retry); cnt, 0, retry);
if (status) { if (status) {
lpfc_free_ct_rsp(phba, outmp); lpfc_free_ct_rsp(phba, outmp);
return -ENOMEM; return -ENOMEM;
...@@ -533,6 +539,9 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint32_t Size) ...@@ -533,6 +539,9 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint32_t Size)
SLI_CTNS_GFF_ID, SLI_CTNS_GFF_ID,
0, Did) == 0) 0, Did) == 0)
vport->num_disc_nodes++; vport->num_disc_nodes++;
else
lpfc_setup_disc_node
(vport, Did);
} }
else { else {
lpfc_debugfs_disc_trc(vport, lpfc_debugfs_disc_trc(vport,
...@@ -1241,7 +1250,7 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode, ...@@ -1241,7 +1250,7 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
be16_to_cpu(SLI_CTNS_RFF_ID); be16_to_cpu(SLI_CTNS_RFF_ID);
CtReq->un.rff.PortId = cpu_to_be32(vport->fc_myDID); CtReq->un.rff.PortId = cpu_to_be32(vport->fc_myDID);
CtReq->un.rff.fbits = FC4_FEATURE_INIT; CtReq->un.rff.fbits = FC4_FEATURE_INIT;
CtReq->un.rff.type_code = FC_FCP_DATA; CtReq->un.rff.type_code = FC_TYPE_FCP;
cmpl = lpfc_cmpl_ct_cmd_rff_id; cmpl = lpfc_cmpl_ct_cmd_rff_id;
break; break;
} }
......
...@@ -926,7 +926,7 @@ lpfc_debugfs_dumpData_open(struct inode *inode, struct file *file) ...@@ -926,7 +926,7 @@ lpfc_debugfs_dumpData_open(struct inode *inode, struct file *file)
goto out; goto out;
/* Round to page boundry */ /* Round to page boundry */
printk(KERN_ERR "BLKGRD %s: _dump_buf_data=0x%p\n", printk(KERN_ERR "9059 BLKGRD: %s: _dump_buf_data=0x%p\n",
__func__, _dump_buf_data); __func__, _dump_buf_data);
debug->buffer = _dump_buf_data; debug->buffer = _dump_buf_data;
if (!debug->buffer) { if (!debug->buffer) {
...@@ -956,8 +956,8 @@ lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file) ...@@ -956,8 +956,8 @@ lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file)
goto out; goto out;
/* Round to page boundry */ /* Round to page boundry */
printk(KERN_ERR "BLKGRD %s: _dump_buf_dif=0x%p file=%s\n", __func__, printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%s\n",
_dump_buf_dif, file->f_dentry->d_name.name); __func__, _dump_buf_dif, file->f_dentry->d_name.name);
debug->buffer = _dump_buf_dif; debug->buffer = _dump_buf_dif;
if (!debug->buffer) { if (!debug->buffer) {
kfree(debug); kfree(debug);
...@@ -1377,7 +1377,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) ...@@ -1377,7 +1377,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
debugfs_create_dir(name, phba->hba_debugfs_root); debugfs_create_dir(name, phba->hba_debugfs_root);
if (!vport->vport_debugfs_root) { if (!vport->vport_debugfs_root) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"0417 Cant create debugfs"); "0417 Cant create debugfs\n");
goto debug_failed; goto debug_failed;
} }
atomic_inc(&phba->debugfs_vport_count); atomic_inc(&phba->debugfs_vport_count);
...@@ -1430,7 +1430,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) ...@@ -1430,7 +1430,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
vport, &lpfc_debugfs_op_nodelist); vport, &lpfc_debugfs_op_nodelist);
if (!vport->debug_nodelist) { if (!vport->debug_nodelist) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"0409 Cant create debugfs nodelist"); "0409 Cant create debugfs nodelist\n");
goto debug_failed; goto debug_failed;
} }
debug_failed: debug_failed:
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
*******************************************************************/ *******************************************************************/
#define FC_MAX_HOLD_RSCN 32 /* max number of deferred RSCNs */ #define FC_MAX_HOLD_RSCN 32 /* max number of deferred RSCNs */
#define FC_MAX_NS_RSP 65536 /* max size NameServer rsp */ #define FC_MAX_NS_RSP 64512 /* max size NameServer rsp */
#define FC_MAXLOOP 126 /* max devices supported on a fc loop */ #define FC_MAXLOOP 126 /* max devices supported on a fc loop */
#define LPFC_DISC_FLOGI_TMO 10 /* Discovery FLOGI ratov */ #define LPFC_DISC_FLOGI_TMO 10 /* Discovery FLOGI ratov */
......
...@@ -1699,8 +1699,7 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) ...@@ -1699,8 +1699,7 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
lpfc_initial_fdisc(vport); lpfc_initial_fdisc(vport);
else { else {
lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP);
lpfc_printf_vlog(vport, KERN_ERR, lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
LOG_ELS,
"2606 No NPIV Fabric support\n"); "2606 No NPIV Fabric support\n");
} }
return; return;
...@@ -1901,7 +1900,10 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) ...@@ -1901,7 +1900,10 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la)
if (phba->fc_topology == TOPOLOGY_LOOP) { if (phba->fc_topology == TOPOLOGY_LOOP) {
phba->sli3_options &= ~LPFC_SLI3_NPIV_ENABLED; phba->sli3_options &= ~LPFC_SLI3_NPIV_ENABLED;
if (phba->cfg_enable_npiv) /* if npiv is enabled and this adapter supports npiv log
* a message that npiv is not supported in this topology
*/
if (phba->cfg_enable_npiv && phba->max_vpi)
lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
"1309 Link Up Event npiv not supported in loop " "1309 Link Up Event npiv not supported in loop "
"topology\n"); "topology\n");
...@@ -3118,7 +3120,7 @@ lpfc_no_rpi(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) ...@@ -3118,7 +3120,7 @@ lpfc_no_rpi(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
struct lpfc_sli *psli; struct lpfc_sli *psli;
struct lpfc_sli_ring *pring; struct lpfc_sli_ring *pring;
struct lpfc_iocbq *iocb, *next_iocb; struct lpfc_iocbq *iocb, *next_iocb;
uint32_t rpi, i; uint32_t i;
lpfc_fabric_abort_nport(ndlp); lpfc_fabric_abort_nport(ndlp);
...@@ -3127,7 +3129,6 @@ lpfc_no_rpi(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) ...@@ -3127,7 +3129,6 @@ lpfc_no_rpi(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
* by firmware with a no rpi error. * by firmware with a no rpi error.
*/ */
psli = &phba->sli; psli = &phba->sli;
rpi = ndlp->nlp_rpi;
if (ndlp->nlp_flag & NLP_RPI_VALID) { if (ndlp->nlp_flag & NLP_RPI_VALID) {
/* Now process each ring */ /* Now process each ring */
for (i = 0; i < psli->num_rings; i++) { for (i = 0; i < psli->num_rings; i++) {
......
...@@ -1124,21 +1124,6 @@ typedef struct { ...@@ -1124,21 +1124,6 @@ typedef struct {
/* Number of 4-byte words in an IOCB. */ /* Number of 4-byte words in an IOCB. */
#define IOCB_WORD_SZ 8 #define IOCB_WORD_SZ 8
/* defines for type field in fc header */
#define FC_ELS_DATA 0x1
#define FC_LLC_SNAP 0x5
#define FC_FCP_DATA 0x8
#define FC_COMMON_TRANSPORT_ULP 0x20
/* defines for rctl field in fc header */
#define FC_DEV_DATA 0x0
#define FC_UNSOL_CTL 0x2
#define FC_SOL_CTL 0x3
#define FC_UNSOL_DATA 0x4
#define FC_FCP_CMND 0x6
#define FC_ELS_REQ 0x22
#define FC_ELS_RSP 0x23
/* network headers for Dfctl field */ /* network headers for Dfctl field */
#define FC_NET_HDR 0x20 #define FC_NET_HDR 0x20
......
...@@ -3004,8 +3004,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, ...@@ -3004,8 +3004,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
spin_unlock_irq(&phba->hbalock); spin_unlock_irq(&phba->hbalock);
/* Read the FCF table and re-discover SAN. */ /* Read the FCF table and re-discover SAN. */
rc = lpfc_sli4_read_fcf_record(phba, rc = lpfc_sli4_read_fcf_record(phba, LPFC_FCOE_FCF_GET_FIRST);
LPFC_FCOE_FCF_GET_FIRST);
if (rc) if (rc)
lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
"2547 Read FCF record failed 0x%x\n", "2547 Read FCF record failed 0x%x\n",
...@@ -3021,7 +3020,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, ...@@ -3021,7 +3020,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
case LPFC_FCOE_EVENT_TYPE_FCF_DEAD: case LPFC_FCOE_EVENT_TYPE_FCF_DEAD:
lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
"2549 FCF disconnected fron network index 0x%x" "2549 FCF disconnected from network index 0x%x"
" tag 0x%x\n", acqe_fcoe->index, " tag 0x%x\n", acqe_fcoe->index,
acqe_fcoe->event_tag); acqe_fcoe->event_tag);
/* If the event is not for currently used fcf do nothing */ /* If the event is not for currently used fcf do nothing */
...@@ -3917,7 +3916,7 @@ lpfc_free_sgl_list(struct lpfc_hba *phba) ...@@ -3917,7 +3916,7 @@ lpfc_free_sgl_list(struct lpfc_hba *phba)
rc = lpfc_sli4_remove_all_sgl_pages(phba); rc = lpfc_sli4_remove_all_sgl_pages(phba);
if (rc) { if (rc) {
lpfc_printf_log(phba, KERN_ERR, LOG_SLI, lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"2005 Unable to deregister pages from HBA: %x", rc); "2005 Unable to deregister pages from HBA: %x\n", rc);
} }
kfree(phba->sli4_hba.lpfc_els_sgl_array); kfree(phba->sli4_hba.lpfc_els_sgl_array);
} }
...@@ -4366,7 +4365,8 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) ...@@ -4366,7 +4365,8 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost)
_dump_buf_data = _dump_buf_data =
(char *) __get_free_pages(GFP_KERNEL, pagecnt); (char *) __get_free_pages(GFP_KERNEL, pagecnt);
if (_dump_buf_data) { if (_dump_buf_data) {
printk(KERN_ERR "BLKGRD allocated %d pages for " lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9043 BLKGRD: allocated %d pages for "
"_dump_buf_data at 0x%p\n", "_dump_buf_data at 0x%p\n",
(1 << pagecnt), _dump_buf_data); (1 << pagecnt), _dump_buf_data);
_dump_buf_data_order = pagecnt; _dump_buf_data_order = pagecnt;
...@@ -4377,17 +4377,20 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) ...@@ -4377,17 +4377,20 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost)
--pagecnt; --pagecnt;
} }
if (!_dump_buf_data_order) if (!_dump_buf_data_order)
printk(KERN_ERR "BLKGRD ERROR unable to allocate " lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9044 BLKGRD: ERROR unable to allocate "
"memory for hexdump\n"); "memory for hexdump\n");
} else } else
printk(KERN_ERR "BLKGRD already allocated _dump_buf_data=0x%p" lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9045 BLKGRD: already allocated _dump_buf_data=0x%p"
"\n", _dump_buf_data); "\n", _dump_buf_data);
if (!_dump_buf_dif) { if (!_dump_buf_dif) {
while (pagecnt) { while (pagecnt) {
_dump_buf_dif = _dump_buf_dif =
(char *) __get_free_pages(GFP_KERNEL, pagecnt); (char *) __get_free_pages(GFP_KERNEL, pagecnt);
if (_dump_buf_dif) { if (_dump_buf_dif) {
printk(KERN_ERR "BLKGRD allocated %d pages for " lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9046 BLKGRD: allocated %d pages for "
"_dump_buf_dif at 0x%p\n", "_dump_buf_dif at 0x%p\n",
(1 << pagecnt), _dump_buf_dif); (1 << pagecnt), _dump_buf_dif);
_dump_buf_dif_order = pagecnt; _dump_buf_dif_order = pagecnt;
...@@ -4398,10 +4401,12 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) ...@@ -4398,10 +4401,12 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost)
--pagecnt; --pagecnt;
} }
if (!_dump_buf_dif_order) if (!_dump_buf_dif_order)
printk(KERN_ERR "BLKGRD ERROR unable to allocate " lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9047 BLKGRD: ERROR unable to allocate "
"memory for hexdump\n"); "memory for hexdump\n");
} else } else
printk(KERN_ERR "BLKGRD already allocated _dump_buf_dif=0x%p\n", lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9048 BLKGRD: already allocated _dump_buf_dif=0x%p\n",
_dump_buf_dif); _dump_buf_dif);
} }
...@@ -5072,10 +5077,9 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) ...@@ -5072,10 +5077,9 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba)
/* It does not make sense to have more EQs than WQs */ /* It does not make sense to have more EQs than WQs */
if (cfg_fcp_eq_count > phba->cfg_fcp_wq_count) { if (cfg_fcp_eq_count > phba->cfg_fcp_wq_count) {
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
"2593 The number of FCP EQs (%d) is more " "2593 The FCP EQ count(%d) cannot be greater "
"than the number of FCP WQs (%d), take " "than the FCP WQ count(%d), limiting the "
"the number of FCP EQs same as than of " "FCP EQ count to %d\n", cfg_fcp_eq_count,
"WQs (%d)\n", cfg_fcp_eq_count,
phba->cfg_fcp_wq_count, phba->cfg_fcp_wq_count,
phba->cfg_fcp_wq_count); phba->cfg_fcp_wq_count);
cfg_fcp_eq_count = phba->cfg_fcp_wq_count; cfg_fcp_eq_count = phba->cfg_fcp_wq_count;
...@@ -7271,15 +7275,15 @@ lpfc_sli4_get_els_iocb_cnt(struct lpfc_hba *phba) ...@@ -7271,15 +7275,15 @@ lpfc_sli4_get_els_iocb_cnt(struct lpfc_hba *phba)
if (phba->sli_rev == LPFC_SLI_REV4) { if (phba->sli_rev == LPFC_SLI_REV4) {
if (max_xri <= 100) if (max_xri <= 100)
return 4; return 10;
else if (max_xri <= 256) else if (max_xri <= 256)
return 8; return 25;
else if (max_xri <= 512) else if (max_xri <= 512)
return 16; return 50;
else if (max_xri <= 1024) else if (max_xri <= 1024)
return 32; return 100;
else else
return 48; return 150;
} else } else
return 0; return 0;
} }
...@@ -8117,15 +8121,15 @@ lpfc_exit(void) ...@@ -8117,15 +8121,15 @@ lpfc_exit(void)
if (lpfc_enable_npiv) if (lpfc_enable_npiv)
fc_release_transport(lpfc_vport_transport_template); fc_release_transport(lpfc_vport_transport_template);
if (_dump_buf_data) { if (_dump_buf_data) {
printk(KERN_ERR "BLKGRD freeing %lu pages for _dump_buf_data " printk(KERN_ERR "9062 BLKGRD: freeing %lu pages for "
"at 0x%p\n", "_dump_buf_data at 0x%p\n",
(1L << _dump_buf_data_order), _dump_buf_data); (1L << _dump_buf_data_order), _dump_buf_data);
free_pages((unsigned long)_dump_buf_data, _dump_buf_data_order); free_pages((unsigned long)_dump_buf_data, _dump_buf_data_order);
} }
if (_dump_buf_dif) { if (_dump_buf_dif) {
printk(KERN_ERR "BLKGRD freeing %lu pages for _dump_buf_dif " printk(KERN_ERR "9049 BLKGRD: freeing %lu pages for "
"at 0x%p\n", "_dump_buf_dif at 0x%p\n",
(1L << _dump_buf_dif_order), _dump_buf_dif); (1L << _dump_buf_dif_order), _dump_buf_dif);
free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order); free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order);
} }
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <scsi/scsi_device.h> #include <scsi/scsi_device.h>
#include <scsi/scsi_transport_fc.h> #include <scsi/scsi_transport_fc.h>
#include <scsi/scsi.h> #include <scsi/scsi.h>
#include <scsi/fc/fc_fs.h>
#include "lpfc_hw4.h" #include "lpfc_hw4.h"
#include "lpfc_hw.h" #include "lpfc_hw.h"
...@@ -1135,7 +1135,7 @@ lpfc_config_ring(struct lpfc_hba * phba, int ring, LPFC_MBOXQ_t * pmb) ...@@ -1135,7 +1135,7 @@ lpfc_config_ring(struct lpfc_hba * phba, int ring, LPFC_MBOXQ_t * pmb)
/* Otherwise we setup specific rctl / type masks for this ring */ /* Otherwise we setup specific rctl / type masks for this ring */
for (i = 0; i < pring->num_mask; i++) { for (i = 0; i < pring->num_mask; i++) {
mb->un.varCfgRing.rrRegs[i].rval = pring->prt[i].rctl; mb->un.varCfgRing.rrRegs[i].rval = pring->prt[i].rctl;
if (mb->un.varCfgRing.rrRegs[i].rval != FC_ELS_REQ) if (mb->un.varCfgRing.rrRegs[i].rval != FC_RCTL_ELS_REQ)
mb->un.varCfgRing.rrRegs[i].rmask = 0xff; mb->un.varCfgRing.rrRegs[i].rmask = 0xff;
else else
mb->un.varCfgRing.rrRegs[i].rmask = 0xfe; mb->un.varCfgRing.rrRegs[i].rmask = 0xfe;
...@@ -1657,9 +1657,12 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox, ...@@ -1657,9 +1657,12 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox,
/* Allocate record for keeping SGE virtual addresses */ /* Allocate record for keeping SGE virtual addresses */
mbox->sge_array = kmalloc(sizeof(struct lpfc_mbx_nembed_sge_virt), mbox->sge_array = kmalloc(sizeof(struct lpfc_mbx_nembed_sge_virt),
GFP_KERNEL); GFP_KERNEL);
if (!mbox->sge_array) if (!mbox->sge_array) {
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
"2527 Failed to allocate non-embedded SGE "
"array.\n");
return 0; return 0;
}
for (pagen = 0, alloc_len = 0; pagen < pcount; pagen++) { for (pagen = 0, alloc_len = 0; pagen < pcount; pagen++) {
/* The DMA memory is always allocated in the length of a /* The DMA memory is always allocated in the length of a
* page even though the last SGE might not fill up to a * page even though the last SGE might not fill up to a
......
This diff is collapsed.
...@@ -516,6 +516,8 @@ __lpfc_sli_get_sglq(struct lpfc_hba *phba) ...@@ -516,6 +516,8 @@ __lpfc_sli_get_sglq(struct lpfc_hba *phba)
struct lpfc_sglq *sglq = NULL; struct lpfc_sglq *sglq = NULL;
uint16_t adj_xri; uint16_t adj_xri;
list_remove_head(lpfc_sgl_list, sglq, struct lpfc_sglq, list); list_remove_head(lpfc_sgl_list, sglq, struct lpfc_sglq, list);
if (!sglq)
return NULL;
adj_xri = sglq->sli4_xritag - phba->sli4_hba.max_cfg_param.xri_base; adj_xri = sglq->sli4_xritag - phba->sli4_hba.max_cfg_param.xri_base;
phba->sli4_hba.lpfc_sglq_active_list[adj_xri] = sglq; phba->sli4_hba.lpfc_sglq_active_list[adj_xri] = sglq;
return sglq; return sglq;
...@@ -2070,8 +2072,8 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -2070,8 +2072,8 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
if ((irsp->ulpCommand == CMD_RCV_ELS_REQ64_CX) || if ((irsp->ulpCommand == CMD_RCV_ELS_REQ64_CX) ||
(irsp->ulpCommand == CMD_RCV_ELS_REQ_CX) || (irsp->ulpCommand == CMD_RCV_ELS_REQ_CX) ||
(irsp->ulpCommand == CMD_IOCB_RCV_ELS64_CX)) { (irsp->ulpCommand == CMD_IOCB_RCV_ELS64_CX)) {
Rctl = FC_ELS_REQ; Rctl = FC_RCTL_ELS_REQ;
Type = FC_ELS_DATA; Type = FC_TYPE_ELS;
} else { } else {
w5p = (WORD5 *)&(saveq->iocb.un.ulpWord[5]); w5p = (WORD5 *)&(saveq->iocb.un.ulpWord[5]);
Rctl = w5p->hcsw.Rctl; Rctl = w5p->hcsw.Rctl;
...@@ -2081,8 +2083,8 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -2081,8 +2083,8 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
if ((Rctl == 0) && (pring->ringno == LPFC_ELS_RING) && if ((Rctl == 0) && (pring->ringno == LPFC_ELS_RING) &&
(irsp->ulpCommand == CMD_RCV_SEQUENCE64_CX || (irsp->ulpCommand == CMD_RCV_SEQUENCE64_CX ||
irsp->ulpCommand == CMD_IOCB_RCV_SEQ64_CX)) { irsp->ulpCommand == CMD_IOCB_RCV_SEQ64_CX)) {
Rctl = FC_ELS_REQ; Rctl = FC_RCTL_ELS_REQ;
Type = FC_ELS_DATA; Type = FC_TYPE_ELS;
w5p->hcsw.Rctl = Rctl; w5p->hcsw.Rctl = Rctl;
w5p->hcsw.Type = Type; w5p->hcsw.Type = Type;
} }
...@@ -4485,7 +4487,8 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) ...@@ -4485,7 +4487,8 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
rc = lpfc_sli4_post_sgl_list(phba); rc = lpfc_sli4_post_sgl_list(phba);
if (unlikely(rc)) { if (unlikely(rc)) {
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI,
"0582 Error %d during sgl post operation", rc); "0582 Error %d during sgl post operation\n",
rc);
rc = -ENODEV; rc = -ENODEV;
goto out_free_vpd; goto out_free_vpd;
} }
...@@ -4494,8 +4497,8 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) ...@@ -4494,8 +4497,8 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
rc = lpfc_sli4_repost_scsi_sgl_list(phba); rc = lpfc_sli4_repost_scsi_sgl_list(phba);
if (unlikely(rc)) { if (unlikely(rc)) {
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI, lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"0383 Error %d during scsi sgl post opeation", "0383 Error %d during scsi sgl post "
rc); "operation\n", rc);
/* Some Scsi buffers were moved to the abort scsi list */ /* Some Scsi buffers were moved to the abort scsi list */
/* A pci function reset will repost them */ /* A pci function reset will repost them */
rc = -ENODEV; rc = -ENODEV;
...@@ -5686,7 +5689,7 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number, ...@@ -5686,7 +5689,7 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number,
case CMD_GEN_REQUEST64_CX: case CMD_GEN_REQUEST64_CX:
if (!(phba->sli.sli_flag & LPFC_MENLO_MAINT) || if (!(phba->sli.sli_flag & LPFC_MENLO_MAINT) ||
(piocb->iocb.un.genreq64.w5.hcsw.Rctl != (piocb->iocb.un.genreq64.w5.hcsw.Rctl !=
FC_FCP_CMND) || FC_RCTL_DD_UNSOL_CMD) ||
(piocb->iocb.un.genreq64.w5.hcsw.Type != (piocb->iocb.un.genreq64.w5.hcsw.Type !=
MENLO_TRANSPORT_TYPE)) MENLO_TRANSPORT_TYPE))
...@@ -6485,27 +6488,27 @@ lpfc_sli_setup(struct lpfc_hba *phba) ...@@ -6485,27 +6488,27 @@ lpfc_sli_setup(struct lpfc_hba *phba)
lpfc_sli_async_event_handler; lpfc_sli_async_event_handler;
pring->num_mask = LPFC_MAX_RING_MASK; pring->num_mask = LPFC_MAX_RING_MASK;
pring->prt[0].profile = 0; /* Mask 0 */ pring->prt[0].profile = 0; /* Mask 0 */
pring->prt[0].rctl = FC_ELS_REQ; pring->prt[0].rctl = FC_RCTL_ELS_REQ;
pring->prt[0].type = FC_ELS_DATA; pring->prt[0].type = FC_TYPE_ELS;
pring->prt[0].lpfc_sli_rcv_unsol_event = pring->prt[0].lpfc_sli_rcv_unsol_event =
lpfc_els_unsol_event; lpfc_els_unsol_event;
pring->prt[1].profile = 0; /* Mask 1 */ pring->prt[1].profile = 0; /* Mask 1 */
pring->prt[1].rctl = FC_ELS_RSP; pring->prt[1].rctl = FC_RCTL_ELS_REP;
pring->prt[1].type = FC_ELS_DATA; pring->prt[1].type = FC_TYPE_ELS;
pring->prt[1].lpfc_sli_rcv_unsol_event = pring->prt[1].lpfc_sli_rcv_unsol_event =
lpfc_els_unsol_event; lpfc_els_unsol_event;
pring->prt[2].profile = 0; /* Mask 2 */ pring->prt[2].profile = 0; /* Mask 2 */
/* NameServer Inquiry */ /* NameServer Inquiry */
pring->prt[2].rctl = FC_UNSOL_CTL; pring->prt[2].rctl = FC_RCTL_DD_UNSOL_CTL;
/* NameServer */ /* NameServer */
pring->prt[2].type = FC_COMMON_TRANSPORT_ULP; pring->prt[2].type = FC_TYPE_CT;
pring->prt[2].lpfc_sli_rcv_unsol_event = pring->prt[2].lpfc_sli_rcv_unsol_event =
lpfc_ct_unsol_event; lpfc_ct_unsol_event;
pring->prt[3].profile = 0; /* Mask 3 */ pring->prt[3].profile = 0; /* Mask 3 */
/* NameServer response */ /* NameServer response */
pring->prt[3].rctl = FC_SOL_CTL; pring->prt[3].rctl = FC_RCTL_DD_SOL_CTL;
/* NameServer */ /* NameServer */
pring->prt[3].type = FC_COMMON_TRANSPORT_ULP; pring->prt[3].type = FC_TYPE_CT;
pring->prt[3].lpfc_sli_rcv_unsol_event = pring->prt[3].lpfc_sli_rcv_unsol_event =
lpfc_ct_unsol_event; lpfc_ct_unsol_event;
/* abort unsolicited sequence */ /* abort unsolicited sequence */
...@@ -8089,7 +8092,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id) ...@@ -8089,7 +8092,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id)
KERN_ERR, KERN_ERR,
LOG_MBOX | LOG_SLI, LOG_MBOX | LOG_SLI,
"0350 rc should have" "0350 rc should have"
"been MBX_BUSY"); "been MBX_BUSY\n");
if (rc != MBX_NOT_FINISHED) if (rc != MBX_NOT_FINISHED)
goto send_current_mbox; goto send_current_mbox;
} }
...@@ -8118,7 +8121,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id) ...@@ -8118,7 +8121,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id)
if (rc != MBX_SUCCESS) if (rc != MBX_SUCCESS)
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX |
LOG_SLI, "0349 rc should be " LOG_SLI, "0349 rc should be "
"MBX_SUCCESS"); "MBX_SUCCESS\n");
} }
spin_lock_irqsave(&phba->hbalock, iflag); spin_lock_irqsave(&phba->hbalock, iflag);
...@@ -10454,8 +10457,7 @@ lpfc_sli4_next_xritag(struct lpfc_hba *phba) ...@@ -10454,8 +10457,7 @@ lpfc_sli4_next_xritag(struct lpfc_hba *phba)
return xritag; return xritag;
} }
spin_unlock_irq(&phba->hbalock); spin_unlock_irq(&phba->hbalock);
lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"2004 Failed to allocate XRI.last XRITAG is %d" "2004 Failed to allocate XRI.last XRITAG is %d"
" Max XRI is %d, Used XRI is %d\n", " Max XRI is %d, Used XRI is %d\n",
phba->sli4_hba.next_xri, phba->sli4_hba.next_xri,
...@@ -10519,15 +10521,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba) ...@@ -10519,15 +10521,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba)
lpfc_sli4_mbox_cmd_free(phba, mbox); lpfc_sli4_mbox_cmd_free(phba, mbox);
return -ENOMEM; return -ENOMEM;
} }
/* Get the first SGE entry from the non-embedded DMA memory */ /* Get the first SGE entry from the non-embedded DMA memory */
if (unlikely(!mbox->sge_array)) {
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
"2525 Failed to get the non-embedded SGE "
"virtual address\n");
lpfc_sli4_mbox_cmd_free(phba, mbox);
return -ENOMEM;
}
viraddr = mbox->sge_array->addr[0]; viraddr = mbox->sge_array->addr[0];
/* Set up the SGL pages in the non-embedded DMA pages */ /* Set up the SGL pages in the non-embedded DMA pages */
...@@ -10551,8 +10545,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba) ...@@ -10551,8 +10545,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba)
sgl_pg_pairs++; sgl_pg_pairs++;
} }
bf_set(lpfc_post_sgl_pages_xri, sgl, xritag_start); bf_set(lpfc_post_sgl_pages_xri, sgl, xritag_start);
pg_pairs = (pg_pairs > 0) ? (pg_pairs - 1) : pg_pairs; bf_set(lpfc_post_sgl_pages_xricnt, sgl, els_xri_cnt);
bf_set(lpfc_post_sgl_pages_xricnt, sgl, pg_pairs);
/* Perform endian conversion if necessary */ /* Perform endian conversion if necessary */
sgl->word0 = cpu_to_le32(sgl->word0); sgl->word0 = cpu_to_le32(sgl->word0);
...@@ -10634,15 +10627,7 @@ lpfc_sli4_post_scsi_sgl_block(struct lpfc_hba *phba, struct list_head *sblist, ...@@ -10634,15 +10627,7 @@ lpfc_sli4_post_scsi_sgl_block(struct lpfc_hba *phba, struct list_head *sblist,
lpfc_sli4_mbox_cmd_free(phba, mbox); lpfc_sli4_mbox_cmd_free(phba, mbox);
return -ENOMEM; return -ENOMEM;
} }
/* Get the first SGE entry from the non-embedded DMA memory */ /* Get the first SGE entry from the non-embedded DMA memory */
if (unlikely(!mbox->sge_array)) {
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
"2565 Failed to get the non-embedded SGE "
"virtual address\n");
lpfc_sli4_mbox_cmd_free(phba, mbox);
return -ENOMEM;
}
viraddr = mbox->sge_array->addr[0]; viraddr = mbox->sge_array->addr[0];
/* Set up the SGL pages in the non-embedded DMA pages */ /* Set up the SGL pages in the non-embedded DMA pages */
...@@ -11565,6 +11550,7 @@ lpfc_sli4_init_vpi(struct lpfc_hba *phba, uint16_t vpi) ...@@ -11565,6 +11550,7 @@ lpfc_sli4_init_vpi(struct lpfc_hba *phba, uint16_t vpi)
{ {
LPFC_MBOXQ_t *mboxq; LPFC_MBOXQ_t *mboxq;
int rc = 0; int rc = 0;
int retval = MBX_SUCCESS;
uint32_t mbox_tmo; uint32_t mbox_tmo;
if (vpi == 0) if (vpi == 0)
...@@ -11575,16 +11561,17 @@ lpfc_sli4_init_vpi(struct lpfc_hba *phba, uint16_t vpi) ...@@ -11575,16 +11561,17 @@ lpfc_sli4_init_vpi(struct lpfc_hba *phba, uint16_t vpi)
lpfc_init_vpi(phba, mboxq, vpi); lpfc_init_vpi(phba, mboxq, vpi);
mbox_tmo = lpfc_mbox_tmo_val(phba, MBX_INIT_VPI); mbox_tmo = lpfc_mbox_tmo_val(phba, MBX_INIT_VPI);
rc = lpfc_sli_issue_mbox_wait(phba, mboxq, mbox_tmo); rc = lpfc_sli_issue_mbox_wait(phba, mboxq, mbox_tmo);
if (rc != MBX_TIMEOUT)
mempool_free(mboxq, phba->mbox_mem_pool);
if (rc != MBX_SUCCESS) { if (rc != MBX_SUCCESS) {
lpfc_printf_log(phba, KERN_ERR, LOG_SLI, lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"2022 INIT VPI Mailbox failed " "2022 INIT VPI Mailbox failed "
"status %d, mbxStatus x%x\n", rc, "status %d, mbxStatus x%x\n", rc,
bf_get(lpfc_mqe_status, &mboxq->u.mqe)); bf_get(lpfc_mqe_status, &mboxq->u.mqe));
rc = -EIO; retval = -EIO;
} }
return rc; if (rc != MBX_TIMEOUT)
mempool_free(mboxq, phba->mbox_mem_pool);
return retval;
} }
/** /**
...@@ -11669,13 +11656,6 @@ lpfc_sli4_add_fcf_record(struct lpfc_hba *phba, struct fcf_record *fcf_record) ...@@ -11669,13 +11656,6 @@ lpfc_sli4_add_fcf_record(struct lpfc_hba *phba, struct fcf_record *fcf_record)
*/ */
lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); lpfc_sli4_mbx_sge_get(mboxq, 0, &sge);
phys_addr = getPaddr(sge.pa_hi, sge.pa_lo); phys_addr = getPaddr(sge.pa_hi, sge.pa_lo);
if (unlikely(!mboxq->sge_array)) {
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
"2526 Failed to get the non-embedded SGE "
"virtual address\n");
lpfc_sli4_mbox_cmd_free(phba, mboxq);
return -ENOMEM;
}
virt_addr = mboxq->sge_array->addr[0]; virt_addr = mboxq->sge_array->addr[0];
/* /*
* Configure the FCF record for FCFI 0. This is the driver's * Configure the FCF record for FCFI 0. This is the driver's
...@@ -11799,13 +11779,6 @@ lpfc_sli4_read_fcf_record(struct lpfc_hba *phba, uint16_t fcf_index) ...@@ -11799,13 +11779,6 @@ lpfc_sli4_read_fcf_record(struct lpfc_hba *phba, uint16_t fcf_index)
*/ */
lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); lpfc_sli4_mbx_sge_get(mboxq, 0, &sge);
phys_addr = getPaddr(sge.pa_hi, sge.pa_lo); phys_addr = getPaddr(sge.pa_hi, sge.pa_lo);
if (unlikely(!mboxq->sge_array)) {
lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
"2527 Failed to get the non-embedded SGE "
"virtual address\n");
error = -ENOMEM;
goto fail_fcfscan;
}
virt_addr = mboxq->sge_array->addr[0]; virt_addr = mboxq->sge_array->addr[0];
read_fcf = (struct lpfc_mbx_read_fcf_tbl *)virt_addr; read_fcf = (struct lpfc_mbx_read_fcf_tbl *)virt_addr;
......
...@@ -159,7 +159,7 @@ struct lpfc_fip_param_hdr { ...@@ -159,7 +159,7 @@ struct lpfc_fip_param_hdr {
#define lpfc_fip_param_hdr_fipp_mode_SHIFT 6 #define lpfc_fip_param_hdr_fipp_mode_SHIFT 6
#define lpfc_fip_param_hdr_fipp_mode_MASK 0x3 #define lpfc_fip_param_hdr_fipp_mode_MASK 0x3
#define lpfc_fip_param_hdr_fipp_mode_WORD parm_flags #define lpfc_fip_param_hdr_fipp_mode_WORD parm_flags
#define FIPP_MODE_ON 0x2 #define FIPP_MODE_ON 0x1
#define FIPP_MODE_OFF 0x0 #define FIPP_MODE_OFF 0x0
#define FIPP_VLAN_VALID 0x1 #define FIPP_VLAN_VALID 0x1
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment