Thread (6 messages) 6 messages, 2 authors, 2005-02-18
STALE7793d

[patch libata-dev-2.6 3/5] libata: filter SET_FEATURES - XFER MODE from ATA pass thru

From: John W. Linville <hidden>
Date: 2005-02-18 20:04:05
Also in: lkml

Filter-out attempts to issue a SET_FEATURES - XFER MODE command
via the ATA pass thru mechanism.

Signed-off-by: John W. Linville <redacted>
---

 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help