From: Francois Romieu <romieu@fr.zoreil.com>
To: Mark Einon <mark.einon@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
gregkh@suse.de, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, o.hartmann@telovital.com,
alan@linux.intel.com
Subject: Re: [PATCH 4/8] staging: et131x: Add pci suspend & resume functions
Date: Sat, 1 Oct 2011 21:36:50 +0200 [thread overview]
Message-ID: <20111001193650.GA14434@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <CANK3SE3eHbBwzE5ZQJVoQEzw1QEE0bTp8Uf=CRpQEvNMiztPtg@mail.gmail.com>
Mark Einon <mark.einon@gmail.com> :
> On 1 October 2011 12:03, Francois Romieu <romieu@fr.zoreil.com> wrote:
[...]
> >> + ? ? err = et131x_open(netdev);
> >> + ? ? if (err) {
> >> + ? ? ? ? ? ? dev_err(&pdev->dev, "Can't resume interface!\n");
> >> + ? ? ? ? ? ? goto out;
> >> + ? ? }
> >
> > You can/should split et131x_{open/close} to remove this failure point.
>
> Hi, thanks for the comments francois,
> I'm not quite sure what you mean here. Can you expand on your comment please?
Something like:
int et131x_open(struct net_device *netdev)
{
add_timer(...)
err = request_irq(...)
if (err < 0)
goto release_timer;
et131x_start(...)
out:
return err;
release_timer:
blah;
goto out;
}
Same thing with et131x_close / et131x_stop. You only use et131x_{start/stop}
for suspend/resume : one error path is gone away.
--
Ueimor
next prev parent reply other threads:[~2011-10-01 19:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-01 10:14 [PATCH 1/8] staging: et131x: Remove TODO entry 'alloc_etherdev initilising memory with zero' Mark Einon
2011-10-01 10:14 ` [PATCH 2/8] staging: et131x: Introduce et1310_in_phy_coma() call Mark Einon
2011-10-01 10:14 ` [PATCH 3/8] staging: et131x: Remove adapter->bmsr, replace with phydev equivalents Mark Einon
2011-10-01 10:14 ` [PATCH 4/8] staging: et131x: Add pci suspend & resume functions Mark Einon
2011-10-01 11:03 ` Francois Romieu
2011-10-01 14:02 ` Mark Einon
2011-10-01 19:36 ` Francois Romieu [this message]
2011-10-01 10:14 ` [PATCH 5/8] staging: et131x: Fix add_timer() from et131x_open Mark Einon
2011-10-01 10:14 ` [PATCH 6/8] staging: et131x: Update TODO file for kernel parameters Mark Einon
2011-10-01 10:14 ` [PATCH 7/8] staging: et131x: Updating copyright statements and module authors Mark Einon
2011-10-01 19:58 ` Dan Carpenter
2011-10-02 18:54 ` Mark Einon
2011-10-01 10:14 ` [PATCH 8/8] staging: et131x: Fix indefinite low power sleep Mark Einon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111001193650.GA14434@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=alan@linux.intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.einon@gmail.com \
--cc=o.hartmann@telovital.com \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®