Skip to content

Commit 5db8440

Browse files
stefan-haberlandMartin Schwidefsky
authored and
Martin Schwidefsky
committed
s390/dasd: add support for control unit initiated reconfiguration
Add support for Control Unit Initiated Reconfiguration (CUIR) to Linux, a storage server interface to reconcile concurrent hardware changes between storage and host. Reviewed-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 362ce84 commit 5db8440

File tree

5 files changed

+472
-5
lines changed

5 files changed

+472
-5
lines changed

drivers/s390/block/dasd.c

+8
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,14 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
16601660
device->discipline->check_for_device_change(device, cqr, irb);
16611661
dasd_put_device(device);
16621662
}
1663+
1664+
/* check for for attention message */
1665+
if (scsw_dstat(&irb->scsw) & DEV_STAT_ATTENTION) {
1666+
device = dasd_device_from_cdev_locked(cdev);
1667+
device->discipline->check_attention(device, irb->esw.esw1.lpum);
1668+
dasd_put_device(device);
1669+
}
1670+
16631671
if (!cqr)
16641672
return;
16651673

drivers/s390/block/dasd_devmap.c

+24
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,29 @@ static ssize_t dasd_reservation_state_store(struct device *dev,
14321432
static DEVICE_ATTR(last_known_reservation_state, 0644,
14331433
dasd_reservation_state_show, dasd_reservation_state_store);
14341434

1435+
static ssize_t dasd_pm_show(struct device *dev,
1436+
struct device_attribute *attr, char *buf)
1437+
{
1438+
struct dasd_device *device;
1439+
u8 opm, nppm, cablepm, cuirpm, hpfpm;
1440+
1441+
device = dasd_device_from_cdev(to_ccwdev(dev));
1442+
if (IS_ERR(device))
1443+
return sprintf(buf, "0\n");
1444+
1445+
opm = device->path_data.opm;
1446+
nppm = device->path_data.npm;
1447+
cablepm = device->path_data.cablepm;
1448+
cuirpm = device->path_data.cuirpm;
1449+
hpfpm = device->path_data.hpfpm;
1450+
dasd_put_device(device);
1451+
1452+
return sprintf(buf, "%02x %02x %02x %02x %02x\n", opm, nppm,
1453+
cablepm, cuirpm, hpfpm);
1454+
}
1455+
1456+
static DEVICE_ATTR(path_masks, 0444, dasd_pm_show, NULL);
1457+
14351458
static struct attribute * dasd_attrs[] = {
14361459
&dev_attr_readonly.attr,
14371460
&dev_attr_discipline.attr,
@@ -1450,6 +1473,7 @@ static struct attribute * dasd_attrs[] = {
14501473
&dev_attr_reservation_policy.attr,
14511474
&dev_attr_last_known_reservation_state.attr,
14521475
&dev_attr_safe_offline.attr,
1476+
&dev_attr_path_masks.attr,
14531477
NULL,
14541478
};
14551479

0 commit comments

Comments
 (0)