aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/message/fusion/Makefile4
-rw-r--r--drivers/message/fusion/mptbase.c17
-rw-r--r--drivers/message/fusion/mptbase.h4
-rw-r--r--drivers/message/fusion/mptfc.c7
-rw-r--r--drivers/message/fusion/mptspi.c7
5 files changed, 15 insertions, 24 deletions
diff --git a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile
index 1c99e355a33f..1d2f9db813c1 100644
--- a/drivers/message/fusion/Makefile
+++ b/drivers/message/fusion/Makefile
@@ -32,7 +32,7 @@
32 32
33#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC 33#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
34 34
35obj-$(CONFIG_FUSION_SPI) += mptspi.o mptscsih.o mptbase.o 35obj-$(CONFIG_FUSION_SPI) += mptbase.o mptscsih.o mptspi.o
36obj-$(CONFIG_FUSION_FC) += mptfc.o mptscsih.o mptbase.o 36obj-$(CONFIG_FUSION_FC) += mptbase.o mptscsih.o mptfc.o
37obj-$(CONFIG_FUSION_CTL) += mptctl.o 37obj-$(CONFIG_FUSION_CTL) += mptctl.o
38obj-$(CONFIG_FUSION_LAN) += mptlan.o 38obj-$(CONFIG_FUSION_LAN) += mptlan.o
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
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index b338a154f78f..2c4bb69fc80a 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -76,8 +76,8 @@
76#define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR 76#define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR
77#endif 77#endif
78 78
79#define MPT_LINUX_VERSION_COMMON "3.03.00" 79#define MPT_LINUX_VERSION_COMMON "3.03.01"
80#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.00" 80#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.01"
81#define WHAT_MAGIC_STRING "@" "(" "#" ")" 81#define WHAT_MAGIC_STRING "@" "(" "#" ")"
82 82
83#define show_mptmod_ver(s,ver) \ 83#define show_mptmod_ver(s,ver) \
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 91c79e525d3c..11845faeede5 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -166,6 +166,9 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
166 return r; 166 return r;
167 167
168 ioc = pci_get_drvdata(pdev); 168 ioc = pci_get_drvdata(pdev);
169 ioc->DoneCtx = mptfcDoneCtx;
170 ioc->TaskCtx = mptfcTaskCtx;
171 ioc->InternalCtx = mptfcInternalCtx;
169 172
170 /* Added sanity check on readiness of the MPT adapter. 173 /* Added sanity check on readiness of the MPT adapter.
171 */ 174 */
@@ -325,10 +328,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
325 hd->timer.data = (unsigned long) hd; 328 hd->timer.data = (unsigned long) hd;
326 hd->timer.function = mptscsih_timer_expired; 329 hd->timer.function = mptscsih_timer_expired;
327 330
328 ioc->DoneCtx = mptfcDoneCtx;
329 ioc->TaskCtx = mptfcTaskCtx;
330 ioc->InternalCtx = mptfcInternalCtx;
331
332 hd->mpt_pq_filter = mpt_pq_filter; 331 hd->mpt_pq_filter = mpt_pq_filter;
333 332
334 ddvprintk((MYIOC_s_INFO_FMT 333 ddvprintk((MYIOC_s_INFO_FMT
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index a4e3c96524e7..5f9a61b85b3b 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -180,6 +180,9 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
180 return r; 180 return r;
181 181
182 ioc = pci_get_drvdata(pdev); 182 ioc = pci_get_drvdata(pdev);
183 ioc->DoneCtx = mptspiDoneCtx;
184 ioc->TaskCtx = mptspiTaskCtx;
185 ioc->InternalCtx = mptspiInternalCtx;
183 186
184 /* Added sanity check on readiness of the MPT adapter. 187 /* Added sanity check on readiness of the MPT adapter.
185 */ 188 */
@@ -395,10 +398,6 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
395 hd->scandv_wait_done = 0; 398 hd->scandv_wait_done = 0;
396 hd->last_queue_full = 0; 399 hd->last_queue_full = 0;
397 400
398 ioc->DoneCtx = mptspiDoneCtx;
399 ioc->TaskCtx = mptspiTaskCtx;
400 ioc->InternalCtx = mptspiInternalCtx;
401
402 error = scsi_add_host (sh, &ioc->pcidev->dev); 401 error = scsi_add_host (sh, &ioc->pcidev->dev);
403 if(error) { 402 if(error) {
404 dprintk((KERN_ERR MYNAM 403 dprintk((KERN_ERR MYNAM