Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
fca894ed b2fa47e6

+34 -1
+34 -1
drivers/s390/cio/chsc.c
··· 326 326 s390_process_res_acc(&link); 327 327 } 328 328 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 + 329 359 struct chp_config_data { 330 360 u8 map[32]; 331 361 u8 op; ··· 406 376 case 1: /* link incident*/ 407 377 chsc_process_sei_link_incident(sei_area); 408 378 break; 409 - case 2: /* i/o resource accessibiliy */ 379 + case 2: /* i/o resource accessibility */ 410 380 chsc_process_sei_res_acc(sei_area); 381 + break; 382 + case 7: /* channel-path-availability information */ 383 + chsc_process_sei_chp_avail(sei_area); 411 384 break; 412 385 case 8: /* channel-path-configuration notification */ 413 386 chsc_process_sei_chp_config(sei_area);