linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * [PATCH v2 1/3] mmc: sdhci-pci: disable 1.8V with dmi quirk
           [not found] <20181022134026.GB18413@jaya>
           [not found] ` <20181018102112.31054-1-anisse@astier.eu>
    @ 2018-10-23 10:07 ` Anisse Astier
      2018-10-23 10:07 ` [PATCH v2 2/3] mmc: sdhci-pci: add new machine with 1.8V " Anisse Astier
      2018-10-23 10:07 ` [PATCH v2 3/3] mmc: sdhci-pci: only install voltage switch method when useful Anisse Astier
      3 siblings, 0 replies; 7+ messages in thread
    From: Anisse Astier @ 2018-10-23 10:07 UTC (permalink / raw)
      To: Adrian Hunter; +Cc: Ulf Hansson, linux-mmc, linux-kernel, Anisse Astier
    
    If the motherboard is known not to support 1.8V properly, add the
    necessary quirk on probe.
    
    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.
    
    Signed-off-by: Anisse Astier <anisse@astier.eu>
    ---
     drivers/mmc/host/sdhci-pci-core.c | 17 +++++++++++++++++
     1 file changed, 17 insertions(+)
    
    diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
    index 7bfd366d970d..396413f7c854 100644
    --- a/drivers/mmc/host/sdhci-pci-core.c
    +++ b/drivers/mmc/host/sdhci-pci-core.c
    @@ -29,6 +29,7 @@
     #include <linux/mmc/slot-gpio.h>
     #include <linux/mmc/sdhci-pci-data.h>
     #include <linux/acpi.h>
    +#include <linux/dmi.h>
     
     #include "cqhci.h"
     
    @@ -703,6 +704,16 @@ static int intel_execute_tuning(struct mmc_host *mmc, u32 opcode)
     	return 0;
     }
     
    +static const struct dmi_system_id board_no_1_8v[] = {
    +	{
    +		.matches = {
    +			DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
    +			DMI_MATCH(DMI_PRODUCT_NAME, "N75_77GU"),
    +		},
    +	},
    +	{ }
    +};
    +
     static void byt_probe_slot(struct sdhci_pci_slot *slot)
     {
     	struct mmc_host_ops *ops = &slot->host->mmc_host_ops;
    @@ -710,6 +721,12 @@ static void byt_probe_slot(struct sdhci_pci_slot *slot)
     	byt_read_dsm(slot);
     
     	ops->execute_tuning = intel_execute_tuning;
    +
    +	if (dmi_check_system(board_no_1_8v)) {
    +		pr_debug("%s: motherboard does not support 1.8V\n",
    +				mmc_hostname(slot->host->mmc));
    +		slot->host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
    +	}
     	ops->start_signal_voltage_switch = intel_start_signal_voltage_switch;
     }
     
    -- 
    2.17.2
    
    
    ^ permalink raw reply related	[flat|nested] 7+ messages in thread
  • * [PATCH v2 2/3] mmc: sdhci-pci: add new machine with 1.8V dmi quirk
           [not found] <20181022134026.GB18413@jaya>
           [not found] ` <20181018102112.31054-1-anisse@astier.eu>
      2018-10-23 10:07 ` [PATCH v2 1/3] mmc: sdhci-pci: disable 1.8V with dmi quirk Anisse Astier
    @ 2018-10-23 10:07 ` Anisse Astier
      2018-10-23 10:07 ` [PATCH v2 3/3] mmc: sdhci-pci: only install voltage switch method when useful Anisse Astier
      3 siblings, 0 replies; 7+ messages in thread
    From: Anisse Astier @ 2018-10-23 10:07 UTC (permalink / raw)
      To: Adrian Hunter; +Cc: Ulf Hansson, linux-mmc, linux-kernel, Anisse Astier
    
    This machine also displays the same issue that is fixed by the quirk.
    
    Signed-off-by: Anisse Astier <anisse@astier.eu>
    ---
     drivers/mmc/host/sdhci-pci-core.c | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
    index 396413f7c854..f2c1fb339d66 100644
    --- a/drivers/mmc/host/sdhci-pci-core.c
    +++ b/drivers/mmc/host/sdhci-pci-core.c
    @@ -711,6 +711,12 @@ static const struct dmi_system_id board_no_1_8v[] = {
     			DMI_MATCH(DMI_PRODUCT_NAME, "N75_77GU"),
     		},
     	},
    +	{
    +		.matches = {
    +			DMI_MATCH(DMI_SYS_VENDOR, "Ordissimo"),
    +			DMI_MATCH(DMI_PRODUCT_NAME, "Agathe3"),
    +		},
    +	},
     	{ }
     };
     
    -- 
    2.17.2
    
    
    ^ permalink raw reply related	[flat|nested] 7+ messages in thread
  • * [PATCH v2 3/3] mmc: sdhci-pci: only install voltage switch method when useful
           [not found] <20181022134026.GB18413@jaya>
                       ` (2 preceding siblings ...)
      2018-10-23 10:07 ` [PATCH v2 2/3] mmc: sdhci-pci: add new machine with 1.8V " Anisse Astier
    @ 2018-10-23 10:07 ` Anisse Astier
      2018-11-16 16:58   ` Anisse Astier
      3 siblings, 1 reply; 7+ messages in thread
    From: Anisse Astier @ 2018-10-23 10:07 UTC (permalink / raw)
      To: Adrian Hunter; +Cc: Ulf Hansson, linux-mmc, linux-kernel, Anisse Astier
    
    If there's no ACPI DSM for voltage switch, it will just cause a lot of
    debug info down the line, we only need one at startup.
    
    Signed-off-by: Anisse Astier <anisse@astier.eu>
    ---
     drivers/mmc/host/sdhci-pci-core.c | 11 +++++++++++
     1 file changed, 11 insertions(+)
    
    diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
    index f2c1fb339d66..95fdbb883c7e 100644
    --- a/drivers/mmc/host/sdhci-pci-core.c
    +++ b/drivers/mmc/host/sdhci-pci-core.c
    @@ -723,6 +723,7 @@ static const struct dmi_system_id board_no_1_8v[] = {
     static void byt_probe_slot(struct sdhci_pci_slot *slot)
     {
     	struct mmc_host_ops *ops = &slot->host->mmc_host_ops;
    +	struct intel_host *intel_host = sdhci_pci_priv(slot);
     
     	byt_read_dsm(slot);
     
    @@ -733,6 +734,16 @@ static void byt_probe_slot(struct sdhci_pci_slot *slot)
     				mmc_hostname(slot->host->mmc));
     		slot->host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
     	}
    +	/* Check if we have the appropriate voltage switch DSM methods */
    +	if (!(intel_host->dsm_fns & (1 << INTEL_DSM_V18_SWITCH)) &&
    +	    !(intel_host->dsm_fns & (1 << INTEL_DSM_V33_SWITCH))) {
    +		/* No voltage switching supported at all, there's no
    +		 * point in installing the callback: return.
    +		 */
    +		pr_debug("%s: No voltage switching ACPI DSM helper\n",
    +				mmc_hostname(slot->host->mmc));
    +		return;
    +	}
     	ops->start_signal_voltage_switch = intel_start_signal_voltage_switch;
     }
     
    -- 
    2.17.2
    
    
    ^ permalink raw reply related	[flat|nested] 7+ messages in thread

  • end of thread, other threads:[~2018-11-19  9:33 UTC | newest]
    
    Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <20181022134026.GB18413@jaya>
         [not found] ` <20181018102112.31054-1-anisse@astier.eu>
         [not found]   ` <88d3fffb-df8d-f29e-f7c1-3bef815435d2@intel.com>
         [not found]     ` <20181019092513.GA2150@jaya>
         [not found]       ` <89d02cd8-c910-76fe-3b08-5dd056ba8a11@intel.com>
         [not found]         ` <20181019134237.GA2762@jaya>
         [not found]           ` <e329ed2e-75b5-e9f0-04e8-097594003e66@intel.com>
         [not found]             ` <20181022091436.GA18413@jaya>
         [not found]               ` <656f1d2e-e27a-cee4-78e1-774e45f067a6@intel.com>
    2018-10-23 10:07                 ` [PATCH v2 0/3] sdhci-pci voltage switch fixes Anisse Astier
    2018-10-23 10:07 ` [PATCH v2 1/3] mmc: sdhci-pci: disable 1.8V with dmi quirk Anisse Astier
    2018-10-23 10:07 ` [PATCH v2 2/3] mmc: sdhci-pci: add new machine with 1.8V " Anisse Astier
    2018-10-23 10:07 ` [PATCH v2 3/3] mmc: sdhci-pci: only install voltage switch method when useful Anisse Astier
    2018-11-16 16:58   ` Anisse Astier
    2018-11-19  7:45     ` Adrian Hunter
    2018-11-19  9:33       ` Anisse Astier
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).