Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53abbf7e authored by Jens Osterkamp's avatar Jens Osterkamp Committed by Jeff Garzik
Browse files

[PATCH] net: fix spider_net media detection



This patch makes the driver work with any BladeCenter
network switch, it used to work only with certain
models.

Please apply.

Signed-off-by: default avatarArnd Bergmann <arndb@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 8b512927
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1817,6 +1817,10 @@ spider_net_setup_phy(struct spider_net_card *card)
	/* LEDs active in both modes, autosense prio = fiber */
	/* LEDs active in both modes, autosense prio = fiber */
	spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0x945f);
	spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0x945f);


	/* switch off fibre autoneg */
	spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0xfc01);
	spider_net_write_phy(card->netdev, 1, 0x0b, 0x0004);

	phy->def->ops->read_link(phy);
	phy->def->ops->read_link(phy);
	pr_info("Found %s with %i Mbps, %s-duplex.\n", phy->def->name,
	pr_info("Found %s with %i Mbps, %s-duplex.\n", phy->def->name,
		phy->speed, phy->duplex==1 ? "Full" : "Half");
		phy->speed, phy->duplex==1 ? "Full" : "Half");