From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 16:03:07 2015 Return-Path: Delivered-To: freebsd-hackers@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53B7FC80 for ; Fri, 19 Jun 2015 16:03:07 +0000 (UTC) (envelope-from brandon@brandonvalentine.com) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 271D182F for ; Fri, 19 Jun 2015 16:03:06 +0000 (UTC) (envelope-from brandon@brandonvalentine.com) Received: by iebmu5 with SMTP id mu5so77675415ieb.1 for ; Fri, 19 Jun 2015 09:03:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=9RkQeklKfA16j10+NrBnO+PSIsxLYbA5+qcbLBDmz7g=; b=eplT0JGUX7mLjUy5fuQxJ0kucSLtVL7Vd8el0HWLDZBXtPv8IeaFEwOAzeSny4Mswu pkhUsrvR2p1JIdAXASqn2marqgpW1AzOCNOFGpo0cNMGWn3qleH4U96RaycloPnXQJh5 zGpeDnad0WLe/3AfzqDSgPU23a8yF0rEvkT1l1vZs9uXXhRGGPo81MKiJHPQdmwL4SpN /qDUcHkn5ODTBUvLMM6fm4EGS7UovlOmQnl/Dop9lu/hVtYU1MFFH/atUSJB417xxgAF kNkqLfwOREC9IdenUgm2q7iqh8C/6kgzGH9K06bqj7V7oEjCAiqyUriLwnCAEt0fKUdw ppvA== X-Gm-Message-State: ALoCoQl4vXHxYeZb51ZG28arNXwLCfoex8mjC6VVvVLcgz8wGjm8fqf9eaZfg7rDaie5CDi8bYE+ MIME-Version: 1.0 X-Received: by 10.42.226.8 with SMTP id iu8mr12480435icb.17.1434729780128; Fri, 19 Jun 2015 09:03:00 -0700 (PDT) Received: by 10.64.154.199 with HTTP; Fri, 19 Jun 2015 09:03:00 -0700 (PDT) Date: Fri, 19 Jun 2015 11:03:00 -0500 Message-ID: Subject: debugging ATA command timeouts on 10.1-RELEASE From: Brandon Valentine To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 16:03:07 -0000 [ 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: 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