public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
To: jens.axboe@kernel.dk
Cc: stephenmcameron@gmail.com, akpm@linux-foundation.org,
	mikem@beardog.cce.hp.com, linux-kernel@vger.kernel.org,
	thenzl@redhat.com
Subject: [PATCH] cciss: use lun reset not target reset
Date: Mon, 07 Jan 2013 10:30:30 -0600	[thread overview]
Message-ID: <20130107163030.5072.17662.stgit@beardog.cce.hp.com> (raw)

From: Stephen M. Cameron <scameron@beardog.cce.hp.com>

In the scsi part of the driver (for tape drives and medium changers)
the device reset error handler attempts to use a target reset rather
than a lun reset.  If there is some shared tape drive library, this
could be potentially disruptive to other hosts trying to use the
tape library.  Use lun reset instead to only reset the lun not the
whole target.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
 drivers/block/cciss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 6526157..64d1d82 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2632,7 +2632,7 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
 			c->Request.Timeout = 0;
 			memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB));
 			c->Request.CDB[0] = cmd;	/* reset */
-			c->Request.CDB[1] = CCISS_RESET_TYPE_TARGET;
+			c->Request.CDB[1] = CCISS_RESET_TYPE_LUN;
 			break;
 		case CCISS_NOOP_MSG:
 			c->Request.CDBLen = 1;
@@ -2674,7 +2674,7 @@ static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
 		return -ENOMEM;
 	return_status = fill_cmd(h, c, CCISS_RESET_MSG, NULL, 0, 0,
 		CTLR_LUNID, TYPE_MSG);
-	c->Request.CDB[1] = reset_type; /* fill_cmd defaults to target reset */
+	c->Request.CDB[1] = reset_type; /* fill_cmd defaults to lun reset */
 	if (return_status != IO_OK) {
 		cmd_special_free(h, c);
 		return return_status;


             reply	other threads:[~2013-01-07 15:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 16:30 Stephen M. Cameron [this message]
2013-04-10 13:22 ` [PATCH] cciss: use lun reset not target reset Tomas Henzl

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=20130107163030.5072.17662.stgit@beardog.cce.hp.com \
    --to=scameron@beardog.cce.hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=jens.axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikem@beardog.cce.hp.com \
    --cc=stephenmcameron@gmail.com \
    --cc=thenzl@redhat.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