Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea058544 authored by Stefan Haberland's avatar Stefan Haberland Committed by Martin Schwidefsky
Browse files

[S390] dasd: move dasd-diag kmsg to dasd



The DIAG discipline does not have a own driver name. It shows up as
dasd-eckd or dasd-fba. So messages for dasd-diag are moved to the
generic dasd part.

Signed-off-by: default avatarStefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent ffa8d2a3
Loading
Loading
Loading
Loading
+22 −20
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@
 *
 *
 */
 */


#define KMSG_COMPONENT "dasd-diag"
#define KMSG_COMPONENT "dasd"


#include <linux/stddef.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
@@ -146,16 +146,16 @@ dasd_diag_erp(struct dasd_device *device)
	rc = mdsk_init_io(device, device->block->bp_block, 0, NULL);
	rc = mdsk_init_io(device, device->block->bp_block, 0, NULL);
	if (rc == 4) {
	if (rc == 4) {
		if (!(device->features & DASD_FEATURE_READONLY)) {
		if (!(device->features & DASD_FEATURE_READONLY)) {
			dev_warn(&device->cdev->dev,
			pr_warning("%s: The access mode of a DIAG device "
				 "The access mode of a DIAG device changed"
				   "changed to read-only\n",
				 " to read-only");
				   dev_name(&device->cdev->dev));
			device->features |= DASD_FEATURE_READONLY;
			device->features |= DASD_FEATURE_READONLY;
		}
		}
		rc = 0;
		rc = 0;
	}
	}
	if (rc)
	if (rc)
		dev_warn(&device->cdev->dev, "DIAG ERP failed with "
		pr_warning("%s: DIAG ERP failed with "
			    "rc=%d\n", rc);
			    "rc=%d\n", dev_name(&device->cdev->dev), rc);
}
}


/* Start a given request at the device. Return zero on success, non-zero
/* Start a given request at the device. Return zero on success, non-zero
@@ -371,8 +371,9 @@ dasd_diag_check_device(struct dasd_device *device)
		private->pt_block = 2;
		private->pt_block = 2;
		break;
		break;
	default:
	default:
		dev_warn(&device->cdev->dev, "Device type %d is not supported "
		pr_warning("%s: Device type %d is not supported "
			    "in DIAG mode\n", private->rdc_data.vdev_class);
			   "in DIAG mode\n", dev_name(&device->cdev->dev),
			   private->rdc_data.vdev_class);
		rc = -EOPNOTSUPP;
		rc = -EOPNOTSUPP;
		goto out;
		goto out;
	}
	}
@@ -413,8 +414,8 @@ dasd_diag_check_device(struct dasd_device *device)
		private->iob.flaga = DASD_DIAG_FLAGA_DEFAULT;
		private->iob.flaga = DASD_DIAG_FLAGA_DEFAULT;
		rc = dia250(&private->iob, RW_BIO);
		rc = dia250(&private->iob, RW_BIO);
		if (rc == 3) {
		if (rc == 3) {
			dev_warn(&device->cdev->dev,
			pr_warning("%s: A 64-bit DIAG call failed\n",
				"A 64-bit DIAG call failed\n");
				   dev_name(&device->cdev->dev));
			rc = -EOPNOTSUPP;
			rc = -EOPNOTSUPP;
			goto out_label;
			goto out_label;
		}
		}
@@ -423,8 +424,9 @@ dasd_diag_check_device(struct dasd_device *device)
			break;
			break;
	}
	}
	if (bsize > PAGE_SIZE) {
	if (bsize > PAGE_SIZE) {
		dev_warn(&device->cdev->dev, "Accessing the DASD failed because"
		pr_warning("%s: Accessing the DASD failed because of an "
			 " of an incorrect format (rc=%d)\n", rc);
			   "incorrect format (rc=%d)\n",
			   dev_name(&device->cdev->dev), rc);
		rc = -EIO;
		rc = -EIO;
		goto out_label;
		goto out_label;
	}
	}
@@ -442,14 +444,14 @@ dasd_diag_check_device(struct dasd_device *device)
		block->s2b_shift++;
		block->s2b_shift++;
	rc = mdsk_init_io(device, block->bp_block, 0, NULL);
	rc = mdsk_init_io(device, block->bp_block, 0, NULL);
	if (rc && (rc != 4)) {
	if (rc && (rc != 4)) {
		dev_warn(&device->cdev->dev, "DIAG initialization "
		pr_warning("%s: DIAG initialization failed with rc=%d\n",
			"failed with rc=%d\n", rc);
			   dev_name(&device->cdev->dev), rc);
		rc = -EIO;
		rc = -EIO;
	} else {
	} else {
		if (rc == 4)
		if (rc == 4)
			device->features |= DASD_FEATURE_READONLY;
			device->features |= DASD_FEATURE_READONLY;
		dev_info(&device->cdev->dev,
		pr_info("%s: New DASD with %ld byte/block, total size %ld "
			 "New DASD with %ld byte/block, total size %ld KB%s\n",
			"KB%s\n", dev_name(&device->cdev->dev),
			(unsigned long) block->bp_block,
			(unsigned long) block->bp_block,
			(unsigned long) (block->blocks <<
			(unsigned long) (block->blocks <<
					 block->s2b_shift) >> 1,
					 block->s2b_shift) >> 1,