Skip to content

Commit fca894e

Browse files
Sebastian OttMartin Schwidefsky
authored andcommitted
[S390] chsc: process channel-path-availability information
Update affected channel path descriptors when receiving channel path availability information. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent b2fa47e commit fca894e

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

‎drivers/s390/cio/chsc.c‎

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,36 @@ static void chsc_process_sei_res_acc(struct chsc_sei_area *sei_area)
326326
s390_process_res_acc(&link);
327327
}
328328

329+
static void chsc_process_sei_chp_avail(struct chsc_sei_area *sei_area)
330+
{
331+
struct channel_path *chp;
332+
struct chp_id chpid;
333+
u8 *data;
334+
int num;
335+
336+
CIO_CRW_EVENT(4, "chsc: channel path availability information\n");
337+
if (sei_area->rs != 0)
338+
return;
339+
data = sei_area->ccdf;
340+
chp_id_init(&chpid);
341+
for (num = 0; num <= __MAX_CHPID; num++) {
342+
if (!chp_test_bit(data, num))
343+
continue;
344+
chpid.id = num;
345+
346+
CIO_CRW_EVENT(4, "Update information for channel path "
347+
"%x.%02x\n", chpid.cssid, chpid.id);
348+
chp = chpid_to_chp(chpid);
349+
if (!chp) {
350+
chp_new(chpid);
351+
continue;
352+
}
353+
mutex_lock(&chp->lock);
354+
chsc_determine_base_channel_path_desc(chpid, &chp->desc);
355+
mutex_unlock(&chp->lock);
356+
}
357+
}
358+
329359
struct chp_config_data {
330360
u8 map[32];
331361
u8 op;
@@ -376,9 +406,12 @@ static void chsc_process_sei(struct chsc_sei_area *sei_area)
376406
case 1: /* link incident*/
377407
chsc_process_sei_link_incident(sei_area);
378408
break;
379-
case 2: /* i/o resource accessibiliy */
409+
case 2: /* i/o resource accessibility */
380410
chsc_process_sei_res_acc(sei_area);
381411
break;
412+
case 7: /* channel-path-availability information */
413+
chsc_process_sei_chp_avail(sei_area);
414+
break;
382415
case 8: /* channel-path-configuration notification */
383416
chsc_process_sei_chp_config(sei_area);
384417
break;

0 commit comments

Comments
 (0)