public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ata: libata: add per device private data
@ 2007-09-24 23:23 Kristen Carlson Accardi
  2007-10-02 15:07 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Kristen Carlson Accardi @ 2007-09-24 23:23 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, linux-kernel

Allow host controllers to store private data per device.

Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@intel.com>

---
 include/linux/libata.h |    3 +++
 1 file changed, 3 insertions(+)

Index: libata-dev/include/linux/libata.h
===================================================================
--- libata-dev.orig/include/linux/libata.h	2007-09-24 16:13:33.000000000 -0700
+++ libata-dev/include/linux/libata.h	2007-09-24 16:15:24.000000000 -0700
@@ -474,6 +474,9 @@ struct ata_device {
 	/* error history */
 	struct ata_ering	ering;
 	int			spdn_cnt;
+
+	/* controller driver per device private data */
+	void 			*private_data;
 };
 
 /* Offset into struct ata_device.  Fields above it are maintained

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] ata: libata: add per device private data
  2007-09-24 23:23 [patch] ata: libata: add per device private data Kristen Carlson Accardi
@ 2007-10-02 15:07 ` Jeff Garzik
  2007-10-09 17:53   ` Kristen Carlson Accardi
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2007-10-02 15:07 UTC (permalink / raw)
  To: Kristen Carlson Accardi; +Cc: linux-ide, linux-kernel

Kristen Carlson Accardi wrote:
> Allow host controllers to store private data per device.
> 
> Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@intel.com>
> 
> ---
>  include/linux/libata.h |    3 +++
>  1 file changed, 3 insertions(+)
> 
> Index: libata-dev/include/linux/libata.h
> ===================================================================
> --- libata-dev.orig/include/linux/libata.h	2007-09-24 16:13:33.000000000 -0700
> +++ libata-dev/include/linux/libata.h	2007-09-24 16:15:24.000000000 -0700
> @@ -474,6 +474,9 @@ struct ata_device {
>  	/* error history */
>  	struct ata_ering	ering;
>  	int			spdn_cnt;
> +
> +	/* controller driver per device private data */
> +	void 			*private_data;

I don't have any objections to this per se...  a lot of other subsystems 
do this too, and I can certainly see a potential need.

But what about object lifetimes?  If a controller is hot-unplugged, does 
anyone need notification to destroy dynamic objects, or does controller 
cleanup take care of that?  If a device is unplugged, where should a 
controller driver do its ->private_data cleanup?

This is /not/ a NAK, just a request to make clear the lifetime rules and 
procedures...

	Jeff




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] ata: libata: add per device private data
  2007-10-02 15:07 ` Jeff Garzik
@ 2007-10-09 17:53   ` Kristen Carlson Accardi
  0 siblings, 0 replies; 3+ messages in thread
From: Kristen Carlson Accardi @ 2007-10-09 17:53 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, linux-kernel

Sorry for the delay in responding, I was on vacation.

On Tue, 02 Oct 2007 11:07:30 -0400
Jeff Garzik <jgarzik@pobox.com> wrote:

> Kristen Carlson Accardi wrote:
> > Allow host controllers to store private data per device.
> > 
> > Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@intel.com>
> > 
> > ---
> >  include/linux/libata.h |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > Index: libata-dev/include/linux/libata.h
> > ===================================================================
> > --- libata-dev.orig/include/linux/libata.h	2007-09-24 16:13:33.000000000 -0700
> > +++ libata-dev/include/linux/libata.h	2007-09-24 16:15:24.000000000 -0700
> > @@ -474,6 +474,9 @@ struct ata_device {
> >  	/* error history */
> >  	struct ata_ering	ering;
> >  	int			spdn_cnt;
> > +
> > +	/* controller driver per device private data */
> > +	void 			*private_data;
> 
> I don't have any objections to this per se...  a lot of other subsystems 
> do this too, and I can certainly see a potential need.
> 
> But what about object lifetimes?  If a controller is hot-unplugged, does 
> anyone need notification to destroy dynamic objects, or does controller 
> cleanup take care of that?  If a device is unplugged, where should a 
> controller driver do its ->private_data cleanup?
> 
> This is /not/ a NAK, just a request to make clear the lifetime rules and 
> procedures...
> 
> 	Jeff
> 

I'll do this - and meanwhile go ahead and ignore this patch.  I've decided
to submit it as part of a series where I actually use the private data,
so we can review it in context.

Thanks,
Kristen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-09 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-24 23:23 [patch] ata: libata: add per device private data Kristen Carlson Accardi
2007-10-02 15:07 ` Jeff Garzik
2007-10-09 17:53   ` Kristen Carlson Accardi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox