Skip to content

Commit

Permalink
[SCSI] aacraid: Restart adapter on firmware assert (Update 2)
Browse files Browse the repository at this point in the history
Received from Mark Salyzyn

If the adapter should be in a blinkled (Firmware Assert) state when the
driver loads, we will perform a warm restart of the Adapter Firmware to
see if we can rescue the adapter. Possible causes of a blinkled can
occur on some early release motherboard BIOSes, transitory PCI bus
problems on embedded systems or non-x86 based architectures, transitory
startup failures of early release drives or transitory hardware
failures; some of which can bite the adapter later at runtime. Future
enhancements will include recovery during runtime.

Fixed extra whitespace space issue.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Mark Haverkamp authored and James Bottomley committed Aug 19, 2006
1 parent c8f7b07 commit 8c23cd7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/aacraid/aacraid.h
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ extern struct aac_common aac_config;
#define RCV_TEMP_READINGS 0x00000025
#define GET_COMM_PREFERRED_SETTINGS 0x00000026
#define IOP_RESET 0x00001000
#define IOP_RESET_ALWAYS 0x00001001
#define RE_INIT_ADAPTER 0x000000ee

/*
Expand Down
29 changes: 22 additions & 7 deletions drivers/scsi/aacraid/rkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,25 @@ static int aac_rkt_send(struct fib * fib)
return 0;
}

static int aac_rkt_restart_adapter(struct aac_dev *dev)
{
u32 var;

printk(KERN_ERR "%s%d: adapter kernel panic'd.\n",
dev->name, dev->id);

if (aac_rkt_check_health(dev) <= 0)
return 1;
if (rkt_sync_cmd(dev, IOP_RESET, 0, 0, 0, 0, 0, 0,
&var, NULL, NULL, NULL, NULL))
return 1;
if (var != 0x00000001)
return 1;
if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
return 1;
return 0;
}

/**
* aac_rkt_init - initialize an i960 based AAC card
* @dev: device to configure
Expand All @@ -417,6 +436,9 @@ int aac_rkt_init(struct aac_dev *dev)
/*
* Check to see if the board panic'd while booting.
*/
if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
if (aac_rkt_restart_adapter(dev))
goto error_iounmap;
/*
* Check to see if the board failed any self tests.
*/
Expand All @@ -431,13 +453,6 @@ int aac_rkt_init(struct aac_dev *dev)
printk(KERN_ERR "%s%d: adapter monitor panic.\n", dev->name, instance);
goto error_iounmap;
}
/*
* Check to see if the board panic'd while booting.
*/
if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {
printk(KERN_ERR "%s%d: adapter kernel panic'd.\n", dev->name, instance);
goto error_iounmap;
}
start = jiffies;
/*
* Wait for the adapter to be up and running. Wait up to 3 minutes
Expand Down
29 changes: 22 additions & 7 deletions drivers/scsi/aacraid/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,25 @@ static int aac_rx_send(struct fib * fib)
return 0;
}

static int aac_rx_restart_adapter(struct aac_dev *dev)
{
u32 var;

printk(KERN_ERR "%s%d: adapter kernel panic'd.\n",
dev->name, dev->id);

if (aac_rx_check_health(dev) <= 0)
return 1;
if (rx_sync_cmd(dev, IOP_RESET, 0, 0, 0, 0, 0, 0,
&var, NULL, NULL, NULL, NULL))
return 1;
if (var != 0x00000001)
return 1;
if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
return 1;
return 0;
}

/**
* aac_rx_init - initialize an i960 based AAC card
* @dev: device to configure
Expand All @@ -416,20 +435,16 @@ int aac_rx_init(struct aac_dev *dev)
/*
* Check to see if the board panic'd while booting.
*/
if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
if (aac_rx_restart_adapter(dev))
goto error_iounmap;
/*
* Check to see if the board failed any self tests.
*/
if (rx_readl(dev, MUnit.OMRx[0]) & SELF_TEST_FAILED) {
printk(KERN_ERR "%s%d: adapter self-test failed.\n", dev->name, instance);
goto error_iounmap;
}
/*
* Check to see if the board panic'd while booting.
*/
if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {
printk(KERN_ERR "%s%d: adapter kernel panic.\n", dev->name, instance);
goto error_iounmap;
}
/*
* Check to see if the monitor panic'd while booting.
*/
Expand Down

0 comments on commit 8c23cd7

Please sign in to comment.