diff options
author | James Smart <james.smart@emulex.com> | 2010-04-06 15:04:33 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 13:45:24 -0500 |
commit | 49198b371e2da20548d1408a7d3a8dea2f91263c (patch) | |
tree | b04993f74b2798bbf9e18f952ec6d1fd18cb0db6 /drivers/scsi/lpfc/lpfc_bsg.c | |
parent | 6c8eea54ec62c1a3fdb21de583639c49dcdc8811 (diff) | |
download | blackbird-op-linux-49198b371e2da20548d1408a7d3a8dea2f91263c.tar.gz blackbird-op-linux-49198b371e2da20548d1408a7d3a8dea2f91263c.zip |
[SCSI] lpfc 8.3.12: Critical fixes
- Move the code to increase the sg seg count for LP21000 adapters.
- Check pcmd on command completion before dereferencing it.
- Clear queue memory when creating firmware queues to prevent stale entries.
- Replace the use of PAGE_SIZE in many areas that assumed it was always 4k.
- Add an else clause to a conditional that needed to unlock the hba_lock.
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/lpfc_bsg.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 92ad202a9380..141a1ce9b742 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -2591,7 +2591,7 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job, goto job_done; } - mb = kzalloc(PAGE_SIZE, GFP_KERNEL); + mb = kzalloc(BSG_MBOX_SIZE, GFP_KERNEL); if (!mb) { rc = -ENOMEM; goto job_done; @@ -2665,13 +2665,12 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job, rxbmp->virt = lpfc_mbuf_alloc(phba, 0, &rxbmp->phys); INIT_LIST_HEAD(&rxbmp->list); rxbpl = (struct ulp_bde64 *) rxbmp->virt; - dmp = diag_cmd_data_alloc(phba, rxbpl, PAGE_SIZE, 0); + dmp = diag_cmd_data_alloc(phba, rxbpl, BSG_MBOX_SIZE, 0); if (!dmp) { rc = -ENOMEM; goto job_done; } - dmp->size = PAGE_SIZE; INIT_LIST_HEAD(&dmp->dma.list); pmb->un.varBIUdiag.un.s2.xmit_bde64.addrHigh = putPaddrHigh(dmp->dma.phys); @@ -2774,12 +2773,12 @@ lpfc_bsg_mbox_cmd(struct fc_bsg_job *job) goto job_error; } - if (job->request_payload.payload_len != PAGE_SIZE) { + if (job->request_payload.payload_len != BSG_MBOX_SIZE) { rc = -EINVAL; goto job_error; } - if (job->reply_payload.payload_len != PAGE_SIZE) { + if (job->reply_payload.payload_len != BSG_MBOX_SIZE) { rc = -EINVAL; goto job_error; } |