diff options
Diffstat (limited to 'drivers/s390/cio/chp.c')
-rw-r--r-- | drivers/s390/cio/chp.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 50ad5fdd815d..21fabc6d5a9c 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -377,6 +377,26 @@ static void chp_release(struct device *dev) | |||
377 | } | 377 | } |
378 | 378 | ||
379 | /** | 379 | /** |
380 | * chp_update_desc - update channel-path description | ||
381 | * @chp - channel-path | ||
382 | * | ||
383 | * Update the channel-path description of the specified channel-path. | ||
384 | * Return zero on success, non-zero otherwise. | ||
385 | */ | ||
386 | int chp_update_desc(struct channel_path *chp) | ||
387 | { | ||
388 | int rc; | ||
389 | |||
390 | rc = chsc_determine_base_channel_path_desc(chp->chpid, &chp->desc); | ||
391 | if (rc) | ||
392 | return rc; | ||
393 | |||
394 | rc = chsc_determine_fmt1_channel_path_desc(chp->chpid, &chp->desc_fmt1); | ||
395 | |||
396 | return rc; | ||
397 | } | ||
398 | |||
399 | /** | ||
380 | * chp_new - register a new channel-path | 400 | * chp_new - register a new channel-path |
381 | * @chpid - channel-path ID | 401 | * @chpid - channel-path ID |
382 | * | 402 | * |
@@ -403,7 +423,7 @@ int chp_new(struct chp_id chpid) | |||
403 | mutex_init(&chp->lock); | 423 | mutex_init(&chp->lock); |
404 | 424 | ||
405 | /* Obtain channel path description and fill it in. */ | 425 | /* Obtain channel path description and fill it in. */ |
406 | ret = chsc_determine_base_channel_path_desc(chpid, &chp->desc); | 426 | ret = chp_update_desc(chp); |
407 | if (ret) | 427 | if (ret) |
408 | goto out_free; | 428 | goto out_free; |
409 | if ((chp->desc.flags & 0x80) == 0) { | 429 | if ((chp->desc.flags & 0x80) == 0) { |