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

From: John W. Linville
Date: Fri Feb 18 2005 - 15:07:01 EST


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

Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
---

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@xxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/