diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-09 22:00:19 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-09 22:00:19 +0300 |
commit | cc1c8445eba5b78f5b719c47572473d7a7caa038 (patch) | |
tree | 3954bcaa641ee362bf06b7aa9197d30a90eb4ca3 /drivers/s390/block/dasd_alias.c | |
parent | ab460a2e72dabecfdabd45eb7e3ee2d73fc876d4 (diff) | |
parent | 75bc37fefc4471e718ba8e651aa74673d4e0a9eb (diff) | |
download | linux-cc1c8445eba5b78f5b719c47572473d7a7caa038.tar.xz |
Merge tag 'v4.17-rc4' into rpmsg-next
Pick up fixes from rproc-v4.17-1
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/s390/block/dasd_alias.c')
-rw-r--r-- | drivers/s390/block/dasd_alias.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index 62f5f04d8f61..5e963fe0e38d 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c @@ -592,13 +592,22 @@ static int _schedule_lcu_update(struct alias_lcu *lcu, int dasd_alias_add_device(struct dasd_device *device) { struct dasd_eckd_private *private = device->private; - struct alias_lcu *lcu; + __u8 uaddr = private->uid.real_unit_addr; + struct alias_lcu *lcu = private->lcu; unsigned long flags; int rc; - lcu = private->lcu; rc = 0; spin_lock_irqsave(&lcu->lock, flags); + /* + * Check if device and lcu type differ. If so, the uac data may be + * outdated and needs to be updated. + */ + if (private->uid.type != lcu->uac->unit[uaddr].ua_type) { + lcu->flags |= UPDATE_PENDING; + DBF_DEV_EVENT(DBF_WARNING, device, "%s", + "uid type mismatch - trigger rescan"); + } if (!(lcu->flags & UPDATE_PENDING)) { rc = _add_device_to_lcu(lcu, device, device); if (rc) |