linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] aacraid: kdump fix
@ 2013-12-23 10:07 Mahesh Rajashekhara
  2014-01-08  6:34 ` Mahesh Rajashekhara
  0 siblings, 1 reply; 5+ messages in thread
From: Mahesh Rajashekhara @ 2013-12-23 10:07 UTC (permalink / raw)
  To: JBottomley, linux-scsi
  Cc: aacraid, Harry.Yang, Achim.Leubner, Rich.Bono,
	Mahesh.Rajashekhara

This patch fixes kernel panic issue while booting into the kdump kernel.

We have triggered crash and kdump vmcore was successful. No issues seen while booting into the OS.

Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
---
 drivers/scsi/aacraid/aacraid.h |    2 +-
 drivers/scsi/aacraid/rx.c      |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 9323d05..eaaf870 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -12,7 +12,7 @@
  *----------------------------------------------------------------------------*/
 
 #ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 30200
+# define AAC_DRIVER_BUILD 30300
 # define AAC_DRIVER_BRANCH "-ms"
 #endif
 #define MAXIMUM_NUM_CONTAINERS	32
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index dada38a..9f2d88f 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -500,13 +500,14 @@ static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
 		if (bled && (bled != -ETIMEDOUT))
 			return -EINVAL;
 	}
-	if (bled || (var == 0x3803000F)) { /* USE_OTHER_METHOD */
+	if (bled && (var == 0x3803000F)) { /* USE_OTHER_METHOD */
 		rx_writel(dev, MUnit.reserved2, 3);
 		msleep(5000); /* Delay 5 seconds */
 		var = 0x00000001;
 	}
-	if (var != 0x00000001)
+	if (bled && (var != 0x00000001))
 		return -EINVAL;
+	ssleep(5);
 	if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
 		return -ENODEV;
 	if (startup_timeout < 300)
-- 
1.7.7.3


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

* RE: [PATCH 1/1] aacraid: kdump fix
  2013-12-23 10:07 [PATCH 1/1] aacraid: kdump fix Mahesh Rajashekhara
@ 2014-01-08  6:34 ` Mahesh Rajashekhara
  2014-01-10 13:03   ` Tomas Henzl
  0 siblings, 1 reply; 5+ messages in thread
From: Mahesh Rajashekhara @ 2014-01-08  6:34 UTC (permalink / raw)
  To: JBottomley@Parallels.com, linux-scsi@vger.kernel.org
  Cc: aacraid@pmc-sierra.com, Harry Yang, Achim Leubner, Rich Bono

Hi James,

Can you please let me know the status of this patch which I submitted sometime back.

Thanks & Regards,
Mahesh

-----Original Message-----
From: Mahesh Rajashekhara 
Sent: Monday, December 23, 2013 3:38 PM
To: JBottomley@Parallels.com; linux-scsi@vger.kernel.org
Cc: aacraid@pmc-sierra.com; Harry Yang; Achim Leubner; Rich Bono; Mahesh Rajashekhara
Subject: [PATCH 1/1] aacraid: kdump fix

This patch fixes kernel panic issue while booting into the kdump kernel.

We have triggered crash and kdump vmcore was successful. No issues seen while booting into the OS.

Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
---
 drivers/scsi/aacraid/aacraid.h |    2 +-
 drivers/scsi/aacraid/rx.c      |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 9323d05..eaaf870 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -12,7 +12,7 @@
  *----------------------------------------------------------------------------*/
 
 #ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 30200
+# define AAC_DRIVER_BUILD 30300
 # define AAC_DRIVER_BRANCH "-ms"
 #endif
 #define MAXIMUM_NUM_CONTAINERS	32
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index dada38a..9f2d88f 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -500,13 +500,14 @@ static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
 		if (bled && (bled != -ETIMEDOUT))
 			return -EINVAL;
 	}
-	if (bled || (var == 0x3803000F)) { /* USE_OTHER_METHOD */
+	if (bled && (var == 0x3803000F)) { /* USE_OTHER_METHOD */
 		rx_writel(dev, MUnit.reserved2, 3);
 		msleep(5000); /* Delay 5 seconds */
 		var = 0x00000001;
 	}
-	if (var != 0x00000001)
+	if (bled && (var != 0x00000001))
 		return -EINVAL;
+	ssleep(5);
 	if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
 		return -ENODEV;
 	if (startup_timeout < 300)
--
1.7.7.3


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

* Re: [PATCH 1/1] aacraid: kdump fix
  2014-01-08  6:34 ` Mahesh Rajashekhara
@ 2014-01-10 13:03   ` Tomas Henzl
  0 siblings, 0 replies; 5+ messages in thread
From: Tomas Henzl @ 2014-01-10 13:03 UTC (permalink / raw)
  To: Mahesh Rajashekhara, JBottomley@Parallels.com,
	linux-scsi@vger.kernel.org
  Cc: aacraid@pmc-sierra.com, Harry Yang, Achim Leubner, Rich Bono

On 01/08/2014 07:34 AM, Mahesh Rajashekhara wrote:
> Hi James,
>
> Can you please let me know the status of this patch which I submitted sometime back.
>
> Thanks & Regards,
> Mahesh
>
> -----Original Message-----
> From: Mahesh Rajashekhara 
> Sent: Monday, December 23, 2013 3:38 PM
> To: JBottomley@Parallels.com; linux-scsi@vger.kernel.org
> Cc: aacraid@pmc-sierra.com; Harry Yang; Achim Leubner; Rich Bono; Mahesh Rajashekhara
> Subject: [PATCH 1/1] aacraid: kdump fix
>
> This patch fixes kernel panic issue while booting into the kdump kernel.
>
> We have triggered crash and kdump vmcore was successful. No issues seen while booting into the OS.
>
> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
> ---
>  drivers/scsi/aacraid/aacraid.h |    2 +-
>  drivers/scsi/aacraid/rx.c      |    5 +++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 9323d05..eaaf870 100644
> --- a/drivers/scsi/aacraid/aacraid.h
> +++ b/drivers/scsi/aacraid/aacraid.h
> @@ -12,7 +12,7 @@
>   *----------------------------------------------------------------------------*/
>  
>  #ifndef AAC_DRIVER_BUILD
> -# define AAC_DRIVER_BUILD 30200
> +# define AAC_DRIVER_BUILD 30300
>  # define AAC_DRIVER_BRANCH "-ms"
>  #endif
>  #define MAXIMUM_NUM_CONTAINERS	32
> diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index dada38a..9f2d88f 100644
> --- a/drivers/scsi/aacraid/rx.c
> +++ b/drivers/scsi/aacraid/rx.c
> @@ -500,13 +500,14 @@ static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
>  		if (bled && (bled != -ETIMEDOUT))
>  			return -EINVAL;
>  	}
> -	if (bled || (var == 0x3803000F)) { /* USE_OTHER_METHOD */
> +	if (bled && (var == 0x3803000F)) { /* USE_OTHER_METHOD */

Hi Mahesh, 
it looks to me that we could arrive here with 'var' not yet initialised
if I'm right please fix this too.
Thanks,
Tomas

>  		rx_writel(dev, MUnit.reserved2, 3);
>  		msleep(5000); /* Delay 5 seconds */
>  		var = 0x00000001;
>  	}
> -	if (var != 0x00000001)
> +	if (bled && (var != 0x00000001))
>  		return -EINVAL;
> +	ssleep(5);
>  	if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
>  		return -ENODEV;
>  	if (startup_timeout < 300)
> --
> 1.7.7.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* [PATCH 1/1] aacraid: kdump fix
@ 2014-01-13  8:20 Mahesh Rajashekhara
  2014-01-13 11:12 ` Tomas Henzl
  0 siblings, 1 reply; 5+ messages in thread
From: Mahesh Rajashekhara @ 2014-01-13  8:20 UTC (permalink / raw)
  To: JBottomley, linux-scsi
  Cc: thenzl, aacraid, Harry.Yang, Achim.Leubner, Rich.Bono,
	Mahesh.Rajashekhara

Thanks for your review comments, Tomas

We have initialized var in this driver patch. This patch fixes kernel panic issue while booting into the kdump kernel.

We have triggered crash and kdump vmcore was successful. No issues seen while booting into the OS.

Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
---
 drivers/scsi/aacraid/aacraid.h |    2 +-
 drivers/scsi/aacraid/rx.c      |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 9323d05..eaaf870 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -12,7 +12,7 @@
  *----------------------------------------------------------------------------*/
 
 #ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 30200
+# define AAC_DRIVER_BUILD 30300
 # define AAC_DRIVER_BRANCH "-ms"
 #endif
 #define MAXIMUM_NUM_CONTAINERS	32
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index dada38a..bb9917c 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -480,7 +480,7 @@ static int aac_rx_ioremap(struct aac_dev * dev, u32 size)
 
 static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
 {
-	u32 var;
+	u32 var = 0;
 
 	if (!(dev->supplement_adapter_info.SupportedOptions2 &
 	  AAC_OPTION_MU_RESET) || (bled >= 0) || (bled == -2)) {
@@ -500,13 +500,14 @@ static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
 		if (bled && (bled != -ETIMEDOUT))
 			return -EINVAL;
 	}
-	if (bled || (var == 0x3803000F)) { /* USE_OTHER_METHOD */
+	if (bled && (var == 0x3803000F)) { /* USE_OTHER_METHOD */
 		rx_writel(dev, MUnit.reserved2, 3);
 		msleep(5000); /* Delay 5 seconds */
 		var = 0x00000001;
 	}
-	if (var != 0x00000001)
+	if (bled && (var != 0x00000001))
 		return -EINVAL;
+	ssleep(5);
 	if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
 		return -ENODEV;
 	if (startup_timeout < 300)
-- 
1.7.7.3


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

* Re: [PATCH 1/1] aacraid: kdump fix
  2014-01-13  8:20 Mahesh Rajashekhara
@ 2014-01-13 11:12 ` Tomas Henzl
  0 siblings, 0 replies; 5+ messages in thread
From: Tomas Henzl @ 2014-01-13 11:12 UTC (permalink / raw)
  To: Mahesh Rajashekhara, JBottomley, linux-scsi
  Cc: aacraid, Harry.Yang, Achim.Leubner, Rich.Bono

On 01/13/2014 09:20 AM, Mahesh Rajashekhara wrote:
> Thanks for your review comments, Tomas
>
> We have initialized var in this driver patch. This patch fixes kernel panic issue while booting into the kdump kernel.
>
> We have triggered crash and kdump vmcore was successful. No issues seen while booting into the OS.
>
> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>

Please add a 'V2' to the subject line next time, so the maintainer may notice that the version is different,
otherwise - looks good, thanks
Tomas

> ---
>  drivers/scsi/aacraid/aacraid.h |    2 +-
>  drivers/scsi/aacraid/rx.c      |    7 ++++---
>  2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
> index 9323d05..eaaf870 100644
> --- a/drivers/scsi/aacraid/aacraid.h
> +++ b/drivers/scsi/aacraid/aacraid.h
> @@ -12,7 +12,7 @@
>   *----------------------------------------------------------------------------*/
>  
>  #ifndef AAC_DRIVER_BUILD
> -# define AAC_DRIVER_BUILD 30200
> +# define AAC_DRIVER_BUILD 30300
>  # define AAC_DRIVER_BRANCH "-ms"
>  #endif
>  #define MAXIMUM_NUM_CONTAINERS	32
> diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
> index dada38a..bb9917c 100644
> --- a/drivers/scsi/aacraid/rx.c
> +++ b/drivers/scsi/aacraid/rx.c
> @@ -480,7 +480,7 @@ static int aac_rx_ioremap(struct aac_dev * dev, u32 size)
>  
>  static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
>  {
> -	u32 var;
> +	u32 var = 0;
>  
>  	if (!(dev->supplement_adapter_info.SupportedOptions2 &
>  	  AAC_OPTION_MU_RESET) || (bled >= 0) || (bled == -2)) {
> @@ -500,13 +500,14 @@ static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
>  		if (bled && (bled != -ETIMEDOUT))
>  			return -EINVAL;
>  	}
> -	if (bled || (var == 0x3803000F)) { /* USE_OTHER_METHOD */
> +	if (bled && (var == 0x3803000F)) { /* USE_OTHER_METHOD */
>  		rx_writel(dev, MUnit.reserved2, 3);
>  		msleep(5000); /* Delay 5 seconds */
>  		var = 0x00000001;
>  	}
> -	if (var != 0x00000001)
> +	if (bled && (var != 0x00000001))
>  		return -EINVAL;
> +	ssleep(5);
>  	if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
>  		return -ENODEV;
>  	if (startup_timeout < 300)


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

end of thread, other threads:[~2014-01-13 11:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23 10:07 [PATCH 1/1] aacraid: kdump fix Mahesh Rajashekhara
2014-01-08  6:34 ` Mahesh Rajashekhara
2014-01-10 13:03   ` Tomas Henzl
  -- strict thread matches above, loose matches on Subject: below --
2014-01-13  8:20 Mahesh Rajashekhara
2014-01-13 11:12 ` Tomas Henzl

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).