diff options
| -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, | |||
| 592 | int dasd_alias_add_device(struct dasd_device *device) | 592 | int dasd_alias_add_device(struct dasd_device *device) |
| 593 | { | 593 | { |
| 594 | struct dasd_eckd_private *private = device->private; | 594 | struct dasd_eckd_private *private = device->private; |
| 595 | struct alias_lcu *lcu; | 595 | __u8 uaddr = private->uid.real_unit_addr; |
| 596 | struct alias_lcu *lcu = private->lcu; | ||
| 596 | unsigned long flags; | 597 | unsigned long flags; |
| 597 | int rc; | 598 | int rc; |
| 598 | 599 | ||
| 599 | lcu = private->lcu; | ||
| 600 | rc = 0; | 600 | rc = 0; |
| 601 | spin_lock_irqsave(&lcu->lock, flags); | 601 | spin_lock_irqsave(&lcu->lock, flags); |
| 602 | /* | ||
| 603 | * Check if device and lcu type differ. If so, the uac data may be | ||
| 604 | * outdated and needs to be updated. | ||
| 605 | */ | ||
| 606 | if (private->uid.type != lcu->uac->unit[uaddr].ua_type) { | ||
| 607 | lcu->flags |= UPDATE_PENDING; | ||
| 608 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", | ||
| 609 | "uid type mismatch - trigger rescan"); | ||
| 610 | } | ||
| 602 | if (!(lcu->flags & UPDATE_PENDING)) { | 611 | if (!(lcu->flags & UPDATE_PENDING)) { |
| 603 | rc = _add_device_to_lcu(lcu, device, device); | 612 | rc = _add_device_to_lcu(lcu, device, device); |
| 604 | if (rc) | 613 | if (rc) |
