Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Feb 2013 12:20:07 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        freebsd-stable@FreeBSD.org
Subject:   Re: stable/9: Force ada1 to UDMA-33
Message-ID:  <1359746407.93359.346.camel@revolution.hippie.lan>
In-Reply-To: <201302011852.r11IqIve093221@grabthar.secnetix.de>
References:  <201302011852.r11IqIve093221@grabthar.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2013-02-01 at 19:52 +0100, Oliver Fromme wrote:
> Hello,
> 
> I've got a (P)ATA disk in a special frame.  The disk itself
> supports UDMA-100 (and has an 80-ribbon cable), but the
> frame isn't compatible with that.  By default, FreeBSD
> negotiates UDMA-100, and the console starts to fill with
> ICRC errors.
> 
> In the past, I used a patch to ata-all.c that enabled the
> following entry in loader.conf to force the disk to UDMA-33,
> so it worked fine:
> 
> hw.ata.ata_dma_limit="2"
> 
> But with the "new world", that doesn't work anymore.
> What is the proper way with ATA_CAM and ada(4) to force a
> P-ATA disk to a lower UDMA mode?

You probably want one of these...

    hint.ata.X.devX.mode
     limits initial ATA mode for specified device on specified channel.

     hint.ata.X.mode
     limits initial ATA mode for every device on specified channel.

These are from ata(4) manpage, there are some others there as well.  One
thing the manpage doesn't say is what sort of values to assign to these
hints.  From the source code it looks like this is the list:

	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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1359746407.93359.346.camel>