From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John W. Linville" Subject: [patch libata-dev-2.6 3/5] libata: filter SET_FEATURES - XFER MODE from ATA pass thru Date: Fri, 18 Feb 2005 15:03:37 -0500 Message-ID: <20050218200337.GD3197@tuxdriver.com> References: <20050218195027.GB3197@tuxdriver.com> <20050218195512.GC3197@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Received: from ra.tuxdriver.com ([24.172.12.4]:25094 "EHLO ra.tuxdriver.com") by vger.kernel.org with ESMTP id S261468AbVBRUDp (ORCPT ); Fri, 18 Feb 2005 15:03:45 -0500 Content-Disposition: inline In-Reply-To: <20050218195512.GC3197@tuxdriver.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, jgarzik@pobox.com Filter-out attempts to issue a SET_FEATURES - XFER MODE command via the ATA pass thru mechanism. Signed-off-by: John W. Linville --- drivers/scsi/libata-scsi.c | 11 +++++++++++ 1 files changed, 11 insertions(+) --- sata-smart-2.6/drivers/scsi/libata-scsi.c.filter 2005-02-17 16:49:51.362715273 -0500 +++ sata-smart-2.6/drivers/scsi/libata-scsi.c 2005-02-17 16:50:03.907040725 -0500 @@ -1764,6 +1764,17 @@ ata_scsi_pass_thru(struct ata_queued_cmd } /* + * Filter SET_FEATURES - XFER MODE command -- otherwise, + * SET_FEATURES - XFER MODE must be preceded/succeeded + * by an update to hardware-specific registers for each + * controller (i.e. the reason for ->set_piomode(), + * ->set_dmamode(), and ->post_set_mode() hooks). + */ + if ((tf->command == ATA_CMD_SET_FEATURES) + && (tf->feature == SETFEATURES_XFER)) + return 1; + + /* * Set flags so that all registers will be written, * and pass on write indication (used for PIO/DMA * setup.) -- John W. Linville linville@tuxdriver.com