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]
Date:	Mon, 12 Mar 2012 19:59:08 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	Sergei Shtylyov <sshtylyov@...sta.com>
Cc:	Jeff Garzik <jgarzik@...ox.com>, linux-ide@...r.kernel.org,
	lkml <linux-kernel@...r.kernel.org>, jslaby@...e.cz,
	cwillu@...llu.com, jackdachef@...il.com
Subject: Re: [PATCH] libata: disable runtime pm for hotpluggable port

On Mon, 2012-03-12 at 14:29 +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 12-03-2012 5:16, Lin Ming wrote:
> 
> > Currently, hotplug doesn't work if port is already runtime suspended.
> > For now, we simply disable runtime pm for hotpluggable port.
> > Later, we should add runtime pm support for hotpluggable port too.
> 
> > https://lkml.org/lkml/2012/2/19/70
> 
> > TODO: add similar hotpluggable port check for controllers other than AHCI.
> 
> > Reported-and-tested-by: Jiri Slaby<jslaby@...e.cz>
> > Reported-and-tested-by: cwillu@...llu.com
> > Reported-and-tested-by: jackdachef@...il.com
> > Signed-off-by: Lin Ming<ming.m.lin@...el.com>
> [...]
> 
> > diff --git a/include/linux/libata.h b/include/linux/libata.h
> > index 3085bdc..ccf0282 100644
> > --- a/include/linux/libata.h
> > +++ b/include/linux/libata.h
> > @@ -209,8 +209,10 @@ enum {
> >   	ATA_FLAG_SW_ACTIVITY	= (1<<  22), /* driver supports sw activity
> >   					      * led */
> >   	ATA_FLAG_NO_DIPM	= (1<<  23), /* host not happy with DIPM */
> > +	ATA_FLAG_EXTERNAL	= (1<<  24), /* controller supports external SATA */
> > +	ATA_FLAG_PLUGGABLE	= (1<<  25), /* port is hotpluggable */
> >
> > -	/* bits 24:31 of ap->flags are reserved for LLD specific flags */
> > +	/* bits 26:31 of ap->flags are reserved for LLD specific flags */
> 
>     There's no need to use bits 24..25, I've freed up some lower order bits 
> last year, removing unused values.

OK. I'll use bit 2 and 3, as below

diff --git a/include/linux/libata.h b/include/linux/libata.h
index cafc09a..f46961d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -187,6 +187,8 @@ enum {
 	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
 					    /* (doesn't imply presence) */
 	ATA_FLAG_SATA		= (1 << 1),
+	ATA_FLAG_EXTERNAL	= (1 << 2), /* Controller supports external SATA */
+	ATA_FLAG_PLUGGABLE	= (1 << 3), /* Port is hotpluggable */
 	ATA_FLAG_NO_ATAPI	= (1 << 6), /* No ATAPI support */
 	ATA_FLAG_PIO_DMA	= (1 << 7), /* PIO cmds via DMA */
 	ATA_FLAG_PIO_LBA48	= (1 << 8), /* Host DMA engine is LBA28 only */


> 
> WBR, Sergei


--
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