public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, James Smart <James.Smart@emulex.com>,
	Swen Schillig <swen@vnet.ibm.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 1/3] scsi_transport_fc: Allow LLD to reset FC BSG timeout
Date: Thu, 14 Jan 2010 17:19:00 +0100	[thread overview]
Message-ID: <20100114163344.885508000@de.ibm.com> (raw)
In-Reply-To: 20100114161859.790342000@de.ibm.com

[-- Attachment #1: bsg_job_timeout.patch --]
[-- Type: text/plain, Size: 1095 bytes --]

From: Swen Schillig <swen@vnet.ibm.com>

The hardware used with zfcp cannot abort a currently pending CT or ELS
request. Therefore we need the option to postpone the timeout
triggered request abort within the fc layer, since there is nothing
zfcp can do to stop the request at this point.

Cc: James Smart <James.Smart@emulex.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
 drivers/scsi/scsi_transport_fc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/scsi/scsi_transport_fc.c	2010-01-14 16:44:42.000000000 +0100
+++ b/drivers/scsi/scsi_transport_fc.c	2010-01-14 16:44:43.000000000 +0100
@@ -3527,7 +3527,10 @@ fc_bsg_job_timeout(struct request *req)
 	if (!done && i->f->bsg_timeout) {
 		/* call LLDD to abort the i/o as it has timed out */
 		err = i->f->bsg_timeout(job);
-		if (err)
+		if (err == -EAGAIN) {
+			job->ref_cnt--;
+			return BLK_EH_RESET_TIMER;
+		} else if (err)
 			printk(KERN_ERR "ERROR: FC BSG request timeout - LLD "
 				"abort failed with status %d\n", err);
 	}


  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 ` Christof Schmitt [this message]
2010-01-14 16:19 ` [patch 2/3] zfcp: Introduce bsg_timeout callback Christof Schmitt
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=20100114163344.885508000@de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@suse.de \
    --cc=James.Smart@emulex.com \
    --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