public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cciss: use lun reset not target reset
@ 2013-01-07 16:30 Stephen M. Cameron
  2013-04-10 13:22 ` Tomas Henzl
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen M. Cameron @ 2013-01-07 16:30 UTC (permalink / raw)
  To: jens.axboe; +Cc: stephenmcameron, akpm, mikem, linux-kernel, thenzl

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;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cciss: use lun reset not target reset
  2013-01-07 16:30 [PATCH] cciss: use lun reset not target reset Stephen M. Cameron
@ 2013-04-10 13:22 ` Tomas Henzl
  0 siblings, 0 replies; 2+ messages in thread
From: Tomas Henzl @ 2013-04-10 13:22 UTC (permalink / raw)
  To: Stephen M. Cameron; +Cc: jens.axboe, stephenmcameron, akpm, mikem, linux-kernel

almost the same patch has been accepted for hpsa so

Acked-by: Tomas Henzl <thenzl@redhat.com>

On 01/07/2013 05:30 PM, Stephen M. Cameron wrote:
> 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;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-10 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 16:30 [PATCH] cciss: use lun reset not target reset Stephen M. Cameron
2013-04-10 13:22 ` Tomas Henzl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox