[PATCH] Allow ATA_ passthrough command through sg.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can already send ATA specific commands using /dev/sd device files.
This patch allow to use /dev/sg device files as well.

Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxx>
---
 block/scsi_ioctl.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 82a0ca2..93fa53e 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -186,6 +186,12 @@ void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
 	__set_bit(GPCMD_LOAD_UNLOAD, filter->write_ok);
 	__set_bit(GPCMD_SET_STREAMING, filter->write_ok);
 	__set_bit(GPCMD_SET_READ_AHEAD, filter->write_ok);
+
+	/* ATA Passthrough */
+	__set_bit(ATA_12, filter->read_ok);
+	__set_bit(ATA_12, filter->write_ok);
+	__set_bit(ATA_16, filter->read_ok);
+	__set_bit(ATA_16, filter->write_ok);
 }
 EXPORT_SYMBOL_GPL(blk_set_cmd_filter_defaults);
 
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux