aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-04 08:45:13 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-04 08:45:13 -0400
commit79fa1b677be3a985cc66b9218a4dd09818f1051b (patch)
treed36030be7cd07461055f005394ef275212353010
parent31ce6daefe2d312e31ee06b0b3301b1cb7878c04 (diff)
parentc2a6585296009379e0f4eff39cdcb108b457ebf2 (diff)
Merge branch 'upstream'
-rw-r--r--drivers/scsi/ahci.c6
-rw-r--r--drivers/scsi/libata-core.c4
-rw-r--r--drivers/scsi/libata-scsi.c6
-rw-r--r--drivers/scsi/libata.h1
-rw-r--r--include/linux/libata.h1
5 files changed, 13 insertions, 5 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 0c5f0c844d21..ff48066d4c4f 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -549,6 +549,12 @@ static int ahci_softreset(struct ata_port *ap, int verbose, unsigned int *class)
549 549
550 DPRINTK("ENTER\n"); 550 DPRINTK("ENTER\n");
551 551
552 if (!sata_dev_present(ap)) {
553 DPRINTK("PHY reports no device\n");
554 *class = ATA_DEV_NONE;
555 return 0;
556 }
557
552 /* prepare for SRST (AHCI-1.1 10.4.1) */ 558 /* prepare for SRST (AHCI-1.1 10.4.1) */
553 rc = ahci_stop_engine(ap); 559 rc = ahci_stop_engine(ap);
554 if (rc) { 560 if (rc) {
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 57b3240ee867..2b2feb6462a9 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -76,6 +76,10 @@ int atapi_enabled = 1;
76module_param(atapi_enabled, int, 0444); 76module_param(atapi_enabled, int, 0444);
77MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); 77MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)");
78 78
79int atapi_dmadir = 0;
80module_param(atapi_dmadir, int, 0444);
81MODULE_PARM_DESC(atapi_dmadir, "Enable ATAPI DMADIR bridge support (0=off, 1=on)");
82
79int libata_fua = 0; 83int libata_fua = 0;
80module_param_named(fua, libata_fua, int, 0444); 84module_param_named(fua, libata_fua, int, 0444);
81MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)"); 85MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)");
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 745fc263feeb..c9c001490293 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2163,11 +2163,9 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
2163 qc->tf.protocol = ATA_PROT_ATAPI_DMA; 2163 qc->tf.protocol = ATA_PROT_ATAPI_DMA;
2164 qc->tf.feature |= ATAPI_PKT_DMA; 2164 qc->tf.feature |= ATAPI_PKT_DMA;
2165 2165
2166#ifdef ATAPI_ENABLE_DMADIR 2166 if (atapi_dmadir && (cmd->sc_data_direction != DMA_TO_DEVICE))
2167 /* some SATA bridges need us to indicate data xfer direction */ 2167 /* some SATA bridges need us to indicate data xfer direction */
2168 if (cmd->sc_data_direction != DMA_TO_DEVICE)
2169 qc->tf.feature |= ATAPI_DMADIR; 2168 qc->tf.feature |= ATAPI_DMADIR;
2170#endif
2171 } 2169 }
2172 2170
2173 qc->nbytes = cmd->bufflen; 2171 qc->nbytes = cmd->bufflen;
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index e3bd1ddb5387..652c08e3808e 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -41,6 +41,7 @@ struct ata_scsi_args {
41 41
42/* libata-core.c */ 42/* libata-core.c */
43extern int atapi_enabled; 43extern int atapi_enabled;
44extern int atapi_dmadir;
44extern int libata_fua; 45extern int libata_fua;
45extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, 46extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
46 struct ata_device *dev); 47 struct ata_device *dev);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index cc6cc08e8010..44d074ff7789 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -44,7 +44,6 @@
44#undef ATA_NDEBUG /* define to disable quick runtime checks */ 44#undef ATA_NDEBUG /* define to disable quick runtime checks */
45#undef ATA_ENABLE_PATA /* define to enable PATA support in some 45#undef ATA_ENABLE_PATA /* define to enable PATA support in some
46 * low-level drivers */ 46 * low-level drivers */
47#undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */
48 47
49 48
50/* note: prints function name for you */ 49/* note: prints function name for you */