qeth: serialize sysfs-triggered device configurations
This patch serializes device removal and other sysfs-triggered configurations by moving removal of sysfs-attributes to the beginning of the remove functions. And it serializes online/offline setting and discipline-switching (causing reestablishing of the net_device) by making use of a new discipline mutex. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
75e0de1363
commit
9dc48ccc68
@@ -411,7 +411,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
|
||||
if (!card)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&card->conf_mutex);
|
||||
mutex_lock(&card->discipline_mutex);
|
||||
if (card->state != CARD_STATE_DOWN) {
|
||||
rc = -EPERM;
|
||||
goto out;
|
||||
@@ -446,7 +446,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
|
||||
|
||||
rc = card->discipline.ccwgdriver->probe(card->gdev);
|
||||
out:
|
||||
mutex_unlock(&card->conf_mutex);
|
||||
mutex_unlock(&card->discipline_mutex);
|
||||
return rc ? rc : count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user