Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2015 11:03:00 -0500
From:      Brandon Valentine <brandon@brandonvalentine.com>
To:        freebsd-hackers@freebsd.org
Subject:   debugging ATA command timeouts on 10.1-RELEASE
Message-ID:  <CALv57%2BzJhSNiRpf5bERa6%2BtbMbg4Ma%2BShNFPJvbzksdR3dwA-Q@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
[ Starting with -hackers before a possible PR. If there's a better place
for this thread please advise. ]

Howdy,

I have an older Soekris net4801 with a NatSemi SC1100 ATA chipset. Runs
great under FreeBSD 8.3, but 10.1-RELEASE-p13 spews the following error, in
a loop, upon boot:

(aprobe0:ata0:0:1:0): ATA_IDENTIFY. ACB: ec 00 00 00 00 40 00 00 00 00 00 00
(aprobe0:ata0:0:1:0): CAM status: Command timeout
(aprobe0:ata0:0:1:0): Retrying command

The atapci driver recognizes it as:

atapci0: <National Geode SC1100 ATA33 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe000-0xe00f at device 18.2 on pci0

And eventually, after a lot of command timeouts, I will get:

ada0: 16.700MB/s transfers (PIO4, PIO 512bytes)
ada0: 3825MB (7835184 512 byte sectors: 16H 63S/T 7773C)
ada0: Previously was known as ad0

However, the system continues issuing failed ATA_IDENTIFY commands after
this and never succeeds in booting. That ada device being detected there is
a 4GB CompactFlash card. In order to eliminate the possibility that the
hardware or card do not support UDMA, write caching, etc, I am booting this
10.1-RELEASE-p13 kernel with the following kernel hints in loader.conf:

hint.ata.0.mode="PIO4"
hint.ata.1.mode="PIO4"
hint.ahci.0.msi="0"
hint.atapci.0.msi="0"
hint.acpi.0.disabled="1"
kern.cam.ada.write_cache="0"

Removing these hints does not make any difference in the outcome.

It has been a while but I'm no stranger to -hackers or this sort of
debugging, but I'm wholly unfamiliar with the CAM subsystem. I've compiled
and booted a 10.1-RELEASE-p13 kernel with all CAM debug flags enabled and
the complete debug log of a boot attempt can be seen here:

https://gist.github.com/bval/0ab616a57b2846f633ab

Is there a developer more familiar with CAM who can take a look at this and
advise me on what might be happening or where to go next in debugging this?
I'm willing to do the legwork just need some guidance.

Thanks,

Brandon

-- 
Brandon D. Valentine
http://www.brandonvalentine.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALv57%2BzJhSNiRpf5bERa6%2BtbMbg4Ma%2BShNFPJvbzksdR3dwA-Q>