All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santwona.Behera@Sun.COM
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Matheos Worku <Matheos.Worku@Sun.COM>,
	agospoda@redhat.com, Santwona Behera <Santwona.Behera@Sun.COM>
Subject: [PATCH 1/1] niu: panic on reset
Date: Thu, 04 Sep 2008 16:55:16 -0700	[thread overview]
Message-ID: <48C07564.3060306@Sun.COM> (raw)

The reset_task function in the niu driver does not reset the hardware 
fully. The buffer addresses and pointers are not being reset/updated in 
the hardware and that leads to panic on reset.

Signed-off-by: santwona.behera@sun.com <santwona.behera@sun.com>
---
 drivers/net/niu.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index e4765b7..422d7e5 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -6006,11 +6006,27 @@ static void niu_reset_task(struct work_struct *work)

        niu_stop_hw(np);

+       spin_unlock_irqrestore(&np->lock, flags);
+
+       niu_free_channels(np);
+
+       err = niu_alloc_channels(np);
+       if (err) {
+               dev_err(np->device, PFX "%s:Failed to alloc niu channels\n",
+                       np->dev->name);
+               return;
+       }
+
+       spin_lock_irqsave(&np->lock, flags);
+
        err = niu_init_hw(np);
        if (!err) {
                np->timer.expires = jiffies + HZ;
                add_timer(&np->timer);
                niu_netif_start(np);
+       } else {
+               dev_err(np->device, PFX "%s:Failed to init hw\n",
+                       np->dev->name);
        }

        spin_unlock_irqrestore(&np->lock, flags);
--
1.5.2

             reply	other threads:[~2008-09-04 23:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 23:55 Santwona.Behera [this message]
2008-09-08 20:20 ` [PATCH 1/1] niu: panic on reset David Miller
2008-09-10 17:01   ` Matheos Worku
2008-09-10 20:28     ` David Miller

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=48C07564.3060306@Sun.COM \
    --to=santwona.behera@sun.com \
    --cc=Matheos.Worku@Sun.COM \
    --cc=agospoda@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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 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.