Commit f6331aa0 authored by Sebastian Ott's avatar Sebastian Ott Committed by Stefan Bader

s390/cio: update chpid descriptor after resource accessibility event

BugLink: http://bugs.launchpad.net/bugs/1768474

commit af2e460a upstream.

Channel path descriptors have been seen as something stable (as
long as the chpid is configured). Recent tests have shown that the
descriptor can also be altered when the link state of a channel path
changes. Thus it is necessary to update the descriptor during
handling of resource accessibility events.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarSebastian Ott <sebott@linux.ibm.com>
Reviewed-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent d39fbbba
...@@ -451,6 +451,7 @@ static void chsc_process_sei_link_incident(struct chsc_sei_nt0_area *sei_area) ...@@ -451,6 +451,7 @@ static void chsc_process_sei_link_incident(struct chsc_sei_nt0_area *sei_area)
static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area) static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area)
{ {
struct channel_path *chp;
struct chp_link link; struct chp_link link;
struct chp_id chpid; struct chp_id chpid;
int status; int status;
...@@ -463,10 +464,17 @@ static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area) ...@@ -463,10 +464,17 @@ static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area)
chpid.id = sei_area->rsid; chpid.id = sei_area->rsid;
/* allocate a new channel path structure, if needed */ /* allocate a new channel path structure, if needed */
status = chp_get_status(chpid); status = chp_get_status(chpid);
if (status < 0) if (!status)
chp_new(chpid);
else if (!status)
return; return;
if (status < 0) {
chp_new(chpid);
} else {
chp = chpid_to_chp(chpid);
mutex_lock(&chp->lock);
chp_update_desc(chp);
mutex_unlock(&chp->lock);
}
memset(&link, 0, sizeof(struct chp_link)); memset(&link, 0, sizeof(struct chp_link));
link.chpid = chpid; link.chpid = chpid;
if ((sei_area->vf & 0xc0) != 0) { if ((sei_area->vf & 0xc0) != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment