From 604a3e3042eb89ffaa4f735ef9208281aae786c7 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 29 Oct 2005 10:28:33 -0500 Subject: [SCSI] lpfc: Fix for "command completion for iotax x?? not found" From: James Smart There were scenarios where the error handlers could reuse an iotag value of an active io. Remove all possibility of this by pre-assigning iotag resources to command resources. Signed-off-by: James Smart Rejections fixed up and Signed-off-by: James Bottomley --- drivers/scsi/lpfc/lpfc_sli.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/scsi/lpfc/lpfc_sli.h') diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 2d5b0670415..5d8911de4fa 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h @@ -33,6 +33,9 @@ typedef enum _lpfc_ctx_cmd { struct lpfc_iocbq { /* lpfc_iocbqs are used in double linked lists */ struct list_head list; + uint16_t iotag; /* pre-assigned IO tag */ + uint16_t rsvd1; + IOCB_t iocb; /* IOCB cmd */ uint8_t retry; /* retry counter for IOCB cmd - if needed */ uint8_t iocb_flag; @@ -200,6 +203,11 @@ struct lpfc_sli { cmd */ uint32_t *MBhostaddr; /* virtual address for mbox cmds */ + +#define LPFC_IOCBQ_LOOKUP_INCREMENT 1024 + struct lpfc_iocbq ** iocbq_lookup; /* array to lookup IOCB by IOTAG */ + size_t iocbq_lookup_len; /* current lengs of the array */ + uint16_t last_iotag; /* last allocated IOTAG */ }; /* Given a pointer to the start of the ring, and the slot number of -- cgit v1.2.3