diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2009-09-14 01:34:23 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-02 10:48:38 -0400 |
commit | 77e63ed44305e89c0564f8292f9cd5764d4fddfb (patch) | |
tree | 66aab9af95be1daadf6e648b008f9c1d77cf1ac0 /drivers/scsi/mpt2sas/mpt2sas_config.c | |
parent | 595bb0bd62edb28a965993d90e0fa1285560ce53 (diff) |
[SCSI] mpt2sas: Target Reset will be issued from Interrupt context.
(1) Added three new functions to handle sending target resest and OP_REMOVE
from interrupt time, they are _scsih_tm_tr_send, _scsih_tm_tr_complete, and
_scsih_sas_control_complete. This code will create a link list of pending
target resets if there is no more available request in the hipriority
request queue. The list is stored in ioc->delayed_tr_list.
(2) All callback handler return type is changed from void to u8.
Now _base_interrupt will check for return type of callback handlers to
take decision of message frame is already freed or not.
In genral,
Return 1 meaning mf should be freed from _base_interrupt
0 means the mf is freed from function.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_config.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index d79a4ddf26be..594a389c6526 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c | |||
@@ -233,18 +233,19 @@ _config_free_config_dma_memory(struct MPT2SAS_ADAPTER *ioc, | |||
233 | * | 233 | * |
234 | * The callback handler when using _config_request. | 234 | * The callback handler when using _config_request. |
235 | * | 235 | * |
236 | * Return nothing. | 236 | * Return 1 meaning mf should be freed from _base_interrupt |
237 | * 0 means the mf is freed from this function. | ||
237 | */ | 238 | */ |
238 | void | 239 | u8 |
239 | mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, | 240 | mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, |
240 | u32 reply) | 241 | u32 reply) |
241 | { | 242 | { |
242 | MPI2DefaultReply_t *mpi_reply; | 243 | MPI2DefaultReply_t *mpi_reply; |
243 | 244 | ||
244 | if (ioc->config_cmds.status == MPT2_CMD_NOT_USED) | 245 | if (ioc->config_cmds.status == MPT2_CMD_NOT_USED) |
245 | return; | 246 | return 1; |
246 | if (ioc->config_cmds.smid != smid) | 247 | if (ioc->config_cmds.smid != smid) |
247 | return; | 248 | return 1; |
248 | ioc->config_cmds.status |= MPT2_CMD_COMPLETE; | 249 | ioc->config_cmds.status |= MPT2_CMD_COMPLETE; |
249 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); | 250 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); |
250 | if (mpi_reply) { | 251 | if (mpi_reply) { |
@@ -258,6 +259,7 @@ mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, | |||
258 | #endif | 259 | #endif |
259 | ioc->config_cmds.smid = USHORT_MAX; | 260 | ioc->config_cmds.smid = USHORT_MAX; |
260 | complete(&ioc->config_cmds.done); | 261 | complete(&ioc->config_cmds.done); |
262 | return 1; | ||
261 | } | 263 | } |
262 | 264 | ||
263 | /** | 265 | /** |