From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>, Marcel Holtmann <marcel@holtmann.org>
Cc: linux-wireless@vger.kernel.org, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arend van Spriel <arend.vanspriel@broadcom.com>
Subject: [PATCH 0/3] drivers: support for sysfs initiated coredump
Date: Wed, 21 Feb 2018 11:50:17 +0100 [thread overview]
Message-ID: <1519210220-22437-1-git-send-email-arend.vanspriel@broadcom.com> (raw)
This series is intended for 4.17 adding support for sysfs initiated
coredump. This uses new functionality that was added in drivers base.
Device drivers can now implement a .coredump() callback upon which a
sysfs entry is created when the device is bound to the driver. From
user-space a device coredump can be initiated. The easiest way is by
going the drivers entry and enter into the bound device folder like
this:
# cd /sys/bus/pci/drivers/brcmfmac/0000:02:00.0
# echo 1 > coredump
# ls /sys/class/devcoredump/
devcd1 disabled
# ls -l /sys/class/devcoredump/devcd1/
total 0
-rw------- 1 root root 0 Feb 19 23:49 data
lrwxrwxrwx 1 root root 0 Feb 19 23:49 failing_device ->
../../../pci0000:00/0000:00:1c.0/0000:02:00.0
drwxr-xr-x 2 root root 0 Feb 19 23:49 power
lrwxrwxrwx 1 root root 0 Feb 19 23:49 subsystem ->
../../../../class/devcoredump
-rw-r--r-- 1 root root 4096 Feb 19 23:49 uevent
The device driver can implement the .coredump() callback as they like.
The use of the dev_coredump api is not enforced although the sysfs entry
is only created when CONFIG_DEV_COREDUMP is selected.
Apart from brcmfmac, the other drivers used dev_coredump api and had a
mechanism in place through debugfs, which is removed in these patches.
With these patches initiating the coredump can be done without selecting
CONFIG_DEBUGFS. No attempt was made to look for drivers providing some sore
of coredump functionality by other means than the dev_coredump api.
The first 2 patches apply to the master branch of the wireless-drivers-next
repository. The last patch applies to the master branch of the bluetooth-next.
Arend van Spriel (3):
brcmfmac: add support for sysfs initiated coredump
mwifiex: support sysfs initiated device coredump
btmrvl: support sysfs initiated firmware coredump
drivers/bluetooth/btmrvl_debugfs.c | 31 ----------------------
drivers/bluetooth/btmrvl_drv.h | 2 --
drivers/bluetooth/btmrvl_main.c | 6 -----
drivers/bluetooth/btmrvl_sdio.c | 18 ++++++++-----
.../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 +
.../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 2 ++
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 7 +++++
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 +
drivers/net/wireless/marvell/mwifiex/debugfs.c | 31 +---------------------
drivers/net/wireless/marvell/mwifiex/pcie.c | 19 +++++++++++--
drivers/net/wireless/marvell/mwifiex/sdio.c | 13 +++++++++
drivers/net/wireless/marvell/mwifiex/usb.c | 14 ++++++++++
12 files changed, 68 insertions(+), 77 deletions(-)
--
1.9.1
next reply other threads:[~2018-02-21 10:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 10:50 Arend van Spriel [this message]
2018-02-21 10:50 ` [PATCH 1/3] brcmfmac: add support for sysfs initiated coredump Arend van Spriel
2018-02-21 10:50 ` [PATCH 2/3] mwifiex: support sysfs initiated device coredump Arend van Spriel
2018-02-21 22:59 ` Brian Norris
2018-02-22 12:17 ` Arend van Spriel
2018-02-22 19:35 ` Brian Norris
2018-02-23 10:39 ` Arend van Spriel
2018-02-23 10:51 ` Johannes Berg
2018-02-26 22:06 ` Brian Norris
2018-02-26 22:25 ` Arend van Spriel
2018-03-12 9:41 ` [2/3] " Kalle Valo
2018-03-12 9:41 ` Kalle Valo
[not found] ` <20180312094115.2E1C1606DB@smtp.codeaurora.org>
2018-03-12 12:44 ` Arend van Spriel
2018-03-13 13:10 ` Kalle Valo
2018-03-13 19:42 ` Arend van Spriel
2018-03-13 20:19 ` Marcel Holtmann
2018-03-13 20:21 ` Arend van Spriel
2018-02-21 10:50 ` [PATCH 3/3] btmrvl: support sysfs initiated firmware coredump Arend van Spriel
2018-02-27 14:46 ` [3/3] " Kalle Valo
2018-02-27 14:46 ` Kalle Valo
2018-02-27 18:26 ` [PATCH 3/3] " Marcel Holtmann
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=1519210220-22437-1-git-send-email-arend.vanspriel@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcel@holtmann.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;
as well as URLs for NNTP newsgroup(s).