aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_nv.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-07-16 01:29:39 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-20 08:02:11 -0400
commitb64bbc39f2122a2276578e40144af69ef01decd4 (patch)
treebd760da68bc785490ecd31060d892eeb7123782d /drivers/ata/sata_nv.c
parent975530e8a33fdeb1ad80d82fde11d56bf9ed2760 (diff)
libata: improve EH report formatting
Requiring LLDs to format multiple error description messages properly doesn't work too well. Help LLDs a bit by making ata_ehi_push_desc() insert ", " on each invocation. __ata_ehi_push_desc() is the raw version without the automatic separator. While at it, make ehi_desc interface proper functions instead of macros. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r--drivers/ata/sata_nv.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index db81e3efa5ec..5d943da042f7 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -715,19 +715,20 @@ static int nv_adma_check_cpb(struct ata_port *ap, int cpb_num, int force_err)
715 int freeze = 0; 715 int freeze = 0;
716 716
717 ata_ehi_clear_desc(ehi); 717 ata_ehi_clear_desc(ehi);
718 ata_ehi_push_desc(ehi, "CPB resp_flags 0x%x", flags ); 718 __ata_ehi_push_desc(ehi, "CPB resp_flags 0x%x: ", flags );
719 if (flags & NV_CPB_RESP_ATA_ERR) { 719 if (flags & NV_CPB_RESP_ATA_ERR) {
720 ata_ehi_push_desc(ehi, ": ATA error"); 720 ata_ehi_push_desc(ehi, "ATA error");
721 ehi->err_mask |= AC_ERR_DEV; 721 ehi->err_mask |= AC_ERR_DEV;
722 } else if (flags & NV_CPB_RESP_CMD_ERR) { 722 } else if (flags & NV_CPB_RESP_CMD_ERR) {
723 ata_ehi_push_desc(ehi, ": CMD error"); 723 ata_ehi_push_desc(ehi, "CMD error");
724 ehi->err_mask |= AC_ERR_DEV; 724 ehi->err_mask |= AC_ERR_DEV;
725 } else if (flags & NV_CPB_RESP_CPB_ERR) { 725 } else if (flags & NV_CPB_RESP_CPB_ERR) {
726 ata_ehi_push_desc(ehi, ": CPB error"); 726 ata_ehi_push_desc(ehi, "CPB error");
727 ehi->err_mask |= AC_ERR_SYSTEM; 727 ehi->err_mask |= AC_ERR_SYSTEM;
728 freeze = 1; 728 freeze = 1;
729 } else { 729 } else {
730 /* notifier error, but no error in CPB flags? */ 730 /* notifier error, but no error in CPB flags? */
731 ata_ehi_push_desc(ehi, "unknown");
731 ehi->err_mask |= AC_ERR_OTHER; 732 ehi->err_mask |= AC_ERR_OTHER;
732 freeze = 1; 733 freeze = 1;
733 } 734 }
@@ -854,20 +855,21 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
854 struct ata_eh_info *ehi = &ap->eh_info; 855 struct ata_eh_info *ehi = &ap->eh_info;
855 856
856 ata_ehi_clear_desc(ehi); 857 ata_ehi_clear_desc(ehi);
857 ata_ehi_push_desc(ehi, "ADMA status 0x%08x", status ); 858 __ata_ehi_push_desc(ehi, "ADMA status 0x%08x: ", status );
858 if (status & NV_ADMA_STAT_TIMEOUT) { 859 if (status & NV_ADMA_STAT_TIMEOUT) {
859 ehi->err_mask |= AC_ERR_SYSTEM; 860 ehi->err_mask |= AC_ERR_SYSTEM;
860 ata_ehi_push_desc(ehi, ": timeout"); 861 ata_ehi_push_desc(ehi, "timeout");
861 } else if (status & NV_ADMA_STAT_HOTPLUG) { 862 } else if (status & NV_ADMA_STAT_HOTPLUG) {
862 ata_ehi_hotplugged(ehi); 863 ata_ehi_hotplugged(ehi);
863 ata_ehi_push_desc(ehi, ": hotplug"); 864 ata_ehi_push_desc(ehi, "hotplug");
864 } else if (status & NV_ADMA_STAT_HOTUNPLUG) { 865 } else if (status & NV_ADMA_STAT_HOTUNPLUG) {
865 ata_ehi_hotplugged(ehi); 866 ata_ehi_hotplugged(ehi);
866 ata_ehi_push_desc(ehi, ": hot unplug"); 867 ata_ehi_push_desc(ehi, "hot unplug");
867 } else if (status & NV_ADMA_STAT_SERROR) { 868 } else if (status & NV_ADMA_STAT_SERROR) {
868 /* let libata analyze SError and figure out the cause */ 869 /* let libata analyze SError and figure out the cause */
869 ata_ehi_push_desc(ehi, ": SError"); 870 ata_ehi_push_desc(ehi, "SError");
870 } 871 } else
872 ata_ehi_push_desc(ehi, "unknown");
871 ata_port_freeze(ap); 873 ata_port_freeze(ap);
872 continue; 874 continue;
873 } 875 }