diff options
author | Prakash, Sathya <sathya.prakash@lsi.com> | 2007-08-14 06:38:40 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:40:40 -0400 |
commit | 7a195f464e0692607aca8150c8489a838fab684b (patch) | |
tree | 55368ee04d0ad6209fae6fe375b977046488c4b6 /drivers/message/fusion/mptctl.c | |
parent | 232f08fc82b15fdcaffc68c558115bfb2b34db86 (diff) |
[SCSI] mpt fusion: Usage of high priority request FIFO to send task management commands
Added support for sending the task management requests through High priority
request FIFO instead of Doorbell writes when firmware support High priority
FIFO.
signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r-- | drivers/message/fusion/mptctl.c | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 89695e705bdc..dce1e9c2cdc0 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -342,7 +342,7 @@ static int mptctl_bus_reset(MPT_IOCTL *ioctl) | |||
342 | SCSITaskMgmt_t *pScsiTm; | 342 | SCSITaskMgmt_t *pScsiTm; |
343 | MPT_SCSI_HOST *hd; | 343 | MPT_SCSI_HOST *hd; |
344 | int ii; | 344 | int ii; |
345 | int retval; | 345 | int retval=0; |
346 | 346 | ||
347 | 347 | ||
348 | ioctl->reset &= ~MPTCTL_RESET_OK; | 348 | ioctl->reset &= ~MPTCTL_RESET_OK; |
@@ -395,12 +395,19 @@ static int mptctl_bus_reset(MPT_IOCTL *ioctl) | |||
395 | DBG_DUMP_TM_REQUEST_FRAME(ioctl->ioc, (u32 *)mf); | 395 | DBG_DUMP_TM_REQUEST_FRAME(ioctl->ioc, (u32 *)mf); |
396 | 396 | ||
397 | ioctl->wait_done=0; | 397 | ioctl->wait_done=0; |
398 | if ((retval = mpt_send_handshake_request(mptctl_id, ioctl->ioc, | 398 | |
399 | sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP)) != 0) { | 399 | if ((ioctl->ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) && |
400 | dfailprintk(ioctl->ioc, printk(MYIOC_s_ERR_FMT "_send_handshake FAILED!" | 400 | (ioctl->ioc->facts.MsgVersion >= MPI_VERSION_01_05)) |
401 | " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, | 401 | mpt_put_msg_frame_hi_pri(mptctl_id, ioctl->ioc, mf); |
402 | hd->ioc, mf)); | 402 | else { |
403 | goto mptctl_bus_reset_done; | 403 | retval = mpt_send_handshake_request(mptctl_id, ioctl->ioc, |
404 | sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP); | ||
405 | if (retval != 0) { | ||
406 | dfailprintk(ioctl->ioc, printk(MYIOC_s_ERR_FMT "_send_handshake FAILED!" | ||
407 | " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, | ||
408 | hd->ioc, mf)); | ||
409 | goto mptctl_bus_reset_done; | ||
410 | } | ||
404 | } | 411 | } |
405 | 412 | ||
406 | /* Now wait for the command to complete */ | 413 | /* Now wait for the command to complete */ |
@@ -2187,15 +2194,20 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr) | |||
2187 | 2194 | ||
2188 | DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf); | 2195 | DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf); |
2189 | 2196 | ||
2190 | if (mpt_send_handshake_request(mptctl_id, ioc, | 2197 | if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) && |
2191 | sizeof(SCSITaskMgmt_t), (u32*)mf, | 2198 | (ioc->facts.MsgVersion >= MPI_VERSION_01_05)) |
2192 | CAN_SLEEP) != 0) { | 2199 | mpt_put_msg_frame_hi_pri(mptctl_id, ioc, mf); |
2193 | dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "_send_handshake FAILED!" | 2200 | else { |
2194 | " (ioc %p, mf %p) \n", ioc->name, | 2201 | rc =mpt_send_handshake_request(mptctl_id, ioc, |
2195 | ioc, mf)); | 2202 | sizeof(SCSITaskMgmt_t), (u32*)mf, CAN_SLEEP); |
2196 | mptctl_free_tm_flags(ioc); | 2203 | if (rc != 0) { |
2197 | rc = -ENODATA; | 2204 | dfailprintk(ioc, printk(MYIOC_s_ERR_FMT |
2198 | goto done_free_mem; | 2205 | "_send_handshake FAILED! (ioc %p, mf %p)\n", |
2206 | ioc->name, ioc, mf)); | ||
2207 | mptctl_free_tm_flags(ioc); | ||
2208 | rc = -ENODATA; | ||
2209 | goto done_free_mem; | ||
2210 | } | ||
2199 | } | 2211 | } |
2200 | 2212 | ||
2201 | } else | 2213 | } else |