Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 86/86] libata: add private driver field to struct ata_device

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bzolnier at gmail

Nov 25, 2009, 9:12 AM

Post #1 of 7 (267 views)
Permalink
[PATCH 86/86] libata: add private driver field to struct ata_device

From: Bartlomiej Zolnierkiewicz <bzolnier [at] gmail>
Subject: [PATCH] libata: add private driver field to struct ata_device

This brings struct ata_device in-line with struct ata_{port,host}.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier [at] gmail>
---
include/linux/libata.h | 1 +
1 file changed, 1 insertion(+)

Index: b/include/linux/libata.h
===================================================================
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -585,6 +585,7 @@ struct ata_device {
unsigned int horkage; /* List of broken features */
unsigned long flags; /* ATA_DFLAG_xxx */
struct scsi_device *sdev; /* attached SCSI device */
+ void *private_data;
#ifdef CONFIG_ATA_ACPI
acpi_handle acpi_handle;
union acpi_object *gtf_cache;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


alan at lxorguk

Nov 25, 2009, 9:56 AM

Post #2 of 7 (249 views)
Permalink
Re: [PATCH 86/86] libata: add private driver field to struct ata_device [In reply to]

On Wed, 25 Nov 2009 18:12:48 +0100
Bartlomiej Zolnierkiewicz <bzolnier [at] gmail> wrote:

> From: Bartlomiej Zolnierkiewicz <bzolnier [at] gmail>
> Subject: [PATCH] libata: add private driver field to struct ata_device
>
> This brings struct ata_device in-line with struct ata_{port,host}.

Do we need it for anything yet - whoever first needs it can add it,
otherwise its just waste.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bzolnier at gmail

Nov 25, 2009, 10:02 AM

Post #3 of 7 (246 views)
Permalink
Re: [PATCH 86/86] libata: add private driver field to struct ata_device [In reply to]

On Wednesday 25 November 2009 06:56:50 pm Alan Cox wrote:
> On Wed, 25 Nov 2009 18:12:48 +0100
> Bartlomiej Zolnierkiewicz <bzolnier [at] gmail> wrote:
>
> > From: Bartlomiej Zolnierkiewicz <bzolnier [at] gmail>
> > Subject: [PATCH] libata: add private driver field to struct ata_device
> >
> > This brings struct ata_device in-line with struct ata_{port,host}.
>
> Do we need it for anything yet - whoever first needs it can add it,
> otherwise its just waste.

There is a new driver using it (to be posted later) and it makes libata API
more coherent for driver developers..

--
Bartlomiej Zolnierkiewicz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


alan at lxorguk

Nov 25, 2009, 10:17 AM

Post #4 of 7 (247 views)
Permalink
Re: [PATCH 86/86] libata: add private driver field to struct ata_device [In reply to]

On Wed, 25 Nov 2009 19:02:44 +0100
Bartlomiej Zolnierkiewicz <bzolnier [at] gmail> wrote:

> On Wednesday 25 November 2009 06:56:50 pm Alan Cox wrote:
> > On Wed, 25 Nov 2009 18:12:48 +0100
> > Bartlomiej Zolnierkiewicz <bzolnier [at] gmail> wrote:
> >
> > > From: Bartlomiej Zolnierkiewicz <bzolnier [at] gmail>
> > > Subject: [PATCH] libata: add private driver field to struct ata_device
> > >
> > > This brings struct ata_device in-line with struct ata_{port,host}.
> >
> > Do we need it for anything yet - whoever first needs it can add it,
> > otherwise its just waste.
>
> There is a new driver using it (to be posted later) and it makes libata API
> more coherent for driver developers..

Ok by me
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jeff at garzik

Dec 3, 2009, 12:04 AM

Post #5 of 7 (225 views)
Permalink
Re: [PATCH 86/86] libata: add private driver field to struct ata_device [In reply to]

On 11/25/2009 12:12 PM, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier [at] gmail>
> Subject: [PATCH] libata: add private driver field to struct ata_device
>
> This brings struct ata_device in-line with struct ata_{port,host}.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier [at] gmail>
> ---
> include/linux/libata.h | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: b/include/linux/libata.h
> ===================================================================
> --- a/include/linux/libata.h
> +++ b/include/linux/libata.h
> @@ -585,6 +585,7 @@ struct ata_device {
> unsigned int horkage; /* List of broken features */
> unsigned long flags; /* ATA_DFLAG_xxx */
> struct scsi_device *sdev; /* attached SCSI device */
> + void *private_data;
> #ifdef CONFIG_ATA_ACPI
> acpi_handle acpi_handle;
> union acpi_object *gtf_cache;

I'm fine with this, and would like to merge this sooner rather than later.

However, BIG FAT WARNING: you must take special care to be sure you
don't leak as devices appear and disappear, etc. IOW, watch your object
lifetimes carefully. Object lifetime was the reason this was not added
until now.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bzolnier at gmail

Dec 3, 2009, 4:37 AM

Post #6 of 7 (225 views)
Permalink
Re: [PATCH 86/86] libata: add private driver field to struct ata_device [In reply to]

On Thursday 03 December 2009 09:04:40 am Jeff Garzik wrote:
> On 11/25/2009 12:12 PM, Bartlomiej Zolnierkiewicz wrote:
> > From: Bartlomiej Zolnierkiewicz<bzolnier [at] gmail>
> > Subject: [PATCH] libata: add private driver field to struct ata_device
> >
> > This brings struct ata_device in-line with struct ata_{port,host}.
> >
> > Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier [at] gmail>
> > ---
> > include/linux/libata.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > Index: b/include/linux/libata.h
> > ===================================================================
> > --- a/include/linux/libata.h
> > +++ b/include/linux/libata.h
> > @@ -585,6 +585,7 @@ struct ata_device {
> > unsigned int horkage; /* List of broken features */
> > unsigned long flags; /* ATA_DFLAG_xxx */
> > struct scsi_device *sdev; /* attached SCSI device */
> > + void *private_data;
> > #ifdef CONFIG_ATA_ACPI
> > acpi_handle acpi_handle;
> > union acpi_object *gtf_cache;
>
> I'm fine with this, and would like to merge this sooner rather than later.
>
> However, BIG FAT WARNING: you must take special care to be sure you
> don't leak as devices appear and disappear, etc. IOW, watch your object
> lifetimes carefully. Object lifetime was the reason this was not added
> until now.

It should be fine for now as the only user is pata_ep93xx and it gets it
right. Though it would definitely be nice to see the underlying issue
(which is the lack of dynamic allocation for struct ata_device objects)
fixed one day in libata.

--
Bartlomiej Zolnierkiewicz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jeff at garzik

Dec 3, 2009, 9:45 AM

Post #7 of 7 (224 views)
Permalink
Re: [PATCH 86/86] libata: add private driver field to struct ata_device [In reply to]

On 11/25/2009 12:12 PM, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier [at] gmail>
> Subject: [PATCH] libata: add private driver field to struct ata_device
>
> This brings struct ata_device in-line with struct ata_{port,host}.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier [at] gmail>
> ---
> include/linux/libata.h | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: b/include/linux/libata.h
> ===================================================================
> --- a/include/linux/libata.h
> +++ b/include/linux/libata.h
> @@ -585,6 +585,7 @@ struct ata_device {
> unsigned int horkage; /* List of broken features */
> unsigned long flags; /* ATA_DFLAG_xxx */
> struct scsi_device *sdev; /* attached SCSI device */
> + void *private_data;
> #ifdef CONFIG_ATA_ACPI
> acpi_handle acpi_handle;
> union acpi_object *gtf_cache;

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.