diff options
author | Tejun Heo <htejun@gmail.com> | 2006-06-12 10:05:38 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-12 10:23:21 -0400 |
commit | f0eb62b81dd16bfc4034916418c3406ba20011e1 (patch) | |
tree | c051e5da940044e189b2227ede4ccb373d0fa169 /include | |
parent | d01712698c7c52bc71f41192e864dccc90a1217d (diff) |
[PATCH] libata: add host_set->next for legacy two host_sets case, take #3
For a legacy ATA controller, libata registers two separate host sets.
There was no connection between the two hosts making it impossible to
traverse all ports related to the controller. This patch adds
host_set->next which points to the second host_set and makes
ata_pci_remove_one() remove all associated host_sets.
* On device removal, all ports hanging off the device are properly
detached. Prior to this patch, ports on the first host_set weren't
detached casuing oops on driver unloading.
* On device removal, both host_sets are properly freed
This will also be used by new power management code to suspend and
resume all ports of a controller. host_set/port representation will
be improved to handle legacy controllers better and this host_set
linking will go away with it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 61eea5795d5a..f03b8664af11 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -356,7 +356,8 @@ struct ata_host_set { | |||
356 | unsigned long flags; | 356 | unsigned long flags; |
357 | int simplex_claimed; /* Keep seperate in case we | 357 | int simplex_claimed; /* Keep seperate in case we |
358 | ever need to do this locked */ | 358 | ever need to do this locked */ |
359 | struct ata_port * ports[0]; | 359 | struct ata_host_set *next; /* for legacy mode */ |
360 | struct ata_port *ports[0]; | ||
360 | }; | 361 | }; |
361 | 362 | ||
362 | struct ata_queued_cmd { | 363 | struct ata_queued_cmd { |