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?
Best regards
Oliver
PS: Excerpt from dmesg ...
atapci0: <VIA 8235 UDMA133 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xd800-0xd80f at device 17.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <IBM-DJNA-352500 J51OA30K> ATA-4 device
ada0: 66.700MB/s transfers (UDMA4, PIO 8192bytes)
ada0: 24405MB (49981680 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad0
ada1 at ata1 bus 0 scbus1 target 0 lun 0
ada1: <ST3250824A 3.AAE> ATA-7 device
ada1: 100.000MB/s transfers (UDMA5, PIO 8192bytes)
ada1: 238475MB (488397168 512 byte sectors: 1H 255S/T 16383C)
ada1: Previously was known as ad2
(ada1:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 10 00
(ada1:ata1:0:0:0): CAM status: ATA Status Error
(ada1:ata1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 84 (ICRC ABRT )
(ada1:ata1:0:0:0): RES: 51 84 00 00 00 00 00 00 00 00 00
(ada1:ata1:0:0:0): Retrying command
(ada1:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 10 00
(ada1:ata1:0:0:0): CAM status: ATA Status Error
(ada1:ata1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 84 (ICRC ABRT )
(ada1:ata1:0:0:0): RES: 51 84 00 00 00 00 00 00 00 00 00
(ada1:ata1:0:0:0): Retrying command
..
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Handelsregister: Amtsgericht Muenchen, HRA 74606, Gesch?ftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsreg.: Amtsgericht M?nchen,
HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen/-Produkte + mehr: http://www.secnetix.de/bsd
Perl is worse than Python because people wanted it worse.
-- Larry Wall
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