pasemi_mac: ethtool get settings fix
authorValentine Barshak <[email protected]>
Mon, 5 Oct 2009 03:27:56 +0000 (03:27 +0000)
committerDavid S. Miller <[email protected]>
Wed, 7 Oct 2009 10:37:43 +0000 (03:37 -0700)
commit49682864b0270a0578b8321ed2686dc471ec37f1
tree3e1ab028bf5954bb795395a993808809000ba45d
parent6e43650cee644b5d7957ecd50f1e41ff71f87734
pasemi_mac: ethtool get settings fix

Not all pasemi mac interfaces can have a phy attached.
For example, XAUI has no phy and phydev is NULL for it.
In this case ethtool get settings causes kernel crash.
Fix it by returning -EOPNOTSUPP if there's no PHY attached.

Signed-off-by: Valentine Barshak <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/pasemi_mac_ethtool.c