Skip to content

Commit

Permalink
s390/qeth: don't let HW override the configured port role
Browse files Browse the repository at this point in the history
[ Upstream commit a04f0ec ]

The only time that our Bridgeport role should change is when we change
the configuration ourselves. In which case we also adjust our internal
state tracking, no need to do it again when we receive the corresponding
event.

Removing the locked section helps a subsequent patch that needs to flush
the workqueue while under sbp_lock.

It would be nice to raise a warning here in case HW does weird things
after all, but this could end up generating false-positives when we
change the configuration ourselves.

Suggested-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
julianwiedmann authored and gregkh committed Oct 29, 2020
1 parent b0a2047 commit 52e318d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/s390/net/qeth_l2_main.c
Expand Up @@ -1120,12 +1120,6 @@ static void qeth_bridge_state_change_worker(struct work_struct *work)
NULL
};

/* Role should not change by itself, but if it did, */
/* information from the hardware is authoritative. */
mutex_lock(&data->card->sbp_lock);
data->card->options.sbp.role = entry->role;
mutex_unlock(&data->card->sbp_lock);

snprintf(env_locrem, sizeof(env_locrem), "BRIDGEPORT=statechange");
snprintf(env_role, sizeof(env_role), "ROLE=%s",
(entry->role == QETH_SBP_ROLE_NONE) ? "none" :
Expand Down

0 comments on commit 52e318d

Please sign in to comment.