Commit 4e16d6ebd6 (r6040: define more MCR0
register bits) added #define values for MCR0 register bits and converted
uses of hardcoded magic values to uses of these defines.
However, one of the conversions looks suspicious:
#define MCR0 0x00 /* Control register 0 */
+#define MCR0_RCVEN 0x0002 /* Receive enable */
+#define MCR0_XMTEN 0x1000 /* Transmission enable */
/* Init RDC private data */
- lp->mcr0 = 0x1002;
+ lp->mcr0 = MCR0_XMTEN | MCR0;
I believe what was meant here was MCR0_XMTEN | MCR0_RCVEN, which makes
sense and matches the original values.
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
checkpatch.pl complained about the line exceding 80 columns, and the
comment was actually on the same line as the code, fix that.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
instead of __attribute__((__aligned(size)__))
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bit 1 is the reset bit of the MAC status machine register, define and
use it.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
MAC_RST bit is already defined, use it instead of 0x1 where applicable.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Define more MCR0-register bits and use them in place of the bits values.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Since the conversion to phylib (3831861b: r6040: implement phylib) some
PHY-related variables and definitions are now useless, remove them.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
We should use an unique MDIO bus name which does not clash with anything
else in the system like the Fixed MDIO bus. The bus is now named:
r6040-<card number> which is unique in the system.
Reported-by: Vladimir Kolpakov <vova.kolpakov@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
We are checking whether the MCR0_HASHEN bit is set using a logical and
instead of bitwise and, fix that.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe reported to me that right after a bring up of a r6040 interface
the ethtool output had no consistent output with respect to link duplex
and speed. Fix this by adding a missing phy_start call in r6040_up and
conversely a phy_stop call in r6040_down to properly initialize phy states.
Reported-by: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
MII Kconfig option is apart of the core networking drivers and
by default NET_CORE is enabled so drivers selecting MII will
have MII enabled as well. It was found using the randconfig
option during testing, MII would be selected but NET_CORE
could be disabled. This caused a dependency error.
Resolved the dependency by selecting NET_CORE when MII is
selected.
Reported-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based on finds for Stephen Rothwell, where current defconfig's
enable a ethernet driver and it is not compiled due to the newly
added NET_VENDOR_* component of Kconfig.
This patch enables all the "new" Kconfig options so that current
defconfig's will continue to compile the expected drivers. In
addition, by enabling all the new Kconfig options does not add
any un-expected options.
CC: Stephen Rothwll <sfc@canb.auug.org.au>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Move the RDC driver into drivers/net/ethernet/rdc/ and make the
necessary Kconfig and Makefile changes.
CC: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>