Re: [PATCH] mmc: sdhci-pci: disable intel voltage switch if unsupported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 19, 2018 at 03:42:37PM +0200, Anisse Astier wrote:
> On Fri, Oct 19, 2018 at 04:19:39PM +0300, Adrian Hunter wrote:
> > On 19/10/18 12:26 PM, Anisse Astier wrote:
> > > Hi Adrian,
> > > 
> > > On Fri, Oct 19, 2018 at 10:07:38AM +0300, Adrian Hunter wrote:
> > >> On 18/10/18 1:21 PM, Anisse Astier wrote:
> > >>> If we don't have the voltage switch DSM methods available, there's no
> > >>> point in advertising to the rest of the kernel that we support 1.8V, or
> > >>> support voltage switch at all.
> > >>>
> > >>> This fixes an issue on a Gemini Lake (GLK) laptop : eMMC driver will
> > >>> timeout on boot (from 60seconds to 10minutes ) as the cqhci attempts CQE
> > >>> recovery after a failed voltage switch. In earlier kernels, the problem
> > >>> existed, but only delayed boot for about 10 seconds after an I/O error,
> > >>> allowing booting on the eMMC (almost) unnoticed.
> > >>
> > >> Can you send the kernel messages?  Which kernel is it?  Which laptop?  An
> > >> acpidump might help too.
> > > 
> > > You're right, I should have started with this. I have attached various
> > > dmesg traces:
> > >  - dmesg-4.18.3-CQE-traces.txt : the original issue that was
> > >    encountered, it shows the multiple CQE recovery timeouts, each taking
> > >    about 60s
> > >  - dmesg-4.19-rc8.noquirk.txt : a boot where the CQE recovery works, and
> > >    only an I/O error is shown. I've reduced it to the mmc/sdhci traces.
> > >  - dmesg-4.19-rc8.noquirk-with-error.txt : a boot where it fails, this
> > >    is similar to the first one, but with a more recent kernel
> > >  - dmesg-4.19-rc8.withquirk.txt : a boot with sdhci.debug_quirks2=0x90c
> > >    on the command line. I've added the SDHCI_QUIRK2_NO_1_8_V quirk to
> > >    the other ones present in the driver. You can see there's no CQE
> > >    recovery or mmc I/O errors.
> > > 
> > > 
> > > I've reproduced the issue with linux 4.17, 4.18 and 4.19-rc8. The laptop
> > > is a noname laptop with an Insyde EFI firmware (Manufacturer: Notebook,
> > > Product Name: N75_77GU).
> > > 
> > > You'll find the acpidump in the attachment. I've looked into another GLK
> > > laptop's tables, and the implemented acpi methods seem to only do a
> > > sleep(), which isn't really helpful. I've tried to add a similmar msleep
> > > in the voltage_switch function, but it didn't seem to help.
> > 
> > Please try disabling CQE i.e.
> > 

The errors might be chained as well, each timeout taking about 10
seconds (instead of 60s with CQE), and delaying the boot:

[    0.512744] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xe0000000-0xe3ffffff] (base 0xe0000000)
[    0.512744] PCI: MMCONFIG at [mem 0xe0000000-0xe3ffffff] reserved in E820
[    0.665246] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge
[    4.145041] sdhci: Secure Digital Host Controller Interface driver
[    4.145043] sdhci: Copyright(c) Pierre Ossman
[    4.146450] sdhci-pci 0000:00:1c.0: SDHCI controller found [8086:31cc] (rev 3)
[    4.146681] mmc0: no DSM function for 1.8 voltage switch
[    4.146682] mmc0: Voltage switching unsupported
[    4.146737] mmc0: CQHCI version 5.10
[    4.151399] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[    4.248620] mmc0: new HS400 MMC card at address 0001
[    4.249722] mmcblk0: mmc0:0001 M52532 29.1 GiB
[    4.249944] mmcblk0boot0: mmc0:0001 M52532 partition 1 4.00 MiB
[    4.250181] mmcblk0boot1: mmc0:0001 M52532 partition 2 4.00 MiB
[    4.250275] mmcblk0rpmb: mmc0:0001 M52532 partition 3 4.00 MiB, chardev (247:0)
[    4.252688]  mmcblk0: p1 p2 p3 p4 p5 p6
[    4.555256] bcache: register_cache() registered cache device mmcblk0p6
[    5.990918] sr 1:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[   16.535288] mmc0: Timeout waiting for hardware interrupt.
[   16.535300] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   16.535308] mmc0: sdhci: Sys addr:  0x00000020 | Version:  0x00001002
[   16.535316] mmc0: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000020
[   16.535322] mmc0: sdhci: Argument:  0x000f4000 | Trn mode: 0x0000003b
[   16.535329] mmc0: sdhci: Present:   0x1fff0001 | Host ctl: 0x0000003d
[   16.535336] mmc0: sdhci: Power:     0x0000000b | Blk gap:  0x00000080
[   16.535343] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
[   16.535350] mmc0: sdhci: Timeout:   0x00000006 | Int stat: 0x00000000
[   16.535358] mmc0: sdhci: Int enab:  0x02ff000b | Sig enab: 0x02ff000b
[   16.535364] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   16.535370] mmc0: sdhci: Caps:      0x546ec881 | Caps_1:   0x80000807
[   16.535377] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
[   16.535384] mmc0: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x00000000
[   16.535391] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   16.535397] mmc0: sdhci: Host ctl2: 0x0000000d
[   16.535405] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000172c5b200
[   16.535408] mmc0: sdhci: ============================================
[   26.775373] mmc0: Timeout waiting for hardware interrupt.
[   26.775386] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   26.775396] mmc0: sdhci: Sys addr:  0x00000008 | Version:  0x00001002
[   26.775403] mmc0: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000008
[   26.775410] mmc0: sdhci: Argument:  0x00cf3f80 | Trn mode: 0x0000003b
[   26.775417] mmc0: sdhci: Present:   0x1fff0001 | Host ctl: 0x0000003d
[   26.775424] mmc0: sdhci: Power:     0x0000000b | Blk gap:  0x00000080
[   26.775430] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
[   26.775437] mmc0: sdhci: Timeout:   0x00000006 | Int stat: 0x00000000
[   26.775444] mmc0: sdhci: Int enab:  0x02ff000b | Sig enab: 0x02ff000b
[   26.775451] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   26.775458] mmc0: sdhci: Caps:      0x546ec881 | Caps_1:   0x80000807
[   26.775465] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
[   26.775472] mmc0: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x00000000
[   26.775479] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000800
[   26.775484] mmc0: sdhci: Host ctl2: 0x0000000d
[   26.775492] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000172c5b200
[   26.775495] mmc0: sdhci: ============================================
[   37.015373] mmc0: Timeout waiting for hardware interrupt.
[   37.015386] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   37.015396] mmc0: sdhci: Sys addr:  0x00000008 | Version:  0x00001002
[   37.015403] mmc0: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000008
[   37.015410] mmc0: sdhci: Argument:  0x000f4000 | Trn mode: 0x0000003b
[   37.015418] mmc0: sdhci: Present:   0x1fff0206 | Host ctl: 0x0000003d
[   37.015425] mmc0: sdhci: Power:     0x0000000b | Blk gap:  0x00000080
[   37.015432] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
[   37.015438] mmc0: sdhci: Timeout:   0x00000006 | Int stat: 0x00000000
[   37.015445] mmc0: sdhci: Int enab:  0x02ff000b | Sig enab: 0x02ff000b
[   37.015452] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   37.015459] mmc0: sdhci: Caps:      0x546ec881 | Caps_1:   0x80000807
[   37.015466] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
[   37.015473] mmc0: sdhci: Resp[0]:   0x00000800 | Resp[1]:  0x00000000
[   37.015480] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000900
[   37.015486] mmc0: sdhci: Host ctl2: 0x0000000d
[   37.015494] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000172c5b200
[   37.015497] mmc0: sdhci: ============================================
[   37.016584] mmc0: mmc_hs400_to_hs200 failed, error -110
[   37.017321] mmc0: mmc_hs400_to_hs200 failed, error -110
[   47.255376] mmc0: Timeout waiting for hardware interrupt.
[   47.255389] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   47.255397] mmc0: sdhci: Sys addr:  0x00000008 | Version:  0x00001002
[   47.255405] mmc0: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000008
[   47.255412] mmc0: sdhci: Argument:  0x000f4000 | Trn mode: 0x0000003b
[   47.255420] mmc0: sdhci: Present:   0x1fff0001 | Host ctl: 0x0000003d
[   47.255426] mmc0: sdhci: Power:     0x0000000b | Blk gap:  0x00000080
[   47.255434] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000207
[   47.255441] mmc0: sdhci: Timeout:   0x00000006 | Int stat: 0x00000000
[   47.255448] mmc0: sdhci: Int enab:  0x02ff000b | Sig enab: 0x02ff000b
[   47.255455] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   47.255463] mmc0: sdhci: Caps:      0x546ec881 | Caps_1:   0x80000807
[   47.255470] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
[   47.255477] mmc0: sdhci: Resp[0]:   0x00400900 | Resp[1]:  0x00000000
[   47.255483] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000100
[   47.255489] mmc0: sdhci: Host ctl2: 0x0000000d
[   47.255497] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000172c5b200
[   47.255500] mmc0: sdhci: ============================================
[   57.495377] mmc0: Timeout waiting for hardware interrupt.
[   57.495390] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   57.495399] mmc0: sdhci: Sys addr:  0x80000001 | Version:  0x00001002
[   57.495406] mmc0: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000001
[   57.495413] mmc0: sdhci: Argument:  0x0139d5a2 | Trn mode: 0x0000002b
[   57.495419] mmc0: sdhci: Present:   0x1fff0106 | Host ctl: 0x0000003d
[   57.495425] mmc0: sdhci: Power:     0x0000000b | Blk gap:  0x00000080
[   57.495433] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000207
[   57.495440] mmc0: sdhci: Timeout:   0x00000008 | Int stat: 0x00000000
[   57.495446] mmc0: sdhci: Int enab:  0x02ff000b | Sig enab: 0x02ff000b
[   57.495453] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   57.495461] mmc0: sdhci: Caps:      0x546ec881 | Caps_1:   0x80000807
[   57.495467] mmc0: sdhci: Cmd:       0x0000193a | Max curr: 0x00000000
[   57.495474] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[   57.495480] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000900
[   57.495487] mmc0: sdhci: Host ctl2: 0x0000000d
[   57.495495] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000172c5b200
[   57.495498] mmc0: sdhci: ============================================
[   57.496650] mmc0: mmc_hs400_to_hs200 failed, error -84
[   57.498397] mmcblk0: error -84 requesting status
[   57.498924] mmc0: mmc_hs400_to_hs200 failed, error -84
[   57.499876] mmc0: cache flush error -84
[   57.601521] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[   58.513170] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro
[   58.852299] bcache: register_bcache() error /dev/mmcblk0p6: device already registered
[   59.362150] Adding 524284k swap on /dev/mmcblk0p3.  Priority:-2 extents:1 across:524284k SSFS
[   59.997479] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[   59.998027] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: errors=remount-ro


Anisse



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux