https://bugzilla.novell.com/show_bug.cgi?id=415034
User trenn@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=415034#c20
Thomas Renninger changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |okir@novell.com, ksievers@novell.com
Info Provider|mzugec@novell.com |okir@novell.com
--- Comment #20 from Thomas Renninger 2008-09-02 05:38:24 MDT ---
Hmm, I mean how long should Yast wait...
IMO this should still be solved properly in the kernel.
IMO the sysfs file access on carrier should block if there is a detection in
progress, something like:
1. I do not know anything about network layer
2. I didn't find and search for the real carrier sysfs method
But could something like this be the real solution?:
static ssize_t carrier_show(struct class *cls, char *buf)
{
unsigned long timeout = jiffies + HZ * 5; /* 5s */
while (netif_carrier_check(cxy->dev)) &&
timeout > jiffies) {
/* I found netif_carrier_ok, netif_carrier_on and
netif_carrier_off...
NIC link detection in progress...
/*
cond_resched();
}
return sprintf(buf, "%d", netif_carrier_ok(xy->dev));
}
Two problems I am not sure:
- Is this allowed in a sysfs read at all, Kay?
- The netif_carrier_check(xy->dev) is probably hard to impelement?
Maybe it could be done for the tg3 only for now?
Just an idea, but solving/workarounding this in Yast is probably really ugly:
Michal just confirmed: Waiting longer would block the whole application, not a
real solution.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.