[SCSI] zfcp: Introduce bsg_timeout callback.
authorSwen Schillig <swen@vnet.ibm.com>
Thu, 14 Jan 2010 16:19:01 +0000 (17:19 +0100)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 17 Jan 2010 18:40:12 +0000 (12:40 -0600)
Introduce a zfcp callback for timeouts triggered from FC BSG.  With
zfcp, the underlying hardware cannot abort CT or ELS requests, so
there is nothing to do when the block layer timeout expires.  To avoid
interference with the block layer timeout, simply indicate that the
block layer timer should be reset. The timer running in the hardware
for the pending CT or ELS request will return the request when it
expires.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_fc.c
drivers/s390/scsi/zfcp_scsi.c

index 03dec83..1406a65 100644 (file)
@@ -108,6 +108,7 @@ extern void zfcp_fc_wka_ports_force_offline(struct zfcp_fc_wka_ports *);
 extern int zfcp_fc_gs_setup(struct zfcp_adapter *);
 extern void zfcp_fc_gs_destroy(struct zfcp_adapter *);
 extern int zfcp_fc_exec_bsg_job(struct fc_bsg_job *);
+extern int zfcp_fc_timeout_bsg_job(struct fc_bsg_job *);
 
 /* zfcp_fsf.c */
 extern int zfcp_fsf_open_port(struct zfcp_erp_action *);
index 81d4375..37a0ca2 100644 (file)
@@ -788,6 +788,12 @@ int zfcp_fc_exec_bsg_job(struct fc_bsg_job *job)
        }
 }
 
+int zfcp_fc_timeout_bsg_job(struct fc_bsg_job *job)
+{
+       /* hardware tracks timeout, reset bsg timeout to not interfere */
+       return -EAGAIN;
+}
+
 int zfcp_fc_gs_setup(struct zfcp_adapter *adapter)
 {
        struct zfcp_fc_wka_ports *wka_ports;
index 771cc53..8e6fc68 100644 (file)
@@ -652,6 +652,7 @@ struct fc_function_template zfcp_transport_functions = {
        .show_host_port_state = 1,
        .show_host_active_fc4s = 1,
        .bsg_request = zfcp_fc_exec_bsg_job,
+       .bsg_timeout = zfcp_fc_timeout_bsg_job,
        /* no functions registered for following dynamic attributes but
           directly set by LLDD */
        .show_host_port_type = 1,