aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/rx.c')
-rw-r--r--drivers/scsi/aacraid/rx.c29
1 files changed, 22 insertions, 7 deletions
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) {