On Wed, Apr 27, 2016 at 04:49:50PM +0000, Raghava Aditya Renukunta wrote: > Hello Johannes, > > > -----Original Message----- > > From: Johannes Thumshirn [mailto:jthmshirn@xxxxxxx] > > Sent: Wednesday, April 27, 2016 2:30 AM > > To: Raghava Aditya Renukunta > > Cc: JBottomley@xxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx; > > martin.petersen@xxxxxxxxxx; aacraid@xxxxxxxxxxxxxx; Gana Sridaran; Scott > > Benesh; Vishal Jose Mannanal > > Subject: Re: [PATCH 09/10] aacraid: Fix for KDUMP driver hang > > > > EXTERNAL EMAIL > > > > > > On Mon, Apr 25, 2016 at 11:32:37PM -0700, Raghava Aditya Renukunta wrote: > > > When KDUMP is triggered the driver first talks to the firmware in INTX > > > mode, but the adapter firmware is still in MSIX mode. Therefore the first > > > driver command hangs since the driver is waiting for an INTX response and > > > firmware gives a MSIX response. If when the OS is installed on a RAID > > > drive created by the adapter KDUMP will hang since the driver does not > > > receive a response in sync mode. > > > > > > Fixed by: Change the firmware to INTX mode if it is in MSIX mode before > > > sending the first sync command. > > > Cc: stable@xxxxxxxxxxxxxxx > > > > > > Signed-off-by: Raghava Aditya Renukunta > > <RaghavaAditya.Renukunta@xxxxxxxxxxxxx> > > > --- > > > drivers/scsi/aacraid/aacraid.h | 1 + > > > drivers/scsi/aacraid/comminit.c | 24 ++++++++++++++++++++++++ > > > 2 files changed, 25 insertions(+) > > > > > > diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h > > > index b70f3eb..0ba8f61 100644 > > > --- a/drivers/scsi/aacraid/aacraid.h > > > +++ b/drivers/scsi/aacraid/aacraid.h > > > @@ -29,6 +29,7 @@ enum { > > > #define AAC_INT_MODE_MSI (1<<1) > > > #define AAC_INT_MODE_AIF (1<<2) > > > #define AAC_INT_MODE_SYNC (1<<3) > > > +#define AAC_INT_MODE_MSIX (1<<16) > > > > > > #define AAC_INT_ENABLE_TYPE1_INTX 0xfffffffb > > > #define AAC_INT_ENABLE_TYPE1_MSIX 0xfffffffa > > > diff --git a/drivers/scsi/aacraid/comminit.c > > b/drivers/scsi/aacraid/comminit.c > > > index 50d521a..341ea32 100644 > > > --- a/drivers/scsi/aacraid/comminit.c > > > +++ b/drivers/scsi/aacraid/comminit.c > > > @@ -37,6 +37,7 @@ > > > #include <linux/spinlock.h> > > > #include <linux/slab.h> > > > #include <linux/blkdev.h> > > > +#include <linux/delay.h> > > > #include <linux/completion.h> > > > #include <linux/mm.h> > > > #include <scsi/scsi_host.h> > > > @@ -47,6 +48,20 @@ struct aac_common aac_config = { > > > .irq_mod = 1 > > > }; > > > > > > +static inline int aac_is_msix_mode(struct aac_dev *dev) > > > +{ > > > + u32 status; > > > + > > > + status = src_readl(dev, MUnit.OMR); > > > + return (status & AAC_INT_MODE_MSIX); > > > +} > > > + > > > +static inline void aac_change_to_intx(struct aac_dev *dev) > > > +{ > > > + aac_src_access_devreg(dev, AAC_DISABLE_MSIX); > > > + aac_src_access_devreg(dev, AAC_ENABLE_INTX); > > > > I don't know your adpater firmware, but isn't it possible to loose interrupts > > this way or do they get queued? > > The firmware queues interrupts messages in its own buffers, and the driver sends > a command to retrieve those messages once the driver gets initialized. > The code that sends the command once the driver is initialized is in the patch 7 of this > Series. > > Hope that clarifies your doubt. > > Regards, > Raghava Aditya OK, thanks for the clarification Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx> -- Johannes Thumshirn Storage jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 -- 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