All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20141201221023.79ffb40d@wiggum>

diff --git a/N1/1.1.hdr b/N1/1.1.hdr
new file mode 100644
index 0000000..1ae7ed1
--- /dev/null
+++ b/N1/1.1.hdr
@@ -0,0 +1,3 @@
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: inline
diff --git a/a/1.txt b/N1/1.1.txt
similarity index 89%
rename from a/1.txt
rename to N1/1.1.txt
index a555d44..b717c0d 100644
--- a/a/1.txt
+++ b/N1/1.1.txt
@@ -20,7 +20,7 @@ Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote:
 Thanks, this looks good.
 I assume you tested this (I currently don't have a device to test this).
 
-Larry, Rafa?, any other b43 user:
+Larry, Rafał, any other b43 user:
 Can you please test whether this doesn't cause regressions for suspend/resume on b43?
 (Patch is attached as reference)
 
@@ -137,17 +137,3 @@ Can you please test whether this doesn't cause regressions for suspend/resume on
 
 -- 
 Michael
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: b44_wol.patch
-Type: text/x-patch
-Size: 4228 bytes
-Desc: not available
-URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20141201/af183d99/attachment.bin>
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: not available
-Type: application/pgp-signature
-Size: 819 bytes
-Desc: OpenPGP digital signature
-URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20141201/af183d99/attachment.sig>
diff --git a/N1/1.2.hdr b/N1/1.2.hdr
new file mode 100644
index 0000000..e8a574b
--- /dev/null
+++ b/N1/1.2.hdr
@@ -0,0 +1,3 @@
+Content-Type: text/x-patch
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=b44_wol.patch
diff --git a/N1/1.2.txt b/N1/1.2.txt
new file mode 100644
index 0000000..bb3c0e1
--- /dev/null
+++ b/N1/1.2.txt
@@ -0,0 +1,127 @@
+From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
+Subject: [PATCH] SSB / B44: fix WOL for BCM4401
+
+Wake On Lan was not working on laptop DELL Vostro 1500.
+If WOL was turned on, BCM4401 was powered up in suspend mode. LEDs blinked.
+But the laptop could not be woken up with the Magic Packet. The reason for
+that was that PCIE was not enabled as a system wakeup source and
+therefore the host PCI bridge was not powered up in suspend mode.
+PCIE was not enabled in suspend by PM because no child devices were
+registered as wakeup source during suspend process.
+On laptop BCM4401 is connected through the SSB bus, that is connected to the
+PCI-Express bus. SSB and B44 did not use standard PM wakeup functions
+and did not forward wakeup settings to their parents.
+To fix that B44 driver enables PM wakeup and registers new wakeup source
+using device_set_wakeup_enable(). Wakeup is automatically reported to the parent SSB
+bus via power.wakeup_path. SSB bus enables wakeup for the parent PCI bridge, if there is any
+child devices with enabled wakeup functionality. All other steps are
+done by PM core code.
+
+Signed-off-by: Andrey Skvortsov <Andrej.Skvortzov@gmail.com>
+---
+ drivers/net/ethernet/broadcom/b44.c |    2 ++
+ drivers/ssb/pcihost_wrapper.c       |   33 ++++++++++++++++++++++-----------
+ 2 files changed, 24 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
+index 416620f..ffeaf47 100644
+--- a/drivers/net/ethernet/broadcom/b44.c
++++ b/drivers/net/ethernet/broadcom/b44.c
+@@ -2104,6 +2104,7 @@ static int b44_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+ 		bp->flags &= ~B44_FLAG_WOL_ENABLE;
+ 	spin_unlock_irq(&bp->lock);
+ 
++	device_set_wakeup_enable(bp->sdev->dev, wol->wolopts & WAKE_MAGIC);
+ 	return 0;
+ }
+ 
+@@ -2452,6 +2453,7 @@ static int b44_init_one(struct ssb_device *sdev,
+ 		}
+ 	}
+ 
++	device_set_wakeup_capable(sdev->dev, true);
+ 	netdev_info(dev, "%s %pM\n", DRV_DESCRIPTION, dev->dev_addr);
+ 
+ 	return 0;
+diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c
+index 69161bb..410215c 100644
+--- a/drivers/ssb/pcihost_wrapper.c
++++ b/drivers/ssb/pcihost_wrapper.c
+@@ -11,15 +11,17 @@
+  * Licensed under the GNU/GPL. See COPYING for details.
+  */
+ 
++#include <linux/pm.h>
+ #include <linux/pci.h>
+ #include <linux/export.h>
+ #include <linux/slab.h>
+ #include <linux/ssb/ssb.h>
+ 
+ 
+-#ifdef CONFIG_PM
+-static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state)
++#ifdef CONFIG_PM_SLEEP
++static int ssb_pcihost_suspend(struct device *d)
+ {
++	struct pci_dev *dev = to_pci_dev(d);
+ 	struct ssb_bus *ssb = pci_get_drvdata(dev);
+ 	int err;
+ 
+@@ -28,17 +30,23 @@ static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state)
+ 		return err;
+ 	pci_save_state(dev);
+ 	pci_disable_device(dev);
+-	pci_set_power_state(dev, pci_choose_state(dev, state));
++
++	/* if there is a wakeup enabled child device on ssb bus,
++	   enable pci wakeup posibility. */
++	device_set_wakeup_enable(d, d->power.wakeup_path);
++
++	pci_prepare_to_sleep(dev);
+ 
+ 	return 0;
+ }
+ 
+-static int ssb_pcihost_resume(struct pci_dev *dev)
++static int ssb_pcihost_resume(struct device *d)
+ {
++	struct pci_dev *dev = to_pci_dev(d);
+ 	struct ssb_bus *ssb = pci_get_drvdata(dev);
+ 	int err;
+ 
+-	pci_set_power_state(dev, PCI_D0);
++	pci_back_from_sleep(dev);
+ 	err = pci_enable_device(dev);
+ 	if (err)
+ 		return err;
+@@ -49,10 +57,12 @@ static int ssb_pcihost_resume(struct pci_dev *dev)
+ 
+ 	return 0;
+ }
+-#else /* CONFIG_PM */
+-# define ssb_pcihost_suspend	NULL
+-# define ssb_pcihost_resume	NULL
+-#endif /* CONFIG_PM */
++
++static const struct dev_pm_ops ssb_pcihost_pm_ops = {
++	SET_SYSTEM_SLEEP_PM_OPS(ssb_pcihost_suspend, ssb_pcihost_resume)
++};
++
++#endif /* CONFIG_PM_SLEEP */
+ 
+ static int ssb_pcihost_probe(struct pci_dev *dev,
+ 			     const struct pci_device_id *id)
+@@ -115,8 +125,9 @@ int ssb_pcihost_register(struct pci_driver *driver)
+ {
+ 	driver->probe = ssb_pcihost_probe;
+ 	driver->remove = ssb_pcihost_remove;
+-	driver->suspend = ssb_pcihost_suspend;
+-	driver->resume = ssb_pcihost_resume;
++#ifdef CONFIG_PM_SLEEP
++	driver->driver.pm = &ssb_pcihost_pm_ops;
++#endif
+ 
+ 	return pci_register_driver(driver);
+ }
+-- 
+1.7.2.5
diff --git a/N1/2.bin b/N1/2.bin
new file mode 100644
index 0000000..bd5718e
--- /dev/null
+++ b/N1/2.bin
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQIcBAEBAgAGBQJUfNk/AAoJEPUyvh2QjYsObEgQAL/O0yBdZCOsVTJgTcevSD/j
+7L6NiE546W7SNmqK1RmIBPE6nijIxJzZ4YlSUnb5ppiRV7UIVte5Zfdv/oJJ6GjQ
+ov1FvRPy15fk0qanoJP+r5ebV1fsgyPUgVatbNKmWx+FLcK1nYCNTao85eS9AgcH
+xjXO07jzHtSFLxhLWqScOCeGuIkS4VUvHHlp1Ne/UR9O81G5USR2CNLyS9QsMMn2
+6yQU3ITyzLHfY1fGFOgwN1JGmBU8ovVglby5Ixpeac03oM2ZM2UELWtLQoxShXfl
+lHBX+jwPicoPcNVXBBqcI8ocEJmYcQChBHHB/0eYK84xR4O37k0l9I5apP9O9oIS
+RehHlr/SiJCTfRc7MkevgChViGJjXvVfyrSKxoOVyxlfBUdb6xMEUo64Os/fpVMf
+31ClOObdBiPvrSzLGEYzrFcrzsO8MUeILwhK96M3JuK+8cs6oehgNUi+0dqonc/0
+qBjXIEcp38eAgeEYToHOJnaJw1IZfkdtMKdcsEOhZSRwcPGr2nwB3sJB2RTOwmTk
+vykdR6loAGiHvAewNP5qDT4krEpHvjKASOf7sThKETMDFlozdbsOmnAi1recND4Q
+MKQa1roZf0TLB0tsliLcjaXN+1cBTjzzU/kSJ1z+YttqfI2NsLkoyWM+CZhlcKMP
+gRIdjL7dKMU8KQNGjE3V
+=neWB
+-----END PGP SIGNATURE-----
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..d21864c
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,2 @@
+Content-Type: application/pgp-signature
+Content-Description: OpenPGP digital signature
diff --git a/a/content_digest b/N1/content_digest
index 4a73eb1..5d92263 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,7 +1,7 @@
  "ref\020141201111125.GA11974@localhost.localdomain\0"
  "ref\01417466798-15735-1-git-send-email-Andrej.Skvortzov@gmail.com\0"
  "From\0Michael B\303\274sch <m@bues.ch>\0"
- "Subject\0[PATCH] SSB / B44: fix WOL for BCM4401\0"
+ "Subject\0Re: [PATCH] SSB / B44: fix WOL for BCM4401\0"
  "Date\0Mon, 1 Dec 2014 22:10:23 +0100\0"
  "To\0Andrey Skvortsov <andrej.skvortzov@gmail.com>\0"
  "Cc\0Rafael J. Wysocki <rjw@rjwysocki.net>"
@@ -11,7 +11,7 @@
   b43-dev <b43-dev@lists.infradead.org>
  " Rafa\305\202 Mi\305\202ecki <zajec5@gmail.com>"
  " Larry Finger <Larry.Finger@lwfinger.net>\0"
- "\00:1\0"
+ "\02:1.1\0"
  "b\0"
  "On Mon,  1 Dec 2014 23:46:38 +0300\n"
  "Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote:\n"
@@ -35,7 +35,7 @@
  "Thanks, this looks good.\n"
  "I assume you tested this (I currently don't have a device to test this).\n"
  "\n"
- "Larry, Rafa?, any other b43 user:\n"
+ "Larry, Rafa\305\202, any other b43 user:\n"
  "Can you please test whether this doesn't cause regressions for suspend/resume on b43?\n"
  "(Patch is attached as reference)\n"
  "\n"
@@ -151,20 +151,156 @@
  "\n"
  "\n"
  "-- \n"
- "Michael\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: b44_wol.patch\n"
- "Type: text/x-patch\n"
- "Size: 4228 bytes\n"
- "Desc: not available\n"
- "URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20141201/af183d99/attachment.bin>\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: not available\n"
- "Type: application/pgp-signature\n"
- "Size: 819 bytes\n"
- "Desc: OpenPGP digital signature\n"
- URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20141201/af183d99/attachment.sig>
+ Michael
+ "\02:1.2\0"
+ "fn\0b44_wol.patch\0"
+ "b\0"
+ "From: Andrey Skvortsov <andrej.skvortzov@gmail.com>\n"
+ "Subject: [PATCH] SSB / B44: fix WOL for BCM4401\n"
+ "\n"
+ "Wake On Lan was not working on laptop DELL Vostro 1500.\n"
+ "If WOL was turned on, BCM4401 was powered up in suspend mode. LEDs blinked.\n"
+ "But the laptop could not be woken up with the Magic Packet. The reason for\n"
+ "that was that PCIE was not enabled as a system wakeup source and\n"
+ "therefore the host PCI bridge was not powered up in suspend mode.\n"
+ "PCIE was not enabled in suspend by PM because no child devices were\n"
+ "registered as wakeup source during suspend process.\n"
+ "On laptop BCM4401 is connected through the SSB bus, that is connected to the\n"
+ "PCI-Express bus. SSB and B44 did not use standard PM wakeup functions\n"
+ "and did not forward wakeup settings to their parents.\n"
+ "To fix that B44 driver enables PM wakeup and registers new wakeup source\n"
+ "using device_set_wakeup_enable(). Wakeup is automatically reported to the parent SSB\n"
+ "bus via power.wakeup_path. SSB bus enables wakeup for the parent PCI bridge, if there is any\n"
+ "child devices with enabled wakeup functionality. All other steps are\n"
+ "done by PM core code.\n"
+ "\n"
+ "Signed-off-by: Andrey Skvortsov <Andrej.Skvortzov@gmail.com>\n"
+ "---\n"
+ " drivers/net/ethernet/broadcom/b44.c |    2 ++\n"
+ " drivers/ssb/pcihost_wrapper.c       |   33 ++++++++++++++++++++++-----------\n"
+ " 2 files changed, 24 insertions(+), 11 deletions(-)\n"
+ "\n"
+ "diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c\n"
+ "index 416620f..ffeaf47 100644\n"
+ "--- a/drivers/net/ethernet/broadcom/b44.c\n"
+ "+++ b/drivers/net/ethernet/broadcom/b44.c\n"
+ "@@ -2104,6 +2104,7 @@ static int b44_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)\n"
+ " \t\tbp->flags &= ~B44_FLAG_WOL_ENABLE;\n"
+ " \tspin_unlock_irq(&bp->lock);\n"
+ " \n"
+ "+\tdevice_set_wakeup_enable(bp->sdev->dev, wol->wolopts & WAKE_MAGIC);\n"
+ " \treturn 0;\n"
+ " }\n"
+ " \n"
+ "@@ -2452,6 +2453,7 @@ static int b44_init_one(struct ssb_device *sdev,\n"
+ " \t\t}\n"
+ " \t}\n"
+ " \n"
+ "+\tdevice_set_wakeup_capable(sdev->dev, true);\n"
+ " \tnetdev_info(dev, \"%s %pM\\n\", DRV_DESCRIPTION, dev->dev_addr);\n"
+ " \n"
+ " \treturn 0;\n"
+ "diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c\n"
+ "index 69161bb..410215c 100644\n"
+ "--- a/drivers/ssb/pcihost_wrapper.c\n"
+ "+++ b/drivers/ssb/pcihost_wrapper.c\n"
+ "@@ -11,15 +11,17 @@\n"
+ "  * Licensed under the GNU/GPL. See COPYING for details.\n"
+ "  */\n"
+ " \n"
+ "+#include <linux/pm.h>\n"
+ " #include <linux/pci.h>\n"
+ " #include <linux/export.h>\n"
+ " #include <linux/slab.h>\n"
+ " #include <linux/ssb/ssb.h>\n"
+ " \n"
+ " \n"
+ "-#ifdef CONFIG_PM\n"
+ "-static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state)\n"
+ "+#ifdef CONFIG_PM_SLEEP\n"
+ "+static int ssb_pcihost_suspend(struct device *d)\n"
+ " {\n"
+ "+\tstruct pci_dev *dev = to_pci_dev(d);\n"
+ " \tstruct ssb_bus *ssb = pci_get_drvdata(dev);\n"
+ " \tint err;\n"
+ " \n"
+ "@@ -28,17 +30,23 @@ static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state)\n"
+ " \t\treturn err;\n"
+ " \tpci_save_state(dev);\n"
+ " \tpci_disable_device(dev);\n"
+ "-\tpci_set_power_state(dev, pci_choose_state(dev, state));\n"
+ "+\n"
+ "+\t/* if there is a wakeup enabled child device on ssb bus,\n"
+ "+\t   enable pci wakeup posibility. */\n"
+ "+\tdevice_set_wakeup_enable(d, d->power.wakeup_path);\n"
+ "+\n"
+ "+\tpci_prepare_to_sleep(dev);\n"
+ " \n"
+ " \treturn 0;\n"
+ " }\n"
+ " \n"
+ "-static int ssb_pcihost_resume(struct pci_dev *dev)\n"
+ "+static int ssb_pcihost_resume(struct device *d)\n"
+ " {\n"
+ "+\tstruct pci_dev *dev = to_pci_dev(d);\n"
+ " \tstruct ssb_bus *ssb = pci_get_drvdata(dev);\n"
+ " \tint err;\n"
+ " \n"
+ "-\tpci_set_power_state(dev, PCI_D0);\n"
+ "+\tpci_back_from_sleep(dev);\n"
+ " \terr = pci_enable_device(dev);\n"
+ " \tif (err)\n"
+ " \t\treturn err;\n"
+ "@@ -49,10 +57,12 @@ static int ssb_pcihost_resume(struct pci_dev *dev)\n"
+ " \n"
+ " \treturn 0;\n"
+ " }\n"
+ "-#else /* CONFIG_PM */\n"
+ "-# define ssb_pcihost_suspend\tNULL\n"
+ "-# define ssb_pcihost_resume\tNULL\n"
+ "-#endif /* CONFIG_PM */\n"
+ "+\n"
+ "+static const struct dev_pm_ops ssb_pcihost_pm_ops = {\n"
+ "+\tSET_SYSTEM_SLEEP_PM_OPS(ssb_pcihost_suspend, ssb_pcihost_resume)\n"
+ "+};\n"
+ "+\n"
+ "+#endif /* CONFIG_PM_SLEEP */\n"
+ " \n"
+ " static int ssb_pcihost_probe(struct pci_dev *dev,\n"
+ " \t\t\t     const struct pci_device_id *id)\n"
+ "@@ -115,8 +125,9 @@ int ssb_pcihost_register(struct pci_driver *driver)\n"
+ " {\n"
+ " \tdriver->probe = ssb_pcihost_probe;\n"
+ " \tdriver->remove = ssb_pcihost_remove;\n"
+ "-\tdriver->suspend = ssb_pcihost_suspend;\n"
+ "-\tdriver->resume = ssb_pcihost_resume;\n"
+ "+#ifdef CONFIG_PM_SLEEP\n"
+ "+\tdriver->driver.pm = &ssb_pcihost_pm_ops;\n"
+ "+#endif\n"
+ " \n"
+ " \treturn pci_register_driver(driver);\n"
+ " }\n"
+ "-- \n"
+ 1.7.2.5
+ "\01:2\0"
+ "d\0OpenPGP digital signature\0"
+ "b\0"
+ "-----BEGIN PGP SIGNATURE-----\n"
+ "Version: GnuPG v2\n"
+ "\n"
+ "iQIcBAEBAgAGBQJUfNk/AAoJEPUyvh2QjYsObEgQAL/O0yBdZCOsVTJgTcevSD/j\n"
+ "7L6NiE546W7SNmqK1RmIBPE6nijIxJzZ4YlSUnb5ppiRV7UIVte5Zfdv/oJJ6GjQ\n"
+ "ov1FvRPy15fk0qanoJP+r5ebV1fsgyPUgVatbNKmWx+FLcK1nYCNTao85eS9AgcH\n"
+ "xjXO07jzHtSFLxhLWqScOCeGuIkS4VUvHHlp1Ne/UR9O81G5USR2CNLyS9QsMMn2\n"
+ "6yQU3ITyzLHfY1fGFOgwN1JGmBU8ovVglby5Ixpeac03oM2ZM2UELWtLQoxShXfl\n"
+ "lHBX+jwPicoPcNVXBBqcI8ocEJmYcQChBHHB/0eYK84xR4O37k0l9I5apP9O9oIS\n"
+ "RehHlr/SiJCTfRc7MkevgChViGJjXvVfyrSKxoOVyxlfBUdb6xMEUo64Os/fpVMf\n"
+ "31ClOObdBiPvrSzLGEYzrFcrzsO8MUeILwhK96M3JuK+8cs6oehgNUi+0dqonc/0\n"
+ "qBjXIEcp38eAgeEYToHOJnaJw1IZfkdtMKdcsEOhZSRwcPGr2nwB3sJB2RTOwmTk\n"
+ "vykdR6loAGiHvAewNP5qDT4krEpHvjKASOf7sThKETMDFlozdbsOmnAi1recND4Q\n"
+ "MKQa1roZf0TLB0tsliLcjaXN+1cBTjzzU/kSJ1z+YttqfI2NsLkoyWM+CZhlcKMP\n"
+ "gRIdjL7dKMU8KQNGjE3V\n"
+ "=neWB\n"
+ "-----END PGP SIGNATURE-----\n"
 
-7ea5754b3fc84a5388d730945ec755c62127d5963b16e4b7723787440023c0c1
+8661d52f2390c5eae57fd602facb4f24cf437825aef5851f9d56966243dcf1a3

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.