drivers: net: cpsw-phy-sel: add dev_warn() for unsupported PHY mode
authorDavid Rivshin <drivshin@allworx.com>
Sat, 13 Feb 2016 00:45:36 +0000 (19:45 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2016 15:50:15 +0000 (10:50 -0500)
commitd148bbd37a52b030b131ac5408c0f8293325ca0b
treecd60a5a2d833d92b3027ce55e2ee03c563ab4289
parentcd772de358d6e001d308292c542f7908511287a4
drivers: net: cpsw-phy-sel: add dev_warn() for unsupported PHY mode

The cpsw-phy-sel driver supports only MII, RMII, and RGMII PHY modes,
and silently handled any other values as if MII was specified. In a
case where the PHY mode was incorrectly specified, or a bug elsewhere,
there would be no indication of a problem. If MII was the correct mode,
then this will go unnoticed, otherwise the symptom will be a failure
to transmit/receive data over the RMII/RGMII link.

Add a dev_warn() to make this condition obvious and provide a
breadcrumb to follow.

Cc: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw-phy-sel.c