From owner-freebsd-current@freebsd.org Tue Mar 29 16:42:40 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7484AE243B for ; Tue, 29 Mar 2016 16:42:40 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 A438B1619; Tue, 29 Mar 2016 16:42:40 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: by mail-ig0-x22a.google.com with SMTP id cl4so80525761igb.0; Tue, 29 Mar 2016 09:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NPhR84RIOnhMnTXrV5byzhTMRRkxo4ybqBHdvKuwn7E=; b=LcDXbUCTwNpnVXuLg0xsC8BelM/eW3dI0DBUtRApc8OzrB0XNdDAjBvNOuZJ0Bso1Q mer7XxlIMbe2Urw8TqUxw0rJFGVBe2CogBSpxu3cJkt3yjM6kItxpOj3jEh5zuZPdIMz w0yHR0/KwxUeF+6+hMLdacD2QkeW9Jw07PeCBQdNMh+2uPqAk3Nr05/1d4+CNMHMaxC8 iitrbB6FjQH8pAeKEAqnq+7p3LmeR5cquzgHhuRGwywOFWO5eollI53f5rERMjetcc3O 0jDO7JiuqSoKzRtLJ2p5Vz4XfIANe+cKlXrEFGEW2wti9LpTGG+WcOPDcyNMsHbnedZl kR6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NPhR84RIOnhMnTXrV5byzhTMRRkxo4ybqBHdvKuwn7E=; b=W3kXdvBt5Vh1TId0qB0KHos/YGJsSUcV831xXerPxcLvO1qGDMLAFWS0nmAoUouvCl mJOyfNl2Zruk9ty9YpyQE0t0MxUaHPgkj6af7e/57xSi9TGjrJn9nbx4WYMxsR+YzQ/H xk2ppjAxhj6kZAN0dNtmlgpZBAeSjk7PpTx7u/BzBuyp/T06jsMd5p9jrCGNXJwMMFdX lL0zOSah0Wrs4juAmAQrU2bFW7kAxV668tpAJm0IzSuasIh9HJA6sk0fl8dMpMvkIcJB 2a/wJ2jwCCB+eBpG+kEAOFTuSCZ6rOD56uhUG4oOowDLLMyckBI+P2mJtsqNmwbp//8g 2J4w== X-Gm-Message-State: AD7BkJJyLfRhNUwH/ZGn+/kjiK5xfb+ZavM9NnhRP7ZMfUmhjfTdwM+Qgzq7WG5hUaPDikjAfrqpzLAReu0Npw== X-Received: by 10.50.78.234 with SMTP id e10mr8534062igx.32.1459269759680; Tue, 29 Mar 2016 09:42:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.38.73 with HTTP; Tue, 29 Mar 2016 09:42:10 -0700 (PDT) In-Reply-To: <1459179514.1091.127.camel@freebsd.org> References: <56F5A0A9.8030207@FreeBSD.org> <1458947510.1091.91.camel@freebsd.org> <56F5CCDA.2060808@FreeBSD.org> <1458954555.1091.94.camel@freebsd.org> <56F6551D.1010308@FreeBSD.org> <1459132140.1091.122.camel@freebsd.org> <56F8FA7C.1030204@FreeBSD.org> <1459179514.1091.127.camel@freebsd.org> From: Jia-Shiun Li Date: Wed, 30 Mar 2016 00:42:10 +0800 Message-ID: Subject: Re: SD card adapter doesn't working anymore To: Ian Lepore Cc: Ruslan Makhmatkhanov , FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 16:42:41 -0000 On Mon, Mar 28, 2016 at 11:38 PM, Ian Lepore wrote: > Wow, there's just nothing to work with in that output. I think the > increased debuging didn't output anything because nothing is happening, > and that's consistant with the value in the Present State register when > the driver attaches, which says that no card is inserted. (It says > that in several ways... when a card is in, half a dozen of those bits > should be non-zero.) > > It makes me think the controller isn't powered up, or is in some > suspend mode or something. But that would be at the pci bus level, not > something the driver is in control of. I had a problem like that > initially on my FitPc2 x86 board that has sdhci on it, but the problem > went away with a bios update. > I tried it on my once-worked notebook. If sdcard was not inserted mmc0 does not get probed. If sdcard was inserted while loading sdhci_pci module, timeout repeats until I eject the sdcard. And inserting card afterward did not get it probed in either cases. Kernel is FreeBSD jsli-nb 11.0-CURRENT FreeBSD 11.0-CURRENT #8 r297267M: Fri Mar 25 19:50:53 CST 2016 jsli@4cbsd:/usr/obj/usr/src/sys/Minimal-NODEBUG amd64 No card: found-> vendor=0x197b, dev=0x2381, revid=0x00 domain=0, bus=7, slot=0, func=2 class=08-05-01, hdrtype=0x00, mfdev=1 cmdreg=0x0407, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=16 powerspec 3 supports D0 D3 current D3 MSI supports 1 message pci0:7:0:2: reprobing on driver added pci5: set ACPI power state D0 on \134_SB_.PCI0.EXP5.J382 pci0:7:0:2: Transition from D3 to D0 sdhci_pci0: mem 0xd7000200-0xd70002ff irq 16 at device 0.2 on pci5 sdhci_pci0: attempting to allocate 1 MSI vectors (1 supported) msi: routing MSI IRQ 259 to local APIC 1 vector 54 sdhci_pci0: using IRQ 259 for MSI sdhci_pci0-slot0: 50MHz 8bits 3.3V DMA sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x0000ac01 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x00080000 | Host ctl: 0x00000000 sdhci_pci0-slot0: Power: 0x00000000 | Blk gap: 0x00000000 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000000 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000000 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 sdhci_pci0-slot0: Caps: 0x014832b2 | Max curr: 0x00000000 sdhci_pci0-slot0: =========================================== sdhci_pci0: 1 slot(s) allocated random: harvesting attach, 8 bytes (4 bits) from sdhci_pci0 Card inserted: found-> vendor=0x197b, dev=0x2381, revid=0x00 domain=0, bus=7, slot=0, func=2 class=08-05-01, hdrtype=0x00, mfdev=1 cmdreg=0x0407, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=16 powerspec 3 supports D0 D3 current D3 MSI supports 1 message pci0:7:0:2: reprobing on driver added pci5: set ACPI power state D0 on \134_SB_.PCI0.EXP5.J382 pci0:7:0:2: Transition from D3 to D0 sdhci_pci0: mem 0xd7000200-0xd70002ff irq 16 at device 0.2 on pci5 sdhci_pci0: attempting to allocate 1 MSI vectors (1 supported) msi: routing MSI IRQ 259 to local APIC 1 vector 54 sdhci_pci0: using IRQ 259 for MSI sdhci_pci0-slot0: 50MHz 8bits 3.3V DMA sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x0000ac01 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x000f0000 | Host ctl: 0x00000000 sdhci_pci0-slot0: Power: 0x00000000 | Blk gap: 0x00000000 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000000 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000000 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 sdhci_pci0-slot0: Caps: 0x014832b2 | Max curr: 0x00000000 sdhci_pci0-slot0: =========================================== sdhci_pci0: 1 slot(s) allocated random: harvesting attach, 8 bytes (4 bits) from sdhci_pci0 found-> vendor=0x197b, dev=0x2383, revid=0x00 domain=0, bus=7, slot=0, func=3 class=08-80-00, hdrtype=0x00, mfdev=1 cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=16 powerspec 3 supports D0 D3 current D3 MSI supports 1 message pci0:7:0:3: reprobing on driver added pci5: set ACPI power state D0 on \134_SB_.PCI0.EXP5.J383 pci0:7:0:3: Transition from D3 to D0 pci0:7:0:3: Transition from D0 to D3 found-> vendor=0x197b, dev=0x2384, revid=0x00 domain=0, bus=7, slot=0, func=4 class=08-80-00, hdrtype=0x00, mfdev=1 cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=16 powerspec 3 supports D0 D3 current D3 MSI supports 1 message pci0:7:0:4: reprobing on driver added pci5: set ACPI power state D0 on \134_SB_.PCI0.EXP5.J384 pci0:7:0:4: Transition from D3 to D0 pci0:7:0:4: Transition from D0 to D3 pci6: driver added mmc0: on sdhci_pci0 sdhci_pci0-slot0: Divider 64 for freq 390625 (base 50000000) mmc0: Probing bus sdhci_pci0-slot0: CMD0 arg 0 flags 0x40 dlen 0 dflags 0 sdhci_pci0-slot0: Controller timeout sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x0000ac01 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000001 sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00004007 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 sdhci_pci0-slot0: Caps: 0x014832b2 | Max curr: 0x00000000 sdhci_pci0-slot0: =========================================== sdhci_pci0-slot0: CMD0 arg 0 flags 0x40 dlen 0 dflags 0 sdhci_pci0-slot0: Controller timeout sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x0000ac01 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000001 sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00004007 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 sdhci_pci0-slot0: Caps: 0x014832b2 | Max curr: 0x00000000 sdhci_pci0-slot0: =========================================== sdhci_pci0-slot0: CMD0 arg 0 flags 0x40 dlen 0 dflags 0 sdhci_pci0-slot0: Controller timeout sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x0000ac01 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000001 sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00004007 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 sdhci_pci0-slot0: Caps: 0x014832b2 | Max curr: 0x00000000 sdhci_pci0-slot0: =========================================== sdhci_pci0-slot0: CMD0 arg 0 flags 0x40 dlen 0 dflags 0 sdhci_pci0-slot0: Controller timeout sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x0000ac01 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x01080000 | Host ctl: 0x00000001 sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00004007 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000081 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 sdhci_pci0-slot0: Caps: 0x014832b2 | Max curr: 0x00000000 sdhci_pci0-slot0: =========================================== sdhci_pci0-slot0: CMD8 arg 0x1aa flags 0x65 dlen 0 dflags 0 sdhci_pci0-slot0: CMD8 arg 0x1aa flags 0x65 dlen 0 dflags 0 sdhci_pci0-slot0: CMD8 arg 0x1aa flags 0x65 dlen 0 dflags 0 sdhci_pci0-slot0: CMD8 arg 0x1aa flags 0x65 dlen 0 dflags 0 sdhci_pci0-slot0: CMD55 arg 0 flags 0x15 dlen 0 dflags 0 sdhci_pci0-slot0: CMD55 arg 0 flags 0x15 dlen 0 dflags 0 sdhci_pci0-slot0: CMD55 arg 0 flags 0x15 dlen 0 dflags 0 sdhci_pci0-slot0: CMD55 arg 0 flags 0x15 dlen 0 dflags 0 mmc0: SD probe: failed sdhci_pci0-slot0: CMD1 arg 0 flags 0x61 dlen 0 dflags 0 sdhci_pci0-slot0: CMD1 arg 0 flags 0x61 dlen 0 dflags 0 sdhci_pci0-slot0: CMD1 arg 0 flags 0x61 dlen 0 dflags 0 sdhci_pci0-slot0: CMD1 arg 0 flags 0x61 dlen 0 dflags 0 mmc0: MMC probe: failed mmc0: Current OCR: 0x00000000 mmc0: No compatible cards found on bus random: harvesting attach, 8 bytes (4 bits) from mmc0 -Jia-Shiun