* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
*
- * $Revision: 1.42 $
+ * $Revision: 1.39 $
*/
#include <linux/config.h>
rc = dia250(&private->iob, RW_BIO);
if (rc > 8) {
- DEV_MESSAGE(KERN_WARNING, device, "dia250 returned CC %d", rc);
+ MESSAGE(KERN_WARNING, "dia250 returned CC %d", rc);
cqr->status = DASD_CQR_ERROR;
} else if (rc == 0) {
cqr->status = DASD_CQR_DONE;
if (dasd_start_diag(next) == 0)
expires = next->expires;
else
- DEV_MESSAGE(KERN_WARNING, device, "%s",
- "Interrupt fastpath "
- "failed!");
+ MESSAGE(KERN_WARNING, "%s",
+ "Interrupt fastpath failed!");
}
}
} else
if (private == NULL) {
private = kmalloc(sizeof(struct dasd_diag_private),GFP_KERNEL);
if (private == NULL) {
- DEV_MESSAGE(KERN_WARNING, device, "%s",
+ MESSAGE(KERN_WARNING, "%s",
"memory allocation failed for private data");
return -ENOMEM;
}
return -ENOTSUPP;
}
- DBF_DEV_EVENT(DBF_INFO, device,
- "%04X: %04X on real %04X/%02X",
- rdc_data->dev_nr,
- rdc_data->vdev_type,
- rdc_data->rdev_type, rdc_data->rdev_model);
+ DBF_EVENT(DBF_INFO,
+ "%04X: %04X on real %04X/%02X",
+ rdc_data->dev_nr,
+ rdc_data->vdev_type,
+ rdc_data->rdev_type, rdc_data->rdev_model);
/* terminate all outstanding operations */
mdsk_term_io(device);
/* figure out blocksize of device */
label = (long *) get_zeroed_page(GFP_KERNEL);
if (label == NULL) {
- DEV_MESSAGE(KERN_WARNING, device, "%s",
- "No memory to allocate initialization request");
+ MESSAGE(KERN_WARNING, "%s",
+ "No memory to allocate initialization request");
return -ENOMEM;
}
- /* try all sizes - needed for ECKD devices */
for (bsize = 512; bsize <= PAGE_SIZE; bsize <<= 1) {
mdsk_init_io(device, bsize, 0, 64);
memset(&bio, 0, sizeof (struct dasd_diag_bio));
break;
mdsk_term_io(device);
}
- if (bsize <= PAGE_SIZE && label[0] == 0xc3d4e2f1) {
- /* get formatted blocksize from label block */
- bsize = (int) label[3];
+ if (bsize <= PAGE_SIZE && label[3] == bsize &&
+ label[0] == 0xc3d4e2f1) {
device->blocks = label[7];
device->bp_block = bsize;
device->s2b_shift = 0; /* bits to shift 512 to get a block */
(device->blocks << device->s2b_shift) >> 1);
rc = 0;
} else {
- if (bsize > PAGE_SIZE)
- DEV_MESSAGE(KERN_WARNING, device, "%s",
- "DIAG access failed");
- else
- DEV_MESSAGE(KERN_WARNING, device, "%s",
- "volume is not CMS formatted");
+ DEV_MESSAGE(KERN_WARNING, device, "%s",
+ "volume has incompatible disk layout");
rc = -EMEDIUMTYPE;
}
free_page((long) label);
dasd_diag_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req,
struct irb *stat)
{
- DEV_MESSAGE(KERN_ERR, device, "%s",
- "dump sense not available for DIAG data");
+ char *page;
+
+ page = (char *) get_zeroed_page(GFP_KERNEL);
+ if (page == NULL) {
+ MESSAGE(KERN_ERR, "%s", "No memory to dump sense data");
+ return;
+ }
+ sprintf(page, KERN_WARNING PRINTK_HEADER
+ "device %s: I/O status report:\n",
+ device->cdev->dev.bus_id);
+
+ MESSAGE(KERN_ERR, "Sense data:\n%s", page);
+
+ free_page((unsigned long) page);
}
/*
dasd_diag_init(void)
{
if (!MACHINE_IS_VM) {
- MESSAGE_LOG(KERN_INFO,
- "Machine is not VM: %s "
- "discipline not initializing",
- dasd_diag_discipline.name);
+ MESSAGE(KERN_INFO,
+ "Machine is not VM: %s discipline not initializing",
+ dasd_diag_discipline.name);
return -EINVAL;
}
ASCEBC(dasd_diag_discipline.ebcname, 4);
dasd_diag_cleanup(void)
{
if (!MACHINE_IS_VM) {
- MESSAGE_LOG(KERN_INFO,
- "Machine is not VM: %s "
- "discipline not cleaned",
- dasd_diag_discipline.name);
+ MESSAGE(KERN_INFO,
+ "Machine is not VM: %s discipline not initializing",
+ dasd_diag_discipline.name);
return;
}
unregister_external_interrupt(0x2603, dasd_ext_handler);