From owner-freebsd-arm@FreeBSD.ORG Thu Nov 6 20:02:34 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAB3C1065673; Thu, 6 Nov 2008 20:02:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 967C78FC24; Thu, 6 Nov 2008 20:02:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 227187387; Thu, 06 Nov 2008 22:02:32 +0200 Message-ID: <49134D57.1050003@FreeBSD.org> Date: Thu, 06 Nov 2008 22:02:31 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.17 (X11/20081029) MIME-Version: 1.0 To: Lars Engels , "M. Warner Losh" , freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-mobile@FreeBSD.org References: <48DEA8E7.2080503@FreeBSD.org> <20081106180556.GH8256@e.0x20.net> <4913345F.2050801@FreeBSD.org> <20081106.112338.1564836080.imp@bsdimp.com> <20081106184017.GB161@e.0x20.net> <49133F2B.4080801@FreeBSD.org> <20081106192353.GD161@e.0x20.net> In-Reply-To: <20081106192353.GD161@e.0x20.net> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 07 Nov 2008 00:17:14 +0000 Cc: Subject: Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2008 20:02:34 -0000 Lars Engels wrote: > Nov 6 20:21:11 maggie kernel: sdhci_request cmd op 55 arg 131072 flags 21 data 0 > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: got interrupt 1 > Nov 6 20:21:11 maggie kernel: sdhci_request cmd op 6 arg 2 flags 21 data 0 > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: got interrupt 1 > Nov 6 20:21:11 maggie kernel: sdhci_request cmd op 17 arg 0 flags 53 data 512 > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: got interrupt 3 This is the first data request. 512 bytes reading. It was finished successfully: command end + data end = 3. > Nov 6 20:21:11 maggie kernel: sdhci_request cmd op 17 arg 0 flags 53 data 0 > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: got interrupt 3 But here is the problem. For some reason you have _zero_ data size. Controller reports successful competition, but it probably isn't > Nov 6 20:21:11 maggie kernel: sdhci_request cmd op 17 arg 0 flags 53 data 0 > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: got interrupt 18002 > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: Command error 1 (opcode 17 arg 0 flags 53 dlen 0 dflags 2) > Nov 6 20:21:11 maggie kernel: sdhci0-slot0: Got data interrupt 0x00000002, but there is no active command. Here is the results of the previous. Card still sending something, does not responds to the command, controller signals error. > # fdisk /dev/mmcsd0 > > Nov 6 20:22:57 maggie kernel: sdhci_request cmd op 17 arg 0 flags 53 data 0 > Nov 6 20:22:57 maggie kernel: sdhci0-slot0: got interrupt 3 > Nov 6 20:22:57 maggie kernel: sdhci_request cmd op 17 arg 0 flags 53 data 0 > Nov 6 20:22:57 maggie kernel: sdhci0-slot0: got interrupt 18002 > Nov 6 20:22:57 maggie kernel: sdhci0-slot0: Command error 1 (opcode 17 arg 0 flags 53 dlen 0 dflags 2) Here is just the same. And you have exactly the same with PIO mode. So looks like it is not card or driver problem, but sooner, mmc or mmcsd layer problem and it looks quite strange. Which sources exactly do you have, are they latest, are they in sync with each other and have you rebuilt all of them carefully? If so, you can try to uncomment // printf("Len %d %lld-%lld flags %#x sz // ... lines in mmcsd.c to look what happens. > Sorry for the lengthy mail :) Thanks, I like such mails, it's like a hunting. :) -- Alexander Motin