Re: kexec kernel failed to restart aacraid device

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Joe Jin <joe.jin@...>
Cc: <aacraid@...>, <mark_salyzyn@...>, <linux-scsi@...>, <linux-kernel@...>
Date: Thursday, July 2, 2009 - 9:33 pm

Hi, 

Checked aacraid drivers, initialzing and reset device at _aac_rx_init(), 
at the begin of function, set @adapter_enable_int to aac_rx_disable_interrupt(),
when device status it KERNEL_PANIC, driver will try to reset device,
before reset device, it will check device health or no by call 
aac_rx_check_health(), then aac_rx_check_health()->rx_sync_cmd() will use the
aac_rx_disable_interrupt() to restore interrupt mask, is that the right
action? if need to replace it to aac_rx_enable_interrupt_producer() before call
aac_rx_check_health()?

Have attached the patch, please review it.

Thanks,
Joe

diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index f70d9f8..07142a6 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -556,7 +556,12 @@ int _aac_rx_init(struct aac_dev *dev)
 	 */
 	status = rx_readl(dev, MUnit.OMRx[0]);
 	if (status & KERNEL_PANIC) {
-		if (aac_rx_restart_adapter(dev, aac_rx_check_health(dev)))
+		int health;
+
+		dev->a_ops.adapter_enable_int = aac_rx_enable_interrupt_producer;
+		health = aac_rx_check_health(dev);
+		dev->a_ops.adapter_enable_int = aac_rx_disable_interrupt;
+		if (aac_rx_restart_adapter(dev, health))
 			goto error_iounmap;
 		++restart;
 	}
@@ -594,7 +599,12 @@ int _aac_rx_init(struct aac_dev *dev)
 		  ((startup_timeout > 60)
 		    ? (startup_timeout - 60)
 		    : (startup_timeout / 2))))) {
-			if (likely(!aac_rx_restart_adapter(dev, aac_rx_check_health(dev))))
+			int health;
+
+			dev->a_ops.adapter_enable_int = aac_rx_enable_interrupt_producer;
+			health = aac_rx_check_health(dev);
+			dev->a_ops.adapter_enable_int = aac_rx_disable_interrupt;
+			if (likely(!aac_rx_restart_adapter(dev, health)))
 				start = jiffies;
 			++restart;
 		}




On 2009-07-01 08:54, Joe Jin wrote:


--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kexec kernel failed to restart aacraid device, Joe Jin, (Tue Jun 30, 8:54 pm)
Re: kexec kernel failed to restart aacraid device, Joe Jin, (Thu Jul 2, 9:33 pm)