LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-19-2018, 08:14 PM   #1
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Rep: Reputation: Disabled
Access/query devices behind PCIe switch


If there's a PCIe switch in the system, how do I (easily) find out the details about devices behind such a switch? I've used setpci and lspci for similar purpose without a switch.

Do I use the Config Space for the switch, and program its BARs and Command registers to spit out individual read/write for those devices? Here's the output of lspci for reference. The device I'm interested in is a Ethernet switch connected to one of the ports of this 4-port PCIe switch.

/scw/rels # lspci -v
01:00.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Memory at 11b00f6300000 (32-bit, non-prefetchable) [size=16K]
Bus: primary=01, secondary=02, subordinate=05, sec-latency=0
I/O behind bridge: 00001000-00002fff
Memory behind bridge: f6000000-f62fffff
Prefetchable memory behind bridge: 00000000f0000000-00000000f5ffffff
Capabilities: [40] Power Management version 3
Capabilities: [48] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/2 Enable-
Capabilities: [68] Express Upstream Port, MSI 00
Capabilities: [a4] Subsystem: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch
Capabilities: [100] Device Serial Number 00-0e-df-b5-10-02-86-ab
Capabilities: [fb4] Advanced Error Reporting <?>
Capabilities: [138] Power Budgeting <?>
Capabilities: [148] Virtual Channel <?>
Capabilities: [950] Vendor Specific Information <?>

02:01.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
I/O behind bridge: 00001000-00001fff
Memory behind bridge: f6000000-f61fffff
Prefetchable memory behind bridge: 00000000f0000000-00000000f5ffffff
Capabilities: [40] Power Management version 3
Capabilities: [48] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/2 Enable-
Capabilities: [68] Express Downstream Port (Slot+), MSI 00
Capabilities: [a4] Subsystem: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch
Capabilities: [100] Device Serial Number 00-0e-df-b5-10-02-86-ab
Capabilities: [fb4] Advanced Error Reporting <?>
Capabilities: [148] Virtual Channel <?>
Capabilities: [520] Access Controls <?>
Capabilities: [950] Vendor Specific Information <?>

02:02.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=02, secondary=04, subordinate=04, sec-latency=0
I/O behind bridge: 00002000-00002fff
Memory behind bridge: f6200000-f62fffff
Capabilities: [40] Power Management version 3
Capabilities: [48] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/2 Enable-
Capabilities: [68] Express Downstream Port (Slot+), MSI 00
Capabilities: [a4] Subsystem: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch
Capabilities: [100] Device Serial Number 00-0e-df-b5-10-02-86-ab
Capabilities: [fb4] Advanced Error Reporting <?>
Capabilities: [148] Virtual Channel <?>
Capabilities: [520] Access Controls <?>
Capabilities: [950] Vendor Specific Information <?>

02:03.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=02, secondary=05, subordinate=05, sec-latency=0
Capabilities: [40] Power Management version 3
Capabilities: [48] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/2 Enable-
Capabilities: [68] Express Downstream Port (Slot+), MSI 00
Capabilities: [a4] Subsystem: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch
Capabilities: [100] Device Serial Number 00-0e-df-b5-10-02-86-ab
Capabilities: [fb4] Advanced Error Reporting <?>
Capabilities: [148] Virtual Channel <?>
Capabilities: [520] Access Controls <?>
Capabilities: [950] Vendor Specific Information <?>

03:00.0 Memory controller: Marvell Technology Group Ltd. Device db60 (rev 01)
Subsystem: Marvell Technology Group Ltd. Device 11ab
Flags: fast devsel, IRQ 129
Memory at 11b00f4000000 (64-bit, prefetchable) [size=1M]
Memory at 11b00f0000000 (64-bit, prefetchable) [size=64M]
Capabilities: [40] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [60] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>

04:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6111/6121 SATA II / PATA Controller (rev b2) (prog-if 8f [Master SecP SecO PriP PriO])
Subsystem: Marvell Technology Group Ltd. 88SE6111/6121 SATA II / PATA Controller
Flags: bus master, fast devsel, latency 0, IRQ 130
I/O ports at 2010 [size=8]
I/O ports at 2020 [size=4]
I/O ports at 2018 [size=8]
I/O ports at 2024 [size=4]
I/O ports at 2000 [size=16]
Memory at 11b00f6200000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [48] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
Capabilities: [e0] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>
Kernel driver in use: ahci
 
Old 03-30-2018, 08:33 PM   #2
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Consider this problem resolved. I got more time to experiment with things, and refreshed my mind after my post. The confusion I had was the device ID used by the switch vendor; they advertise it as a "memory controller", instead of a Ethernet switch. It's evident in their data sheet. Presumably, I could see this could be viewed as a memory controller with side-effects that implement switching.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I cannot see my PCIe device in /sys/devices rob18767 Linux - Hardware 4 08-26-2017 11:35 AM
Hotplug of PCIe switch devices. nskogler Linux - Hardware 3 03-24-2015 08:10 PM
lspci enumeration failed through PCIe switch giasis Linux - Hardware 0 02-19-2015 12:44 AM
Are there any PCIe compatable devices apart from graphics cards yet? APB_4 Linux - Hardware 1 03-31-2005 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration