kern/121686: bogus CHS to LBA mapping in (at least) ata
Adam Pordzik
tektonaut at fuckner.net
Fri Mar 14 05:10:01 UTC 2008
>Number: 121686
>Category: kern
>Synopsis: bogus CHS to LBA mapping in (at least) ata
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 14 05:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Adam Pordzik
>Release: 7-release
>Organization:
>Environment:
>Description:
After attaching a 16GB Transcend CF Disk to an ALIX (pcengine.ch Geode) SBC several DMA timeouts occurred in dmesg before init starts: (boot -v)
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 15.2 on pci0
ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA66 cable=40 wire
ad0: setting PIO4 on CS5536 chip
ad0: DMA limited to UDMA33, device found non-ATA66 cable
ad0: setting UDMA33 on CS5536 chip
ad0: 15296MB <TRANSCEND 20070831> at ata0-master UDMA33
>How-To-Repeat:
>Fix:
Make LBA-addressing independent from CHS? I would also be happy with some device.hints to override calculated cylinder count, where I can place static values.
>Release-Note:
>Audit-Trail:
>Unformatted:
>ad0: 31326208 sectors [33149C/15H/63S] 1 sectors/interrupt 1 depth queue
ad0: DMA limited to UDMA33, device found non-ATA66 cable
ad0: setting UDMA33 on CS5536 chip
ad0: 15296MB <TRANSCEND 20070831> at ata0-master UDMA33
ad0: setting UDMA33 on CS5536 chip
ad0: TIMEOUT - READ_DMA retrying (1 retry left) LBA=31326207
ad0: setting UDMA33 on CS5536 chip
ad0: TIMEOUT - READ_DMA retrying (0 retries left) LBA=31326207
ad0: setting UDMA33 on CS5536 chip
ad0: FAILURE - READ_DMA timed out LBA=31326207
DMA in general is working, with PIO a get similar results.
According to atacontrol, the CF Card have 31326208 sectors (verified), so FAILUE is at the last block. I assume GEOM looks here for a label.
BIOS claims the CF has either a 1949/255/63 or 1023/240/63 mapping, The CF announces itself with 16383/15/63 and ata-disc calculates [33149C/15H/63S]. (sade, fdisk and sysinstall also use this values.)
The product of latter c/h/s values is 31325805, which does not equal the physical 31326208. Actually I cannot access any sector beyond 31325804 with e.g. dd
More information about the freebsd-bugs
mailing list