linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] aacraid: Initialize rx/rkt function pointers before calling them
@ 2007-04-26 22:58 Darrick J. Wong
  2007-04-27 12:46 ` Salyzyn, Mark
  0 siblings, 1 reply; 9+ messages in thread
From: Darrick J. Wong @ 2007-04-26 22:58 UTC (permalink / raw)
  To: linux-scsi; +Cc: mark_salyzyn, Alexis Bruemmer

Commit 8418852d11f0bbaeebeedd4243560d8fdc85410d to scsi-misc resulted in
the substitution of calls to rx_sync_cmd with a function pointer
abstraction.  aac_rx_restart_adapter requires a pointer to a sync_cmd
function, which is not set up before its first invocation.  That causes
the driver to crash at startup.  Move the initializers (we need both
rx_sync_cmd and enable_int pointers) further up to proceed the
restart_adapter call.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

 drivers/scsi/aacraid/rx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 0c71315..b7810d6 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -537,6 +537,8 @@ int _aac_rx_init(struct aac_dev *dev)
 		printk(KERN_WARNING "%s: unable to map adapter.\n", name);
 		goto error_iounmap;
 	}
+	dev->a_ops.adapter_sync_cmd = rx_sync_cmd;
+	aac_adapter_comm(dev, AAC_COMM_PRODUCER);
 
 	/* Failure to reset here is an option ... */
 	dev->OIMR = status = rx_readb (dev, MUnit.OIMR);
@@ -598,7 +600,6 @@ int _aac_rx_init(struct aac_dev *dev)
 	dev->a_ops.adapter_interrupt = aac_rx_interrupt_adapter;
 	dev->a_ops.adapter_disable_int = aac_rx_disable_interrupt;
 	dev->a_ops.adapter_notify = aac_rx_notify_adapter;
-	dev->a_ops.adapter_sync_cmd = rx_sync_cmd;
 	dev->a_ops.adapter_check_health = aac_rx_check_health;
 	dev->a_ops.adapter_restart = aac_rx_restart_adapter;
 
@@ -606,7 +607,6 @@ int _aac_rx_init(struct aac_dev *dev)
 	 *	First clear out all interrupts.  Then enable the one's that we
 	 *	can handle.
 	 */
-	aac_adapter_comm(dev, AAC_COMM_PRODUCER);
 	aac_adapter_disable_int(dev);
 	rx_writel(dev, MUnit.ODR, 0xffffffff);
 	aac_adapter_enable_int(dev);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-05-02 23:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 22:58 [PATCH] aacraid: Initialize rx/rkt function pointers before calling them Darrick J. Wong
2007-04-27 12:46 ` Salyzyn, Mark
2007-04-27 13:57   ` Salyzyn, Mark
2007-04-27 18:11     ` Darrick J. Wong
2007-04-27 18:47       ` Salyzyn, Mark
2007-04-27 21:49         ` Darrick J. Wong
2007-05-01 15:43           ` [PATCH] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers Salyzyn, Mark
2007-05-01 16:37             ` Darrick J. Wong
2007-05-02 23:39               ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).