* [PATCH resend 0/2] mmc: sdhci-acpi quirks changes
@ 2017-03-08 8:49 Hans de Goede
2017-03-08 8:49 ` [PATCH resend 1/2] mmc: sdhci-acpi: Sync quirks with sdhci_intel_byt_* from sdhci-pci-core.c Hans de Goede
2017-03-08 8:49 ` [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk Hans de Goede
0 siblings, 2 replies; 5+ messages in thread
From: Hans de Goede @ 2017-03-08 8:49 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson; +Cc: Hans de Goede, linux-mmc
Hi,
These 2 patches seem to have fallen through the crack, so I'm
resending them. They have been rebased on top of 4.11-rc1 (trivial
rebase).
Regards,
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH resend 1/2] mmc: sdhci-acpi: Sync quirks with sdhci_intel_byt_* from sdhci-pci-core.c
2017-03-08 8:49 [PATCH resend 0/2] mmc: sdhci-acpi quirks changes Hans de Goede
@ 2017-03-08 8:49 ` Hans de Goede
2017-03-08 8:49 ` [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk Hans de Goede
1 sibling, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2017-03-08 8:49 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson; +Cc: Hans de Goede, linux-mmc
The sdhci_intel_byt_* and the non _qcom_ sdhci_acpi_slot_ entries in
sdhci-acpi.c are for the same mmc host in either pci or acpi mapped
mode, so the flags should be the same.
The syncing removes the SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk from
sdhci_acpi_slot_int_sdio, this quirk is a nop as this slot also has
MMC_CAP_NONREMOVABLE, and adds SDHCI_QUIRK2_PRESET_VALUE_BROKEN to
sdhci_acpi_slot_int_sdio and sdhci_acpi_slot_int_sd. Note that
sdhci_acpi_slot_int_mmc already has the SDHCI_QUIRK2_PRESET_VALUE_BROKEN
quirk, which is another indication that the others need it too.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/mmc/host/sdhci-acpi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 9dcb704..237f318 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -286,9 +286,9 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = {
};
static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
- .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
- SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
- .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON,
+ .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+ .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
+ SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
.caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD |
MMC_CAP_WAIT_WHILE_BUSY,
.flags = SDHCI_ACPI_RUNTIME_PM,
@@ -301,6 +301,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = {
SDHCI_ACPI_RUNTIME_PM,
.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
.quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
+ SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
SDHCI_QUIRK2_STOP_WITH_TC,
.caps = MMC_CAP_WAIT_WHILE_BUSY,
.probe_slot = sdhci_acpi_sd_probe_slot,
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk
2017-03-08 8:49 [PATCH resend 0/2] mmc: sdhci-acpi quirks changes Hans de Goede
2017-03-08 8:49 ` [PATCH resend 1/2] mmc: sdhci-acpi: Sync quirks with sdhci_intel_byt_* from sdhci-pci-core.c Hans de Goede
@ 2017-03-08 8:49 ` Hans de Goede
2017-03-15 13:48 ` Ulf Hansson
1 sibling, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2017-03-08 8:49 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson; +Cc: Hans de Goede, linux-mmc, Dong Aisheng
From: Dong Aisheng <b29396@freescale.com>
SDIO cards may need clock to send the card interrupt to the host.
Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON to prevent the clock resource
being released.
Hans de Goede:
It looks like we still need this patch, on a cherrytrail tablet with
a RTL8723BS wifi chip, without this patch pinging the tablet results in:
PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=78.6 ms
64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1760 ms
64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=753 ms
64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=3.88 ms
64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=795 ms
64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1841 ms
64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=810 ms
64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1860 ms
64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=812 ms
64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=48.6 ms
Where as with this patch I get:
PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=3.96 ms
64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1.97 ms
64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=17.2 ms
64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=2.46 ms
64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=2.83 ms
64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1.40 ms
64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=2.10 ms
64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1.40 ms
64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=2.04 ms
64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=1.40 ms
Signed-off-by: Dong Aisheng <b29396@freescale.com>
[hdegoede@redhat.com: Updated commit msg with sdio wifi ping output]
[hdegoede@redhat.com: Add quirk to both acpi and pci intel-sdio entries]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Note an alternative approach would be to add a new flag for this and do
a runtime_pm_get on sdio_irq_enable and runtime_pm_put on
sdio_irq_disable, that would safe some power if the sdio-driver properly
disables the irq when e.g. wifi is turned off, or an oob interrupt is
used.
---
drivers/mmc/host/sdhci-acpi.c | 1 +
drivers/mmc/host/sdhci-pci-core.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 237f318..c107757 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -288,6 +288,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = {
static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
.quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
+ SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
.caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD |
MMC_CAP_WAIT_WHILE_BUSY,
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 982b3e3..7cb54b0 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -498,6 +498,7 @@ static const struct sdhci_pci_fixes sdhci_ni_byt_sdio = {
static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
.quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
+ SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
.allow_runtime_pm = true,
.probe_slot = byt_sdio_probe_slot,
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk
2017-03-08 8:49 ` [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk Hans de Goede
@ 2017-03-15 13:48 ` Ulf Hansson
2017-03-15 16:27 ` Hans de Goede
0 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2017-03-15 13:48 UTC (permalink / raw)
To: Hans de Goede; +Cc: Adrian Hunter, linux-mmc@vger.kernel.org, Dong Aisheng
On 8 March 2017 at 09:49, Hans de Goede <hdegoede@redhat.com> wrote:
> From: Dong Aisheng <b29396@freescale.com>
>
> SDIO cards may need clock to send the card interrupt to the host.
> Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON to prevent the clock resource
> being released.
>
> Hans de Goede:
>
> It looks like we still need this patch, on a cherrytrail tablet with
> a RTL8723BS wifi chip, without this patch pinging the tablet results in:
>
> PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
> 64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=78.6 ms
> 64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1760 ms
> 64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=753 ms
> 64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=3.88 ms
> 64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=795 ms
> 64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1841 ms
> 64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=810 ms
> 64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1860 ms
> 64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=812 ms
> 64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=48.6 ms
>
> Where as with this patch I get:
>
> PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
> 64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=3.96 ms
> 64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1.97 ms
> 64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=17.2 ms
> 64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=2.46 ms
> 64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=2.83 ms
> 64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1.40 ms
> 64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=2.10 ms
> 64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1.40 ms
> 64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=2.04 ms
> 64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=1.40 ms
>
> Signed-off-by: Dong Aisheng <b29396@freescale.com>
> [hdegoede@redhat.com: Updated commit msg with sdio wifi ping output]
> [hdegoede@redhat.com: Add quirk to both acpi and pci intel-sdio entries]
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Note an alternative approach would be to add a new flag for this and do
> a runtime_pm_get on sdio_irq_enable and runtime_pm_put on
> sdio_irq_disable, that would safe some power if the sdio-driver properly
> disables the irq when e.g. wifi is turned off, or an oob interrupt is
> used.
That approach seems more reasonable. Can you please try this instead?
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-acpi.c | 1 +
> drivers/mmc/host/sdhci-pci-core.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index 237f318..c107757 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -288,6 +288,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = {
> static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
> .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
> + SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
> SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> .caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD |
> MMC_CAP_WAIT_WHILE_BUSY,
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 982b3e3..7cb54b0 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -498,6 +498,7 @@ static const struct sdhci_pci_fixes sdhci_ni_byt_sdio = {
> static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
> .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
> + SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
> SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> .allow_runtime_pm = true,
> .probe_slot = byt_sdio_probe_slot,
> --
> 2.9.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk
2017-03-15 13:48 ` Ulf Hansson
@ 2017-03-15 16:27 ` Hans de Goede
0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2017-03-15 16:27 UTC (permalink / raw)
To: Ulf Hansson; +Cc: Adrian Hunter, linux-mmc@vger.kernel.org, Dong Aisheng
Hi,
On 15-03-17 14:48, Ulf Hansson wrote:
> On 8 March 2017 at 09:49, Hans de Goede <hdegoede@redhat.com> wrote:
>> From: Dong Aisheng <b29396@freescale.com>
>>
>> SDIO cards may need clock to send the card interrupt to the host.
>> Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON to prevent the clock resource
>> being released.
>>
>> Hans de Goede:
>>
>> It looks like we still need this patch, on a cherrytrail tablet with
>> a RTL8723BS wifi chip, without this patch pinging the tablet results in:
>>
>> PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
>> 64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=78.6 ms
>> 64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1760 ms
>> 64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=753 ms
>> 64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=3.88 ms
>> 64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=795 ms
>> 64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1841 ms
>> 64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=810 ms
>> 64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1860 ms
>> 64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=812 ms
>> 64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=48.6 ms
>>
>> Where as with this patch I get:
>>
>> PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
>> 64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=3.96 ms
>> 64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1.97 ms
>> 64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=17.2 ms
>> 64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=2.46 ms
>> 64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=2.83 ms
>> 64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1.40 ms
>> 64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=2.10 ms
>> 64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1.40 ms
>> 64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=2.04 ms
>> 64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=1.40 ms
>>
>> Signed-off-by: Dong Aisheng <b29396@freescale.com>
>> [hdegoede@redhat.com: Updated commit msg with sdio wifi ping output]
>> [hdegoede@redhat.com: Add quirk to both acpi and pci intel-sdio entries]
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> Note an alternative approach would be to add a new flag for this and do
>> a runtime_pm_get on sdio_irq_enable and runtime_pm_put on
>> sdio_irq_disable, that would safe some power if the sdio-driver properly
>> disables the irq when e.g. wifi is turned off, or an oob interrupt is
>> used.
>
> That approach seems more reasonable. Can you please try this instead?
Ok, done (just completed testing it) I will send a v2 of this set
with that approach right after this mail.
Regards,
Hans
>
> Kind regards
> Uffe
>
>> ---
>> drivers/mmc/host/sdhci-acpi.c | 1 +
>> drivers/mmc/host/sdhci-pci-core.c | 1 +
>> 2 files changed, 2 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
>> index 237f318..c107757 100644
>> --- a/drivers/mmc/host/sdhci-acpi.c
>> +++ b/drivers/mmc/host/sdhci-acpi.c
>> @@ -288,6 +288,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = {
>> static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
>> .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>> .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
>> + SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
>> SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
>> .caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD |
>> MMC_CAP_WAIT_WHILE_BUSY,
>> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
>> index 982b3e3..7cb54b0 100644
>> --- a/drivers/mmc/host/sdhci-pci-core.c
>> +++ b/drivers/mmc/host/sdhci-pci-core.c
>> @@ -498,6 +498,7 @@ static const struct sdhci_pci_fixes sdhci_ni_byt_sdio = {
>> static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
>> .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>> .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
>> + SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
>> SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
>> .allow_runtime_pm = true,
>> .probe_slot = byt_sdio_probe_slot,
>> --
>> 2.9.3
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-15 16:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08 8:49 [PATCH resend 0/2] mmc: sdhci-acpi quirks changes Hans de Goede
2017-03-08 8:49 ` [PATCH resend 1/2] mmc: sdhci-acpi: Sync quirks with sdhci_intel_byt_* from sdhci-pci-core.c Hans de Goede
2017-03-08 8:49 ` [PATCH resend 2/2] mmc: sdhci: sdio-intel: Set SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk Hans de Goede
2017-03-15 13:48 ` Ulf Hansson
2017-03-15 16:27 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox