diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/s390/cio/device_ops.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/s390/cio/device_ops.c')
-rw-r--r-- | drivers/s390/cio/device_ops.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 6da84543dfe9..f98698d5735e 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -418,12 +418,9 @@ int ccw_device_resume(struct ccw_device *cdev) | |||
418 | int | 418 | int |
419 | ccw_device_call_handler(struct ccw_device *cdev) | 419 | ccw_device_call_handler(struct ccw_device *cdev) |
420 | { | 420 | { |
421 | struct subchannel *sch; | ||
422 | unsigned int stctl; | 421 | unsigned int stctl; |
423 | int ending_status; | 422 | int ending_status; |
424 | 423 | ||
425 | sch = to_subchannel(cdev->dev.parent); | ||
426 | |||
427 | /* | 424 | /* |
428 | * we allow for the device action handler if . | 425 | * we allow for the device action handler if . |
429 | * - we received ending status | 426 | * - we received ending status |
@@ -687,6 +684,46 @@ int ccw_device_tm_start_timeout(struct ccw_device *cdev, struct tcw *tcw, | |||
687 | EXPORT_SYMBOL(ccw_device_tm_start_timeout); | 684 | EXPORT_SYMBOL(ccw_device_tm_start_timeout); |
688 | 685 | ||
689 | /** | 686 | /** |
687 | * ccw_device_get_mdc - accumulate max data count | ||
688 | * @cdev: ccw device for which the max data count is accumulated | ||
689 | * @mask: mask of paths to use | ||
690 | * | ||
691 | * Return the number of 64K-bytes blocks all paths at least support | ||
692 | * for a transport command. Return values <= 0 indicate failures. | ||
693 | */ | ||
694 | int ccw_device_get_mdc(struct ccw_device *cdev, u8 mask) | ||
695 | { | ||
696 | struct subchannel *sch = to_subchannel(cdev->dev.parent); | ||
697 | struct channel_path_desc_fmt1 desc; | ||
698 | struct chp_id chpid; | ||
699 | int mdc = 0, ret, i; | ||
700 | |||
701 | /* Adjust requested path mask to excluded varied off paths. */ | ||
702 | if (mask) | ||
703 | mask &= sch->lpm; | ||
704 | else | ||
705 | mask = sch->lpm; | ||
706 | |||
707 | chp_id_init(&chpid); | ||
708 | for (i = 0; i < 8; i++) { | ||
709 | if (!(mask & (0x80 >> i))) | ||
710 | continue; | ||
711 | chpid.id = sch->schib.pmcw.chpid[i]; | ||
712 | ret = chsc_determine_fmt1_channel_path_desc(chpid, &desc); | ||
713 | if (ret) | ||
714 | return ret; | ||
715 | if (!desc.f) | ||
716 | return 0; | ||
717 | if (!desc.r) | ||
718 | mdc = 1; | ||
719 | mdc = mdc ? min(mdc, (int)desc.mdc) : desc.mdc; | ||
720 | } | ||
721 | |||
722 | return mdc; | ||
723 | } | ||
724 | EXPORT_SYMBOL(ccw_device_get_mdc); | ||
725 | |||
726 | /** | ||
690 | * ccw_device_tm_intrg - perform interrogate function | 727 | * ccw_device_tm_intrg - perform interrogate function |
691 | * @cdev: ccw device on which to perform the interrogate function | 728 | * @cdev: ccw device on which to perform the interrogate function |
692 | * | 729 | * |