Re: [PATCH v2 07/24] mmc: sdhci: command response CRC error handling

2016-01-04 Thread Adrian Hunter
On 02/01/16 14:25, Russell King - ARM Linux wrote: > On Tue, Dec 29, 2015 at 03:08:20PM +0200, Adrian Hunter wrote: >> On 21/12/15 13:40, Russell King wrote: >>> When we get a response CRC error on a command, it means that the >>> response we received back from the car

Re: [PATCH v2 08/24] mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer

2016-01-04 Thread Adrian Hunter
On 02/01/16 16:31, Russell King - ARM Linux wrote: > On Sat, Jan 02, 2016 at 12:29:19PM +, Russell King - ARM Linux wrote: >> On Tue, Dec 29, 2015 at 03:44:38PM +0200, Adrian Hunter wrote: >>> On 21/12/15 13:41, Russell King wrote: >>>> Unnecessarily mapping

Re: [PATCH v2 08/24] mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer

2016-01-04 Thread Adrian Hunter
On 02/01/16 14:29, Russell King - ARM Linux wrote: > On Tue, Dec 29, 2015 at 03:44:38PM +0200, Adrian Hunter wrote: >> On 21/12/15 13:41, Russell King wrote: >>> Unnecessarily mapping and unmapping the align buffer for SD cards is >>> expensive: performanc

Re: [PATCH v2 07/24] mmc: sdhci: command response CRC error handling

2015-12-29 Thread Adrian Hunter
On 21/12/15 13:40, Russell King wrote: > When we get a response CRC error on a command, it means that the > response we received back from the card was not correct. It does not > mean that the card did not receive the command correctly. If the Pedantically, if the timeout bit is set as well

Re: [PATCH v2 08/24] mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer

2015-12-29 Thread Adrian Hunter
On 21/12/15 13:41, Russell King wrote: > Unnecessarily mapping and unmapping the align buffer for SD cards is > expensive: performance measurements on iMX6 show that this gives a hit > of 10% on hdparm buffered disk reads. > > MMC/SD card IO comes from the mm/vfs which gives us page based IO, so

Re: [PATCH RESEND] mmc:Fix error handling in the function mmc_blk_issue_rq

2015-12-28 Thread Adrian Hunter
On 26/12/15 22:10, Nicholas Krause wrote: > This fixes error handling in the function mmc_blk_issue_rq for > checking if the calls to the function mmc_blk_issue_rw_rq have > failed by returning zero as there return value and if so jump > immediately to the goto label out for cleanup of resources

Re: [PATCH] mmc: It is not an error for the card to be removed while suspended

2015-12-16 Thread Adrian Hunter
On 15/12/15 06:01, Jaehoon Chung wrote: > On 12/14/2015 10:51 PM, Adrian Hunter wrote: >> A card can be removed while it is runtime suspended. >> Do not print an error message. > > Well, if card is non-removable (in case of eMMC, card can be non-removable), > it needs to

Re: 4.3 kernel panics when MMC/SDHC card is inserted on thinkpad

2015-12-15 Thread Adrian Hunter
t;> [22947.054379] Code: 01 44 29 f1 e8 12 c6 ff ff 4c 89 ee 4c 89 ff e8 >> b7 8d ff ff 4c 89 e7 e8 0f c7 ff ff 48 83 c4 10 5b 41 5c 41 5d 41 5e >> 41 5f 5d c3 <0f> 0b 49 8b 54 24 50 48 85 d2 74 29 4c 8b 45 d0 4c 89 f1 >> 48 c7 >> [22947.058834] RIP [] in

[PATCH] mmc: It is not an error for the card to be removed while suspended

2015-12-14 Thread Adrian Hunter
A card can be removed while it is runtime suspended. Do not print an error message. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 2 +- drivers/mmc/core/sd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/m

Re: [PATCH] mmc: sdhci-acpi: set non-removable in ACPI table

2015-12-11 Thread Adrian Hunter
On 10/12/15 22:57, Philip Elcan wrote: > > On 12/07/2015 03:30 AM, Adrian Hunter wrote: >> On 04/12/15 17:40, Philip Elcan wrote: >>> On 12/03/2015 09:14 AM, Adrian Hunter wrote: >>>> On 03/12/15 15:48, Philip Elcan wrote: >>>>> This al

Re: [PATCH] mmc: sdhci-acpi: set non-removable in ACPI table

2015-12-07 Thread Adrian Hunter
On 04/12/15 17:40, Philip Elcan wrote: > > On 12/03/2015 09:14 AM, Adrian Hunter wrote: >> On 03/12/15 15:48, Philip Elcan wrote: >>> This allows setting an SDHC controller as non-removable >>> by using the _RMV method in the ACPI table. It doesn't >>

Re: [PATCH] mmc: sdhci-acpi: set non-removable in ACPI table

2015-12-03 Thread Adrian Hunter
On 03/12/15 15:48, Philip Elcan wrote: > This allows setting an SDHC controller as non-removable > by using the _RMV method in the ACPI table. It doesn't Is that _RMV on the host controller? Shouldn't it be on the card i.e. child device node? > mark it as non-removable if GPIO card detection is

[PATCH 1/7] mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400

2015-11-26 Thread Adrian Hunter
wenkai...@intel.com> Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Cc: sta...@vger.kernel.org # v4.2+ --- drivers/mmc/core/mmc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 66957addf9e4..549c56e8cf6b 1

[PATCH 0/7] mmc: Some fixes

2015-11-26 Thread Adrian Hunter
Hi Here are some fixes. The important ones have cc: stable. It doesn't matter to me whether you queue them as fixes or for v4.5. Adrian Hunter (6): mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPT mmc: sdhci: Do not BUG on invalid vdd mmc: sdio: Fix

[PATCH 3/7] mmc: sdhci: Do not BUG on invalid vdd

2015-11-26 Thread Adrian Hunter
The driver may not be able to set the power correctly but that is not a reason to BUG(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/sdhci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/s

[PATCH 4/7] mmc: sdio: Fix invalid vdd in voltage switch power cycle

2015-11-26 Thread Adrian Hunter
vdd. Fix by passing the card's ocr value which does not have the flag. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Cc: sta...@vger.kernel.org # v3.13+ --- drivers/mmc/core/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/sdio.c b/drive

[PATCH 6/7] mmc: sdhci: 64-bit DMA actually has 4-byte alignment

2015-11-26 Thread Adrian Hunter
). For simplicity just check it is 8-byte aligned, but add a comment that some Intel controllers actually require 8-byte alignment even when using 32-bit DMA. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/sdhci.c | 31 --- drivers/mm

[PATCH 5/7] mmc: sdhc: Fix DMA descriptor with zero data length

2015-11-26 Thread Adrian Hunter
by hitting the bug. In fact, a closer look at the SDHCI specs indicates that only the descriptor table requires 8-byte alignment for 64-bit DMA. That will be dealt with in a separate patch, but the potential for a 2-byte access remains, so this fix is needed anyway. Signed-off-by: Adrian Hunter &

[PATCH 2/7] mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPT

2015-11-26 Thread Adrian Hunter
In some cases, the stronger 33 Ohm driver strength must not be used so it is not a suitable default. Change it to the standard default 50 Ohm value. The patch applies to v4.2+ except the file name changed. It is drivers/mmc/host/sdhci-pci.c prior to v.4.4. Signed-off-by: Adrian Hunter

Re: [PATCH 0/2] sdio: Prevent re-tuning conflicting with custom sleep

2015-11-26 Thread Adrian Hunter
On 28/04/15 17:45, Adrian Hunter wrote: > Here are 2 patches that allow brcmfmac to awake from a > custom sleep state that conflicts with re-tuning. > > The first patch adds sdio_retune_hold_now() and > sdio_retune_release(). They are used in the 2nd patch > to prevent re-tunin

Re: [PATCH 0/4] mmc: mmc: Improve reliability of HS200/HS400 selection

2015-11-06 Thread Adrian Hunter
On 06/11/15 13:03, Ulf Hansson wrote: > On 28 October 2015 at 13:25, Adrian Hunter <adrian.hun...@intel.com> wrote: >> Hi >> >> Here are some patches that improve the reliability of selecting >> eMMC HS200 or HS400 mode. >> >> Generally the impro

[PATCH 0/4] mmc: mmc: Improve reliability of HS200/HS400 selection

2015-10-28 Thread Adrian Hunter
Hi Here are some patches that improve the reliability of selecting eMMC HS200 or HS400 mode. Generally the improvement is to match the host controller timing setting with the card mode before sending commands. Adrian Hunter (4): mmc: mmc: Improve reliability of mmc_select_hs200

[PATCH 3/4] mmc: mmc: Move mmc_switch_status()

2015-10-28 Thread Adrian Hunter
Move the mmc_switch_status() function in preparation for calling it in mmc_select_hs400(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/core/m

[PATCH 1/4] mmc: mmc: Improve reliability of mmc_select_hs200()

2015-10-28 Thread Adrian Hunter
timing must be restored in that case. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index c793fda27321..2cef40

[PATCH 2/4] mmc: mmc: Fix HS setting in mmc_select_hs400()

2015-10-28 Thread Adrian Hunter
. This patch does that. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 2cef40ce9851..14fb767ee8dd 100644 --- a/drivers/mmc/core

[PATCH 4/4] mmc: mmc: Improve reliability of mmc_select_hs400()

2015-10-28 Thread Adrian Hunter
. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs400() can be made more reliable by setting the host to the correct timing before sending CMD13. This patch does that. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 28 ++-- 1 file changed, 26 inse

[PATCH 1/2] mmc: sdhci-pci: Add more PCI IDs for Intel controllers

2015-10-21 Thread Adrian Hunter
Add PCI IDs for Intel host controllers Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/sdhci-pci-core.c | 48 +++ drivers/mmc/host/sdhci-pci.h | 6 + 2 files changed, 54 insertions(+) diff --git a/drivers/mmc/host

[PATCH 2/2] mmc: sdhci-acpi: Add more ACPI HIDs for Intel controllers

2015-10-21 Thread Adrian Hunter
Add ACPI HIDs for Intel host controllers including one supporting HS400. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/sdhci-acpi.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host

Re: [PATCH v2] mmc: core: Fix init_card in 52Mhz

2015-10-09 Thread Adrian Hunter
On 08/10/15 16:35, Ulf Hansson wrote: > On 8 October 2015 at 15:03, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 08/10/15 13:59, Ulf Hansson wrote: >>> On 8 October 2015 at 09:09, Chaotian Jing <chaotian.j...@mediatek.com> >>> wrote: &g

Re: [PATCH v2] mmc: core: Fix init_card in 52Mhz

2015-10-08 Thread Adrian Hunter
tus. >> >> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> >> Suggested-by: Adrian Hunter <adrian.hun...@intel.com> >> --- >> drivers/mmc/card/mmc_test.c | 6 ++ >> drivers/mmc/core/mmc.c | 2 +- >> 2 files changed, 7 insertion

[PATCH] mmc: sdhci-pci: Add another PCI ID for an Intel eMMC host controller

2015-10-06 Thread Adrian Hunter
Add another PCI ID for an Intel eMMC host controller. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/sdhci-pci.c | 8 drivers/mmc/host/sdhci-pci.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host

Re: [PATCH] mmc: core: Fix init_card in 52Mhz

2015-09-30 Thread Adrian Hunter
On 30/09/15 06:28, Chaotian Jing wrote: > Suppose that we got a data crc error, and it triggers the mmc_reset. > mmc_reset will call mmc_send_status to see if HW reset was supported. > before issue CMD13, it will do retune, and if EMMC was in HS400 mode, > it will reduce frequency to 52Mhz

Re: [PATCH] mmc: core: fix dead loop of mmc_retune

2015-09-30 Thread Adrian Hunter
mmc request so it doesn't see this issue. But definitely the CRC logic is not meant for the tuning commands, so Acked-by: Adrian Hunter <adrian.hun...@intel.com> > --- > drivers/mmc/core/core.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/driver

Re: [PATCH] mmc: core: Fix init_card in 52Mhz

2015-09-30 Thread Adrian Hunter
On 30/09/15 12:03, Chaotian Jing wrote: > On Wed, 2015-09-30 at 11:24 +0300, Adrian Hunter wrote: >> On 30/09/15 06:28, Chaotian Jing wrote: >>> Suppose that we got a data crc error, and it triggers the mmc_reset. >>> mmc_reset will call mmc_send_status to see if HW rese

Re: [PATCH] MMC/SDIO: enable SDIO device to suspend/resume asynchronously

2015-09-21 Thread Adrian Hunter
On 21/09/15 08:29, Fu, Zhonghui wrote: > > > On 2015/8/24 15:07, Fu, Zhonghui wrote: >> >> On 2015/8/17 14:48, Adrian Hunter wrote: >>> On 17/08/15 06:26, Fu, Zhonghui wrote: >>>> Hi, >>>> >>>> Any comments are welcome. >

Re: [PATCH] MMC/SDIO: enable SDIO device to suspend/resume asynchronously

2015-09-21 Thread Adrian Hunter
On 21/09/15 11:15, Adrian Hunter wrote: > On 21/09/15 08:29, Fu, Zhonghui wrote: >> >> >> On 2015/8/24 15:07, Fu, Zhonghui wrote: >>> >>> On 2015/8/17 14:48, Adrian Hunter wrote: >>>> On 17/08/15 06:26, Fu, Zhonghui wrote: >>>>>

Re: [PATCH] mmc: sdhci-acpi: detect sd card reader on asus x205ta

2015-09-07 Thread Adrian Hunter
// _HID: Hardware ID > Name (_CID, "PNP0D40" /* SDA Standard Compliant SD Host Controller */) > Name (_DDN, "Intel(R) SD Card Controller - 80860F16") // _DDN: DOS Dev > Name (_UID, 0x03) // _UID: Unique ID > Name (RDEP, Package (0x02) > > Sign

Re: [PATCH] MMC/SDIO: enable SDIO device to suspend/resume asynchronously

2015-08-17 Thread Adrian Hunter
On 17/08/15 06:26, Fu, Zhonghui wrote: Hi, Any comments are welcome. Thanks, Zhonghui On 2015/7/30 15:40, Fu, Zhonghui wrote: Enable SDIO card and function device to suspend/resume asynchronously. This can improve system suspend/resume speed. For me, it needs more explanation.

Re: [PATCH] mmc: enable mmc host device to suspend/resume asynchronously

2015-08-17 Thread Adrian Hunter
On 17/08/15 06:36, Fu, Zhonghui wrote: Hi, Any comments are welcome. Same comments as here: http://marc.info/?l=linux-kernelm=143979428424353w=2 Thanks, Zhonghui On 2015/8/3 20:39, Fu, Zhonghui wrote: Enable mmc host device to suspend/resume asynchronously. This can

Re: [PATCH] mmc/sdhci-acpi: enable sdhci-acpi device to suspend/resume asynchronously

2015-08-17 Thread Adrian Hunter
On 17/08/15 06:38, Fu, Zhonghui wrote: Hi, Any comments are welcome. Same comments as here: http://marc.info/?l=linux-kernelm=143979428424353w=2 Thanks, Zhonghui On 2015/8/3 21:10, Fu, Zhonghui wrote: Enable sdhci-acpi device to suspend/resume asynchronously. This can

Re: [PATCH 1/3] mmc: sdhci: let GPIO based card detection have higher precedence

2015-06-26 Thread Adrian Hunter
On 26/06/15 13:00, Ivan T. Ivanov wrote: Controller could have BROKEN_CARD_DETECTION quirk set, but drivers could use GPIO to detect card present state. Let, when defined, GPIO take precedence, so drivers could properly detect card state and not use polling. Signed-off-by: Ivan T. Ivanov

Re: [PATCH 1/3] mmc: sdhci: let GPIO based card detection have higher precedence

2015-06-26 Thread Adrian Hunter
On 26/06/15 14:00, Ivan T. Ivanov wrote: On Fri, 2015-06-26 at 13:19 +0300, Adrian Hunter wrote: On 26/06/15 13:00, Ivan T. Ivanov wrote: Controller could have BROKEN_CARD_DETECTION quirk set, but drivers could use GPIO to detect card present state. Let, when defined, GPIO take precedence

Re: [PATCH] mmc: host: sdhci check parameters before call dma_free_coherent

2015-06-22 Thread Adrian Hunter
...@gmail.com Acked-by: Adrian Hunter adrian.hun...@intel.com Looks like the problem started in v3.16 with: commit d1e49f77d7c7b75fdc022e1d46c1549bbc91c5b7 Author: Russell King rmk+ker...@arm.linux.org.uk Date: Fri Apr 25 12:58:34 2014 +0100 mmc: sdhci: convert ADMA descriptors to a coherent

Re: [PATCH] mmc: host: Fix mmc_alloc_host() error path

2015-06-12 Thread Adrian Hunter
On 12/06/15 07:39, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com If mmc_gpio_alloc() fails we miss to call 'kfree(host)', so rearrange the error path to fix it. Are you sure it doesn't get freed through put_device()? Signed-off-by: Fabio Estevam

Re: [RFC PATCH 2/2] mmc: core.c: Add comment to clarify special cases of ERASE/TRIM

2015-06-04 Thread Adrian Hunter
On 04/06/15 13:20, David Jander wrote: Signed-off-by: David Jander da...@protonic.nl Please never send delta patches. Always send a new version of the whole patch. --- drivers/mmc/core/core.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] mmc: core: Fix off-by-one error in mmc_do_calc_max_discard()

2015-06-01 Thread Adrian Hunter
On 01/06/15 12:20, David Jander wrote: qty is the maximum number of discard that _do_ fit in the timeout, not the first amount that does _not_ fit anymore. This seemingly harmless error has a very severe performance impact when the timeout value is enough for only 1 erase group.

Re: [PATCH] mmc: core: Fix off-by-one error in mmc_do_calc_max_discard()

2015-06-01 Thread Adrian Hunter
On 01/06/15 14:32, David Jander wrote: On Mon, 01 Jun 2015 13:36:45 +0300 Adrian Hunter adrian.hun...@intel.com wrote: On 01/06/15 12:20, David Jander wrote: qty is the maximum number of discard that _do_ fit in the timeout, not the first amount that does _not_ fit anymore. This seemingly

Re: [PATCH V2 00/11] mmc: Add support for drive strength for eMMCs

2015-05-25 Thread Adrian Hunter
On 11/05/15 13:23, Ulf Hansson wrote: On 11 May 2015 at 11:29, Adrian Hunter adrian.hun...@intel.com wrote: On 06/02/15 14:12, Adrian Hunter wrote: Hi Here is V2 of some patches to enable a host controller to select driver strength for eMMCs using HS200 or HS400. These are based on top

[PATCH V7 02/14] mmc: core: Enable / disable re-tuning

2015-05-07 Thread Adrian Hunter
will be needed upon resume since it is not known how long the suspend will last. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 4 drivers/mmc/core/sdio.c | 6 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc

[PATCH V7 12/14] mmc: block: Check re-tuning in the recovery path

2015-05-07 Thread Adrian Hunter
If re-tuning is needed, do it in the recovery path to give recovery commands a better chance of success. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/card/block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c

Re: [PATCH V6 03/15] mmc: core: Add support for re-tuning before each request

2015-05-06 Thread Adrian Hunter
On 06/05/15 12:45, Ulf Hansson wrote: On 6 May 2015 at 10:02, Adrian Hunter adrian.hun...@intel.com wrote: On 04/05/15 16:28, Ulf Hansson wrote: On 20 April 2015 at 14:09, Adrian Hunter adrian.hun...@intel.com wrote: At the start of each request, re-tune if needed and then hold off re-tuning

Re: [PATCH V6 03/15] mmc: core: Add support for re-tuning before each request

2015-05-06 Thread Adrian Hunter
On 04/05/15 16:28, Ulf Hansson wrote: On 20 April 2015 at 14:09, Adrian Hunter adrian.hun...@intel.com wrote: At the start of each request, re-tune if needed and then hold off re-tuning again until the request is done. Note that though there is one function that starts requests

Re: [PATCH V6 00/15] mmc: host: Add facility to support re-tuning

2015-05-04 Thread Adrian Hunter
On 20/04/15 15:09, Adrian Hunter wrote: Hi Here is V6 of some patches to move re-tuning support out of sdhci and into the core, and add support for HS400 re-tuning. Currently sdhci does re-tuning transparently by calling sdhci_execute_tuning() from its -request() function

[PATCH 0/2] sdio: Prevent re-tuning conflicting with custom sleep

2015-04-28 Thread Adrian Hunter
Hi Here are 2 patches that allow brcmfmac to awake from a custom sleep state that conflicts with re-tuning. The first patch adds sdio_retune_hold_now() and sdio_retune_release(). They are used in the 2nd patch to prevent re-tuning for the 'wake-up' command. Adrian Hunter (2): mmc: core

[PATCH 2/2] brcmfmac: Prevent re-tuning conflicting with 'wake-up'

2015-04-28 Thread Adrian Hunter
happened, and the error is anyway ignored. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac

[PATCH V7 02/15] mmc: core: Enable / disable re-tuning

2015-04-28 Thread Adrian Hunter
will be needed upon resume since it is not known how long the suspend will last. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- Changes in V7: Also flag re-tune needed in SDIO 'keep_power' case, when a re-tuning timer is being used. drivers/mmc/core/core.c | 4 drivers

Re: [PATCH V6 08/15] mmc: mmc: Hold re-tuning if the card is put to sleep

2015-04-22 Thread Adrian Hunter
On 21/04/15 21:25, Arend van Spriel wrote: On 04/21/15 14:26, Adrian Hunter wrote: On 21/04/15 14:53, Ulf Hansson wrote: On 21 April 2015 at 13:00, Adrian Hunteradrian.hun...@intel.com wrote: On 21/04/15 12:42, Ulf Hansson wrote: On 20 April 2015 at 14:09, Adrian Hunteradrian.hun

Re: [RFC PATCH 1/4] PM / QoS: Add pm_qos_cancel_request_lazy() that doesn't sleep

2015-04-21 Thread Adrian Hunter
On 21/04/15 13:18, Dov Levenglick wrote: On 20/04/15 17:00, Dov Levenglick wrote: Add pm_qos_cancel_request_lazy() which is convenient for contexts that may not sleep. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- include/linux/pm_qos.h | 2 ++ kernel/power/qos.c | 20

Re: [RFC PATCH 1/4] PM / QoS: Add pm_qos_cancel_request_lazy() that doesn't sleep

2015-04-21 Thread Adrian Hunter
On 20/04/15 17:00, Dov Levenglick wrote: Add pm_qos_cancel_request_lazy() which is convenient for contexts that may not sleep. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- include/linux/pm_qos.h | 2 ++ kernel/power/qos.c | 20 2 files changed, 22

Re: [PATCH V6 08/15] mmc: mmc: Hold re-tuning if the card is put to sleep

2015-04-21 Thread Adrian Hunter
On 21/04/15 14:53, Ulf Hansson wrote: On 21 April 2015 at 13:00, Adrian Hunter adrian.hun...@intel.com wrote: On 21/04/15 12:42, Ulf Hansson wrote: On 20 April 2015 at 14:09, Adrian Hunter adrian.hun...@intel.com wrote: Currently mmc sleep is used before power off and is not paired

Re: [PATCH V6 02/15] mmc: core: Enable / disable re-tuning

2015-04-21 Thread Adrian Hunter
On 21/04/15 11:59, Ulf Hansson wrote: On 20 April 2015 at 14:09, Adrian Hunter adrian.hun...@intel.com wrote: Enable re-tuning when tuning is executed and disable re-tuning when card is no longer initialized. In the case of SDIO suspend, the card can keep power. In that case, re-tuning need

Re: [PATCH V6 08/15] mmc: mmc: Hold re-tuning if the card is put to sleep

2015-04-21 Thread Adrian Hunter
On 21/04/15 12:42, Ulf Hansson wrote: On 20 April 2015 at 14:09, Adrian Hunter adrian.hun...@intel.com wrote: Currently mmc sleep is used before power off and is not paired with waking up. Nevertheless hold re-tuning. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc

[PATCH V6 13/15] mmc: block: Check re-tuning in the recovery path

2015-04-20 Thread Adrian Hunter
If re-tuning is needed, do it in the recovery path to give recovery commands a better chance of success. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/card/block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c

[PATCH V6 11/15] mmc: sdhci: Change to new way of doing re-tuning

2015-04-20 Thread Adrian Hunter
-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci.c | 112 ++- drivers/mmc/host/sdhci.h | 3 -- 2 files changed, 13 insertions(+), 102 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c80287a..b345844

[PATCH V6 15/15] mmc: core: Don't print reset warning if reset is not supported

2015-04-20 Thread Adrian Hunter
Check the error code for EOPNOTSUPP and do not print reset warning in that case. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 7aae0ff

[PATCH V6 03/15] mmc: core: Add support for re-tuning before each request

2015-04-20 Thread Adrian Hunter
hold re-tuning at other times when it might cause a conflict. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c

[PATCH V6 12/15] mmc: sdhci: Flag re-tuning is needed on CRC or End-Bit errors

2015-04-20 Thread Adrian Hunter
CRC or End-Bit errors could possibly be alleviated by re-tuning so flag re-tuning needed in those cases. Note this has no effect if re-tuning has not been enabled. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci.c | 14 +- 1 file changed, 9 insertions

[PATCH V6 07/15] mmc: core: Hold re-tuning while bkops ongoing

2015-04-20 Thread Adrian Hunter
Hold re-tuning during bkops to prevent it from conflicting with the busy state. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index dbd7a77..7aae0ff

[PATCH V6 05/15] mmc: core: Hold re-tuning during switch commands

2015-04-20 Thread Adrian Hunter
Hold re-tuning during switch commands to prevent it from conflicting with the busy state or the CMD13 verification. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/mmc_ops.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff

[PATCH V6 14/15] mmc: block: Retry errored data requests when re-tuning is needed

2015-04-20 Thread Adrian Hunter
Retry errored data requests when re-tuning is needed and add a flag to struct mmc_blk_request so that the retry is only done once. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/card/block.c | 11 ++- drivers/mmc/card/queue.h | 1 + 2 files changed, 11 insertions

[PATCH V6 06/15] mmc: core: Hold re-tuning during erase commands

2015-04-20 Thread Adrian Hunter
Hold re-tuning during erase commands to prevent it from conflicting with the sequence of commands. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index

[PATCH V6 02/15] mmc: core: Enable / disable re-tuning

2015-04-20 Thread Adrian Hunter
Enable re-tuning when tuning is executed and disable re-tuning when card is no longer initialized. In the case of SDIO suspend, the card can keep power. In that case, re-tuning need not be disabled, but ensure the re-tuning timer is disabled. Signed-off-by: Adrian Hunter adrian.hun...@intel.com

[PATCH V6 04/15] mmc: core: Check re-tuning before retrying

2015-04-20 Thread Adrian Hunter
Possibly a command is failing because re-tuning is needed. Use mmc_retune_recheck() to check re-tuning. At that point re-tuning is held, at least by the request, so mmc_retune_recheck() flags host-retune_now if the hold count is 1. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers

[PATCH V6 08/15] mmc: mmc: Hold re-tuning if the card is put to sleep

2015-04-20 Thread Adrian Hunter
Currently mmc sleep is used before power off and is not paired with waking up. Nevertheless hold re-tuning. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/mmc.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/mmc.c b

[PATCH V6 10/15] mmc: core: Add support for HS400 re-tuning

2015-04-20 Thread Adrian Hunter
HS400 re-tuning must be done in HS200 mode. Add the ability to switch from HS400 mode to HS200 mode before re-tuning and switch back to HS400 after re-tuning. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.h | 2 ++ drivers/mmc/core/host.c | 17

[PATCH V6 01/15] mmc: host: Add facility to support re-tuning

2015-04-20 Thread Adrian Hunter
needing synchronization. hold_retune is a integer to allow nesting. Various simple functions are provided to set / clear those variables. Subsequent patches take those functions into use. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/host.c | 68

[PATCH V6 00/15] mmc: host: Add facility to support re-tuning

2015-04-20 Thread Adrian Hunter
if reset is not supported New patch Adrian Hunter (15): mmc: host: Add facility to support re-tuning mmc: core: Enable / disable re-tuning mmc: core: Add support for re-tuning before each request mmc: core: Check re-tuning before retrying mmc: core: Hold re

Re: [PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-17 Thread Adrian Hunter
On 16/04/15 18:19, Ulf Hansson wrote: [...] 1) Card removal/detect (hold/release?) Re-tuning will be done if needed before detect (because it is done before a request), which is necessary because detect can fail if tuning is needed. Re-tuning is done before a request. Requests aren't

Re: [PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-17 Thread Adrian Hunter
On 16/04/15 16:57, Ulf Hansson wrote: [...] 2) system PM (disable?) System pm does mmc_power_off() which calls mmc_set_initial_state() At System PM other commands will be sent to put the card into sleep state. For example CMD5. These commands are invoked prior mmc_power_off() is called.

Re: [PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-17 Thread Adrian Hunter
On 17/04/15 11:56, Ulf Hansson wrote: On 17 April 2015 at 09:06, Adrian Hunter adrian.hun...@intel.com wrote: On 16/04/15 18:19, Ulf Hansson wrote: [...] 1) Card removal/detect (hold/release?) Re-tuning will be done if needed before detect (because it is done before a request), which

Re: [PATCH V4 01/15] mmc: host: Add facility to support re-tuning

2015-04-16 Thread Adrian Hunter
On 16/04/15 10:24, Ulf Hansson wrote: [...] Using runtime pm for custom sleep states would seem to conflict with its use by the power domain. For example ACPI will enumerate embedded SDIO function devices and link them to the ACPI power domain. Then ACPI will choose the lowest power

Re: [PATCH V5 08/15] mmc: mmc: Comment that callers need to hold re-tuning if the card is put to sleep

2015-04-16 Thread Adrian Hunter
On 16/04/15 12:01, Ulf Hansson wrote: On 14 April 2015 at 15:12, Adrian Hunter adrian.hun...@intel.com wrote: Currently mmc sleep is only used before power off and is not paired with waking up. If that ever changed, re-tuning might need to be held, so add a comment for that. Signed-off

Re: [PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-16 Thread Adrian Hunter
On 16/04/15 11:57, Ulf Hansson wrote: On 14 April 2015 at 15:12, Adrian Hunter adrian.hun...@intel.com wrote: Enable re-tuning when tuning is executed and disable re-tuning when card is no longer initialized. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c

[PATCH V6 07/15] mmc: core: Hold re-tuning while bkops ongoing

2015-04-16 Thread Adrian Hunter
Hold re-tuning during bkops to prevent it from conflicting with the busy state. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- Changes in V6: Hold re-tuning always and release only if bkops is not ongoing. drivers/mmc/core/core.c | 6 ++ 1 file changed, 6

Re: [PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-16 Thread Adrian Hunter
On 16/04/15 15:00, Ulf Hansson wrote: On 16 April 2015 at 11:26, Adrian Hunter adrian.hun...@intel.com wrote: On 16/04/15 11:57, Ulf Hansson wrote: On 14 April 2015 at 15:12, Adrian Hunter adrian.hun...@intel.com wrote: Enable re-tuning when tuning is executed and disable re-tuning when card

Re: [PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-16 Thread Adrian Hunter
On 16/04/15 15:00, Ulf Hansson wrote: On 16 April 2015 at 11:26, Adrian Hunter adrian.hun...@intel.com wrote: On 16/04/15 11:57, Ulf Hansson wrote: On 14 April 2015 at 15:12, Adrian Hunter adrian.hun...@intel.com wrote: Enable re-tuning when tuning is executed and disable re-tuning when card

Re: [PATCH V4 01/15] mmc: host: Add facility to support re-tuning

2015-04-14 Thread Adrian Hunter
On 13/04/15 15:07, Ulf Hansson wrote: On 8 April 2015 at 09:42, Adrian Hunter adrian.hun...@intel.com wrote: On 02/04/15 17:00, Ulf Hansson wrote: [...] Also SDIO cards can have a custom sleep state where tuning won't work. Our SDIO wifi device has such a state and it can only come out

[PATCH V5 03/15] mmc: core: Add support for re-tuning before each request

2015-04-14 Thread Adrian Hunter
hold re-tuning at other times when it might cause a conflict. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c

[PATCH V5 06/15] mmc: core: Hold re-tuning during erase commands

2015-04-14 Thread Adrian Hunter
Hold re-tuning during erase commands to prevent it from conflicting with the sequence of commands. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index

[PATCH V5 05/15] mmc: core: Hold re-tuning during switch commands

2015-04-14 Thread Adrian Hunter
Hold re-tuning during switch commands to prevent it from conflicting with the busy state or the CMD13 verification. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/mmc_ops.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff

[PATCH V5 04/15] mmc: core: Check re-tuning before retrying

2015-04-14 Thread Adrian Hunter
Possibly a command is failing because re-tuning is needed. Use mmc_retune_recheck() to check re-tuning. At that point re-tuning is held, at least by the request, so mmc_retune_recheck() flags host-retune_now if the hold count is 1. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers

[PATCH V5 07/15] mmc: core: Hold re-tuning while bkops ongoing

2015-04-14 Thread Adrian Hunter
Hold re-tuning during bkops to prevent it from conflicting with the busy state. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index dbd7a77..4a42174

[PATCH V5 00/15] mmc: host: Add facility to support re-tuning

2015-04-14 Thread Adrian Hunter
when re-tuning is needed New patch mmc: core: Don't print reset warning if reset is not supported New patch Adrian Hunter (15): mmc: host: Add facility to support re-tuning mmc: core: Enable / disable re-tuning mmc: core: Add support for re-tuning before each

[PATCH V5 01/15] mmc: host: Add facility to support re-tuning

2015-04-14 Thread Adrian Hunter
needing synchronization. hold_retune is a integer to allow nesting. Various simple functions are provided to set / clear those variables. Subsequent patches take those functions into use. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/host.c | 71

[PATCH V5 02/15] mmc: core: Enable / disable re-tuning

2015-04-14 Thread Adrian Hunter
Enable re-tuning when tuning is executed and disable re-tuning when card is no longer initialized. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index

[PATCH V5 14/15] mmc: block: Retry errored data requests when re-tuning is needed

2015-04-14 Thread Adrian Hunter
Retry errored data requests when re-tuning is needed and add a flag to struct mmc_blk_request so that the retry is only done once. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/card/block.c | 11 ++- drivers/mmc/card/queue.h | 1 + 2 files changed, 11 insertions

[PATCH V5 08/15] mmc: mmc: Comment that callers need to hold re-tuning if the card is put to sleep

2015-04-14 Thread Adrian Hunter
Currently mmc sleep is only used before power off and is not paired with waking up. If that ever changed, re-tuning might need to be held, so add a comment for that. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH V5 10/15] mmc: core: Add support for HS400 re-tuning

2015-04-14 Thread Adrian Hunter
HS400 re-tuning must be done in HS200 mode. Add the ability to switch from HS400 mode to HS200 mode before re-tuning and switch back to HS400 after re-tuning. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/core.h | 2 ++ drivers/mmc/core/host.c | 17

[PATCH V5 11/15] mmc: sdhci: Change to new way of doing re-tuning

2015-04-14 Thread Adrian Hunter
-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci.c | 112 ++- drivers/mmc/host/sdhci.h | 3 -- 2 files changed, 13 insertions(+), 102 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c80287a..b345844

[PATCH V5 09/15] mmc: core: Separate out the mmc_switch status check so it can be re-used

2015-04-14 Thread Adrian Hunter
Make a separate function to do the mmc_switch status check so it can be re-used. This is preparation for adding support for HS400 re-tuning. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/core/mmc_ops.c | 30 -- drivers/mmc/core/mmc_ops.h | 1

  1   2   3   4   5   6   7   8   9   >