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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Sep 2010 21:26:08 +0900
From:	"Masayuki Ohtake" <masa-korg@....okisemi.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>, "Jiri Slaby" <jslaby@...e.cz>
Cc:	"David S. Miller" <davem@...emloft.net>,
	"Randy Dunlap" <randy.dunlap@...cle.com>,
	"John Linn" <john.linn@...inx.com>,
	"Ralf Baechle" <ralf@...ux-mips.org>,
	"Kristoffer Glembo" <kristoffer@...sler.com>,
	"Maxime Bizon" <mbizon@...ebox.fr>,
	"Greg Rose" <gregory.v.rose@...el.com>,
	"ML netdev" <netdev@...r.kernel.org>,
	"LKML" <linux-kernel@...r.kernel.org>,
	"MeeGo" <meego-dev@...go.com>,
	"Stephen Hemminger" <shemminger@...tta.com>,
	"FUJITA Tomonori" <fujita.tomonori@....ntt.co.jp>,
	"Wang, Qi" <qi.wang@...el.com>,
	"Wang, Yong Y" <yong.y.wang@...el.com>,
	"Andrew" <andrew.chih.howe.khor@...el.com>,
	"Intel OTC" <joel.clark@...el.com>,
	"Foster, Margie" <margie.foster@...el.com>,
	"Arjan" <arjan@...ux.intel.com>,
	"Toshiharu Okada" <okada533@....okisemi.com>,
	"Takahiro Shimizu" <shimizu394@....okisemi.com>,
	"Tomoya Morinaga" <morinaga526@....okisemi.com>
Subject: Re: [PATCH v3] Gigabit Ethernet driver of Topcliff PCH

Hi Rafael

Thank you for your comment.
I will confirm pci.txt and r8169.c.

Thanks Ohtake.
-----
Date: Mon, 13 Sep 2010 00:19:26 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
> > > > +#ifdef CONFIG_PM
> > > > +static int pch_gbe_resume(struct pci_dev *pdev)
> > > > +{
> > > > + struct net_device *netdev = pci_get_drvdata(pdev);
> > > > + struct pch_gbe_adapter *adapter = netdev_priv(netdev);
> > > > + struct pch_gbe_hw *hw = &adapter->hw;
> > > > + u32 err;
> > > > +
> > > > + pci_enable_wake(pdev, PCI_D0, 0);
> > > > + pci_set_power_state(pdev, PCI_D0);
> > > > + pci_restore_state(pdev);
> > > > + err = pci_enable_device(pdev);
> > > > + if (err) {
> > > > + pr_err("Cannot enable PCI device from suspend\n");
> > > > + return err;
> > > > + }
> > > > + pci_set_master(pdev);
> > >
> > > Not sure which of those you need. Rafael may tell you more. You should
> > > not set power state and restore state, but I might be wrong.
>
> You're basically right.  In fact you're supposed to use struct dev_pm_ops
> for defining PM callbacks and then you don't need do any PCI-specific
> operations directly in the driver.
>
> All of this is described in detail in Documentation/power/pci.txt and you
> can have a look into r8169.c for a reference implementation.
>
> Thanks,
> Rafael
>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists