From: Andrew Morton <akpm@linux-foundation.org>
To: "Rafał Bilski" <rafalbilski@interia.pl>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Mark Brown <broonie@sirena.org.uk>
Subject: Re: Natsemi DP83815 driver spaming
Date: Mon, 30 Apr 2007 20:55:22 -0700 [thread overview]
Message-ID: <20070430205522.abad2481.akpm@linux-foundation.org> (raw)
In-Reply-To: <46365887.3010705@interia.pl>
On Mon, 30 Apr 2007 22:58:47 +0200 Rafał Bilski <rafalbilski@interia.pl> wrote:
> Hello,
>
> I have Wyse 3360SE terminal running Linux 2.6.21-rc7. Everything
> works great with one small exception. Natsemi DP83815 driver is
> filling log with:
> > ezri user.info kernel: eth0: DSPCFG accepted after 0 usec.
> > ezri user.notice kernel: eth0: Wake-up event 0x80000a
> > ezri user.info kernel: eth0: Setting full-duplex based on negotiated link capability.
> every 5 seconds. I can comment out these messages, but I would
> like to turn off the source of wake up event. It is a bit
> strange to see wakeup event on running system.
>
> Please CC me.
>
> Thank You
> Rafał
>
> natsemi dp8381x driver, version 2.1, Sept 11, 2006
> originally by Donald Becker <becker@scyld.com>
> http://www.scyld.com/network/natsemi.html
> 2.4.x kernel port by Jeff Garzik, Tjeerd Mulder
> PCI: Setting latency timer of device 0000:00:0f.0 to 64
> natsemi eth0: NatSemi DP8381[56] at 0x10010000 (0000:00:0f.0), 00:80:64:10:c6:09, IRQ 10, port TP.
>
> 00:0f.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
> Subsystem: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
> Latency: 64 (2750ns min, 13000ns max)
> Interrupt: pin A routed to IRQ 10
> Region 0: I/O ports at f800 [size=256]
> Region 1: Memory at 10010000 (32-bit, non-prefetchable) [size=4K]
> [virtual] Expansion ROM at 10000000 [disabled] [size=64K]
> Capabilities: [40] Power Management version 2
> Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=320mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=0 PME+
>
>
It seems to be repeatedly setting the same duplex setting. The closest
thing I can see in there in recent times is
68c90166e4aaa15ddcdd4778ad30bfb8b32534be, "Add support for using MII port
with no PHY".
Does applying the below backout patch fix things?
diff -puN drivers/net/natsemi.c~a drivers/net/natsemi.c
--- a/drivers/net/natsemi.c~a
+++ a/drivers/net/natsemi.c
@@ -573,8 +573,6 @@ struct netdev_private {
u32 intr_status;
/* Do not touch the nic registers */
int hands_off;
- /* Don't pay attention to the reported link state. */
- int ignore_phy;
/* external phy that is used: only valid if dev->if_port != PORT_TP */
int mii;
int phy_addr_external;
@@ -703,10 +701,7 @@ static void __devinit natsemi_init_media
struct netdev_private *np = netdev_priv(dev);
u32 tmp;
- if (np->ignore_phy)
- netif_carrier_on(dev);
- else
- netif_carrier_off(dev);
+ netif_carrier_off(dev);
/* get the initial settings from hardware */
tmp = mdio_read(dev, MII_BMCR);
@@ -816,13 +811,8 @@ static int __devinit natsemi_probe1 (str
np->hands_off = 0;
np->intr_status = 0;
np->eeprom_size = natsemi_pci_info[chip_idx].eeprom_size;
- if (natsemi_pci_info[chip_idx].flags & NATSEMI_FLAG_IGNORE_PHY)
- np->ignore_phy = 1;
- else
- np->ignore_phy = 0;
/* Initial port:
- * - If configured to ignore the PHY set up for external.
* - If the nic was configured to use an external phy and if find_mii
* finds a phy: use external port, first phy that replies.
* - Otherwise: internal port.
@@ -830,7 +820,7 @@ static int __devinit natsemi_probe1 (str
* The address would be used to access a phy over the mii bus, but
* the internal phy is accessed through mapped registers.
*/
- if (np->ignore_phy || readl(ioaddr + ChipConfig) & CfgExtPhy)
+ if (readl(ioaddr + ChipConfig) & CfgExtPhy)
dev->if_port = PORT_MII;
else
dev->if_port = PORT_TP;
@@ -840,9 +830,7 @@ static int __devinit natsemi_probe1 (str
if (dev->if_port != PORT_TP) {
np->phy_addr_external = find_mii(dev);
- /* If we're ignoring the PHY it doesn't matter if we can't
- * find one. */
- if (!np->ignore_phy && np->phy_addr_external == PHY_ADDR_NONE) {
+ if (np->phy_addr_external == PHY_ADDR_NONE) {
dev->if_port = PORT_TP;
np->phy_addr_external = PHY_ADDR_INTERNAL;
}
@@ -908,8 +896,6 @@ static int __devinit natsemi_probe1 (str
printk("%02x, IRQ %d", dev->dev_addr[i], irq);
if (dev->if_port == PORT_TP)
printk(", port TP.\n");
- else if (np->ignore_phy)
- printk(", port MII, ignoring PHY\n");
else
printk(", port MII, phy ad %d.\n", np->phy_addr_external);
}
@@ -1590,13 +1576,9 @@ static void check_link(struct net_device
{
struct netdev_private *np = netdev_priv(dev);
void __iomem * ioaddr = ns_ioaddr(dev);
- int duplex = np->duplex;
+ int duplex;
u16 bmsr;
- /* If we are ignoring the PHY then don't try reading it. */
- if (np->ignore_phy)
- goto propagate_state;
-
/* The link status field is latched: it remains low after a temporary
* link failure until it's read. We need the current link status,
* thus read twice.
@@ -1608,7 +1590,7 @@ static void check_link(struct net_device
if (netif_carrier_ok(dev)) {
if (netif_msg_link(np))
printk(KERN_NOTICE "%s: link down.\n",
- dev->name);
+ dev->name);
netif_carrier_off(dev);
undo_cable_magic(dev);
}
@@ -1632,7 +1614,6 @@ static void check_link(struct net_device
duplex = 1;
}
-propagate_state:
/* if duplex is set then bit 28 must be set, too */
if (duplex ^ !!(np->rx_config & RxAcceptTx)) {
if (netif_msg_link(np))
@@ -2861,15 +2842,6 @@ static int netdev_set_ecmd(struct net_de
}
/*
- * If we're ignoring the PHY then autoneg and the internal
- * transciever are really not going to work so don't let the
- * user select them.
- */
- if (np->ignore_phy && (ecmd->autoneg == AUTONEG_ENABLE ||
- ecmd->port == PORT_TP))
- return -EINVAL;
-
- /*
* maxtxpkt, maxrxpkt: ignored for now.
*
* transceiver:
_
next parent reply other threads:[~2007-05-01 3:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46365887.3010705@interia.pl>
2007-05-01 3:55 ` Andrew Morton [this message]
[not found] ` <4636E970.3010602@interia.pl>
[not found] ` <4636F90A.2070303@interia.pl>
2007-05-01 8:35 ` Natsemi DP83815 driver spaming Andrew Morton
2007-05-01 8:46 ` Mark Brown
2007-05-01 10:25 ` Rafał Bilski
2007-05-01 18:08 ` Mark Brown
2007-05-01 19:10 ` Rafał Bilski
2007-05-01 19:52 ` Rafał Bilski
2007-05-01 21:27 ` Mark Brown
[not found] ` <b3ece790705011543gdca3a9ei905d3499b6c18dc8@mail.gmail.com>
2007-05-02 5:54 ` Rafał Bilski
[not found] ` <b3ece790705012303x1e5a2d03xddf6c14aec5a99d8@mail.gmail.com>
2007-05-02 6:34 ` Rafał Bilski
2007-05-02 6:51 ` Tim Hockin
2007-05-02 8:22 ` Mark Brown
[not found] ` <b3ece790705020744p2e73bb5fo2c0acad947a5de15@mail.gmail.com>
[not found] ` <4638EF0B.9050701@interia.pl>
2007-05-02 21:41 ` Mark Brown
2007-05-03 6:33 ` Rafał Bilski
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=20070430205522.abad2481.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=broonie@sirena.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rafalbilski@interia.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;
as well as URLs for NNTP newsgroup(s).