netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: james@albanarts.com
Cc: zambrano@broadcom.com, jpirko@redhat.com,
	fujita.tomonori@lab.ntt.co.jp, hauke@hauke-m.de,
	Larry.Finger@lwfinger.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] b44: fix resume, request_irq after hw reset
Date: Wed, 13 Oct 2010 09:46:59 -0700 (PDT)	[thread overview]
Message-ID: <20101013.094659.226765041.davem@davemloft.net> (raw)
In-Reply-To: <201010120022.13171.james@albanarts.com>

From: James Hogan <james@albanarts.com>
Date: Tue, 12 Oct 2010 00:22:12 +0100

> @@ -2309,6 +2303,12 @@ static int b44_resume(struct ssb_device *sdev)
>  	netif_device_attach(bp->dev);
>  	spin_unlock_irq(&bp->lock);
>  
> +	rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev);
> +	if (rc) {
> +		netdev_err(dev, "request_irq failed\n");
> +		return rc;
> +	}
> +
>  	b44_enable_ints(bp);
>  	netif_wake_queue(dev);

Since you've moved the request_irq() down, you'll need to adjust
the error handling so that it undoes side effects made by this
function up until this point.

F.e. netif_device_attach() has to be undone for one thing.

Next, b44_init_rings() allocates memory that you must now free.

Etc. etc. etc.

This change is not so simple. :-)

  parent reply	other threads:[~2010-10-13 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 23:22 [PATCH] b44: fix resume, request_irq after hw reset James Hogan
2010-10-11 23:34 ` Andrew Morton
2010-10-12  7:08   ` James Hogan
2010-10-12  7:27     ` Andrew Morton
2010-10-12  8:40       ` James Hogan
2010-10-13 16:46 ` David Miller [this message]
2010-10-13 21:39   ` James Hogan

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=20101013.094659.226765041.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=hauke@hauke-m.de \
    --cc=james@albanarts.com \
    --cc=jpirko@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zambrano@broadcom.com \
    /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;
as well as URLs for NNTP newsgroup(s).