aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAlan <alan@lxorguk.ukuu.org.uk>2007-03-01 12:36:46 -0500
committerJeff Garzik <jeff@garzik.org>2007-03-02 17:42:48 -0500
commit032af1ce16d496b825adde0fa03948785ee16830 (patch)
tree314aa36e4941a7db9c446da103379c530c9d785b /include/linux
parent562aa1d4c6a874373f9a48ac184f662fbbb06a04 (diff)
libata-core: Fix simplex handling
The initial simplex handling code is fooled if you suspend and resume. This also causes problems with some single channel controllers which claim to be simplex. The fix is fairly simple, instead of keeping a flag to remember if we gave away the simplex channel we remember the actual owner. As the owner is always part of the host_set we don't even need a refcount. Knowing the owner also means we can reassign simplex DMA channels in future hotplug code etc if we need to Signed-off-by: Alan Cox <alan@redhat.com> (and a signed-off for the patch I sent before while I remember) Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 045fb3a72d59..3f89d13c2e9a 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -403,8 +403,7 @@ struct ata_host {
403 void *private_data; 403 void *private_data;
404 const struct ata_port_operations *ops; 404 const struct ata_port_operations *ops;
405 unsigned long flags; 405 unsigned long flags;
406 int simplex_claimed; /* Keep seperate in case we 406 struct ata_port *simplex_claimed; /* channel owning the DMA */
407 ever need to do this locked */
408 struct ata_port *ports[0]; 407 struct ata_port *ports[0];
409}; 408};
410 409