Bug 1534106

Summary: RocketRAID 644L isn't bound to AHCI driver.
Product: [Fedora] Fedora Reporter: Joseph A. Farmer <jfarmer99>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 27CC: airlied, ajax, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jfarmer99, jglisse, john.j5live, jonathan, josef, kernel-maint, linville, mchehab, mjg59, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-01 20:38:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joseph A. Farmer 2018-01-13 04:59:12 UTC
Description of problem:  RocketRAID 644L e-sata controller can be used without the hardware RAID it provides.  Which is good as their driver doesn't compile.  When used as just a SATA controller no driver is loaded for it.

I apologize as I should submit patches but I'd mess that up.  A patch was submitted for the AHCI driver for the RocketRAID 642L in June of 2014.  Same chipset.

@@ -449,6 +449,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 	  .driver_data = board_ahci_yes_fbs },
 	{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230),
 	  .driver_data = board_ahci_yes_fbs },
+	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x0642),
+	  .driver_data = board_ahci_yes_fbs },
 
 	/* Promise */
 	{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci },	/* PDC42819 */

The RocketRAID is 0x0645 and maybe should have been done at the same time.

Patch here:
https://marc.info/?l=linux-ide&m=140182168302554&w=2

https://github.com/torvalds/linux/blob/master/drivers/pci/quirks.c was also updated at the time:

			 quirk_dma_func1_alias);
/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c49 */
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9230,
			 quirk_dma_func1_alias);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TTI, 0x0642,
			 quirk_dma_func1_alias);
/* https://bugs.gentoo.org/show_bug.cgi?id=497630 */

PCI_VENDOR_ID_TTI, 0x0645 would have picked up the 644L.

Again, apologies for not submitting patches but I don't have a development environment and wouldn't know how.

Version-Release number of selected component (if applicable):
27

How reproducible:
No driver loads by default.

Steps to Reproduce:
1. Install RocketRAID 644L
2.  No drives will be found.  lshw reports it's unclaimed.
3.

Actual results:
No drives.

Expected results:
Drives.

echo "1103 0645" > /sys/bus/pci/drivers/ahci/new_id

binds it.

Additional info:
0a:00.0 RAID bus controller [0104]: HighPoint Technologies, Inc. RocketRAID 642L SATA-III Controller (2 eSATA ports + 2 internal SATA ports) [1103:0642] (rev 01)

03:00.0 RAID bus controller [0104]: HighPoint Technologies, Inc. RocketRAID 644L 4 Port SATA-III Controller (eSATA) [1103:0645] (rev 11)


642L was added, 644L wasn't.  ID is 0645 and not the expected 0644.

Thanks.

Comment 1 Hans de Goede 2018-01-13 12:18:21 UTC
Thank you for the bug report. I can write a patch and build a test kernel with that patch for you to test, but before I do that, what happens after you bind the device, does the controller then work?

And if it does not work after binding, what about if you boot with iommu=pt on the kernel cmdline and then manually bind?

Comment 2 Joseph A. Farmer 2018-01-13 12:41:51 UTC
Thank you.

After binding the drives work as expected.

Yes, I'll test a kernel with the patch.

Comment 3 Laura Abbott 2018-02-20 20:00:35 UTC
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  As kernel maintainers, we try to keep up with bugzilla but due the rate at which the upstream kernel project moves, bugs may be fixed without any indication to us. Due to this, we are doing a mass bug update across all of the Fedora 27 kernel bugs.
 
Fedora 27 has now been rebased to 4.15.3-300.f27.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you experience different issues, please open a new bug report for those.

Comment 4 Hans de Goede 2018-02-27 14:26:29 UTC
This bug clearly is still relevant. I'm working on preparing a test-kernel now (sorry for the delay). Clearing needinfo.

Comment 5 Hans de Goede 2018-02-27 14:36:36 UTC
Ok, a test-kernel which adds the PCI-id for the 644L to both the pci-quirks table and to the ahci driver is building here now:

https://koji.fedoraproject.org/koji/taskinfo?taskID=25346127

Once this is done building (this takes a couple of hours), follow these test-instructions to test:

https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

Once I've positive feedback from you that this works, then I will submit the patches for this upstream.

Comment 6 Joseph A. Farmer 2018-03-01 20:38:32 UTC
Sorry for the delay.

==========

Linux ryzen.5madfarmers.com 4.16.0-0.rc3.git0.1.rhbz1534106.fc29.x86_64 #1 SMP Tue Feb 27 14:48:31 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

0a:00.0 RAID bus controller: HighPoint Technologies, Inc. RocketRAID 644L 4 Port SATA-III Controller (eSATA) (rev 01)
	Subsystem: HighPoint Technologies, Inc. RocketRAID 644L 4 Port SATA-III Controller (eSATA)
	Flags: bus master, fast devsel, latency 0, IRQ 46
	I/O ports at d050 [size=8]
	I/O ports at d040 [size=4]
	I/O ports at d030 [size=8]
	I/O ports at d020 [size=4]
	I/O ports at d000 [size=32]
	Memory at fe810000 (32-bit, non-prefetchable) [size=2K]
	Expansion ROM at fe800000 [disabled] [size=64K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [70] Express Legacy Endpoint, MSI 00
	Capabilities: [e0] SATA HBA v0.0
	Capabilities: [100] Advanced Error Reporting
	Kernel driver in use: ahci

============

So, yes, that patched kernel works.  "Kernel driver in use: ahci"  

Thank you.

Comment 7 Hans de Goede 2018-03-02 10:39:33 UTC
Thank you for reporting back, I've submitted the 2 patches for this upstream.