aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_alias.c
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2012-09-11 11:19:12 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-17 03:58:21 -0400
commit03429f34c22cedc3300a81e13d5790450cc468af (patch)
tree9a30b2dcb2db6ce065d0b1abee5b62045d770532 /drivers/s390/block/dasd_alias.c
parent12d7b1078bb374fc3e2955b9f2815415a66157b6 (diff)
s390/dasd: fix read unit address configuration loop
Read unit address is done for all devices during online processing to read out LCU features. This is also done after disconnect/connect a LCU. Some older storage hardware does not provide the capability to read unit address configuration. This leads to a loop trying to read unit address configuration every 30 seconds. The device is still operational but logs are flooded with error messages. Fix the loop by recognizing a command reject saying that the suborder for ruac is not supported. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_alias.c')
-rw-r--r--drivers/s390/block/dasd_alias.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c
index 157defe5e069..6b556995bb33 100644
--- a/drivers/s390/block/dasd_alias.c
+++ b/drivers/s390/block/dasd_alias.c
@@ -384,6 +384,29 @@ static void _remove_device_from_lcu(struct alias_lcu *lcu,
384 group->next = NULL; 384 group->next = NULL;
385}; 385};
386 386
387static int
388suborder_not_supported(struct dasd_ccw_req *cqr)
389{
390 char *sense;
391 char reason;
392 char msg_format;
393 char msg_no;
394
395 sense = dasd_get_sense(&cqr->irb);
396 if (!sense)
397 return 0;
398
399 reason = sense[0];
400 msg_format = (sense[7] & 0xF0);
401 msg_no = (sense[7] & 0x0F);
402
403 /* command reject, Format 0 MSG 4 - invalid parameter */
404 if ((reason == 0x80) && (msg_format == 0x00) && (msg_no == 0x04))
405 return 1;
406
407 return 0;
408}
409
387static int read_unit_address_configuration(struct dasd_device *device, 410static int read_unit_address_configuration(struct dasd_device *device,
388 struct alias_lcu *lcu) 411 struct alias_lcu *lcu)
389{ 412{
@@ -435,6 +458,8 @@ static int read_unit_address_configuration(struct dasd_device *device,
435 458
436 do { 459 do {
437 rc = dasd_sleep_on(cqr); 460 rc = dasd_sleep_on(cqr);
461 if (rc && suborder_not_supported(cqr))
462 return -EOPNOTSUPP;
438 } while (rc && (cqr->retries > 0)); 463 } while (rc && (cqr->retries > 0));
439 if (rc) { 464 if (rc) {
440 spin_lock_irqsave(&lcu->lock, flags); 465 spin_lock_irqsave(&lcu->lock, flags);
@@ -521,7 +546,7 @@ static void lcu_update_work(struct work_struct *work)
521 * processing the data 546 * processing the data
522 */ 547 */
523 spin_lock_irqsave(&lcu->lock, flags); 548 spin_lock_irqsave(&lcu->lock, flags);
524 if (rc || (lcu->flags & NEED_UAC_UPDATE)) { 549 if ((rc && (rc != -EOPNOTSUPP)) || (lcu->flags & NEED_UAC_UPDATE)) {
525 DBF_DEV_EVENT(DBF_WARNING, device, "could not update" 550 DBF_DEV_EVENT(DBF_WARNING, device, "could not update"
526 " alias data in lcu (rc = %d), retry later", rc); 551 " alias data in lcu (rc = %d), retry later", rc);
527 schedule_delayed_work(&lcu->ruac_data.dwork, 30*HZ); 552 schedule_delayed_work(&lcu->ruac_data.dwork, 30*HZ);