RE: [PATCH] aacraid: Initialize rx/rkt function pointers before calling them

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just wait a second ...

We are not supposed to be calling aac_rx_restart_adapter unless the
Adapter has it's interrupts enabled (from a previous driver load in the
same warm session such as a kexec) or if the kernel reset_devices flag
is set (which is a mandatory kernel flag during kdump or kexec). This
restart of the Adapter is really for kexec and kdump issues and should
not be triggered elsewhere.

In my unit tests of aacraid_kexec_5.patch, restart was not called for
normal operations. If you are just doing a normal boot, what conditions
are causing restart to be called in your case? Is it a warm restart?
Some kind of operation that leaves the Adapter in an initialized state,
or a bug in the driver making sure that interrupts are disabled when
shut down. Inquiring minds want to know!

Sincerely -- Mark Salyzyn

> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx 
> [mailto:linux-scsi-owner@xxxxxxxxxxxxxxx] On Behalf Of Salyzyn, Mark
> Sent: Friday, April 27, 2007 8:47 AM
> To: Darrick J. Wong; linux-scsi@xxxxxxxxxxxxxxx
> Cc: Alexis Bruemmer
> Subject: RE: [PATCH] aacraid: Initialize rx/rkt function 
> pointers before calling them
> 
> 
> Reject, this is already covered in aacraid_kexec_5.patch and again
> separately in aacraid_kexec_fix.patch.
> 
> Sincerely -- Mark Salyzyn
> 
> > -----Original Message-----
> > From: Darrick J. Wong [mailto:djwong@xxxxxxxxxx] 
> > Sent: Thursday, April 26, 2007 6:58 PM
> > To: linux-scsi@xxxxxxxxxxxxxxx
> > Cc: Salyzyn, Mark; Alexis Bruemmer
> > Subject: [PATCH] aacraid: Initialize rx/rkt function pointers 
> > before calling them
> > 
> > 
> > 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@xxxxxxxxxx>
> > ---
> > 
> >  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);
> > 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux