aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@google.com>2010-05-25 15:31:38 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-10-21 20:21:03 -0400
commitd9027470b88631d0956ac37cdadfdeb9cdcf2c99 (patch)
treeb15273e88431ba734a24965dfc81132ac13bc8bd /include/linux
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
[libata] Add ATA transport class
This is a scheleton for libata transport class. All information is read only, exporting information from libata: - ata_port class: one per ATA port - ata_link class: one per ATA port or 15 for SATA Port Multiplier - ata_device class: up to 2 for PATA link, usually one for SATA. Signed-off-by: Gwendal Grignou <gwendal@google.com> Reviewed-by: Grant Grundler <grundler@google.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 45fb2967b66d..c50f66d4382c 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -604,6 +604,7 @@ struct ata_device {
604 union acpi_object *gtf_cache; 604 union acpi_object *gtf_cache;
605 unsigned int gtf_filter; 605 unsigned int gtf_filter;
606#endif 606#endif
607 struct device tdev;
607 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ 608 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
608 u64 n_sectors; /* size of device, if ATA */ 609 u64 n_sectors; /* size of device, if ATA */
609 u64 n_native_sectors; /* native size, if ATA */ 610 u64 n_native_sectors; /* native size, if ATA */
@@ -690,6 +691,7 @@ struct ata_link {
690 struct ata_port *ap; 691 struct ata_port *ap;
691 int pmp; /* port multiplier port # */ 692 int pmp; /* port multiplier port # */
692 693
694 struct device tdev;
693 unsigned int active_tag; /* active tag on this link */ 695 unsigned int active_tag; /* active tag on this link */
694 u32 sactive; /* active NCQ commands */ 696 u32 sactive; /* active NCQ commands */
695 697
@@ -707,6 +709,8 @@ struct ata_link {
707 709
708 struct ata_device device[ATA_MAX_DEVICES]; 710 struct ata_device device[ATA_MAX_DEVICES];
709}; 711};
712#define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag)
713#define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0])
710 714
711struct ata_port { 715struct ata_port {
712 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ 716 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
@@ -752,6 +756,7 @@ struct ata_port {
752 struct ata_port_stats stats; 756 struct ata_port_stats stats;
753 struct ata_host *host; 757 struct ata_host *host;
754 struct device *dev; 758 struct device *dev;
759 struct device tdev;
755 760
756 struct mutex scsi_scan_mutex; 761 struct mutex scsi_scan_mutex;
757 struct delayed_work hotplug_task; 762 struct delayed_work hotplug_task;