Re: [PATCH] ks8851_ml ethernet network driver
From: Stephen Hemminger <hidden>
Date: 2009-09-17 04:07:04
From: Stephen Hemminger <hidden>
Date: 2009-09-17 04:07:04
On Wed, 16 Sep 2009 19:38:36 -0700 Greg KH [off-list ref] wrote:
+
+/**
+ * ks_net_open - open network device
+ * @netdev: The network device being opened.
+ *
+ * Called when the network device is marked active, such as a user executing
+ * 'ifconfig up' on the device.
+ */
+static int ks_net_open(struct net_device *netdev)
+{
+ struct ks_net *ks = netdev_priv(netdev);
+ int err;
+
+#define KS_INT_FLAGS (IRQF_DISABLED|IRQF_TRIGGER_LOW)
+ /* lock the card, even if we may not actually do anything
+ * else at the moment.
+ */
+ mutex_lock(&ks->lock);
+I don't understand the purpose of ks->lock mutex. What is it really protecting? open/close are already protected by rtnl_mutex, is it really only for the PHY?