lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFqp-_KguRjby4gSnjjXKctHrhjh3uWqYHmJFcD=x3Dogg@mail.gmail.com>
Date:	Tue, 11 Feb 2014 10:50:43 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Roger <rogerable@...ltek.com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>, Chris Ball <cjb@...top.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Maxim Levitsky <maximlevitsky@...il.com>,
	Alex Dubov <oakad@...oo.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	driverdev-devel@...uxdriverproject.org,
	Wei WANG <wei_wang@...lsil.com.cn>, micky_ching@...lsil.com.cn
Subject: Re: [PATCH v3 2/3] mmc: Add realtek USB sdmmc host driver

On 11 February 2014 10:27, Roger <rogerable@...ltek.com> wrote:
> On 02/10/2014 10:58 PM, Ulf Hansson wrote:
>>
>> On 6 February 2014 15:35,  <rogerable@...ltek.com> wrote:
>>>
>>> From: Roger Tseng <rogerable@...ltek.com>
>>>
>>> Realtek USB SD/MMC host driver provides mmc host support based on the
>>> Realtek
>>> USB card reader MFD driver.
>>>
>>> Signed-off-by: Roger Tseng <rogerable@...ltek.com>
>>> ---
>>>   drivers/mmc/host/Kconfig          |    7 +
>>>   drivers/mmc/host/Makefile         |    1 +
>>>   drivers/mmc/host/rtsx_usb_sdmmc.c | 1500
>>> +++++++++++++++++++++++++++++++++++++
>>>   3 files changed, 1508 insertions(+)
>>>   create mode 100644 drivers/mmc/host/rtsx_usb_sdmmc.c
>
> [snip]
>
>>> +#ifdef CONFIG_PM_RUNTIME
>>
>>
>> There are stubs for pm_runtime* functions, thus the ifdefs can be removed.
>> Please go though the complete patch and remove all instances.
>>
>>> +               pm_runtime_put(sdmmc_dev(host));
>>
>>
>> I don't know so much about USB mmc hosts hardware, but I just wanted
>> to find out if I have understood this correct.
>>
>> You can't do fine grained power management of the USB parent device,
>> since it needs to be runtime resumed to be able keep the power the
>> card? Once it becomes runtime suspended, the power to the card will
>> thus also be dropped?
>>
> Yes, and to keep some internal state of the controller.

Okay.

But the internal state of the controller should be possible to restore
at runtime_resume, so that should not be the reason, right?

>
> [snip]
>
>>> +#ifdef CONFIG_PM
>>
>>
>> I suppose this should be CONFIG_PM_SLEEP?
>>
> ...
>
>>> +       err = mmc_suspend_host(mmc);
>>
>>
>> This won't compile. The mmc_suspend_host API has been removed.
>>
> ...
>
>>> +       return mmc_resume_host(mmc);
>>
>>
>> This won't compile. The mmc_resume_host API has been removed.
>>
> ...
>>>
>>> +static struct platform_driver rtsx_usb_sdmmc_driver = {
>>> +       .probe          = rtsx_usb_sdmmc_drv_probe,
>>> +       .remove         = rtsx_usb_sdmmc_drv_remove,
>>> +       .id_table       = rtsx_usb_sdmmc_ids,
>>> +       .suspend        = rtsx_usb_sdmmc_suspend,
>>> +       .resume         = rtsx_usb_sdmmc_resume,
>>
>>
>> Please use the modern pm_ops instead of the legacy suspend/resume
>> callbacks.
>> I suggest you then also switch to use the SIMPLE_DEV_PM_OPS macro.
>
>
> I just missed the removal of mmc_suspend|resume_host.
>
> I'll remove all these unnecessary mmc host pm things as done in commit
> ff71c4bcb0af2730d047989e485303ae4e1ce794 for drivers of our PCIe devices.
>
> Thanks for pointing this out.
>
>> Kind regards
>> Ulf Hansson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ