From owner-freebsd-current@freebsd.org Fri May 14 13:05:06 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A349464742F for ; Fri, 14 May 2021 13:05:06 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FhTJx0wfVz3kfP for ; Fri, 14 May 2021 13:05:04 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 14ED52XV081201; Fri, 14 May 2021 06:05:02 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 14ED51QX081200; Fri, 14 May 2021 06:05:01 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202105141305.14ED51QX081200@gndrsh.dnsmgr.net> Subject: Re: More rtsx issues (13.0-R system) was: Re: CURRENT crashes at early boot on Lenovo T540p... In-Reply-To: To: Henri Hennebert Date: Fri, 14 May 2021 06:05:01 -0700 (PDT) CC: "Rodney W. Grimes" , freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4FhTJx0wfVz3kfP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 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: Fri, 14 May 2021 13:05:06 -0000 > On 5/13/21 9:00 PM, Rodney W. Grimes wrote: > >> On 12.05.2021 21:01, Marc Veldman wrote: > >> > >>> I?m not sure if this is an interesting data point or not, > >>> but a warm boot without the card inserted succeeds after > >>> a cold boot with the card inserted. > >> > >> It could explain, why my tests with "same code path" gave different results! > > > > I am suspect of 2 things here, something the bios does that leaves > > the card in a state that alters the loader's disk probing, and > > that probling itself leaving the device in a state that our kernel > > does not like. > > > > I have it very "odd" that I can boot from a rtsx sd card, ie the kernel > > gets loaded, but fails at "mountroot" phase due to a sd card timeout. > > I am baffled that the loader can read the SD card from a RTS525A. Can you detail > the boot process and the SD card partitions. The loader should just be using BIOS calls and should work with almost any system that presents the SD card as a bios disk device. IIRC when booting with an SD card in the slot the loader finds drives C to E, which, again IIRC are: C: nvme D: USB to SATA disk in external enclosure E: SD card > > Please show > > kenv | grep smbios.system rgrimes@e5470:~ % kenv | grep smbios.system smbios.system.family="Latitude" smbios.system.maker="Dell Inc." smbios.system.product="Latitude E5470" smbios.system.serial="5YK7RF2" smbios.system.sku="06DE" smbios.system.uuid="4c4c4544-0059-4b10-8037-b5c04f524632" > > and > > pciconf -lvbc The output of that was included in my original mail, and is still in your reply below. Repeated here: rtsx0@pci0:3:0:0: class=0xff0000 rev=0x01 hdr=0x00 vendor=0x10ec device=0x525a subvendor=0x1028 subdevice=0x06de vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTS525A PCI Express Card Reader' bar [14] = type Memory, range 32, base 0xe1000000, size 4096, enabled cap 01[80] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 05[90] = MSI supports 1 message, 64 bit enabled with 1 message cap 10[b0] = PCI-Express 2 endpoint max data 256(512) RO max read 512 link x1(x1) speed 5.0(5.0) ASPM disabled(L0s/L1) ClockPM enabled ecap 0001[100] = AER 2 0 fatal 0 non-fatal 1 corrected ecap 0003[148] = Serial 1 00000001004ce000 ecap 0018[158] = LTR 1 ecap 001e[160] = L1 PM Substates 1 > > > Anyway can you use the driver from GitHub - version 2.0h so we start with > something that work for others. > > Henri > > > If I simply cycle the sd card in and out of its socket and then > > give the right command string to mountroot it goes on to multiuser > > without issue. > > > > I'll also note that if I am booting from other disks (nvme or usb) > > that I get these same sd card timeouts and I have to cycle the > > card in and out of the socket to use it: > > > > rtsx0: <2.0c Realtek RTS525A PCI MMC/SD Card Reader> mem 0xe1000000-0xe1000fff irq 18 at device 0.0 on pci3 > > rtsx0: pci_read_config() error - reg: 0xeeffffaa > > rtsx0: Card present > > mmc0: on rtsx0 > > rtsx0: CRC error > > rtsx0: Transfer fail - status: 0x90010080 > > rtsx0: CRC error > > rtsx0: Transfer fail - status: 0x90010080 > > rtsx0: CRC error > > rtsx0: Transfer fail - status: 0x90010080 > > rtsx0: CRC error > > rtsx0: Transfer fail - status: 0x90010080 > > rtsx0: Interrupt card inserted/removed > > rtsx0: Card absent > > rtsx0: Interrupt card inserted/removed > > rtsx0: Card present > > mmc0: on rtsx0 > > > > (The last 5 lines caused by me removeing/inserting the card) > > > > Further note that this is a different controller chip version, > > from a Dell E5470: > > > > rtsx0@pci0:3:0:0: class=0xff0000 rev=0x01 hdr=0x00 vendor=0x10ec device=0x525a subvendor=0x1028 subdevice=0x06de > > vendor = 'Realtek Semiconductor Co., Ltd.' > > device = 'RTS525A PCI Express Card Reader' > > bar [14] = type Memory, range 32, base 0xe1000000, size 4096, enabled > > cap 01[80] = powerspec 3 supports D0 D1 D2 D3 current D0 > > cap 05[90] = MSI supports 1 message, 64 bit enabled with 1 message > > cap 10[b0] = PCI-Express 2 endpoint max data 256(512) RO > > max read 512 > > link x1(x1) speed 5.0(5.0) ASPM disabled(L0s/L1) ClockPM enabled > > ecap 0001[100] = AER 2 0 fatal 0 non-fatal 1 corrected > > ecap 0003[148] = Serial 1 00000001004ce000 > > ecap 0018[158] = LTR 1 > > ecap 001e[160] = L1 PM Substates 1 > > > >> // Lev Serebryakov > -- Rod Grimes rgrimes@freebsd.org