lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 12 Oct 2009 13:07:49 +0300
From:	tike64@...il.com
To:	linux-kernel@...r.kernel.org
Subject: smc91x and ifplugd

Dear linux-kernel,

I am configuring 2.6.27 kernel for a custom board with a LAN91C111 ethernet 
interface. I tried to manage the interface with ifplugd but encountered a 
problem: ifplugd works fine through the first event pair, one up event and then 
one down event but after that the interface is dead. In the driver the carrier 
presence knowledge is updated in the interrupt handler and, when the interface 
is brought down, no one updates the fact that the carrier is again present.

I implemented a driver specific 'get_link' method and commented out
smc_phy_powerdown call from smc_close. Now it seems to work for me but I'm far 
too uneducated to judge if this is a correct way to solve the problem or if 
there is going to be ill effects.

Right away I can say that I'm not comfortable with not powering down the PHY on 
interface down. Secondly this seems not to solve the problem if there is an 
external PHY, right?

So, what might be the correct solution which would have a chance to be included 
into the mainline?

My get_link implementation:

static u32 smc_get_link(struct net_device *dev)
{
	struct smc_local *lp = netdev_priv(dev);
	void __iomem *ioaddr = lp->base;
	u32 carrier;
	static u32 old = -1;

	spin_lock_irq(&lp->lock);
	SMC_SELECT_BANK(lp, 0);
	carrier = mii_link_ok(&lp->mii);
	SMC_SELECT_BANK(lp, 2);
	spin_unlock_irq(&lp->lock);
	if (old != carrier) {
		old = carrier;
		printk("smc_get_link carrier: %i\n", carrier); }
	return carrier;
}

--

Timo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ