mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
libata: Add atapi_dmadir force flag
Some device require DMADIR to be enabled, but are not detected as such by atapi_id_dmadir. One such example is "Asus Serillel 2" SATA-host-to-PATA-device bridge: the bridge itself requires DMADIR, even if the bridged device does not. As atapi_dmadir module parameter can cause problems with some devices (as per Tejun Heo's memory), enabling it globally may not be possible depending on the hardware. This patch adds atapi_dmadir in the form of a "force" horkage value, allowing global, per-bus and per-device control. Signed-off-by: Vincent Pelletier <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
e628dc999e
commit
966fbe193f
3 changed files with 5 additions and 1 deletions
|
|
@ -2395,7 +2395,7 @@ int ata_dev_configure(struct ata_device *dev)
|
|||
cdb_intr_string = ", CDB intr";
|
||||
}
|
||||
|
||||
if (atapi_dmadir || atapi_id_dmadir(dev->id)) {
|
||||
if (atapi_dmadir || (dev->horkage & ATA_HORKAGE_ATAPI_DMADIR) || atapi_id_dmadir(dev->id)) {
|
||||
dev->flags |= ATA_DFLAG_DMADIR;
|
||||
dma_dir_string = ", DMADIR";
|
||||
}
|
||||
|
|
@ -6496,6 +6496,7 @@ static int __init ata_parse_force_one(char **cur,
|
|||
{ "nosrst", .lflags = ATA_LFLAG_NO_SRST },
|
||||
{ "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST },
|
||||
{ "rstonce", .lflags = ATA_LFLAG_RST_ONCE },
|
||||
{ "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR },
|
||||
};
|
||||
char *start = *cur, *p = *cur;
|
||||
char *id, *val, *endp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue