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: <53353981.7050302@realtek.com>
Date:	Fri, 28 Mar 2014 16:57:37 +0800
From:	Roger <rogerable@...ltek.com>
To:	Oliver Neukum <oneukum@...e.de>
CC:	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Chris Ball <chris@...ntf.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Maxim Levitsky <maximlevitsky@...il.com>,
	Alex Dubov <oakad@...oo.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	<linux-kernel@...r.kernel.org>, <linux-mmc@...r.kernel.org>,
	<driverdev-devel@...uxdriverproject.org>,
	<wei_wang@...lsil.com.cn>, <micky_ching@...lsil.com.cn>
Subject: Re: [PATCH v5 1/3] mfd: Add realtek USB card reader driver


On 03/28/2014 04:31 PM, Oliver Neukum wrote:
> On Fri, 2014-03-28 at 11:33 +0800, Roger wrote:
>> On 03/26/2014 10:36 PM, Oliver Neukum wrote:
>>> On Tue, 2014-03-25 at 18:44 +0800, rogerable@...ltek.com wrote:
>>>> From: Roger Tseng <rogerable@...ltek.com>
>
>>>> +	if (ret)
>>>> +		goto out_init_fail;
>>>> +
>>>> +	/* initialize USB SG transfer timer */
>>>> +	init_timer(&ucr->sg_timer);
>>>> +	setup_timer(&ucr->sg_timer, rtsx_usb_sg_timed_out, (unsigned long) ucr);
>>>> +#ifdef CONFIG_PM
>>>> +	intf->needs_remote_wakeup = 1;
>>>
>>> Why?
>> Our reader supports remote wake-up from card slot event(insertion,
>> removal). It should be enabled to let the driver be able to detect the
>> newly inserted card.
>
> Interesting. This capability has been lacking for a long time.
> That is cool hardware. Are you sure the upper layers implement
> the event infrastructure so that devices are not polled?
>
Polling is still necessary because USB essentially doesn't support 
interrupt.

However, if remote wake-up is not enabled or supported, the device will 
have to be resumed every time when polling and then suspended right away 
if there isn't a new card. This should consume more power than the 
designed behavior: suspending device while card removed, taking failed 
polls as no-card, and card being successfully polled after 
insertion-triggered remote wake-up.

>> The LED is not in a permanent cut-off state after here. It is called to
>> guarantee the LED is off during suspend to save more power. It could be
>> lit up in the card host drivers(e.g. rtsx_usb_sdmmc.c) anytime whenever
>> necessary.
>>
>> This has been asked may times. I'm considering putting some comment in
>> next revision.
>
> Good idea.
>
> 	Regards
> 		Oliver

Best regards,
Roger Tseng
--
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