Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173259
b: refs/heads/master
c: 22825ab
h: refs/heads/master
i:
  173257: d06d725
  173255: 835349c
v: v3
  • Loading branch information
Stefan Weinhuber authored and Martin Schwidefsky committed Dec 7, 2009
1 parent 60b96f0 commit 310e18f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c1e3e79430615d0472dbf9f8fed89c571e66423
refs/heads/master: 22825ab7693fd29769518a0d25ba43c01a50092a
19 changes: 16 additions & 3 deletions trunk/drivers/s390/block/dasd_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ dasd_diag_erp(struct dasd_device *device)

mdsk_term_io(device);
rc = mdsk_init_io(device, device->block->bp_block, 0, NULL);
if (rc == 4) {
if (!(device->features & DASD_FEATURE_READONLY)) {
dev_warn(&device->cdev->dev,
"The access mode of a DIAG device changed"
" to read-only");
device->features |= DASD_FEATURE_READONLY;
}
rc = 0;
}
if (rc)
dev_warn(&device->cdev->dev, "DIAG ERP failed with "
"rc=%d\n", rc);
Expand Down Expand Up @@ -433,16 +442,20 @@ dasd_diag_check_device(struct dasd_device *device)
for (sb = 512; sb < bsize; sb = sb << 1)
block->s2b_shift++;
rc = mdsk_init_io(device, block->bp_block, 0, NULL);
if (rc) {
if (rc && (rc != 4)) {
dev_warn(&device->cdev->dev, "DIAG initialization "
"failed with rc=%d\n", rc);
rc = -EIO;
} else {
if (rc == 4)
device->features |= DASD_FEATURE_READONLY;
dev_info(&device->cdev->dev,
"New DASD with %ld byte/block, total size %ld KB\n",
"New DASD with %ld byte/block, total size %ld KB%s\n",
(unsigned long) block->bp_block,
(unsigned long) (block->blocks <<
block->s2b_shift) >> 1);
block->s2b_shift) >> 1,
(rc == 4) ? ", read-only device" : "");
rc = 0;
}
out_label:
free_page((long) label);
Expand Down

0 comments on commit 310e18f

Please sign in to comment.