Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Any way to get these tools to work with Redwood Ridge? #67

Open
DanaGoyette opened this issue Aug 21, 2019 · 14 comments
Open

Any way to get these tools to work with Redwood Ridge? #67

DanaGoyette opened this issue Aug 21, 2019 · 14 comments

Comments

@DanaGoyette
Copy link

DanaGoyette commented Aug 21, 2019

I have a Supermicro X10SAT motherboard with a Redwood Ridge controller, and whatever I do, the NHI driver won't load for it, so I can't authorize devices in "One Time Shared Key" or "Unique ID" modes. To get Thunderbolt devices to enumerate, I have to have the BIOS use it in Legacy mode, which seems insecure.

Are the tools meant to support these chips (in this case, DSL4410)? If I try adding the PCI ID to the 'thunderbolt' driver via 'new_id' in sysfs, I get: thunderbolt 0000:0e:00.0: failed to determine connection manager, aborting

It's not a high priority for me, just a nice to have, and I wasn't sure where else to ask.

0e:00.0 System peripheral [0880]: Intel Corporation DSL4410 Thunderbolt NHI [Redwood Ridge 2C 2013] [8086:1566]
	Subsystem: Device [2222:1111]
	Flags: fast devsel, IRQ 16
	Memory at ee000000 (32-bit, non-prefetchable) [size=256K]
	Memory at ee040000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [80] Power Management version 3
	Capabilities: [88] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [c0] Express Endpoint, MSI 00
	Capabilities: [a0] MSI-X: Enable- Count=16 Masked-
	Capabilities: [100] Device Serial Number 01-00-00-00-00-<removed 3 pairs of digits>
	Capabilities: [200] Advanced Error Reporting
	Capabilities: [300] Virtual Channel
	Capabilities: [400] Power Budgeting <?>
	Capabilities: [500] Vendor Specific Information: ID=1234 Rev=1 Len=050 <?>
	Capabilities: [600] Latency Tolerance Reporting
@YehezkelShB
Copy link

I was pretty sure that RR doesn't support user authorization of devices (and doesn't have the relevant FW so the driver can't handle it), but the fact that the BIOS have these modes caused me to think maybe I'm missing something.

@westeri
Copy link
Collaborator

westeri commented Aug 22, 2019

Yeah, it is interesting as RR is gen1 host and I was under impression security level thing was only added starting from gen 2 FR. Assuming it has firmware that supports security levels and that it resembles FR the attached patch should in theory work.

PATCH: RR PCI IDs

@YehezkelShB
Copy link

The chances are that the board supports adding FR card, and this is why it has these settings, but let's see the results of testing this patch

@westeri
Copy link
Collaborator

westeri commented Aug 23, 2019

BTW, I got educated that RR actually was the first one to implement SL1 (Unique ID) so assuming the FW messages are similar between RR and FR the patch above might just work.

@DanaGoyette
Copy link
Author

I'll give it a try when I get some time this weekend, thanks! Redwood Ridge is a weird device... it can do Thunderbolt OR DisplayPort 1.2... but it can't pipe a DP 1.2 signal over a Thunderbolt chain.

@DanaGoyette
Copy link
Author

I finally got around to trying it, and it looks like that patch doesn't actually associate the 1566 device ID with the 'thunderbolt' module. Either that, or I just didn't apply it properly.

alias:          pci:v00008086d000015EBsv*sd*bc*sc*i*
alias:          pci:v00008086d000015E8sv*sd*bc*sc*i*
alias:          pci:v00008086d000015DEsv*sd*bc*sc*i*
alias:          pci:v00008086d000015D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000015D9sv*sd*bc*sc*i*
alias:          pci:v00008086d000015DCsv*sd*bc*sc*i*
alias:          pci:v00008086d000015BFsv*sd*bc*sc*i*
alias:          pci:v00008086d000015DDsv*sd*bc*sc*i*
alias:          pci:v00008086d00001577sv*sd*bc*sc*i*
alias:          pci:v00008086d00001575sv*sd*bc*sc*i*
alias:          pci:v00008086d0000156Csv*sd*bc08sc80i00*
alias:          pci:v00008086d0000156Asv*sd*bc08sc80i00*
alias:          pci:v00008086d00001547sv00002222sd00001111bc08sc80i00*
alias:          pci:v00008086d00001513sv00002222sd00001111bc08sc80i00*

@DanaGoyette
Copy link
Author

Huh, doing modinfo against one of the built kernel modules seems to indicate that I just did something wrong when installing it. I'll try again.

@DanaGoyette
Copy link
Author

DanaGoyette commented Sep 9, 2019

A more complete paste of the full Thunderbolt device chain:

0c:00.0 PCI bridge [0604]: Intel Corporation DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] [8086:1567]
        Kernel driver in use: pcieport
0d:00.0 PCI bridge [0604]: Intel Corporation DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] [8086:1567]
        Kernel driver in use: pcieport
0d:03.0 PCI bridge [0604]: Intel Corporation DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] [8086:1567]
        Kernel driver in use: pcieport
0d:04.0 PCI bridge [0604]: Intel Corporation DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] [8086:1567]
        Kernel driver in use: pcieport
0d:05.0 PCI bridge [0604]: Intel Corporation DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] [8086:1567]
        Kernel driver in use: pcieport
0d:06.0 PCI bridge [0604]: Intel Corporation DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] [8086:1567]
        Kernel driver in use: pcieport
0e:00.0 System peripheral [0880]: Intel Corporation DSL4410 Thunderbolt NHI [Redwood Ridge 2C 2013] [8086:1566]
        Subsystem: Device [2222:1111]
0f:00.0 PCI bridge [0604]: Intel Corporation DSL2210 Thunderbolt Controller [Port Ridge 1C 2011] [8086:1549]
        Kernel driver in use: pcieport
10:00.0 PCI bridge [0604]: Intel Corporation DSL2210 Thunderbolt Controller [Port Ridge 1C 2011] [8086:1549]
        Kernel driver in use: pcieport
11:00.0 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM57762 Gigabit Ethernet PCIe [14e4:1682]
        Subsystem: Apple Inc. Thunderbolt to Gigabit Ethernet Adapter [106b:00f6]
        Kernel driver in use: tg3
        Kernel modules: tg3

@westeri
Copy link
Collaborator

westeri commented Sep 10, 2019

It shows that the driver is not bound to the device. Did you run "sudo make modules_install" and all that after you applied and built the patch?

@DanaGoyette
Copy link
Author

I'm using (and rebuilding) the Ubuntu linux-hwe-5.0.0.27 package. Finally got it rebuilt with the patch, and I get this error when loading the thunderbolt module (which now matches):
thunderbolt 0000:0e:00.0: timeout reading config space 2 from 0x0

@DanaGoyette
Copy link
Author

BIOS settings, for reference:

Intel(R) Thunderbolt Configuration
Thunderbolt Specification Version       1.0
Intel Sample Code Version:              1.7
Thunderbolt Host Chip:                  Redwood Ridge

Intel Thunderbolt Technology            [Enabled]
Security Level                          [One time saved key]
Wake from Thunderbolt devices           [Disabled]
AIC Support                             [Disabled]
Thunderbolt PCIe Cache-Line Size        [32]
Thunderbolt Surprise-Removal            [Disabled]
Thunderbolt Software SMI Delay          20
Reserved Memory per Physical Slot       32
Reserved Prefetch Memory per Phys Slot  32
Thunderbolt Device IO Resource Support  [Disabled]

@westeri
Copy link
Collaborator

westeri commented Sep 12, 2019

It could be that the RR firmware does not work the same way than the more recent ones. Can you add "thunderbolt.dyndbg" to the kernel command line and attach dmesg? You need to have CONFIG_DYNAMIC_DEBUG=y in your .config too.

@DanaGoyette
Copy link
Author

[    5.811312] thunderbolt 0000:0e:00.0: NHI initialized, starting thunderbolt                                                                     
[    5.817401] thunderbolt 0000:0e:00.0: allocating TX ring 0 of size 10                                                                           
[    5.817421] thunderbolt 0000:0e:00.0: allocating RX ring 0 of size 10                                                                           
[    5.817435] thunderbolt 0000:0e:00.0: control channel created                                                                                   
[    5.817435] thunderbolt 0000:0e:00.0: control channel starting...                                                                               
[    5.817437] thunderbolt 0000:0e:00.0: starting TX ring 0                                                                                        
[    5.817450] thunderbolt 0000:0e:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)                                                 
[    5.817451] thunderbolt 0000:0e:00.0: starting RX ring 0                                                                                        
[    5.817460] thunderbolt 0000:0e:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)                                             
[   26.730316] thunderbolt 0000:0e:00.0: timeout reading config space 2 from 0x0                                                                   
[   26.733187] thunderbolt 0000:0e:00.0: stopping RX ring 0                                                                                        
[   26.733199] thunderbolt 0000:0e:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)                                            
[   26.733203] thunderbolt 0000:0e:00.0: stopping TX ring 0                                                                                        
[   26.733208] thunderbolt 0000:0e:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)                                                
[   26.733211] thunderbolt 0000:0e:00.0: control channel stopped                                                                                   
[   26.733238] thunderbolt 0000:0e:00.0: freeing RX ring 0                                                                                         
[   26.733243] thunderbolt 0000:0e:00.0: freeing TX ring 0                                                                                         
[   26.733249] thunderbolt 0000:0e:00.0: shutdown    

@westeri
Copy link
Collaborator

westeri commented Sep 13, 2019

OK thanks. So it tries to read host router config space and fails miserably. It could be that the RR is so different from FR+ that the current flows in the driver just don't work with it. Unfortunately I don't have any knowledge how it is supposed to work with RR :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants