aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 82af7011f2dd..622350d9b2e3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4024,6 +4024,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
4024 4024
4025 /* Weird ATAPI devices */ 4025 /* Weird ATAPI devices */
4026 { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 }, 4026 { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
4027 { "QUANTUM DAT DAT72-000", NULL, ATA_HORKAGE_ATAPI_MOD16_DMA },
4027 4028
4028 /* Devices we expect to fail diagnostics */ 4029 /* Devices we expect to fail diagnostics */
4029 4030
@@ -4444,7 +4445,8 @@ int atapi_check_dma(struct ata_queued_cmd *qc)
4444 /* Don't allow DMA if it isn't multiple of 16 bytes. Quite a 4445 /* Don't allow DMA if it isn't multiple of 16 bytes. Quite a
4445 * few ATAPI devices choke on such DMA requests. 4446 * few ATAPI devices choke on such DMA requests.
4446 */ 4447 */
4447 if (unlikely(qc->nbytes & 15)) 4448 if (!(qc->dev->horkage & ATA_HORKAGE_ATAPI_MOD16_DMA) &&
4449 unlikely(qc->nbytes & 15))
4448 return 1; 4450 return 1;
4449 4451
4450 if (ap->ops->check_atapi_dma) 4452 if (ap->ops->check_atapi_dma)
@@ -5934,7 +5936,7 @@ static void ata_port_detach(struct ata_port *ap)
5934 * to us. Restore SControl and disable all existing devices. 5936 * to us. Restore SControl and disable all existing devices.
5935 */ 5937 */
5936 __ata_port_for_each_link(link, ap) { 5938 __ata_port_for_each_link(link, ap) {
5937 sata_scr_write(link, SCR_CONTROL, link->saved_scontrol); 5939 sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
5938 ata_link_for_each_dev(dev, link) 5940 ata_link_for_each_dev(dev, link)
5939 ata_dev_disable(dev); 5941 ata_dev_disable(dev);
5940 } 5942 }