aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c1
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c7
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.h4
4 files changed, 12 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index ba4573912c02..e591611f98e2 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1429,6 +1429,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
1429 if (!phba->slim2p) 1429 if (!phba->slim2p)
1430 goto out_iounmap; 1430 goto out_iounmap;
1431 1431
1432 memset(phba->slim2p, 0, SLI2_SLIM_SIZE);
1432 1433
1433 /* Initialize the SLI Layer to run with lpfc HBAs. */ 1434 /* Initialize the SLI Layer to run with lpfc HBAs. */
1434 lpfc_sli_setup(phba); 1435 lpfc_sli_setup(phba);
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index 73eb89f91593..31c20cc00609 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -531,6 +531,7 @@ lpfc_config_port(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
531 size_t offset; 531 size_t offset;
532 struct lpfc_hgp hgp; 532 struct lpfc_hgp hgp;
533 void __iomem *to_slim; 533 void __iomem *to_slim;
534 int i;
534 535
535 memset(pmb, 0, sizeof(LPFC_MBOXQ_t)); 536 memset(pmb, 0, sizeof(LPFC_MBOXQ_t));
536 mb->mbxCommand = MBX_CONFIG_PORT; 537 mb->mbxCommand = MBX_CONFIG_PORT;
@@ -587,7 +588,11 @@ lpfc_config_port(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
587 /* write HGP data to SLIM at the required longword offset */ 588 /* write HGP data to SLIM at the required longword offset */
588 memset(&hgp, 0, sizeof(struct lpfc_hgp)); 589 memset(&hgp, 0, sizeof(struct lpfc_hgp));
589 to_slim = phba->MBslimaddr + (SLIMOFF*sizeof (uint32_t)); 590 to_slim = phba->MBslimaddr + (SLIMOFF*sizeof (uint32_t));
590 lpfc_memcpy_to_slim(to_slim, &hgp, sizeof(struct lpfc_hgp)); 591
592 for (i=0; i < phba->sli.num_rings; i++) {
593 lpfc_memcpy_to_slim(to_slim, &hgp, sizeof(struct lpfc_hgp));
594 to_slim += sizeof (struct lpfc_hgp);
595 }
591 596
592 /* Setup Port Group ring pointer */ 597 /* Setup Port Group ring pointer */
593 offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port - 598 offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port -
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e74e224fd77c..71ff2b6a642f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -335,7 +335,7 @@ lpfc_sli_submit_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
335 * driver will put a command into. 335 * driver will put a command into.
336 */ 336 */
337 pring->cmdidx = pring->next_cmdidx; 337 pring->cmdidx = pring->next_cmdidx;
338 writeb(pring->cmdidx, phba->MBslimaddr 338 writel(pring->cmdidx, phba->MBslimaddr
339 + (SLIMOFF + (pring->ringno * 2)) * 4); 339 + (SLIMOFF + (pring->ringno * 2)) * 4);
340} 340}
341 341
@@ -1033,7 +1033,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
1033 1033
1034 to_slim = phba->MBslimaddr + 1034 to_slim = phba->MBslimaddr +
1035 (SLIMOFF + (pring->ringno * 2) + 1) * 4; 1035 (SLIMOFF + (pring->ringno * 2) + 1) * 4;
1036 writeb(pring->rspidx, to_slim); 1036 writel(pring->rspidx, to_slim);
1037 1037
1038 if (pring->rspidx == portRspPut) 1038 if (pring->rspidx == portRspPut)
1039 portRspPut = le32_to_cpu(pgp->rspPutInx); 1039 portRspPut = le32_to_cpu(pgp->rspPutInx);
@@ -1147,7 +1147,7 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba,
1147 1147
1148 to_slim = phba->MBslimaddr + (SLIMOFF + (pring->ringno * 2) 1148 to_slim = phba->MBslimaddr + (SLIMOFF + (pring->ringno * 2)
1149 + 1) * 4; 1149 + 1) * 4;
1150 writeb(pring->rspidx, to_slim); 1150 writel(pring->rspidx, to_slim);
1151 1151
1152 if (list_empty(&(pring->iocb_continueq))) { 1152 if (list_empty(&(pring->iocb_continueq))) {
1153 list_add(&rspiocbp->list, &(pring->iocb_continueq)); 1153 list_add(&rspiocbp->list, &(pring->iocb_continueq));
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h
index 6c74f3c85ff7..2d5b0670415c 100644
--- a/drivers/scsi/lpfc/lpfc_sli.h
+++ b/drivers/scsi/lpfc/lpfc_sli.h
@@ -125,10 +125,10 @@ struct lpfc_sli_ring {
125 125
126 uint32_t local_getidx; /* last available cmd index (from cmdGetInx) */ 126 uint32_t local_getidx; /* last available cmd index (from cmdGetInx) */
127 uint32_t next_cmdidx; /* next_cmd index */ 127 uint32_t next_cmdidx; /* next_cmd index */
128 uint32_t rspidx; /* current index in response ring */
129 uint32_t cmdidx; /* current index in command ring */
128 uint8_t rsvd; 130 uint8_t rsvd;
129 uint8_t ringno; /* ring number */ 131 uint8_t ringno; /* ring number */
130 uint8_t rspidx; /* current index in response ring */
131 uint8_t cmdidx; /* current index in command ring */
132 uint16_t numCiocb; /* number of command iocb's per ring */ 132 uint16_t numCiocb; /* number of command iocb's per ring */
133 uint16_t numRiocb; /* number of rsp iocb's per ring */ 133 uint16_t numRiocb; /* number of rsp iocb's per ring */
134 134