impossible to set pata dma mode?
Norbert Koch
nkoch at demig.de
Thu Jan 28 16:34:43 UTC 2016
Am 28.01.2016 um 16:45 schrieb Ian Lepore:
Thanks Ian, I know that I can configure this using
boot hints.
I am having a rather special situation where I need to
change these settings after boot. It has to do with
pxe booting different FreeBSD versions using an
outdated grub which only allows to directly load
a kernel without specifying boot parameters.
Obviously I can help myself with a modified
camcontrol. But I am still curious what the
reason for the limitation might be.
> On Thu, 2016-01-28 at 09:44 +0100, Norbert Koch wrote:
>> Hello.
>>
>> I have to reduce dma mode from udma to wdma2
>> for a flash device.
>>
>> In the past this was easy using atacontrol
>> but, afaiks it seems to be impossible using camcontrol.
>>
>> camcontrol negotiate ada0 -M wdma
>> ...You can only modify user parameters
>>
>> camcontrol negotiate ada0 -NM wdma
>> Works, but I see no way how those user
>> parameters become active parameters as the
>> driver only reads then in attach as far as
>> I can see.
>>
>> It seems like the ata driver's interface
>> allows to change the current settings
>> (XPT_SET_TRAN_SETTINGS/CTS_TYPE_CURRENT_SETTINGS)
>> so, why is camcontrol so restrictive?
>>
>> Thank you,
>> Norbert Koch
> I don't know about changing it on the fly with camcontrol (I've never
> done that), but you can configure it at boot time with a tunable in
> loader.conf of the form
>
> dev.ada.0.mode="modestr"
>
> Where modestr is one of these (from dev/ata/ata-all.c):
>
> if (!strcasecmp(str, "PIO0")) return (ATA_PIO0);
> if (!strcasecmp(str, "PIO1")) return (ATA_PIO1);
> if (!strcasecmp(str, "PIO2")) return (ATA_PIO2);
> if (!strcasecmp(str, "PIO3")) return (ATA_PIO3);
> if (!strcasecmp(str, "PIO4")) return (ATA_PIO4);
> if (!strcasecmp(str, "WDMA0")) return (ATA_WDMA0);
> if (!strcasecmp(str, "WDMA1")) return (ATA_WDMA1);
> if (!strcasecmp(str, "WDMA2")) return (ATA_WDMA2);
> if (!strcasecmp(str, "UDMA0")) return (ATA_UDMA0);
> if (!strcasecmp(str, "UDMA16")) return (ATA_UDMA0);
> if (!strcasecmp(str, "UDMA1")) return (ATA_UDMA1);
> if (!strcasecmp(str, "UDMA25")) return (ATA_UDMA1);
> if (!strcasecmp(str, "UDMA2")) return (ATA_UDMA2);
> if (!strcasecmp(str, "UDMA33")) return (ATA_UDMA2);
> if (!strcasecmp(str, "UDMA3")) return (ATA_UDMA3);
> if (!strcasecmp(str, "UDMA44")) return (ATA_UDMA3);
> if (!strcasecmp(str, "UDMA4")) return (ATA_UDMA4);
> if (!strcasecmp(str, "UDMA66")) return (ATA_UDMA4);
> if (!strcasecmp(str, "UDMA5")) return (ATA_UDMA5);
> if (!strcasecmp(str, "UDMA100")) return (ATA_UDMA5);
> if (!strcasecmp(str, "UDMA6")) return (ATA_UDMA6);
> if (!strcasecmp(str, "UDMA133")) return (ATA_UDMA6);
>
> -- Ian
--
Dipl.-Ing. Norbert Koch
Entwicklung Prozessregler
More information about the freebsd-hackers
mailing list