linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drivers: support for sysfs initiated coredump
@ 2018-02-21 10:50 Arend van Spriel
  2018-02-21 10:50 ` [PATCH 1/3] brcmfmac: add " Arend van Spriel
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Arend van Spriel @ 2018-02-21 10:50 UTC (permalink / raw)
  To: Kalle Valo, Marcel Holtmann
  Cc: linux-wireless, linux-bluetooth, linux-kernel,
	Greg Kroah-Hartman, Arend van Spriel

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-03-13 20:21 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 10:50 [PATCH 0/3] drivers: support for sysfs initiated coredump Arend van Spriel
2018-02-21 10:50 ` [PATCH 1/3] brcmfmac: add " 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

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).