diff options
-rw-r--r-- | drivers/scsi/ipr.c | 10 | ||||
-rw-r--r-- | drivers/scsi/ipr.h | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index f03963a972fc..e16a9cf442c1 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -3751,14 +3751,6 @@ static ssize_t ipr_store_update_fw(struct device *dev, | |||
3751 | 3751 | ||
3752 | image_hdr = (struct ipr_ucode_image_header *)fw_entry->data; | 3752 | image_hdr = (struct ipr_ucode_image_header *)fw_entry->data; |
3753 | 3753 | ||
3754 | if (be32_to_cpu(image_hdr->header_length) > fw_entry->size || | ||
3755 | (ioa_cfg->vpd_cbs->page3_data.card_type && | ||
3756 | ioa_cfg->vpd_cbs->page3_data.card_type != image_hdr->card_type)) { | ||
3757 | dev_err(&ioa_cfg->pdev->dev, "Invalid microcode buffer\n"); | ||
3758 | release_firmware(fw_entry); | ||
3759 | return -EINVAL; | ||
3760 | } | ||
3761 | |||
3762 | src = (u8 *)image_hdr + be32_to_cpu(image_hdr->header_length); | 3754 | src = (u8 *)image_hdr + be32_to_cpu(image_hdr->header_length); |
3763 | dnld_size = fw_entry->size - be32_to_cpu(image_hdr->header_length); | 3755 | dnld_size = fw_entry->size - be32_to_cpu(image_hdr->header_length); |
3764 | sglist = ipr_alloc_ucode_buffer(dnld_size); | 3756 | sglist = ipr_alloc_ucode_buffer(dnld_size); |
@@ -3777,6 +3769,8 @@ static ssize_t ipr_store_update_fw(struct device *dev, | |||
3777 | goto out; | 3769 | goto out; |
3778 | } | 3770 | } |
3779 | 3771 | ||
3772 | ipr_info("Updating microcode, please be patient. This may take up to 30 minutes.\n"); | ||
3773 | |||
3780 | result = ipr_update_ioa_ucode(ioa_cfg, sglist); | 3774 | result = ipr_update_ioa_ucode(ioa_cfg, sglist); |
3781 | 3775 | ||
3782 | if (!result) | 3776 | if (!result) |
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index f9766f84d91c..0cbf58f6ae5d 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h | |||
@@ -208,7 +208,7 @@ | |||
208 | #define IPR_CANCEL_ALL_TIMEOUT (ipr_fastfail ? 10 * HZ : 30 * HZ) | 208 | #define IPR_CANCEL_ALL_TIMEOUT (ipr_fastfail ? 10 * HZ : 30 * HZ) |
209 | #define IPR_ABORT_TASK_TIMEOUT (ipr_fastfail ? 10 * HZ : 30 * HZ) | 209 | #define IPR_ABORT_TASK_TIMEOUT (ipr_fastfail ? 10 * HZ : 30 * HZ) |
210 | #define IPR_INTERNAL_TIMEOUT (ipr_fastfail ? 10 * HZ : 30 * HZ) | 210 | #define IPR_INTERNAL_TIMEOUT (ipr_fastfail ? 10 * HZ : 30 * HZ) |
211 | #define IPR_WRITE_BUFFER_TIMEOUT (10 * 60 * HZ) | 211 | #define IPR_WRITE_BUFFER_TIMEOUT (30 * 60 * HZ) |
212 | #define IPR_SET_SUP_DEVICE_TIMEOUT (2 * 60 * HZ) | 212 | #define IPR_SET_SUP_DEVICE_TIMEOUT (2 * 60 * HZ) |
213 | #define IPR_REQUEST_SENSE_TIMEOUT (10 * HZ) | 213 | #define IPR_REQUEST_SENSE_TIMEOUT (10 * HZ) |
214 | #define IPR_OPERATIONAL_TIMEOUT (5 * 60) | 214 | #define IPR_OPERATIONAL_TIMEOUT (5 * 60) |