[S390] dasd: fix timeout handling in interrupt handler
authorStefan Weinhuber <wein@de.ibm.com>
Thu, 15 May 2008 14:52:36 +0000 (16:52 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 15 May 2008 14:52:40 +0000 (16:52 +0200)
When the dasd_int_handler is called with an error code instead of
an irb, the associated request should be restarted. This handling
was missing from the -ETIMEDOUT case. In fact it should be done in
any case.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c

index ac6d4d3218b3d9c4d7652407c5847d87dc844fbb..8ba3f135da221fe59cfeb2badf3c25df8e28cdb5 100644 (file)
@@ -925,6 +925,8 @@ static void dasd_handle_killed_request(struct ccw_device *cdev,
        struct dasd_ccw_req *cqr;
        struct dasd_device *device;
 
+       if (!intparm)
+               return;
        cqr = (struct dasd_ccw_req *) intparm;
        if (cqr->status != DASD_CQR_IN_IO) {
                MESSAGE(KERN_DEBUG,
@@ -976,17 +978,16 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
        if (IS_ERR(irb)) {
                switch (PTR_ERR(irb)) {
                case -EIO:
-                       dasd_handle_killed_request(cdev, intparm);
                        break;
                case -ETIMEDOUT:
                        printk(KERN_WARNING"%s(%s): request timed out\n",
                               __func__, cdev->dev.bus_id);
-                       //FIXME - dasd uses own timeout interface...
                        break;
                default:
                        printk(KERN_WARNING"%s(%s): unknown error %ld\n",
                               __func__, cdev->dev.bus_id, PTR_ERR(irb));
                }
+               dasd_handle_killed_request(cdev, intparm);
                return;
        }