All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-ide@vger.kernel.org, Forrest Zhao <forrest.zhao@gmail.com>
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 11/14] libata-link: update ata_scsi_error() to handle PMP links
Date: Mon, 16 Jul 2007 18:34:40 +0900	[thread overview]
Message-ID: <1184578480236-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11845784783033-git-send-email-htejun@gmail.com>

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 <htejun@gmail.com>
---
 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
-- 
1.5.0.3



  parent reply	other threads:[~2007-07-16  9:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16  9:34 [PATCHSET 2/4] libata: implement ata_link, take 5 Tejun Heo
2007-07-16  9:34 ` [PATCH 02/14] libata-link: implement and use link/device iterators Tejun Heo
2007-07-16  9:34 ` [PATCH 01/14] libata-link: introduce ata_link Tejun Heo
2007-07-16  9:34 ` [PATCH 07/14] libata-link: make two port flags HRST_TO_RESUME and SKIP_D2H_BSY link flags Tejun Heo
2007-07-16  9:34 ` [PATCH 04/14] libata-link: linkify EH action helpers Tejun Heo
2007-07-16  9:34 ` [PATCH 05/14] libata-link: linkify reset Tejun Heo
2007-07-16  9:34 ` [PATCH 03/14] libata-link: linkify PHY-related functions Tejun Heo
2007-07-16  9:34 ` [PATCH 06/14] libata-link: linkify config/EH related functions Tejun Heo
2007-07-16  9:34 ` [PATCH 13/14] libata-link: update hotplug to handle PMP links Tejun Heo
2007-07-16  9:34 ` [PATCH 12/14] libata-link: update EH to deal with " Tejun Heo
2007-07-16  9:34 ` Tejun Heo [this message]
2007-07-16  9:34 ` [PATCH 10/14] libata-link: add " Tejun Heo
2007-07-16  9:34 ` [PATCH 08/14] libata-link: separate out link initialization functions Tejun Heo
2007-07-16  9:34 ` [PATCH 09/14] libata-link: implement ata_link_abort() Tejun Heo
2007-07-16  9:34 ` [PATCH 14/14] libata-link: update Power Management to handle PMP links Tejun Heo
2007-07-16  9:42 ` [PATCHSET 2/4] libata: implement ata_link, take 5 Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2007-08-04  8:42 [PATCHSET] libata: implement ata_link, take 6 Tejun Heo
2007-08-04  8:42 ` [PATCH 11/14] libata-link: update ata_scsi_error() to handle PMP links Tejun Heo
2007-08-06  9:36 [PATCHSET 2/4] libata: implement ata_link, take 7 Tejun Heo
2007-08-06  9:36 ` [PATCH 11/14] libata-link: update ata_scsi_error() to handle PMP links Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1184578480236-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=forrest.zhao@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.