Bug 619365 - [LSI 5.6 feat] update megaraid_sas to version 4.31 [rhel-5.5.z]
[LSI 5.6 feat] update megaraid_sas to version 4.31 [rhel-5.5.z]
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.6
All Linux
urgent Severity high
: rc
: ---
Assigned To: Tomas Henzl
Red Hat Kernel QE team
: FutureFeature, OtherQA, ZStream
Depends On: 564249
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-29 07:53 EDT by RHEL Product and Program Management
Modified: 2010-11-11 08:59 EST (History)
23 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
A bug was found in the way the megaraid_sas driver (for SAS based RAID controllers) handled physical disks and management IOCTLs (Input/Output Control). All physical disks were exported to the disk layer, allowing an oops in megasas_complete_cmd_dpc() when completing the IOCTL command if a timeout occurred. One possible trigger for this bug was running mkfs. This update resolves this issue by updating the megaraid_sas driver to version 4.31.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-09 13:08:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Update the megaraid sas driver to rhel5.5.z (92.54 KB, patch)
2010-08-25 17:13 EDT, bo yang
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0839 normal SHIPPED_LIVE Moderate: kernel security and bug fix update 2010-11-09 13:06:20 EST

  None (edit)
Description RHEL Product and Program Management 2010-07-29 07:53:33 EDT
This bug has been copied from bug #564249 and has been proposed
to be backported to 5.5 z-stream (EUS).
Comment 2 Jiri Pirko 2010-07-29 10:18:02 EDT
Note that purpose of this bz is only to fix issue described in bug 602714. This issue is fixed in 5.6 by a driver update. Separate fix is backported to this z-stream, not the full driver update.
Comment 5 Martin Wilck 2010-08-16 07:22:01 EDT
Can you please attach the patch that has been used here?
Comment 6 Tomas Henzl 2010-08-16 12:38:25 EDT
(In reply to comment #5)
> Can you please attach the patch that has been used here?

Sorry, we don't have the patch yet.
Comment 7 bo yang 2010-08-25 17:13:27 EDT
Created attachment 441053 [details]
Update the megaraid sas driver to rhel5.5.z

Tomas,

Attached is the patch for megaraid sas driver for rhel5.5.z
Comment 8 bo yang 2010-08-25 17:14:31 EDT
Tomas,

Let me know if you are facing the issues for this patch.

Thanks,

Bo Yang
Comment 9 Tomas Henzl 2010-08-26 08:48:57 EDT
(In reply to comment #7)
> Attached is the patch for megaraid sas driver for rhel5.5.z

Thanks, I'll look into it.
Comment 10 Tomas Henzl 2010-08-26 11:43:31 EDT
Hi Bo,
I looked at the differencies between 5.5.z and 5.6 and would like you to clarify some points:

megasas_check_reset_gen2(struct megasas_instance *instance, struct megasas_register_set __iomem * regs)
 {
+        if (instance->adprecovery != MEGASAS_HBA_OPERATIONAL) {
+                return 1;
+        }
1.This is missing in 5.6 should it be added?
 
I'll change the sysfs_max_sectors_read function so it corresponds to what is in 5.6 myself and let you verify that.
@@ -3033,7 +3055,6 @@ megasas_get_pd_list(struct megasas_insta
 	dcmd->timeout = 0;
-	dcmd->pad_0 = 0;
 	dcmd->data_xfer_len = MEGASAS_MAX_PD * sizeof(struct MR_PD_LIST);
2.This is missing in 5.5,z should it be added?

@@ -3142,7 +3159,7 @@ megasas_get_ld_list(struct megasas_insta
 
-	if ( (ret == 0) && (ci->ldCount <= (MAX_LOGICAL_DRIVES))){
+	if ( (ret == 0) && (ci->ldCount < (MAX_LOGICAL_DRIVES))){
 		
3.Which version is wrong?

4.In 5.6 we have scsi_host_put(host); in megasas_suspend this seems to be wrong should it be removed?
@@ -4174,21 +4190,12 @@ megasas_suspend(struct pci_dev *pdev, pm
 
-	scsi_host_put(host);
 	pci_save_state(pdev);


5.Then there is a lot of changes in cancel_delayed_work(&ev->hotplug_work);
which is missing in 5.5.z
@@ -3933,7 +3950,6 @@ megasas_probe_one(struct pci_dev *pdev, 
 	instance->flag_ieee = 0;
-	instance->ev = NULL;
  	instance->issuepend_done = 1;
@@ -4174,21 +4190,12 @@ megasas_suspend(struct pci_dev *pdev, pm
 	megasas_shutdown_controller(instance, MR_DCMD_HIBERNATE_SHUTDOWN);
 
-	/* cancel the delayed work if this work still in queue */
-	if (instance->ev != NULL) {
-		struct megasas_aen_event *ev = instance->ev;
-		cancel_delayed_work(&ev->hotplug_work);
-		flush_scheduled_work();
-		instance->ev = NULL;
-	}
-
 	tasklet_kill(&instance->isr_tasklet);
@@ -4327,14 +4329,6 @@ static void __devexit megasas_detach_one
 	megasas_shutdown_controller(instance, MR_DCMD_CTRL_SHUTDOWN);
 
-	/* cancel the delayed work if this work still in queue*/
-	if (instance->ev != NULL) {
-		struct megasas_aen_event *ev = instance->ev;
-		cancel_delayed_work(&ev->hotplug_work);
-		flush_scheduled_work();
-		instance->ev = NULL;
-	}
-
 	tasklet_kill(&instance->isr_tasklet);
@@ -5007,7 +4989,6 @@ megasas_aen_polling(void *arg)
 		return;
 	}
-	instance->ev = NULL;
 	host = instance->host;
@@ -5007,7 +4989,6 @@ megasas_aen_polling(void *arg)
 	}
-	instance->ev = NULL;
 	host = instance->host;


6.This is again missing in 5.5.z - which version is ok? 
@@ -4261,11 +4268,6 @@ megasas_resume(struct pci_dev *pdev)
 	/*
-	 * Store instance in PCI softstate
-	 */
-	pci_set_drvdata(pdev, instance);
-
Comment 11 Tomas Henzl 2010-08-31 11:02:51 EDT
Bo,
thanks for posting the 4.9 version. Please answer the question here, as some of them seems to apply also for the 4.9 version.

Thanks, Tomas
Comment 12 Tomas Henzl 2010-09-08 11:01:44 EDT
Bo,
any news here?
Comment 13 bo yang 2010-09-13 10:21:38 EDT
Tomas,

1. megasas_check_reset_gen2(struct megasas_instance *instance, struct
megasas_register_set __iomem * regs)
 {
+        if (instance->adprecovery != MEGASAS_HBA_OPERATIONAL) {
+                return 1;
+        }
1.This is missing in 5.6 should it be added?  

--->this is needed.  It was fixed in later version (4.32).

2.  @@ -3033,7 +3055,6 @@ megasas_get_pd_list(struct megasas_insta
  dcmd->timeout = 0;
- dcmd->pad_0 = 0;
  dcmd->data_xfer_len = MEGASAS_MAX_PD * sizeof(struct MR_PD_LIST);

--->we see the issue in VMWare esx4.xx, but it is not seeing in Linux.  it is OK if not have this.

3.  2.This is missing in 5.5,z should it be added?

@@ -3142,7 +3159,7 @@ megasas_get_ld_list(struct megasas_insta

- if ( (ret == 0) && (ci->ldCount <= (MAX_LOGICAL_DRIVES))){
+ if ( (ret == 0) && (ci->ldCount < (MAX_LOGICAL_DRIVES))){

---> - if ( (ret == 0) && (ci->ldCount <= (MAX_LOGICAL_DRIVES))){ is the correct one, but I only apply the OCR changes based on the base, so it missed.


all items 4, 5 and 6 was not related to OCR.  So they are not in rhel5.5z as base doesn't have.
Comment 14 Tomas Henzl 2010-09-23 08:27:00 EDT
Bo,
I just posted this for internal review.

Next time please consider running checkpatch.pl against your patches and correct the coding style issues. There is a lot of them.
&checkpatch.pl your.patch
....
total: 365 errors, 155 warnings, 2828 lines checked
Comment 15 Jiri Pirko 2010-10-11 04:54:32 EDT
in kernel 2.6.18-194.20.1.el5

linux-2.6-scsi-megaraid_sas-fix-physical-disk-handling.patch
Comment 24 Eryu Guan 2010-11-07 11:04:56 EST
Hi, any updates? We expect to get feedback before Nov. 8
Comment 25 Eryu Guan 2010-11-08 21:14:36 EST
Confirmed patch linux-2.6-scsi-megaraid_sas-fix-physical-disk-handling.patch is applied in 2.6.18-194.26.1.el5 kernel correctly. Set SanityOnly verified
Comment 27 errata-xmlrpc 2010-11-09 13:08:37 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0839.html
Comment 28 Martin Prpič 2010-11-11 08:59:54 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
A bug was found in the way the megaraid_sas driver (for SAS based RAID controllers) handled physical disks and management IOCTLs (Input/Output Control). All physical disks were exported to the disk layer, allowing an oops in megasas_complete_cmd_dpc() when completing the IOCTL command if a timeout occurred. One possible trigger for this bug was running mkfs. This update resolves this issue by updating the megaraid_sas driver to version 4.31.

Note You need to log in before you can comment on or make changes to this bug.