Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/switchtec

FieldValue
SubsystemMicrosemi Switchtec PCI Switch Management Endpoint (ABI doc header); implementation file not in cached tree
Config gatenot verifiable from the cached tree: the ABI doc names no Kconfig symbol and no switchtec Kconfig/Makefile is cached (not verified)
ABI documentationDocumentation/ABI/testing/sysfs-class-switchtec (header: “For details on this subsystem look at Documentation/driver-api/switchtec.rst” – that file is not in the cached tree)
Sincev4.11 (entries dated 05-Jan-2017)
Live (5.10.134 host)class absent: no switchtec row in the cached live enumeration of 46 classes
Ledger IDSYSC-switchtec

What it represents

One directory switchtecX (X an integer >= 0) per registered Switchtec management endpoint – the management interface of Microsemi (now Microchip) Switchtec PCIe switches. The class exposes the switch identity card: component/product vendor, id and revision strings, device and firmware versions, and the partition topology (this device’s partition number and the total partition count). The ABI states every value is read-only (“(read only)” on each entry). Actual management operations (firmware upgrade, MRPC commands) go through the char device interface referenced by the driver-api doc, not through sysfs.

Relationship to the device model

Each class entry is backed by a PCI function implementing the Switchtec management endpoint; the identity attributes are read from hardware registers (“as stored in the hardware”, per the ABI). partition and partition_count describe the switch’s partition split, which maps one physical switch onto several independent PCIe domains. No bus-specific or device-management attributes are documented in the ABI file; it defines only the class directory, its naming scheme, and the ten identity attributes.

Attributes

All documented attributes are read-only; values per the ABI “Values:” fields.

AttributeR/WUnit/formatConditional?Source
switchtec[0-9]+/component_vendorROarbitrary string, e.g. “MICROSEM”alwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/component_idROarbitrary string, e.g. “PM8543”alwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/component_revisionROintegeralwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/product_vendorROarbitrary string, e.g. “MICROSEM”alwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/product_idROarbitrary string, e.g. “PSX 48XG3”alwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/product_revisionROarbitrary string, e.g. “RevB”alwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/device_versionROintegeralwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/fw_versionROinteger in hexadecimal (currently running firmware version)alwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/partitionROinteger, partition number of this devicealwaysABI testing sysfs-class-switchtec
switchtec[0-9]+/partition_countROinteger, total partitions in the switchalwaysABI testing sysfs-class-switchtec

Safety and writes

No write path exists in the ABI file: all ten attributes are read-only hardware-identity views, so reads are safe and side-effect free. The identity pair (product/vendor/component) plus fw_version is the natural inventory hook for fleet tooling. Anything that changes switch state is out of scope here per the ABI; the referenced Documentation/driver-api/switchtec.rst (not cached) is the pointer for the management interface.

References

  • Documentation/ABI/testing/sysfs-class-switchtec (cached copy; eleven What: entries, contact Logan Gunthorpe)
  • ABI doc online
  • source-cache/sysfs-attrs.json switchtec entry (10 paths, matching)
  • sysfs overview, ledger
  • Ledger row SYSC-switchtec