Launchpad has imported 10 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=491358.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2009-03-20T15:44:24+00:00 Bill wrote:

Description of problem:

[root@apone ~]# mii-tool eth0
SIOCGMIIREG on eth0 failed: Input/output error
eth0: negotiated 100baseTx-FD, link ok

It reports the 'negotiated 100base...' line no matter whether or not
something is connected. This breaks the initscripts link check.

I suppose it could also be a kernel issue. Driver is:
[root@apone ~]# ethtool -i eth0
driver: e1000e
version: 0.3.3.3-k6

Also occurs on rawhide.

Version-Release number of selected component (if applicable):

net-tools-1.60-91.fc10.x86_64
kernel-2.6.28-4.fc10.x86_64

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/0

------------------------------------------------------------------------
On 2009-07-02T18:14:09+00:00 Andy wrote:


when mii-tool checks link status, this code is called (from mii-tool.c):

    200 int show_basic_mii(int sock, int phy_id)
    201 {
    202     char buf[100];
    203     int i, mii_val[32];
    204     int bmcr, bmsr, advert, lkpar;
    205
    206     /* Some bits in the BMSR are latched, but we can't rely on being
    207        the only reader, so only the current values are meaningful */
    208     mdio_read(sock, MII_BMSR);
    209     for (i = 0; i < ((verbose > 1) ? 32 : 8); i++)
    210         mii_val[i] = mdio_read(sock, i);
    211
    212     if (mii_val[MII_BMCR] == 0xffff) {
    213         fprintf(stderr, "  No MII transceiver present!.\n");
    214         return -1;
    215     }

Since 'verbose' is false, we will call the SIOCGMIIREG ioctl with the
commands MII_BMSR and then the commands 0-7 will be called.  Those
commands are:


#define MII_BMCR            0x00        /* Basic mode control register */
#define MII_BMSR            0x01        /* Basic mode status register  */
#define MII_PHYSID1         0x02        /* PHYS ID 1                   */
#define MII_PHYSID2         0x03        /* PHYS ID 2                   */
#define MII_ADVERTISE       0x04        /* Advertisement control reg   */
#define MII_LPA             0x05        /* Link partner ability reg    */
#define MII_EXPANSION       0x06        /* Expansion register          */
#define MII_CTRL1000        0x09        /* 1000BASE-T control          */

Where is 0x7????

If we look at the sources for e1000e, we can see why -EIO is returned.
>From drivers/net/e1000e/netdev.c (e1000_mii_ioctl) in net-next-2.6
upstream tree:

   4347         case SIOCGMIIREG:
   4348                 if (!capable(CAP_NET_ADMIN))
   4349                         return -EPERM;
   4350                 switch (data->reg_num & 0x1F) {
   4351                 case MII_BMCR:
   4352                         data->val_out = adapter->phy_regs.bmcr;
   4353                         break;
   4354                 case MII_BMSR:
   4355                         data->val_out = adapter->phy_regs.bmsr;
   4356                         break;
   4357                 case MII_PHYSID1:
   4358                         data->val_out = (adapter->hw.phy.id >> 16);
   4359                         break;
   4360                 case MII_PHYSID2:
   4361                         data->val_out = (adapter->hw.phy.id & 0xFFFF);
   4362                         break;
   4363                 case MII_ADVERTISE:
   4364                         data->val_out = adapter->phy_regs.advertise;
   4365                         break;
   4366                 case MII_LPA:
   4367                         data->val_out = adapter->phy_regs.lpa;
   4368                         break;
   4369                 case MII_EXPANSION:
   4370                         data->val_out = adapter->phy_regs.expansion;
   4371                         break;
   4372                 case MII_CTRL1000:
   4373                         data->val_out = adapter->phy_regs.ctrl1000;
   4374                         break;
   4375                 case MII_STAT1000:
   4376                         data->val_out = adapter->phy_regs.stat1000;
   4377                         break;
   4378                 case MII_ESTATUS:
   4379                         data->val_out = adapter->phy_regs.estatus;
   4380                         break;
   4381                 default:
   4382                         return -EIO;
   4383                 }
   4384                 break;

The killer is 0x7 -- it seems it should not be checked by mii-tool.

My guess is that this would fail on multiple devices.  Have you tried it
with any other interfaces?

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/1

------------------------------------------------------------------------
On 2009-07-02T18:17:42+00:00 Bill wrote:

The only other wired device I have access to ATM is e100 - it doesn't
throw an error.

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/2

------------------------------------------------------------------------
On 2009-07-02T18:34:12+00:00 Andy wrote:

Interesting.  Is mii-tool always called in initscripts or only when
ethtool fails.

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/3

------------------------------------------------------------------------
On 2009-07-02T19:01:00+00:00 Bill wrote:

Always, at least until I build
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e
for rawhide.

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/4

------------------------------------------------------------------------
On 2009-10-30T16:08:55+00:00 Jiri wrote:

Created attachment 366821
mii-tool patch

mii-tool will be checking only generic MII registers defined in <linux/mii.h>
i.e.
#define MII_BMCR            0x00        /* Basic mode control register */
#define MII_BMSR            0x01        /* Basic mode status register  */
#define MII_PHYSID1         0x02        /* PHYS ID 1                   */
#define MII_PHYSID2         0x03        /* PHYS ID 2                   */
#define MII_ADVERTISE       0x04        /* Advertisement control reg   */
#define MII_LPA             0x05        /* Link partner ability reg    */
#define MII_EXPANSION       0x06        /* Expansion register          */
#define MII_CTRL1000        0x09        /* 1000BASE-T control          */
#define MII_STAT1000        0x0a        /* 1000BASE-T status           */
#define MII_ESTATUS         0x0f        /* Extended Status */
#define MII_DCOUNTER        0x12        /* Disconnect counter          */
#define MII_FCSCOUNTER      0x13        /* False carrier counter       */
#define MII_NWAYTEST        0x14        /* N-way auto-neg test reg     */
#define MII_RERRCOUNTER     0x15        /* Receive error counter       */
#define MII_SREVISION       0x16        /* Silicon revision            */
#define MII_RESV1           0x17        /* Reserved...                 */
#define MII_LBRERROR        0x18        /* Lpback, rx, bypass error    */
#define MII_PHYADDR         0x19        /* PHY address                 */
#define MII_RESV2           0x1a        /* Reserved...                 */
#define MII_TPISTATUS       0x1b        /* TPI status for 10mbps       */
#define MII_NCONFIG         0x1c        /* Network interface config    */

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/5

------------------------------------------------------------------------
On 2009-11-06T00:08:27+00:00 Fedora wrote:

net-tools-1.60-95.fc11 has been pushed to the Fedora 11 testing repository.  If 
problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update net-tools'.  You can provide 
feedback for this update here: 
http://admin.fedoraproject.org/updates/F11/FEDORA-2009-11010

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/6

------------------------------------------------------------------------
On 2009-11-06T09:55:06+00:00 Fedora wrote:

net-tools-1.60-97.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/net-tools-1.60-97.fc12

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/7

------------------------------------------------------------------------
On 2009-11-11T14:59:03+00:00 Fedora wrote:

net-tools-1.60-98.fc12 has been pushed to the Fedora 12 testing repository.  If 
problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update net-tools'.  You can provide 
feedback for this update here: 
http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11140

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/8

------------------------------------------------------------------------
On 2009-11-12T00:59:56+00:00 Fedora wrote:

net-tools-1.60-95.fc11 has been pushed to the Fedora 11 stable
repository.  If problems still persist, please make note of it in this
bug report.

Reply at: https://bugs.launchpad.net/ubuntu/+source/net-
tools/+bug/611715/comments/9


** Changed in: net-tools (Fedora)
       Status: Unknown => Fix Released

** Changed in: net-tools (Fedora)
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to net-tools in Ubuntu.
https://bugs.launchpad.net/bugs/611715

Title:
  mii-tool not working with e1000e nic driver

Status in net-tools package in Ubuntu:
  Confirmed
Status in net-tools package in Fedora:
  Fix Released

Bug description:
  Binary package hint: net-tools

  On newer kernels the e1000 nic driver was replaced by the e1000e
  driver.

  mii-tool doesn't work with that new driver:

  SIOCGMIIPHY on 'eth1' failed: Resource temporarily unavailable
  SIOCGMIIREG on eth2 failed: Input/output error
  SIOCGMIIREG on eth2 failed: Input/output error
    No MII transceiver present!.
  SIOCGMIIREG on eth3 failed: Input/output error
  SIOCGMIIREG on eth3 failed: Input/output error
    No MII transceiver present!.
  SIOCGMIIREG on eth4 failed: Input/output error
  SIOCGMIIREG on eth4 failed: Input/output error
    No MII transceiver present!.
  SIOCGMIIREG on eth5 failed: Input/output error
  SIOCGMIIREG on eth5 failed: Input/output error
    No MII transceiver present!.

  hardy 8.04.4 LTS (net-tools 1.60-19ubuntu1) uses the e1000 driver and
  works fine. The latest lucid release uses the e1000e (net-tools
  1.60-23ubuntu2) driver and it doesn' work.

  Is mii-tool descontinued?

  
  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-tools/+bug/611715/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to