]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/block/dasd_diag.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6-omap-h63xx.git] / drivers / s390 / block / dasd_diag.c
index ab8754e566bcbdff183f22982dbe91d2ba431cac..4002f6c1c1b3222a01b1fa2ced3b8df3da0fe043 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * File...........: linux/drivers/s390/block/dasd_diag.c
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  * Based on.......: linux/drivers/s390/block/mdisk.c
@@ -6,7 +6,6 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  *
- * $Revision: 1.51 $
  */
 
 #include <linux/config.h>
@@ -25,6 +24,7 @@
 #include <asm/io.h>
 #include <asm/s390_ext.h>
 #include <asm/todclk.h>
+#include <asm/vtoc.h>
 
 #include "dasd_int.h"
 #include "dasd_diag.h"
@@ -74,7 +74,7 @@ dia250(void *iob, int cmd)
        int rc;
 
        __asm__ __volatile__(
-#ifdef CONFIG_ARCH_S390X
+#ifdef CONFIG_64BIT
                "       lghi    %0,3\n"
                "       lgr     0,%3\n"
                "       diag    0,%2,0x250\n"
@@ -329,14 +329,14 @@ dasd_diag_check_device(struct dasd_device *device)
        struct dasd_diag_private *private;
        struct dasd_diag_characteristics *rdc_data;
        struct dasd_diag_bio bio;
-       struct dasd_diag_cms_label *label;
+       struct vtoc_cms_label *label;
        blocknum_t end_block;
        unsigned int sb, bsize;
        int rc;
 
        private = (struct dasd_diag_private *) device->private;
        if (private == NULL) {
-               private = kmalloc(sizeof(struct dasd_diag_private),GFP_KERNEL);
+               private = kzalloc(sizeof(struct dasd_diag_private),GFP_KERNEL);
                if (private == NULL) {
                        DEV_MESSAGE(KERN_WARNING, device, "%s",
                                "memory allocation failed for private data");
@@ -380,7 +380,7 @@ dasd_diag_check_device(struct dasd_device *device)
        mdsk_term_io(device);
 
        /* figure out blocksize of device */
-       label = (struct dasd_diag_cms_label *) get_zeroed_page(GFP_KERNEL);
+       label = (struct vtoc_cms_label *) get_zeroed_page(GFP_KERNEL);
        if (label == NULL)  {
                DEV_MESSAGE(KERN_WARNING, device, "%s",
                            "No memory to allocate initialization request");
@@ -527,7 +527,7 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req)
                                   datasize, device);
        if (IS_ERR(cqr))
                return cqr;
-       
+
        dreq = (struct dasd_diag_req *) cqr->data;
        dreq->block_count = count;
        dbio = dreq->bio;
@@ -548,6 +548,8 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req)
        }
        cqr->retries = DIAG_MAX_RETRIES;
        cqr->buildclk = get_clock();
+       if (req->flags & REQ_FAILFAST)
+               set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
        cqr->device = device;
        cqr->expires = DIAG_TIMEOUT;
        cqr->status = DASD_CQR_FILLED;