]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: net: set carrier state at ifup
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 17 Dec 2010 21:22:33 +0000 (22:22 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 19 Dec 2010 14:27:02 +0000 (15:27 +0100)
commitaa3a189ba9918cd1e5d35b40194c563ee51802bc
treec8aa70b7d7aaf3984a7c1b8579bd7f2ae29ec39d
parente7fa3034f956ab501fa4a08462acab3b3be0d6a1
firewire: net: set carrier state at ifup

At ifup, carrier status would be shown on even if it actually was off.
Also add an include for ethtool_ops rather than to rely on the one from
netdevice.h.

Note, we can alas not use fwnet_device_mutex to serialize access to
dev->peer_count (as I originally wanted).  This would cause a lock
inversion:
  - fwnet_probe | takes fwnet_device_mutex
      + register_netdev | takes rtnl_mutex
  - devinet_ioctl | takes rtnl_mutex
      + fwnet_open | ...must not take fwnet_device_mutex

Hence use the dev->lock spinlock for serialization.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/net.c