public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>, linux-scsi@vger.kernel.org
Cc: Douglas Gilbert <dgilbert@interlog.com>, Robert Elliott <Elliott@hp.com>
Subject: Re: [PATCH 5/6] osst: call scsi_set_medium_removal directly
Date: Wed, 05 Nov 2014 15:14:16 +0100	[thread overview]
Message-ID: <545A30B8.2060301@suse.de> (raw)
In-Reply-To: <1414661229-15199-6-git-send-email-hch@lst.de>

On 10/30/2014 10:27 AM, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/scsi/osst.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
> index b6d63d6..8c38464 100644
> --- a/drivers/scsi/osst.c
> +++ b/drivers/scsi/osst.c
> @@ -3327,19 +3327,18 @@ static int osst_write_frame(struct osst_tape * STp, struct osst_request ** aSRpn
>  /* Lock or unlock the drive door. Don't use when struct osst_request allocated. */
>  static int do_door_lock(struct osst_tape * STp, int do_lock)
>  {
> -	int retval, cmd;
> +	int retval;
>  
> -	cmd = do_lock ? SCSI_IOCTL_DOORLOCK : SCSI_IOCTL_DOORUNLOCK;
>  #if DEBUG
>  	printk(OSST_DEB_MSG "%s:D: %socking drive door.\n", tape_name(STp), do_lock ? "L" : "Unl");
>  #endif
> -	retval = scsi_ioctl(STp->device, cmd, NULL);
> -	if (!retval) {
> +
> +	retval = scsi_set_medium_removal(STp->device,
> +			do_lock ? SCSI_REMOVAL_PREVENT : SCSI_REMOVAL_ALLOW);
> +	if (!retval)
>  		STp->door_locked = do_lock ? ST_LOCKED_EXPLICIT : ST_UNLOCKED;
> -	}
> -	else {
> +	else
>  		STp->door_locked = ST_LOCK_FAILS;
> -	}
>  	return retval;
>  }
>  
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-11-05 14:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  9:27 misc scsi ioctl updates V2 Christoph Hellwig
2014-10-30  9:27 ` [PATCH 1/6] scsi: refactor scsi_reset_provider handling Christoph Hellwig
2014-10-30  9:38   ` Hannes Reinecke
2014-11-05 14:11   ` Hannes Reinecke
2014-11-05 14:25   ` Martin K. Petersen
2014-11-06 18:01   ` Elliott, Robert (Server Storage)
2014-10-30  9:27 ` [PATCH 2/6] scsi: split scsi_nonblockable_ioctl Christoph Hellwig
2014-11-05 14:12   ` Hannes Reinecke
2014-11-05 14:28   ` Martin K. Petersen
2014-11-06 22:35   ` Elliott, Robert (Server Storage)
2014-10-30  9:27 ` [PATCH 3/6] sd: fix up ->compat_ioctl Christoph Hellwig
2014-10-30  9:40   ` Hannes Reinecke
2014-11-05 14:13   ` Hannes Reinecke
2014-11-05 14:29   ` Martin K. Petersen
2014-11-06 21:41   ` Elliott, Robert (Server Storage)
2014-10-30  9:27 ` [PATCH 4/6] st: call scsi_set_medium_removal directly Christoph Hellwig
2014-11-05 14:13   ` Hannes Reinecke
2014-11-05 14:31   ` Martin K. Petersen
2014-11-06 23:54   ` Elliott, Robert (Server Storage)
2014-11-08 13:26     ` Christoph Hellwig
2014-11-09 19:18     ` "Kai Mäkisara (Kolumbus)"
2014-10-30  9:27 ` [PATCH 5/6] osst: " Christoph Hellwig
2014-11-05 14:14   ` Hannes Reinecke [this message]
2014-11-05 14:31   ` Martin K. Petersen
2014-11-07  0:01   ` Elliott, Robert (Server Storage)
2014-10-30  9:27 ` [PATCH 6/6] scsi: return EAGAIN when resetting a device under EH Christoph Hellwig
2014-11-05 14:14   ` Hannes Reinecke
2014-11-05 14:33   ` Martin K. Petersen
2014-11-06 21:46   ` Elliott, Robert (Server Storage)
2014-11-06 22:55     ` Douglas Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2014-10-27 17:59 misc scsi ioctl updates Christoph Hellwig
2014-10-27 17:59 ` [PATCH 5/6] osst: call scsi_set_medium_removal directly Christoph Hellwig

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=545A30B8.2060301@suse.de \
    --to=hare@suse.de \
    --cc=Elliott@hp.com \
    --cc=dgilbert@interlog.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    /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