public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Wayne Boyer <wayneb@linux.vnet.ibm.com>
To: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	Brian King <brking@linux.vnet.ibm.com>,
	Kleber Sacilotto de Souza <klebers@br.ibm.com>,
	Wendy Xiong <wenxiong@linux.vnet.ibm.com>
Subject: [PATCH 1/1] ipr: Add support to flash FPGA and flash back DRAM images
Date: Mon, 03 Oct 2011 20:54:37 -0700	[thread overview]
Message-ID: <4E8A837D.5090206@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111004035136.190411310@linux.vnet.ibm.com>

The write buffer command is used to download and burn new IOA FW images.
The same interface can now be used to flash FPGA and flash back DRAM images.
To download and flash the new images takes more than 15 minutes, so increase
the write buffer command timeout to 30 minutes.

The FPGA and flash back DRAM images don't have the same card_type as the IOA FW
image. So, remove the sanity checking from the driver.  The adapter has sanity
checking and will only accept a valid image.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
---
 drivers/scsi/ipr.c |   10 ++--------
 drivers/scsi/ipr.h |    2 +-
 2 files changed, 3 insertions(+), 9 deletions(-)

Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c	2011-09-14 15:53:52.771934805 -0700
+++ b/drivers/scsi/ipr.c	2011-10-03 20:38:27.709101216 -0700
@@ -3751,14 +3751,6 @@ static ssize_t ipr_store_update_fw(struc

 	image_hdr = (struct ipr_ucode_image_header *)fw_entry->data;

-	if (be32_to_cpu(image_hdr->header_length) > fw_entry->size ||
-	    (ioa_cfg->vpd_cbs->page3_data.card_type &&
-	     ioa_cfg->vpd_cbs->page3_data.card_type != image_hdr->card_type)) {
-		dev_err(&ioa_cfg->pdev->dev, "Invalid microcode buffer\n");
-		release_firmware(fw_entry);
-		return -EINVAL;
-	}
-
 	src = (u8 *)image_hdr + be32_to_cpu(image_hdr->header_length);
 	dnld_size = fw_entry->size - be32_to_cpu(image_hdr->header_length);
 	sglist = ipr_alloc_ucode_buffer(dnld_size);
@@ -3777,6 +3769,8 @@ static ssize_t ipr_store_update_fw(struc
 		goto out;
 	}

+	ipr_info("Updating microcode, please be patient.  This may take up to 30 minutes.\n");
+
 	result = ipr_update_ioa_ucode(ioa_cfg, sglist);

 	if (!result)
Index: b/drivers/scsi/ipr.h
===================================================================
--- a/drivers/scsi/ipr.h	2011-09-14 15:53:52.739933466 -0700
+++ b/drivers/scsi/ipr.h	2011-09-14 16:56:27.476756895 -0700
@@ -208,7 +208,7 @@
 #define IPR_CANCEL_ALL_TIMEOUT		(ipr_fastfail ? 10 * HZ : 30 * HZ)
 #define IPR_ABORT_TASK_TIMEOUT		(ipr_fastfail ? 10 * HZ : 30 * HZ)
 #define IPR_INTERNAL_TIMEOUT			(ipr_fastfail ? 10 * HZ : 30 * HZ)
-#define IPR_WRITE_BUFFER_TIMEOUT		(10 * 60 * HZ)
+#define IPR_WRITE_BUFFER_TIMEOUT		(30 * 60 * HZ)
 #define IPR_SET_SUP_DEVICE_TIMEOUT		(2 * 60 * HZ)
 #define IPR_REQUEST_SENSE_TIMEOUT		(10 * HZ)
 #define IPR_OPERATIONAL_TIMEOUT		(5 * 60)


       reply	other threads:[~2011-10-04  3:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20111004035136.190411310@linux.vnet.ibm.com>
2011-10-04  3:54 ` Wayne Boyer [this message]
2011-10-05 12:53   ` [PATCH 1/1] ipr: Add support to flash FPGA and flash back DRAM images Brian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8A837D.5090206@linux.vnet.ibm.com \
    --to=wayneb@linux.vnet.ibm.com \
    --cc=JBottomley@parallels.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=klebers@br.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=wenxiong@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox