]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[SCSI] zfcp: Simplify ccw notify handler
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Thu, 21 Aug 2008 11:43:34 +0000 (13:43 +0200)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 29 Aug 2008 14:04:13 +0000 (09:04 -0500)
The notify handler does not change the list of adapters, it only
triggers erp actions to open or shutdown the adapter. We don't
need to hold the config semaphore and wait for the erp to complete.

This is a prerequisite for a fix in the s390 common i/o code.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/s390/scsi/zfcp_ccw.c

index 391dd29749f8118509bd43a19673b2d31eedc68e..51b6a05f4d12f107fca7cd6d40a1c4a186337828 100644 (file)
@@ -152,10 +152,8 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device)
  */
 static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
 {
-       struct zfcp_adapter *adapter;
+       struct zfcp_adapter *adapter = dev_get_drvdata(&ccw_device->dev);
 
-       down(&zfcp_data.config_sema);
-       adapter = dev_get_drvdata(&ccw_device->dev);
        switch (event) {
        case CIO_GONE:
                dev_warn(&adapter->ccw_device->dev, "device gone\n");
@@ -174,8 +172,6 @@ static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
                                        89, NULL);
                break;
        }
-       zfcp_erp_wait(adapter);
-       up(&zfcp_data.config_sema);
        return 1;
 }