lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20060923082851.GA2611@melchior.yamamaya.is-a-geek.org>
Date:	Sat, 23 Sep 2006 10:28:51 +0200
From:	Tobias Diedrich <ranma@...edrich.de>
To:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: forcedeth broken powermanagement/irq handling ?

Hi,

since there hasn't been much progress with the bugzilla entry I'm
bringing this issue to your attention here. :)

http://bugzilla.kernel.org/show_bug.cgi?id=6398

vanilla forcedeth doesn't seem to support suspend and an
ifdown/up-cycle is needed to get it working again after suspend.
Francois Romieu's "Awfully experimental" patch is working just fine
for me (with message signalled interrupts disabled) and has survived
quite a few suspend/resume cycles.

So I'd very much like to see (at least partial, with msi disabled)
suspend support for forcedeth in mainline. 

Romieu's patch:

--- linux-2.6.18-rc6/drivers/net/forcedeth.c	2006-09-09 09:45:43.000000000 +0200
+++ linux-2.6.17.11-xen/drivers/net/forcedeth.c	2006-09-09 09:41:25.000000000 +0200
@@ -4433,6 +4433,50 @@
 	pci_set_drvdata(pci_dev, NULL);
 }
 
+
+#ifdef CONFIG_PM
+
+static int nv_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct fe_priv *np = netdev_priv(dev);
+
+	if (!netif_running(dev))
+		goto out;
+
+	netif_device_detach(dev);
+
+	// Gross.
+	nv_close(dev);
+
+	pci_save_state(pdev);
+	pci_enable_wake(pdev, pci_choose_state(pdev, state), np->wolenabled);
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
+out:
+	return 0;
+}
+
+static int nv_resume(struct pci_dev *pdev)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	int rc = 0;
+
+	if (!netif_running(dev))
+		goto out;
+
+	netif_device_attach(dev);
+
+	pci_set_power_state(pdev, PCI_D0);
+	pci_restore_state(pdev);
+	pci_enable_wake(pdev, PCI_D0, 0);
+
+	rc = nv_open(dev);
+out:
+	return rc;
+}
+
+#endif /* CONFIG_PM */
+
 static struct pci_device_id pci_tbl[] = {
 	{	/* nForce Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_1),
@@ -4534,6 +4578,10 @@
 	.id_table = pci_tbl,
 	.probe = nv_probe,
 	.remove = __devexit_p(nv_remove),
+#ifdef CONFIG_PM
+	.suspend	= nv_suspend,
+	.resume		= nv_resume,
+#endif
 };
 
 
-- 
Tobias						PGP: http://9ac7e0bc.uguu.de
このメールは十割再利用されたビットで作られています。
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ