aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/src.c
diff options
context:
space:
mode:
authorMahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>2013-03-19 03:07:26 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-04-10 14:55:52 -0400
commit2c10cd43ac0b618be1f2e394bef4cbb2aa8bad34 (patch)
tree7bdfe559606cc5b8f8a129349116de491bd81023 /drivers/scsi/aacraid/src.c
parent162cca5ed9c28d5d0923179c2b5d6be0c4d4d72e (diff)
[SCSI] aacraid: Dual firmware image support
This patch adds dual flash firmware support for Series 7 and above controllers. [thenzl: used ssleep(10) instead udelay] Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/aacraid/src.c')
-rw-r--r--drivers/scsi/aacraid/src.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index e2e349204e7d..0f56d8d7524f 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -703,6 +703,28 @@ int aac_srcv_init(struct aac_dev *dev)
703 !aac_src_restart_adapter(dev, 0)) 703 !aac_src_restart_adapter(dev, 0))
704 ++restart; 704 ++restart;
705 /* 705 /*
706 * Check to see if flash update is running.
707 * Wait for the adapter to be up and running. Wait up to 5 minutes
708 */
709 status = src_readl(dev, MUnit.OMR);
710 if (status & FLASH_UPD_PENDING) {
711 start = jiffies;
712 do {
713 status = src_readl(dev, MUnit.OMR);
714 if (time_after(jiffies, start+HZ*FWUPD_TIMEOUT)) {
715 printk(KERN_ERR "%s%d: adapter flash update failed.\n",
716 dev->name, instance);
717 goto error_iounmap;
718 }
719 } while (!(status & FLASH_UPD_SUCCESS) &&
720 !(status & FLASH_UPD_FAILED));
721 /* Delay 10 seconds.
722 * Because right now FW is doing a soft reset,
723 * do not read scratch pad register at this time
724 */
725 ssleep(10);
726 }
727 /*
706 * Check to see if the board panic'd while booting. 728 * Check to see if the board panic'd while booting.
707 */ 729 */
708 status = src_readl(dev, MUnit.OMR); 730 status = src_readl(dev, MUnit.OMR);
@@ -730,7 +752,9 @@ int aac_srcv_init(struct aac_dev *dev)
730 /* 752 /*
731 * Wait for the adapter to be up and running. Wait up to 3 minutes 753 * Wait for the adapter to be up and running. Wait up to 3 minutes
732 */ 754 */
733 while (!((status = src_readl(dev, MUnit.OMR)) & KERNEL_UP_AND_RUNNING)) { 755 while (!((status = src_readl(dev, MUnit.OMR)) &
756 KERNEL_UP_AND_RUNNING) ||
757 status == 0xffffffff) {
734 if ((restart && 758 if ((restart &&
735 (status & (KERNEL_PANIC|SELF_TEST_FAILED|MONITOR_PANIC))) || 759 (status & (KERNEL_PANIC|SELF_TEST_FAILED|MONITOR_PANIC))) ||
736 time_after(jiffies, start+HZ*startup_timeout)) { 760 time_after(jiffies, start+HZ*startup_timeout)) {