Douglas Gilbert 26cf591e6d scsi: add SG_SCSI_RESET_NO_ESCALATE flag to SG_SCSI_RESET ioctl
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);

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Jeremy Linton <jlinton@tributary.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-12 11:15:54 +01:00
..
2014-09-15 16:01:58 -07:00
2014-08-26 09:35:54 +02:00
2014-07-17 22:07:37 +02:00
2014-11-10 15:25:41 +01:00
2014-10-07 21:29:18 -04:00
2014-10-07 21:29:18 -04:00
2014-11-10 15:25:29 +01:00
2014-05-19 19:12:23 +02:00
2014-10-07 21:29:18 -04:00
2014-07-25 17:16:55 -04:00
2014-08-26 09:35:54 +02:00
2014-07-17 22:07:37 +02:00
2014-10-01 13:11:26 +02:00
2014-08-08 15:57:29 -07:00
2014-07-17 22:07:37 +02:00
2014-08-08 15:57:29 -07:00
2014-07-25 07:43:43 -04:00
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:23 -04:00
2014-07-17 22:07:37 +02:00
2014-06-09 18:54:06 -07:00
2014-07-17 22:07:40 +02:00
2014-07-17 22:07:38 +02:00
2014-09-15 16:01:58 -07:00
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:17 -04:00
2014-09-16 09:09:38 -07:00
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:16 -04:00
2014-07-17 22:07:37 +02:00
2014-09-26 10:07:27 +02:00
2014-10-14 02:18:24 +02:00
2013-04-09 14:13:27 -04:00
2014-09-30 09:29:55 +02:00
2014-09-30 09:29:55 +02:00
2014-08-08 15:57:29 -07:00
2013-04-09 14:13:15 -04:00
2014-07-17 22:07:37 +02:00
2014-07-17 22:07:35 +02:00
2014-07-17 22:07:37 +02:00
2014-05-28 18:14:16 +02:00
2014-10-07 21:29:18 -04:00
2014-07-25 17:16:55 -04:00
2013-04-09 14:13:17 -04:00
2014-07-17 22:07:37 +02:00
2014-07-25 17:16:55 -04:00
2014-04-10 15:30:35 -07:00
2014-07-17 22:07:37 +02:00
2014-07-17 22:07:37 +02:00
2014-07-17 22:07:39 +02:00
2014-07-17 22:07:39 +02:00
2012-09-14 17:59:29 +01:00
2014-07-17 22:07:37 +02:00
2014-05-28 12:05:37 +02:00
2014-05-28 12:05:37 +02:00
2014-07-17 22:07:37 +02:00
2014-10-15 10:25:14 +10:30
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:15 -04:00