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/mptbase.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/mptbase.c')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 828f0ca7c1b3..7ef86cb3aa55 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -842,6 +842,38 @@ mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) | |||
842 | CHIPREG_WRITE32(&ioc->chip->RequestFifo, mf_dma_addr); | 842 | CHIPREG_WRITE32(&ioc->chip->RequestFifo, mf_dma_addr); |
843 | } | 843 | } |
844 | 844 | ||
845 | /** | ||
846 | * mpt_put_msg_frame_hi_pri - Send a protocol specific MPT request frame | ||
847 | * to a IOC using hi priority request queue. | ||
848 | * @handle: Handle of registered MPT protocol driver | ||
849 | * @ioc: Pointer to MPT adapter structure | ||
850 | * @mf: Pointer to MPT request frame | ||
851 | * | ||
852 | * This routine posts a MPT request frame to the request post FIFO of a | ||
853 | * specific MPT adapter. | ||
854 | **/ | ||
855 | void | ||
856 | mpt_put_msg_frame_hi_pri(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) | ||
857 | { | ||
858 | u32 mf_dma_addr; | ||
859 | int req_offset; | ||
860 | u16 req_idx; /* Request index */ | ||
861 | |||
862 | /* ensure values are reset properly! */ | ||
863 | mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; | ||
864 | req_offset = (u8 *)mf - (u8 *)ioc->req_frames; | ||
865 | req_idx = req_offset / ioc->req_sz; | ||
866 | mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_idx); | ||
867 | mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0; | ||
868 | |||
869 | DBG_DUMP_PUT_MSG_FRAME(ioc, (u32 *)mf); | ||
870 | |||
871 | mf_dma_addr = (ioc->req_frames_low_dma + req_offset); | ||
872 | dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mf_dma_addr=%x req_idx=%d\n", | ||
873 | ioc->name, mf_dma_addr, req_idx)); | ||
874 | CHIPREG_WRITE32(&ioc->chip->RequestHiPriFifo, mf_dma_addr); | ||
875 | } | ||
876 | |||
845 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 877 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
846 | /** | 878 | /** |
847 | * mpt_free_msg_frame - Place MPT request frame back on FreeQ. | 879 | * mpt_free_msg_frame - Place MPT request frame back on FreeQ. |
@@ -7315,6 +7347,7 @@ EXPORT_SYMBOL(mpt_device_driver_register); | |||
7315 | EXPORT_SYMBOL(mpt_device_driver_deregister); | 7347 | EXPORT_SYMBOL(mpt_device_driver_deregister); |
7316 | EXPORT_SYMBOL(mpt_get_msg_frame); | 7348 | EXPORT_SYMBOL(mpt_get_msg_frame); |
7317 | EXPORT_SYMBOL(mpt_put_msg_frame); | 7349 | EXPORT_SYMBOL(mpt_put_msg_frame); |
7350 | EXPORT_SYMBOL(mpt_put_msg_frame_hi_pri); | ||
7318 | EXPORT_SYMBOL(mpt_free_msg_frame); | 7351 | EXPORT_SYMBOL(mpt_free_msg_frame); |
7319 | EXPORT_SYMBOL(mpt_add_sge); | 7352 | EXPORT_SYMBOL(mpt_add_sge); |
7320 | EXPORT_SYMBOL(mpt_send_handshake_request); | 7353 | EXPORT_SYMBOL(mpt_send_handshake_request); |