aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/chp.c')
-rw-r--r--drivers/s390/cio/chp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index 297cdceb0ca4..297f1653b52b 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -496,6 +496,26 @@ void chp_process_crw(int id, int status)
496 chsc_chp_offline(chpid); 496 chsc_chp_offline(chpid);
497} 497}
498 498
499int chp_ssd_get_mask(struct chsc_ssd_info *ssd, struct res_acc_data *data)
500{
501 int i;
502 int mask;
503
504 for (i = 0; i < 8; i++) {
505 mask = 0x80 >> i;
506 if (!(ssd->path_mask & mask))
507 continue;
508 if (!chp_id_is_equal(&ssd->chpid[i], &data->chpid))
509 continue;
510 if ((ssd->fla_valid_mask & mask) &&
511 ((ssd->fla[i] & data->fla_mask) != data->fla))
512 continue;
513 return mask;
514 }
515 return 0;
516}
517EXPORT_SYMBOL_GPL(chp_ssd_get_mask);
518
499static inline int info_bit_num(struct chp_id id) 519static inline int info_bit_num(struct chp_id id)
500{ 520{
501 return id.id + id.cssid * (__MAX_CHPID + 1); 521 return id.id + id.cssid * (__MAX_CHPID + 1);