Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 572004

Summary: [LSI 5.6 FEAT] Update 3w-9xxx driver to v2.26.08.007-2.6.18RH
Product: Red Hat Enterprise Linux 5 Reporter: Adam Radford <aradford>
Component: kernelAssignee: Tomas Henzl <thenzl>
Status: CLOSED ERRATA QA Contact: Storage QE <storage-qe>
Severity: high Docs Contact:
Priority: high    
Version: 5.6CC: andriusb, coughlan, cward
Target Milestone: alphaKeywords: FutureFeature, OtherQA
Target Release: 5.6   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 20:39:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 557597    
Attachments:
Description Flags
3w-9xxx_RHEL5.6 patch none

Description Adam Radford 2010-03-10 00:04:11 UTC
Created attachment 398969 [details]
3w-9xxx_RHEL5.6 patch

This patch updates the 3w-9xxx driver in RHEL 5.6 to v2.26.08.007-2.6.18RH.

Changes in this driver release:

+   2.26.08.004 - Add MSI support and "use_msi" module parameter.
+                 Fix bug in twa_get_param() on 4GB+.
+                 Use pci_resource_len() for ioremap().
+                 Add memory-write invalidate support.
+                 Use default DMA data direction.
+   2.26.08.005 - Add power management support.
+   2.26.08.006 - Fix bug in twa_load_sgl().
+   2.26.08.007 - Force 60 second timeout default.

-Adam Radford

Comment 1 Tomas Henzl 2010-05-31 14:41:13 UTC
Adam,
some of the scsi functions (scsi_dma_map,..) were backported to RHEL5 in the past, you can use them next time if you wish.

Patch posted today on rhkl.

Comment 2 Tomas Henzl 2010-08-26 09:38:42 UTC
Adam,
thi came to attention during internal review:
+/* This function is called on PCI resume */
+static int twa_resume(struct pci_dev *pdev)
+{
+	int retval = 0;
...
+out_disable_device:
+	scsi_remove_host(host);
+	pci_disable_device(pdev);
+
+	return retval;
+} /* End twa_resume() */
+#endif

In this failure path, are you supposed to remove the scsi host? If you 
rmmod the driver then twa_remove will not get called will it?
If you are supposed to remove it then  you need a scsi_host_put() call 
(to release the last refcount).

Comment 3 Adam Radford 2010-08-26 13:43:25 UTC
Tomas,

Are you talking about the case where we are not the boot controller but
resume fails (and the system hasn't crashed), then someone wants to rmmod the driver? 

What is your suggested fix for this?

Remove scsi_remove_host() call from twl_resume() ?

or:

Replace scsi_remove_host() with scsi_host_put() ?

Looking through the latest kernel 2.6.36-rc2, there seems to be some 
inconsistencies as to what scsi drivers do in this case.  

Some drivers (such as megaraid_sas.c/pmcraid.c) are doing this:

scsi_host_put()
pci_disable_device()

While others do nothing, except return non zero from hostt->resume().

-Adam

Comment 4 Tomas Henzl 2010-08-26 15:06:10 UTC
(In reply to comment #3)
> Are you talking about the case where we are not the boot controller but
> resume fails (and the system hasn't crashed), then someone wants to rmmod the
> driver? 
Yes, exactly.

> What is your suggested fix for this?
> 
> Remove scsi_remove_host() call from twl_resume() ?
> 
> or:
> 
> Replace scsi_remove_host() with scsi_host_put() ?
> 
> Looking through the latest kernel 2.6.36-rc2, there seems to be some 
> inconsistencies as to what scsi drivers do in this case.
> 
> Some drivers (such as megaraid_sas.c/pmcraid.c) are doing this:
> 
> scsi_host_put()
> pci_disable_device()

I think that when driver fails to resume that that when rmmod the remove function is still called. That for me means the driver usually  should call scsi_remove_host + scsi_host_put only in the remove function. So I'd prefer the latest option: (with a small note - I'm by far not an scsi layer guru)
> While others do nothing, except return non zero from hostt->resume().

Comment 5 Tomas Henzl 2010-08-30 15:23:26 UTC
Adam,
have you come to a solution for this, or do you have an other idea?

Comment 6 Adam Radford 2010-08-30 21:13:41 UTC
Nope, I think we just need a 1 line patch that removes the
scsi_remote_host() call from twa_resume().   Should I attach one to this
bugzilla?

-Adam

Comment 7 Tomas Henzl 2010-08-31 13:24:54 UTC
(In reply to comment #6)
> Nope, I think we just need a 1 line patch that removes the
> scsi_remote_host() call from twa_resume().   Should I attach one to this
> bugzilla?

Not needed, but please post the correction upstream. 
Btw. I think I have seen this also in other 3w* driver.

Comment 9 Jarod Wilson 2010-09-17 14:02:02 UTC
in kernel-2.6.18-222.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 11 Chris Ward 2010-11-09 13:36:33 UTC
~~ Attention Customers and Partners - RHEL 5.6 Public Beta is now available on RHN ~~

A fix for this 'OtherQA' BZ should be present and testable in the release. 

If this Bugzilla is verified as resolved, please update the Verified field above with an appropriate value and include a summary of the testing executed and the results obtained.

If you encounter any issues or have questions while testing, please describe them and set this bug into NEED_INFO. 

If you encounter new defects or have additional patches to request for inclusion, promptly escalate the new issues through your support representative.

Finally, future Beta kernels can be found here:
 http://people.redhat.com/jwilson/el5/

Note: Bugs with the 'OtherQA' keyword require Third-Party testing to confirm the request has been properly addressed. See: https://bugzilla.redhat.com/describekeywords.cgi#OtherQA ).

Comment 12 Adam Radford 2010-11-30 22:35:53 UTC
Redhat,

I have verified this bugzilla with RHEL5.6 (snapshot 2) kernel 2.6.18-232.el5.
I was able to successfully access storage devices using the 3w-9xxx driver, and
the 3w-9xxx driver loaded successfully during OS installation.

-Adam

Comment 14 errata-xmlrpc 2011-01-13 20:39:36 UTC
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-2011-0017.html