[PATCH 4 of 12] Update Emulex lpfc driver to rev 8.0.29

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix error loading lpfc on sparc

Bug reported via SourceForge - lpfc does not load on sparc.  The lpfc
driver must byteswap all FCP IOCBs to recover the data into cpu native
format.

Also correct issue of "iotag not found" messages

Signed-off-by: James Smart <James.Smart@xxxxxxxxxx>

---

 scsi-misc-2.6-20050620-jsmart/drivers/scsi/lpfc/lpfc_sli.c |   17 +++++++++----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff -puN drivers/scsi/lpfc/lpfc_sli.c~bebyteswap drivers/scsi/lpfc/lpfc_sli.c
--- scsi-misc-2.6-20050620/drivers/scsi/lpfc/lpfc_sli.c~bebyteswap	2005-06-25 09:42:03.000000000 -0400
+++ scsi-misc-2.6-20050620-jsmart/drivers/scsi/lpfc/lpfc_sli.c	2005-06-25 09:42:03.000000000 -0400
@@ -904,6 +904,7 @@ lpfc_sli_handle_fast_ring_event(struct l
 {
  	struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno];
 	IOCB_t *irsp = NULL;
+	IOCB_t *entry = NULL;
 	struct lpfc_iocbq *cmdiocbq = NULL;
 	struct lpfc_iocbq rspiocbq;
 	uint32_t status;
@@ -948,7 +949,17 @@ lpfc_sli_handle_fast_ring_event(struct l
 
 	rmb();
 	while (pring->rspidx != portRspPut) {
-		irsp = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx);
+		/*
+		 * Fetch an entry off the ring and copy it into a local data
+		 * structure.  The copy involves a byte-swap since the
+		 * network byte order and pci byte orders are different.
+		 */
+		entry = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx);
+		lpfc_sli_pcimem_bcopy((uint32_t *) entry,
+				      (uint32_t *) &rspiocbq.iocb,
+				      sizeof (IOCB_t));
+		irsp = &rspiocbq.iocb;
+
 		type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK);
 		pring->stats.iocb_rsp++;
 		rsp_cmpl++;
@@ -980,10 +991,6 @@ lpfc_sli_handle_fast_ring_event(struct l
 				break;
 			}
 
-			rspiocbq.iocb.un.ulpWord[4] = irsp->un.ulpWord[4];
-			rspiocbq.iocb.ulpStatus = irsp->ulpStatus;
-			rspiocbq.iocb.ulpContext = irsp->ulpContext;
-			rspiocbq.iocb.ulpIoTag = irsp->ulpIoTag;
 			cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba,
 								pring,
 								&rspiocbq);
_
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux