From: Hannes Reinecke <hare@suse.de>
To: dgilbert@interlog.com,
SCSI development list <linux-scsi@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Cc: "Elliott, Robert (Server Storage)" <elliott@hp.com>,
Jeremy Linton <jlinton@tributary.com>
Subject: Re: [PATCH v3] SG_SCSI_RESET ioctl: add no_escalate values
Date: Mon, 20 Oct 2014 13:30:37 +0200 [thread overview]
Message-ID: <5444F25D.5010903@suse.de> (raw)
In-Reply-To: <5442C969.4060504@interlog.com>
On 10/18/2014 10:11 PM, Douglas Gilbert wrote:
> Further to a January 2013 thread titled: "[PATCH] SG_SCSI_RESET ioctl
> should only perform requested operation" by Jeremy Linton a patch (v3)
> is presented that expands the existing ioctl to include "no_escalate"
> versions to the existing resets. This requires no changes to SCSI low
> level drivers (LLDs); it adds several more finely tuned reset options
> to the user space. For example:
>
> /* This call remains the same, with the same escalating semantics
> * if the device (LU) reset fail. That is: on failure to try a
> * target reset and if that fails, try a bus reset, and if that fails
> * try a host (i.e. LLD) reset. */
> val = SG_SCSI_RESET_DEVICE;
> res = ioctl(<sg_or_block_fd>, SG_SCSI_RESET, &val);
>
> /* What follows is a new option introduced by this patch series. Only
> * a device reset is attempted. If that fails then an appropriate
> * error code is provided. N.B. There is no reset escalation. */
> val = SG_SCSI_RESET_DEVICE | SG_SCSI_RESET_NO_ESCALATE;
> res = ioctl(<sg_or_block_fd>, SG_SCSI_RESET, &val);
>
> This patches applies to lk 3.17.0 and Christoph's drivers-for-3.18
> tree. The sg_reset utility has been extended to use this new option
> since sg3_utils-1.36 package which was released on 20130531.
>
> v3 of this patch changes adding, subtracting and arithmetic
> comparisons to the corresponding bitwise logical operations.
> For example 'SG_SCSI_RESET_DEVICE + SG_SCSI_RESET_NO_ESCALATE' has
> been changed to 'SG_SCSI_RESET_DEVICE | SG_SCSI_RESET_NO_ESCALATE'.
>
> ChangeLog:
> - modify SG_SCSI_RESET ioctl so the SG_SCSI_RESET_NO_ESCALATE
> value may be OR-ed to the existing values. If so the existing
> device->target->bus->host escalation does not occur. The
> SG_SCSI_RESET ioctl is modified in both the sg driver and
> scsi_ioctl.c (so block devices can use it).
> - modify scsi_reset_provider() in the scsi_error.c file in a
> similar way to support this additional functionality.
>
> Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (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
next prev parent reply other threads:[~2014-10-20 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 20:11 [PATCH v3] SG_SCSI_RESET ioctl: add no_escalate values Douglas Gilbert
2014-10-20 11:30 ` Hannes Reinecke [this message]
2014-10-20 18:15 ` Jeremy Linton
2014-10-23 17:12 ` 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=5444F25D.5010903@suse.de \
--to=hare@suse.de \
--cc=dgilbert@interlog.com \
--cc=elliott@hp.com \
--cc=hch@infradead.org \
--cc=jlinton@tributary.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.