From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 03/10] sky2: phy irq on shutdown
Date: Wed, 11 Oct 2006 14:22:28 -0700 [thread overview]
Message-ID: <20061011212310.492971897@osdl.org> (raw)
In-Reply-To: 20061011212225.941046083@osdl.org
[-- Attachment #1: sky2-phy-read-shut.patch --]
[-- Type: text/plain, Size: 1502 bytes --]
When PHY is turned off on shutdown, it causes the IRQ to get stuck on.
Make sure and disable the IRQ first, and if IRQ occurs when device
is not running, don't access PHY because that will hang.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/sky2.c 2006-10-11 11:43:40.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-10-11 11:43:43.000000000 -0700
@@ -1499,6 +1499,11 @@
/* Stop more packets from being queued */
netif_stop_queue(dev);
+ /* Disable port IRQ */
+ imask = sky2_read32(hw, B0_IMSK);
+ imask &= ~portirq_msk[port];
+ sky2_write32(hw, B0_IMSK, imask);
+
sky2_gmac_reset(hw, port);
/* Stop transmitter */
@@ -1549,11 +1554,6 @@
sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);
- /* Disable port IRQ */
- imask = sky2_read32(hw, B0_IMSK);
- imask &= ~portirq_msk[port];
- sky2_write32(hw, B0_IMSK, imask);
-
sky2_phy_power(hw, port, 0);
/* turn off LED's */
@@ -1750,13 +1750,13 @@
struct sky2_port *sky2 = netdev_priv(dev);
u16 istatus, phystat;
+ if (!netif_running(dev))
+ return;
+
spin_lock(&sky2->phy_lock);
istatus = gm_phy_read(hw, port, PHY_MARV_INT_STAT);
phystat = gm_phy_read(hw, port, PHY_MARV_PHY_STAT);
- if (!netif_running(dev))
- goto out;
-
if (netif_msg_intr(sky2))
printk(KERN_INFO PFX "%s: phy interrupt status 0x%x 0x%x\n",
sky2->netdev->name, istatus, phystat);
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-10-11 21:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 21:22 [PATCH 00/10] sky2: version 1.9 patches Stephen Hemminger
2006-10-11 21:22 ` [PATCH 01/10] sky2: MSI test is only a warning Stephen Hemminger
2006-10-11 21:22 ` [PATCH 02/10] sky2: turn of workaround timer Stephen Hemminger
2006-10-11 21:22 ` Stephen Hemminger [this message]
2006-10-11 21:22 ` [PATCH 04/10] sky2: fiber pause bits Stephen Hemminger
2006-10-11 21:22 ` [PATCH 05/10] sky2: advertising register 16 bits Stephen Hemminger
2006-10-11 21:22 ` [PATCH 06/10] sky2: use duplex result bits Stephen Hemminger
2006-10-11 21:22 ` [PATCH 07/10] sky2: dont reset PHY twice Stephen Hemminger
2006-10-11 21:22 ` [PATCH 08/10] sky2: flow control setting fixes Stephen Hemminger
2006-10-11 21:22 ` [PATCH 09/10] sky2: no message on rx fifo overflow Stephen Hemminger
2006-10-11 21:22 ` [PATCH 10/10] sky2: version 1.9 Stephen Hemminger
2006-10-16 20:50 ` [PATCH 1/2] sky2: multicast pause frame receive Stephen Hemminger
2006-10-16 20:52 ` [PATCH 2/2] sky2: don't process pause frames in recveiver Stephen Hemminger
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=20061011212310.492971897@osdl.org \
--to=shemminger@osdl.org \
--cc=jgarzik@pobox.com \
--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 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).