From patchwork Mon Jun 29 21:24:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 29298 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by bilbo.ozlabs.org (Postfix) with ESMTP id 37050B708F for ; Tue, 30 Jun 2009 07:24:41 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754373AbZF2VYd (ORCPT ); Mon, 29 Jun 2009 17:24:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753059AbZF2VYd (ORCPT ); Mon, 29 Jun 2009 17:24:33 -0400 Received: from smtp-out.google.com ([216.239.33.17]:6640 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752581AbZF2VYc (ORCPT ); Mon, 29 Jun 2009 17:24:32 -0400 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id n5TLOSrE016071; Mon, 29 Jun 2009 22:24:29 +0100 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1246310670; bh=NYLZsN2Bt8wlt5EyLOqMuHGIcYY=; h=DomainKey-Signature:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References; b=d//I+/VYjH6YVsmfz7NcqzHBcM89i9vZDMzhqeuu /FmlAvz+0+hgH4rPOdNQ0E1QOu3plOCLM01yplcY27+zfg== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=v/x3ihNU6omDW/00a2gh9hOwkd8OhaEnwA3BDE4wePIQ6QkGHOZ/ZYEwuIBJJaRtS rbbnrkngUkZyI2hAMy8qw== Received: from localhost (hippo2.mtv.corp.google.com [172.18.118.87]) by wpaz1.hot.corp.google.com with ESMTP id n5TLOPJv014693; Mon, 29 Jun 2009 14:24:26 -0700 Received: by localhost (Postfix, from userid 60833) id 7971E5A9B1; Mon, 29 Jun 2009 14:24:25 -0700 (PDT) From: Gwendal Grignou To: jens.axboe@oracle.com Cc: linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org, Gwendal Grignou Subject: [PATCH] Allow ATA_ passthrough command through sg. Date: Mon, 29 Jun 2009 14:24:25 -0700 Message-Id: <1246310665-31727-1-git-send-email-gwendal@google.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <> References: <> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 --- 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);