Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 313206 Details for
Bug 457567
pulse not support monitor link on bond interface
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to resolve problem
mii.patch (text/plain), 1.19 KB, created by
Enzo
on 2008-08-01 14:56:57 UTC
(
hide
)
Description:
Patch to resolve problem
Filename:
MIME Type:
Creator:
Enzo
Created:
2008-08-01 14:56:57 UTC
Size:
1.19 KB
patch
obsolete
>--- linkstate.c.orig 2008-07-31 14:46:09.000000000 +0200 >+++ linkstate.c 2008-07-31 14:59:18.000000000 +0200 >@@ -60,6 +60,22 @@ > #include <linux/ethtool.h> > #include <net/if.h> > >+/* Begin extract from mii.h of net-tools */ >+ >+/* This data structure is used for all the MII ioctl's */ >+struct mii_data { >+ __u16 phy_id; >+ __u16 reg_num; >+ __u16 val_in; >+ __u16 val_out; >+}; >+ >+/* Basic Mode Status Register */ >+#define MII_BMSR 0x01 >+#define MII_BMSR_LINK_VALID 0x0004 >+ >+/* End extract from mii.h */ >+ > static int get_link_state(int fd, struct ifreq *ifr); > > /** >@@ -164,7 +180,20 @@ > return edata.data; > } else if (errno == EOPNOTSUPP) { > /* oops, pretend the link's there */ >- return 1; >+ //return 1; >+ // Operation not supported try with MII >+ struct mii_data *mii = (struct mii_data *)&ifr->ifr_data; >+ >+ memset(mii,0,sizeof(struct mii_data)); >+ >+ mii->reg_num = MII_BMSR; >+ err = ioctl(fd, SIOCGMIIREG, ifr); >+ if(err == 0) { >+ return (mii->val_out & MII_BMSR_LINK_VALID ? 1 : 0); >+ } else if (errno == EOPNOTSUPP) { >+ // No support for MII stop to check and assume all ok >+ return 1; >+ } > } > > /* Any other errors: no link? */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 457567
: 313206 |
315634