diff options
author | Yang, Bo <Bo.Yang@lsi.com> | 2009-10-06 14:47:35 -0600 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-29 13:03:21 -0400 |
commit | 0c79e681eef10810a5ed41a2eb1dce244ab1c37d (patch) | |
tree | c6b389d9acafd043ddbc5b8ea159f1ee1d4fc899 /drivers/scsi/megaraid/megaraid_sas.h | |
parent | f4c9a1317d32bb0af7546ef0c1dcc3be52dc8d0a (diff) |
[SCSI] megaraid_sas: Fix the fix for fw hang caused by megaraid sas application
Add a lock to the skinny firmware initialisation sequence to prevent
the two stage write being non atomic if multiple instances use it.
Add a flag to the driver shutdown sequence to prevent aen ioctls being
called after shutdown begins.
Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.h')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index a1fd44bc1817..13ac37e80075 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -1157,17 +1157,6 @@ struct megasas_evt_detail { } __attribute__ ((packed)); - struct megasas_instance_template { - void (*fire_cmd)(dma_addr_t ,u32 ,struct megasas_register_set __iomem *); - - void (*enable_intr)(struct megasas_register_set __iomem *) ; - void (*disable_intr)(struct megasas_register_set __iomem *); - - int (*clear_intr)(struct megasas_register_set __iomem *); - - u32 (*read_fw_status_reg)(struct megasas_register_set __iomem *); - }; - struct megasas_instance { u32 *producer; @@ -1193,6 +1182,8 @@ struct megasas_instance { spinlock_t cmd_pool_lock; /* used to synch producer, consumer ptrs in dpc */ spinlock_t completion_lock; + /* used to sync fire the cmd to fw */ + spinlock_t fire_lock; struct dma_pool *frame_dma_pool; struct dma_pool *sense_dma_pool; @@ -1224,6 +1215,18 @@ struct megasas_instance { struct timer_list io_completion_timer; }; +struct megasas_instance_template { + void (*fire_cmd)(struct megasas_instance *, dma_addr_t, \ + u32, struct megasas_register_set __iomem *); + + void (*enable_intr)(struct megasas_register_set __iomem *) ; + void (*disable_intr)(struct megasas_register_set __iomem *); + + int (*clear_intr)(struct megasas_register_set __iomem *); + + u32 (*read_fw_status_reg)(struct megasas_register_set __iomem *); +}; + #define MEGASAS_IS_LOGICAL(scp) \ (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1 |