From owner-freebsd-current@freebsd.org Sat Mar 26 01:09:19 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 052B6ADEEE3 for ; Sat, 26 Mar 2016 01:09:19 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF48212DC for ; Sat, 26 Mar 2016 01:09:18 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4fa8d9cc-f2ef-11e5-827e-7d17a39bef25 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 26 Mar 2016 01:08:55 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u2Q19FOk020284; Fri, 25 Mar 2016 19:09:15 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1458954555.1091.94.camel@freebsd.org> Subject: Re: SD card adapter doesn't working anymore From: Ian Lepore To: Ruslan Makhmatkhanov , FreeBSD Current Date: Fri, 25 Mar 2016 19:09:15 -0600 In-Reply-To: <56F5CCDA.2060808@FreeBSD.org> References: <56F5A0A9.8030207@FreeBSD.org> <1458947510.1091.91.camel@freebsd.org> <56F5CCDA.2060808@FreeBSD.org> Content-Type: multipart/mixed; boundary="=-jUbba7m6ihm6c3IP7ZyY" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 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: Sat, 26 Mar 2016 01:09:19 -0000 --=-jUbba7m6ihm6c3IP7ZyY Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, 2016-03-26 at 02:42 +0300, Ruslan Makhmatkhanov wrote: > Ian Lepore wrote on 03/26/16 02:11 AM: > > On Fri, 2016-03-25 at 23:33 +0300, Ruslan Makhmatkhanov wrote: > > > Hello, > > > > > > I have this in pciconf output: > > > > > > ================================================================= > > > ==== > > > = > > > none1@pci0:36:0:0: class=0x088000 card=0x167e103c > > > chip=0x2392197b > > > rev=0x30 hdr=0x00 > > > vendor = 'JMicron Technology Corp.' > > > device = 'SD/MMC Host Controller' > > > class = base peripheral > > > > > > none2@pci0:36:0:3: class=0x088000 card=0x167e103c > > > chip=0x2393197b > > > rev=0x30 hdr=0x00 > > > vendor = 'JMicron Technology Corp.' > > > device = 'MS Host Controller' > > > class = base peripheral > > > ================================================================= > > > ==== > > > = > > > > > > And my SD-card controller is not working anymore (it worked on > > > -current > > > on the same laptop year or two ago). Do I need to load some kld > > > to > > > make > > > it working, or support for this controllers was dropped > > > altogether > > > for > > > some reason? I have mostly vanilla GENERIC at r296772, but it > > > actually > > > stopped to work much earlier. > > > > > > Thanks. > > > > > > > Do you have a pciconf entry for class=080501 chip=0x2391197b, > > device > > would probably be "SD Host Controller", and if so, is it none@pci o > > r > > sdhci_pci@pci ? If sdhci_pci attached, there would be dmesg output > > for > > it, and I'm curious whether any irq-related error showed up when it > > attached. > > > > The only change I can find that might have some effect is a switch > > to > > MSI-based interrupts some time ago. That was MFC'd to 10-stable in > > r271051, and that's very close to range cited in that PR. > > > > It might be worth trying to set hw.sdhci.enable_msi=0 in > > loader.conf > > and see if it makes a difference. > > > > -- Ian > > Sorry, but nothing has changed in pciconf/dmesg with this option at > boot. > Hmm, well so much for logic ("what changed around the time reported in that PR?"). Now for intuition... Maybe this JMicro device id needs the same quirks as the 2381 ID that's already in the driver. The attached patch would add that. If this fixes it, that's good, but it doesn't explain why it worked then stopped working at some point. -- Ian --=-jUbba7m6ihm6c3IP7ZyY Content-Disposition: inline; filename="temp.diff" Content-Type: text/x-patch; name="temp.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: dev/sdhci/sdhci_pci.c =================================================================== --- dev/sdhci/sdhci_pci.c (revision 297146) +++ dev/sdhci/sdhci_pci.c (working copy) @@ -105,6 +105,9 @@ static const struct sdhci_device { { 0x2381197B, 0xffff, "JMicron JMB38X SD", SDHCI_QUIRK_32BIT_DMA_SIZE | SDHCI_QUIRK_RESET_AFTER_REQUEST }, + { 0x2391197B, 0xffff, "JMicron JMB38X SD", + SDHCI_QUIRK_32BIT_DMA_SIZE | + SDHCI_QUIRK_RESET_AFTER_REQUEST }, { 0x16bc14e4, 0xffff, "Broadcom BCM577xx SDXC/MMC Card Reader", SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC }, { 0, 0xffff, NULL, --=-jUbba7m6ihm6c3IP7ZyY--