aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.c
diff options
context:
space:
mode:
authorMoore, Eric Dean <Eric.Moore@lsil.com>2005-04-30 18:09:38 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 13:53:42 -0400
commitd335cc38c75e28407455463444b912b09c92daec (patch)
tree031810afee4004df4797a641d9d02fe3955a3b9b /drivers/message/fusion/mptbase.c
parent4e33bd874bce8b3df2ab52538db59730196383c3 (diff)
[SCSI] mptfusion: fix panic loading driver statically compiled
Adjust link ordering in the Makefile. Also, the ioc->DoneCtx handles for mptspi/mptfc in the message frame. And I'm now not seeing the panic. Signed-off-by: Eric Moore <Eric.Moore@lsil.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.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 42ed5e272dca..d2a3c086a995 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -360,15 +360,8 @@ mpt_interrupt(int irq, void *bus_id, struct pt_regs *r)
360 } 360 }
361 361
362 if (freeme) { 362 if (freeme) {
363 unsigned long flags;
364
365 /* Put Request back on FreeQ! */ 363 /* Put Request back on FreeQ! */
366 spin_lock_irqsave(&ioc->FreeQlock, flags); 364 mpt_free_msg_frame(ioc, mf);
367 list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeQ);
368#ifdef MFCNT
369 ioc->mfcnt--;
370#endif
371 spin_unlock_irqrestore(&ioc->FreeQlock, flags);
372 } 365 }
373 366
374 mb(); 367 mb();
@@ -735,8 +728,8 @@ mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc)
735 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; /* byte */ 728 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; /* byte */
736 req_offset = (u8 *)mf - (u8 *)ioc->req_frames; 729 req_offset = (u8 *)mf - (u8 *)ioc->req_frames;
737 /* u16! */ 730 /* u16! */
738 req_idx = cpu_to_le16(req_offset / ioc->req_sz); 731 req_idx = req_offset / ioc->req_sz;
739 mf->u.frame.hwhdr.msgctxu.fld.req_idx = req_idx; 732 mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_idx);
740 mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0; 733 mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;
741 ioc->RequestNB[req_idx] = ioc->NB_for_64_byte_frame; /* Default, will be changed if necessary in SG generation */ 734 ioc->RequestNB[req_idx] = ioc->NB_for_64_byte_frame; /* Default, will be changed if necessary in SG generation */
742#ifdef MFCNT 735#ifdef MFCNT
@@ -782,8 +775,8 @@ mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
782 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; /* byte */ 775 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; /* byte */
783 req_offset = (u8 *)mf - (u8 *)ioc->req_frames; 776 req_offset = (u8 *)mf - (u8 *)ioc->req_frames;
784 /* u16! */ 777 /* u16! */
785 req_idx = cpu_to_le16(req_offset / ioc->req_sz); 778 req_idx = req_offset / ioc->req_sz;
786 mf->u.frame.hwhdr.msgctxu.fld.req_idx = req_idx; 779 mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_idx);
787 mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0; 780 mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;
788 781
789#ifdef MPT_DEBUG_MSG_FRAME 782#ifdef MPT_DEBUG_MSG_FRAME