Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-de
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-de
  • Repository
Switch branch/tag
  • linux-de
  • drivers
  • pci
  • Kconfig
Find file BlameHistoryPermalink
  • Logan Gunthorpe's avatar
    MicroSemi Switchtec management interface driver · 080b47de
    Logan Gunthorpe authored Mar 06, 2017
    Microsemi's "Switchtec" line of PCI switch devices is already well
    supported by the kernel with standard PCI switch drivers.  However, the
    Switchtec device advertises a special management endpoint with a separate
    PCI function address and class code.  This endpoint enables some additional
    functionality which includes:
    
     * Packet and Byte Counters
     * Switch Firmware Upgrades
     * Event and Error logs
     * Querying port link status
     * Custom user firmware commands
    
    Add a switchtec kernel module which provides PCI driver that exposes a char
    device.  The char device provides userspace access to this interface
    through read, write and (optionally) poll calls.
    
    A userspace tool and library which utilizes this interface is available
    at [1].  This tool takes inspiration (and borrows some code) from
    nvme-cli [2].  The tool is largely complete at this time but additional
    features may be added in the future.
    
    [1] https://github.com/sbates130272/switchtec-user
    [2] https://github.com/linux-nvme/nvme-cli
    
    
    
    [Dan Carpenter <dan.carpenter@oracle.com>: don't invert error codes]
    [Christophe JAILLET <christophe.jaillet@wanadoo.fr>: fix
    switchtec_dev_open() error handling]
    Tested-by: default avatarKrishna Dhulipala <krishnad@fb.com>
    Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
    Signed-off-by: default avatarStephen Bates <stephen.bates@microsemi.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: default avatarWei Zhang <wzhang@fb.com>
    Reviewed-by: default avatarJens Axboe <axboe@fb.com>
    Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    080b47de