aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2006-08-08 11:52:14 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-19 16:33:13 -0400
commit8c23cd7457151fc8ace79ec700a8aeaa9fc5b3d9 (patch)
treef957cbf36472ef63872f71d444b0bb75ed594ab4 /drivers/scsi
parentc8f7b073e0e81499474a84ee2a90f77f7805c7f8 (diff)
[SCSI] aacraid: Restart adapter on firmware assert (Update 2)
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/aacraid.h1
-rw-r--r--drivers/scsi/aacraid/rkt.c29
-rw-r--r--drivers/scsi/aacraid/rx.c29
3 files changed, 45 insertions, 14 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index d0eecd4bec83..05f80982efa5 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1670,6 +1670,7 @@ extern struct aac_common aac_config;
1670#define RCV_TEMP_READINGS 0x00000025 1670#define RCV_TEMP_READINGS 0x00000025
1671#define GET_COMM_PREFERRED_SETTINGS 0x00000026 1671#define GET_COMM_PREFERRED_SETTINGS 0x00000026
1672#define IOP_RESET 0x00001000 1672#define IOP_RESET 0x00001000
1673#define IOP_RESET_ALWAYS 0x00001001
1673#define RE_INIT_ADAPTER 0x000000ee 1674#define RE_INIT_ADAPTER 0x000000ee
1674 1675
1675/* 1676/*
diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c
index 458ea897fd72..f850c3a7cce9 100644
--- a/drivers/scsi/aacraid/rkt.c
+++ b/drivers/scsi/aacraid/rkt.c
@@ -395,6 +395,25 @@ static int aac_rkt_send(struct fib * fib)
395 return 0; 395 return 0;
396} 396}
397 397
398static int aac_rkt_restart_adapter(struct aac_dev *dev)
399{
400 u32 var;
401
402 printk(KERN_ERR "%s%d: adapter kernel panic'd.\n",
403 dev->name, dev->id);
404
405 if (aac_rkt_check_health(dev) <= 0)
406 return 1;
407 if (rkt_sync_cmd(dev, IOP_RESET, 0, 0, 0, 0, 0, 0,
408 &var, NULL, NULL, NULL, NULL))
409 return 1;
410 if (var != 0x00000001)
411 return 1;
412 if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
413 return 1;
414 return 0;
415}
416
398/** 417/**
399 * aac_rkt_init - initialize an i960 based AAC card 418 * aac_rkt_init - initialize an i960 based AAC card
400 * @dev: device to configure 419 * @dev: device to configure
@@ -417,6 +436,9 @@ int aac_rkt_init(struct aac_dev *dev)
417 /* 436 /*
418 * Check to see if the board panic'd while booting. 437 * Check to see if the board panic'd while booting.
419 */ 438 */
439 if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
440 if (aac_rkt_restart_adapter(dev))
441 goto error_iounmap;
420 /* 442 /*
421 * Check to see if the board failed any self tests. 443 * Check to see if the board failed any self tests.
422 */ 444 */
@@ -431,13 +453,6 @@ int aac_rkt_init(struct aac_dev *dev)
431 printk(KERN_ERR "%s%d: adapter monitor panic.\n", dev->name, instance); 453 printk(KERN_ERR "%s%d: adapter monitor panic.\n", dev->name, instance);
432 goto error_iounmap; 454 goto error_iounmap;
433 } 455 }
434 /*
435 * Check to see if the board panic'd while booting.
436 */
437 if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {
438 printk(KERN_ERR "%s%d: adapter kernel panic'd.\n", dev->name, instance);
439 goto error_iounmap;
440 }
441 start = jiffies; 456 start = jiffies;
442 /* 457 /*
443 * Wait for the adapter to be up and running. Wait up to 3 minutes 458 * Wait for the adapter to be up and running. Wait up to 3 minutes
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 035018db69b1..c715c4b2442d 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -394,6 +394,25 @@ static int aac_rx_send(struct fib * fib)
394 return 0; 394 return 0;
395} 395}
396 396
397static int aac_rx_restart_adapter(struct aac_dev *dev)
398{
399 u32 var;
400
401 printk(KERN_ERR "%s%d: adapter kernel panic'd.\n",
402 dev->name, dev->id);
403
404 if (aac_rx_check_health(dev) <= 0)
405 return 1;
406 if (rx_sync_cmd(dev, IOP_RESET, 0, 0, 0, 0, 0, 0,
407 &var, NULL, NULL, NULL, NULL))
408 return 1;
409 if (var != 0x00000001)
410 return 1;
411 if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
412 return 1;
413 return 0;
414}
415
397/** 416/**
398 * aac_rx_init - initialize an i960 based AAC card 417 * aac_rx_init - initialize an i960 based AAC card
399 * @dev: device to configure 418 * @dev: device to configure
@@ -416,6 +435,9 @@ int aac_rx_init(struct aac_dev *dev)
416 /* 435 /*
417 * Check to see if the board panic'd while booting. 436 * Check to see if the board panic'd while booting.
418 */ 437 */
438 if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
439 if (aac_rx_restart_adapter(dev))
440 goto error_iounmap;
419 /* 441 /*
420 * Check to see if the board failed any self tests. 442 * Check to see if the board failed any self tests.
421 */ 443 */
@@ -424,13 +446,6 @@ int aac_rx_init(struct aac_dev *dev)
424 goto error_iounmap; 446 goto error_iounmap;
425 } 447 }
426 /* 448 /*
427 * Check to see if the board panic'd while booting.
428 */
429 if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {
430 printk(KERN_ERR "%s%d: adapter kernel panic.\n", dev->name, instance);
431 goto error_iounmap;
432 }
433 /*
434 * Check to see if the monitor panic'd while booting. 449 * Check to see if the monitor panic'd while booting.
435 */ 450 */
436 if (rx_readl(dev, MUnit.OMRx[0]) & MONITOR_PANIC) { 451 if (rx_readl(dev, MUnit.OMRx[0]) & MONITOR_PANIC) {