From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
Subject: [PATCH 1/1] MicroSemi Switchtec management interface driver
Date: Tue, 31 Jan 2017 18:27:50 +0100 [thread overview]
Message-ID: <20170131172750.GC12595@kroah.com> (raw)
In-Reply-To: <1485882204-26947-2-git-send-email-logang@deltatee.com>
On Tue, Jan 31, 2017@10:03:24AM -0700, Logan Gunthorpe wrote:
> 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
>
> This patch introduces the 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 couple of special IOCTLs are provided to:
>
> * Inform userspace of firmware partition locations
> * Pass event counts and allow userspace to wait on events
>
> A short text file is provided which documents the switchtec driver,
> outlines the semantics of using the char device and describes the
> IOCTLs.
>
> The device also exposes a few read-only sysfs attributes which provide
> some device information component names and versions which is provided
> by the hardware. These are documented in
> Documentation/ABI/testing/sysfs-class-switchtec
>
> 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
>
> Signed-off-by: Logan Gunthorpe <logang at deltatee.com>
> Signed-off-by: Stephen Bates <stephen.bates at microsemi.com>
> ---
> Documentation/ABI/testing/sysfs-class-switchtec | 96 ++
> Documentation/ioctl/ioctl-number.txt | 1 +
> Documentation/switchtec.txt | 80 ++
> MAINTAINERS | 11 +
> drivers/pci/Kconfig | 1 +
> drivers/pci/Makefile | 1 +
> drivers/pci/switch/Kconfig | 13 +
> drivers/pci/switch/Makefile | 1 +
> drivers/pci/switch/switchtec.c | 1320 +++++++++++++++++++++++
> drivers/pci/switch/switchtec.h | 266 +++++
Why a .h file for a single .c file?
Also, why a whole new directory?
thanks,
greg k-h
next prev parent reply other threads:[~2017-01-31 17:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 17:03 [PATCH 0/1] DRAFT: New Microsemi PCI Switch Management Driver Logan Gunthorpe
2017-01-31 17:03 ` [PATCH 1/1] MicroSemi Switchtec management interface driver Logan Gunthorpe
2017-01-31 17:26 ` Greg Kroah-Hartman
2017-01-31 17:35 ` Logan Gunthorpe
2017-01-31 17:49 ` Jonathan Corbet
2017-01-31 18:32 ` Logan Gunthorpe
2017-01-31 18:57 ` Greg Kroah-Hartman
2017-01-31 19:04 ` Logan Gunthorpe
2017-01-31 17:27 ` Greg Kroah-Hartman [this message]
2017-01-31 18:21 ` kbuild test robot
2017-01-31 20:48 ` Emil Velikov
2017-01-31 23:13 ` Logan Gunthorpe
2017-02-01 12:10 ` Emil Velikov
2017-02-02 16:37 ` Logan Gunthorpe
2017-02-03 13:49 ` Emil Velikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170131172750.GC12595@kroah.com \
--to=gregkh@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox