aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.h
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.(none)>2005-10-29 11:28:33 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-29 11:28:33 -0400
commit604a3e3042eb89ffaa4f735ef9208281aae786c7 (patch)
tree54c4ad58274b0bb79386c6c57b4849bfb92d4118 /drivers/scsi/lpfc/lpfc_sli.h
parent21568f5387636fe2bfb9ee42383d76de11ed99c7 (diff)
[SCSI] lpfc: Fix for "command completion for iotax x?? not found"
From: James Smart <James.Smart@emulex.com> 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 <James.Smart@emulex.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h
index 2d5b0670415c..5d8911de4faa 100644
--- a/drivers/scsi/lpfc/lpfc_sli.h
+++ b/drivers/scsi/lpfc/lpfc_sli.h
@@ -33,6 +33,9 @@ typedef enum _lpfc_ctx_cmd {
33struct lpfc_iocbq { 33struct lpfc_iocbq {
34 /* lpfc_iocbqs are used in double linked lists */ 34 /* lpfc_iocbqs are used in double linked lists */
35 struct list_head list; 35 struct list_head list;
36 uint16_t iotag; /* pre-assigned IO tag */
37 uint16_t rsvd1;
38
36 IOCB_t iocb; /* IOCB cmd */ 39 IOCB_t iocb; /* IOCB cmd */
37 uint8_t retry; /* retry counter for IOCB cmd - if needed */ 40 uint8_t retry; /* retry counter for IOCB cmd - if needed */
38 uint8_t iocb_flag; 41 uint8_t iocb_flag;
@@ -200,6 +203,11 @@ struct lpfc_sli {
200 cmd */ 203 cmd */
201 204
202 uint32_t *MBhostaddr; /* virtual address for mbox cmds */ 205 uint32_t *MBhostaddr; /* virtual address for mbox cmds */
206
207#define LPFC_IOCBQ_LOOKUP_INCREMENT 1024
208 struct lpfc_iocbq ** iocbq_lookup; /* array to lookup IOCB by IOTAG */
209 size_t iocbq_lookup_len; /* current lengs of the array */
210 uint16_t last_iotag; /* last allocated IOTAG */
203}; 211};
204 212
205/* Given a pointer to the start of the ring, and the slot number of 213/* Given a pointer to the start of the ring, and the slot number of