From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, Swen Schillig <swen@vnet.ibm.com>,
Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 2/3] zfcp: Introduce bsg_timeout callback.
Date: Thu, 14 Jan 2010 17:19:01 +0100 [thread overview]
Message-ID: <20100114163345.126589000@de.ibm.com> (raw)
In-Reply-To: 20100114161859.790342000@de.ibm.com
[-- Attachment #1: zfcp_bsg_timeout.patch --]
[-- Type: text/plain, Size: 2158 bytes --]
From: Swen Schillig <swen@vnet.ibm.com>
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>
---
drivers/s390/scsi/zfcp_ext.h | 1 +
drivers/s390/scsi/zfcp_fc.c | 6 ++++++
drivers/s390/scsi/zfcp_scsi.c | 1 +
3 files changed, 8 insertions(+)
--- a/drivers/s390/scsi/zfcp_ext.h 2010-01-14 17:00:09.000000000 +0100
+++ b/drivers/s390/scsi/zfcp_ext.h 2010-01-14 17:00:21.000000000 +0100
@@ -108,6 +108,7 @@ extern void zfcp_fc_wka_ports_force_offl
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 *);
--- a/drivers/s390/scsi/zfcp_fc.c 2010-01-14 17:00:09.000000000 +0100
+++ b/drivers/s390/scsi/zfcp_fc.c 2010-01-14 17:00:43.000000000 +0100
@@ -788,6 +788,12 @@ int zfcp_fc_exec_bsg_job(struct fc_bsg_j
}
}
+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;
--- a/drivers/s390/scsi/zfcp_scsi.c 2010-01-14 17:00:09.000000000 +0100
+++ b/drivers/s390/scsi/zfcp_scsi.c 2010-01-14 17:00:21.000000000 +0100
@@ -652,6 +652,7 @@ struct fc_function_template zfcp_transpo
.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,
next prev parent reply other threads:[~2010-01-14 16:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 16:18 [patch 0/3] zfcp FC BSG timeout fixes for 2.6.33-rc4 Christof Schmitt
2010-01-14 16:19 ` [patch 1/3] scsi_transport_fc: Allow LLD to reset FC BSG timeout Christof Schmitt
2010-01-14 16:19 ` Christof Schmitt [this message]
2010-01-14 16:19 ` [patch 3/3] zfcp: Set hardware timeout as requested by BSG request Christof Schmitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100114163345.126589000@de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=swen@vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox