diff for duplicates of <20141203161855.50951aa8@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 76% rename from a/1.txt rename to N1/1.1.txt index 48d823b..53a464f 100644 --- a/a/1.txt +++ b/N1/1.1.txt @@ -1,11 +1,11 @@ On Tue, 02 Dec 2014 16:23:49 -0600 Larry Finger <Larry.Finger@lwfinger.net> wrote: -> On 12/02/2014 02:12 PM, Michael B?sch wrote: +> On 12/02/2014 02:12 PM, Michael Büsch wrote: > > On Tue, 2 Dec 2014 23:01:29 +0300 > > Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote: > > -> >> On Mon, Dec 01, 2014 at 10:10:23PM +0100, Michael B?sch wrote: +> >> On Mon, Dec 01, 2014 at 10:10:23PM +0100, Michael Büsch wrote: > >>> On Mon, 1 Dec 2014 23:46:38 +0300 > >>> Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote: > >>> @@ -45,17 +45,3 @@ I added my Signed-off. -- Michael --------------- next part -------------- -A non-text attachment was scrubbed... -Name: b44_wol.patch -Type: text/x-patch -Size: 4270 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20141203/08d679b2/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/20141203/08d679b2/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..c582f9e --- /dev/null +++ b/N1/1.2.txt @@ -0,0 +1,128 @@ +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> +Signed-off-by: Michael Buesch <m@bues.ch> +--- + 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..3ff6f0a --- /dev/null +++ b/N1/2.bin @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAEBAgAGBQJUfynhAAoJEPUyvh2QjYsOAv4QAIPve5oTD2MzWFR03PG1Xl2Z +Xqci1oYJ5iRkLHU6moW2lbZLjQvhig0vco65r9Vma9IRa5B0rqpEk9CDkwur3IWs +3uLVkW9E4g4VE2JjxSYn0qAoeqe4z2kKd7cGUECYJts4ckDbqohxgmdglHKFnpfA +fHPMX40fLe2aluuKs/Xr06k5gWcddMdp0bFkmLtanKiRcKFQizlAN08py0SJWlR8 +cGmCjn0RcTb9OweEKmoj0NUc3JUNWFp8EaAWzRvnYRmyVmJ6QSDtDa9oauK0gHmz +m/79QrOtAKu7F1TKpMvkKDSMBiyQJLyS4THN5GO3+nGr8XEumVUpa9WF8lUuHcm/ +0AR/dViWAr4j8/7vTHYpthXx7H0luS3Z7RcojeJPTU9I0s1bTvcVs18XZ6VpXvwF +IkGnz9Fez9FhPTf9mJUkO9zjrjjDbu08abAoukwoOrS+VEhRLcVdBiO9Ph7n6XEC +1WxtYhGdpsausIrLrumNXJXMuToGYsjFSO9ilNCgUNUeUz30Al4kkhmZnpJ2JT6Q +/nCsv6wmuBnWWdih5S0RBZIRvJ7arS4Pzklt1G3LOH5d7AC3qGxFFvNHCV7gnQdz +mIzfXEQ8URtlLwgsePbYFaaAhZhZaapZiFL7Z7ZKQ3FPJsatJPDpCbgBRgzcuptf +Ht88nRXA+C1b2qeedEAd +=BzqB +-----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 ad3e322..f47873b 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -5,7 +5,7 @@ "ref\020141202211211.7e08b935@wiggum\0" "ref\0547E3BF5.5060201@lwfinger.net\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\0Wed, 3 Dec 2014 16:18:55 +0100\0" "To\0Larry Finger <Larry.Finger@lwfinger.net>" " John W. Linville <linville@tuxdriver.com>\0" @@ -16,16 +16,16 @@ linux-kernel@vger.kernel.org b43-dev <b43-dev@lists.infradead.org> " Rafa\305\202 Mi\305\202ecki <zajec5@gmail.com>\0" - "\00:1\0" + "\02:1.1\0" "b\0" "On Tue, 02 Dec 2014 16:23:49 -0600\n" "Larry Finger <Larry.Finger@lwfinger.net> wrote:\n" "\n" - "> On 12/02/2014 02:12 PM, Michael B?sch wrote:\n" + "> On 12/02/2014 02:12 PM, Michael B\303\274sch wrote:\n" "> > On Tue, 2 Dec 2014 23:01:29 +0300\n" "> > Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote:\n" "> >\n" - "> >> On Mon, Dec 01, 2014 at 10:10:23PM +0100, Michael B?sch wrote:\n" + "> >> On Mon, Dec 01, 2014 at 10:10:23PM +0100, Michael B\303\274sch wrote:\n" "> >>> On Mon, 1 Dec 2014 23:46:38 +0300\n" "> >>> Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote:\n" "> >>>\n" @@ -64,20 +64,157 @@ "I added my Signed-off.\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: 4270 bytes\n" - "Desc: not available\n" - "URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20141203/08d679b2/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/20141203/08d679b2/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" + "Signed-off-by: Michael Buesch <m@bues.ch>\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" + "iQIcBAEBAgAGBQJUfynhAAoJEPUyvh2QjYsOAv4QAIPve5oTD2MzWFR03PG1Xl2Z\n" + "Xqci1oYJ5iRkLHU6moW2lbZLjQvhig0vco65r9Vma9IRa5B0rqpEk9CDkwur3IWs\n" + "3uLVkW9E4g4VE2JjxSYn0qAoeqe4z2kKd7cGUECYJts4ckDbqohxgmdglHKFnpfA\n" + "fHPMX40fLe2aluuKs/Xr06k5gWcddMdp0bFkmLtanKiRcKFQizlAN08py0SJWlR8\n" + "cGmCjn0RcTb9OweEKmoj0NUc3JUNWFp8EaAWzRvnYRmyVmJ6QSDtDa9oauK0gHmz\n" + "m/79QrOtAKu7F1TKpMvkKDSMBiyQJLyS4THN5GO3+nGr8XEumVUpa9WF8lUuHcm/\n" + "0AR/dViWAr4j8/7vTHYpthXx7H0luS3Z7RcojeJPTU9I0s1bTvcVs18XZ6VpXvwF\n" + "IkGnz9Fez9FhPTf9mJUkO9zjrjjDbu08abAoukwoOrS+VEhRLcVdBiO9Ph7n6XEC\n" + "1WxtYhGdpsausIrLrumNXJXMuToGYsjFSO9ilNCgUNUeUz30Al4kkhmZnpJ2JT6Q\n" + "/nCsv6wmuBnWWdih5S0RBZIRvJ7arS4Pzklt1G3LOH5d7AC3qGxFFvNHCV7gnQdz\n" + "mIzfXEQ8URtlLwgsePbYFaaAhZhZaapZiFL7Z7ZKQ3FPJsatJPDpCbgBRgzcuptf\n" + "Ht88nRXA+C1b2qeedEAd\n" + "=BzqB\n" + "-----END PGP SIGNATURE-----\n" -7e0941de2f77daf6c5e400a409a43872f7c18ed8df23b0bc06e372a05be173f7 +4e1a64af3a64ea0e8e010fa450f31343e3dd16491331146a3dfb6c582deea31f
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.