[linux] 01/01: [sparc] Implement and wire up hotplug and modalias_show for vio

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Wed Apr 27 22:11:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit 9321f394c6c3cc7844a57cd8fdf0090f2fe823f8
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Apr 28 00:09:05 2016 +0200

    [sparc] Implement and wire up hotplug and modalias_show for vio
    
    Thanks to Adrian Glaubitz; closes: #815977
---
 debian/changelog                                   |  2 ++
 ...plement-and-wire-up-modalias_show-for-vio.patch | 36 +++++++++++++++++++
 ...implement-and-wire-up-vio_hotplug-for-vio.patch | 40 ++++++++++++++++++++++
 debian/patches/series                              |  2 ++
 4 files changed, 80 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 881050a..5319f14 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -122,6 +122,8 @@ linux (4.5.2-1) UNRELEASED; urgency=medium
   * linux-source: Fix up module signing configuration in included kernel
     config files
   * README.Debian: Change more URLs to use https: scheme
+  * [sparc] Implement and wire up hotplug and modalias_show for vio, thanks to
+    Adrian Glaubitz (Closes: #815977)
 
   [ Aurelien Jarno ]
   * [mips*] Emulate unaligned LDXC1 and SDXC1 instructions.
diff --git a/debian/patches/bugfix/sparc/sparc-implement-and-wire-up-modalias_show-for-vio.patch b/debian/patches/bugfix/sparc/sparc-implement-and-wire-up-modalias_show-for-vio.patch
new file mode 100644
index 0000000..56b97f2
--- /dev/null
+++ b/debian/patches/bugfix/sparc/sparc-implement-and-wire-up-modalias_show-for-vio.patch
@@ -0,0 +1,36 @@
+From: Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
+Date: Thu, 14 Apr 2016 20:14:41 +0200
+Subject: sparc: Implement and wire up modalias_show for vio.
+Origin: https://git.kernel.org/cgit/linux/kernel/git/davem/sparc.git/commit?id=36128d204b81c099b5779771127a5546eac549c9
+Bug-Debian: https://bugs.debian.org/815977
+
+Signed-off-by: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
+Acked-by: Sam Ravnborg <sam at ravnborg.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ arch/sparc/kernel/vio.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
+index cb5789c9f961..d7055609a41c 100644
+--- a/arch/sparc/kernel/vio.c
++++ b/arch/sparc/kernel/vio.c
+@@ -105,9 +105,18 @@ static ssize_t type_show(struct device *dev,
+ 	return sprintf(buf, "%s\n", vdev->type);
+ }
+ 
++static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
++			     char *buf)
++{
++	const struct vio_dev *vdev = to_vio_dev(dev);
++
++	return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
++}
++
+ static struct device_attribute vio_dev_attrs[] = {
+ 	__ATTR_RO(devspec),
+ 	__ATTR_RO(type),
++	__ATTR_RO(modalias),
+ 	__ATTR_NULL
+ };
+ 
diff --git a/debian/patches/bugfix/sparc/sparc-implement-and-wire-up-vio_hotplug-for-vio.patch b/debian/patches/bugfix/sparc/sparc-implement-and-wire-up-vio_hotplug-for-vio.patch
new file mode 100644
index 0000000..3c276bd
--- /dev/null
+++ b/debian/patches/bugfix/sparc/sparc-implement-and-wire-up-vio_hotplug-for-vio.patch
@@ -0,0 +1,40 @@
+From: Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
+Date: Thu, 14 Apr 2016 20:14:42 +0200
+Subject: sparc: Implement and wire up vio_hotplug for vio.
+Origin: https://git.kernel.org/cgit/linux/kernel/git/davem/sparc.git/commit?id=5bde2c9be701c4583f0a9243bd46590ec401bfba
+Bug-Debian: https://bugs.debian.org/815977
+
+Signed-off-by: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
+Acked-by: Sam Ravnborg <sam at ravnborg.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ arch/sparc/kernel/vio.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
+index d7055609a41c..f6bb857254fc 100644
+--- a/arch/sparc/kernel/vio.c
++++ b/arch/sparc/kernel/vio.c
+@@ -45,6 +45,14 @@ static const struct vio_device_id *vio_match_device(
+ 	return NULL;
+ }
+ 
++static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
++{
++	const struct vio_dev *vio_dev = to_vio_dev(dev);
++
++	add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, vio_dev->compat);
++	return 0;
++}
++
+ static int vio_bus_match(struct device *dev, struct device_driver *drv)
+ {
+ 	struct vio_dev *vio_dev = to_vio_dev(dev);
+@@ -123,6 +131,7 @@ static struct device_attribute vio_dev_attrs[] = {
+ static struct bus_type vio_bus_type = {
+ 	.name		= "vio",
+ 	.dev_attrs	= vio_dev_attrs,
++	.uevent         = vio_hotplug,
+ 	.match		= vio_bus_match,
+ 	.probe		= vio_device_probe,
+ 	.remove		= vio_device_remove,
diff --git a/debian/patches/series b/debian/patches/series
index a1e3ced..ab10005 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -150,3 +150,5 @@ bugfix/all/scripts-fix-x.509-pem-support-in-sign-file.patch
 bugfix/arm/arm-dts-kirkwood-fix-sd-slot-default-configuration-f.patch
 bugfix/all/atl2-disable-unimplemented-scatter-gather-feature.patch
 bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch
+bugfix/sparc/sparc-implement-and-wire-up-modalias_show-for-vio.patch
+bugfix/sparc/sparc-implement-and-wire-up-vio_hotplug-for-vio.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list