Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf1b86c8ab41fe2b2a2eb59c9a2ea9a7e463653a
Commit:     cf1b86c8ab41fe2b2a2eb59c9a2ea9a7e463653a
Parent:     8989805d6d176aa32c0e9a68a536aa4c8ef5231c
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 6 18:36:23 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:55:32 2007 -0400

    libata-link: update ata_scsi_error() to handle PMP links
    
    Update ata_scsi_error() to handle PMP links.  As error conditions can
    occur on both host and PMP links, __ata_port_for_each_link() is used.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-eh.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index eb4c059..45eb932 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -363,6 +363,8 @@ void ata_scsi_error(struct Scsi_Host *host)
  repeat:
        /* invoke error handler */
        if (ap->ops->error_handler) {
+               struct ata_link *link;
+
                /* kill fast drain timer */
                del_timer_sync(&ap->fastdrain_timer);
 
@@ -372,9 +374,11 @@ void ata_scsi_error(struct Scsi_Host *host)
                /* fetch & clear EH info */
                spin_lock_irqsave(ap->lock, flags);
 
-               memset(&ap->link.eh_context, 0, sizeof(ap->link.eh_context));
-               ap->link.eh_context.i = ap->link.eh_info;
-               memset(&ap->link.eh_info, 0, sizeof(ap->link.eh_info));
+               __ata_port_for_each_link(link, ap) {
+                       memset(&link->eh_context, 0, sizeof(link->eh_context));
+                       link->eh_context.i = link->eh_info;
+                       memset(&link->eh_info, 0, sizeof(link->eh_info));
+               }
 
                ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
                ap->pflags &= ~ATA_PFLAG_EH_PENDING;
@@ -410,7 +414,8 @@ void ata_scsi_error(struct Scsi_Host *host)
                }
 
                /* this run is complete, make sure EH info is clear */
-               memset(&ap->link.eh_info, 0, sizeof(ap->link.eh_info));
+               __ata_port_for_each_link(link, ap)
+                       memset(&link->eh_info, 0, sizeof(link->eh_info));
 
                /* Clear host_eh_scheduled while holding ap->lock such
                 * that if exception occurs after this point but
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to