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]
Message-ID: <4AE07C90.2080901@gmail.com>
Date:	Thu, 22 Oct 2009 08:38:56 -0700
From:	"Eugene T. Bordenkircher" <eugebo@...il.com>
To:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
CC:	linux.nics@...el.com
Subject: Problem with MDI/MDI-X auto-switching in E100 driver

Around line 1466 of e100.c (git master) is the following code to turn on 
MDI/MDI-X auto-switching if it is not already.

         } else if ((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
             (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) &&
                  !(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) {
                  /* enable/disable MDI/MDI-X auto-switching. */
                  mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
                                  nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
         }

This code is broken in the case where an 8255x is used without magnetics.  Per 
Intel Application note 435, without the magnetics, auto switching is not 
possible.  The only way to turn this off without driver modifications is to set 
the force_media flag via ethtool, which has the side effect of turning off all 
auto-negotiation. This happens to be the case on a product I am currently 
working on.

It seems a better solution to this is to trust the eeprom's configuration 
rather than override it.  Am I missing something or does this sound reasonable?

Eugene T. Bordenkircher
--
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