tg3: Restrict phy ioctl access
authorMatt Carlson <mcarlson@broadcom.com>
Tue, 15 Feb 2011 12:51:10 +0000 (12:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Feb 2011 22:11:15 +0000 (14:11 -0800)
commited199facd070f8e551dc16a2ae1baa01d8d28ed4
tree79b67ec787dadc8fc88b1c8ec9273979b189decd
parent0d672e9f8ac320c6d1ea9103db6df7f99ea20361
tg3: Restrict phy ioctl access

If management firmware is present and the device is down, the firmware
will assume control of the phy.  If a phy access were allowed from the
host, it will collide with firmware phy accesses, resulting in
unpredictable behavior.  This patch fixes the problem by disallowing phy
accesses during the problematic condition.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c