Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2021 14:48:16 +0200
From:      Henri Hennebert <hlh@restart.be>
To:        lev@FreeBSD.org, Marc Veldman <marc@bumblingdork.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: CURRENT crashes at early boot on Lenovo T540p: rtsx to blame - 13.0-RELEASE crashes same way!
Message-ID:  <1de588e2-20cb-3206-3aea-f3f88f577675@restart.be>
In-Reply-To: <a630c8a3-a9d7-c6f5-111c-be0e64db1ec6@FreeBSD.org>
References:  <a7363387-c53f-d6c0-acc0-be9081590ea1@FreeBSD.org> <740cd7a0-3faf-7a56-80f7-dbb9bdacb55b@FreeBSD.org> <37122994-8172-b943-2602-fd1b4e9af78a@FreeBSD.org> <CALH631k8ek0UEB8LUv04YQg%2BzZUafUO2W4hcHBXqrTWDdDp7mg@mail.gmail.com> <20210512122747.51d2f574@laptop.domain> <1e23c1de-7529-0be9-c4ec-83d17b2b6bac@restart.be> <e49c4a5e-d567-522b-c60c-59faa054c807@FreeBSD.org> <20210512133456.57f374f4@ernst.home> <b72d8b9d-8cfd-84a7-59b2-c5a2b33416e7@FreeBSD.org> <20210512141130.755ae361@ernst.home> <D9843F30-308D-4F9F-A229-05639346564A@bumblingdork.com> <9f0abf48-ed13-bff3-5687-fca0d57195d8@restart.be> <C4E25C70-25BA-4BEB-83F0-D77279B2B94A@bumblingdork.com> <8d4e076b-9ecd-aef2-0ee8-73519bb9d939@FreeBSD.org> <8d2be5f2-4144-082e-4237-0dac0c4b37e6@restart.be> <f084b1c8-5020-2db9-6cf3-47641066bb69@FreeBSD.org> <6798878a-c499-d78d-e96d-d744513cb80d@restart.be> <a630c8a3-a9d7-c6f5-111c-be0e64db1ec6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------F9E79536A4D5353DBA203CB6
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit



On 5/13/21 2:40 PM, Lev Serebryakov wrote:
> On 13.05.2021 15:13, Henri Hennebert via freebsd-current 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!
>>>>>
>>>> With a "cold" boot and without a card inserted did you see something like:
>>>>
>>>> rtsx0: <2.0c Realtek ...
>>>> rtsx0: Card present
>>>> mmc0: <MMC/SD bus> on rtsx0
>>>> rtsx0: Interrupt card inserted/removed
>>>> rtsx0: Card absent
>>>   When it panics, it panics before rtsx0 prints something in my case.
>>>
>> Does iwm0 / mmc0 is shown during boot?
>>
>> can you try a verbose boot (boot -s)
>   do you mean "boot -v"? :) It runs very fast, and there are not so much lines 
> on the screen (is it possible to change screen reoslution before loading i915kms?)

OUPS yes boot -v
> 
>   Ok, now I've recorded cold boot without SD, without verbose, with my phone 
> (yes, screenshots by photocamera, I fell so low!) and I was wrong, there is rtsx0:
> 
> 
> 
> rtsx0: <2.0c .....>
> rtsx0: Card present
> mmc0: <MMC/SD bus> on rtsx0
> rtsx0: Interrupt card inserted/removed
> rtsx0: Card absent
> ...

This must be the culprit this change from present/absent

> PANIC! (without rtsx0 in stacktrace, again it is 
> run_interrupt_driven_config_hooks()).
> 
>> if you can't see the verbose output which is too fast on the display:
>> try a boot -p
>   Oooops, keyboard is unresponsive after first pause and I can not unpause 
> output :-(
> 
>   Looks like another bug of early boot — EFI boot can not access keywboard 
> before it is detected as `atkbd` (keyboard in loader works!)
> 

try to rebuild your kernel with the attached patch.




--------------F9E79536A4D5353DBA203CB6
Content-Type: text/plain; charset=UTF-8;
 name="rtsx-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="rtsx-patch"

diff --git a/sys/dev/rtsx/rtsx.c b/sys/dev/rtsx/rtsx.c
index 4400fbef541..a2410d76fe8 100644
--- a/sys/dev/rtsx/rtsx.c
+++ b/sys/dev/rtsx/rtsx.c
@@ -3715,7 +3715,7 @@ rtsx_attach(device_t dev)
 	 * Schedule a card detection as we won't get an interrupt
 	 * if the card is inserted when we attach
 	 */
-	DELAY(500);
+	DELAY(1000);
 	if (rtsx_is_card_present(sc))
 		device_printf(sc->rtsx_dev, "Card present\n");
 	else

--------------F9E79536A4D5353DBA203CB6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1de588e2-20cb-3206-3aea-f3f88f577675>