Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Aug 2014 10:42:52 +0000 (UTC)
From:      Shunsuke Akiyama <akiyama@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r270873 - stable/10/sys/x86/acpica
Message-ID:  <201408311042.s7VAgqcv061332@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: akiyama
Date: Sun Aug 31 10:42:52 2014
New Revision: 270873
URL: http://svnweb.freebsd.org/changeset/base/270873

Log:
  MFC r263859:
    Change default logic to CONFORM because this routine is shared
    with SCI polarity setting.
  
    Reviewed by: jhb
  
  MFC r269184:
    Add missing newline to output dmesg properly.

Modified:
  stable/10/sys/x86/acpica/madt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/acpica/madt.c
==============================================================================
--- stable/10/sys/x86/acpica/madt.c	Sun Aug 31 10:28:31 2014	(r270872)
+++ stable/10/sys/x86/acpica/madt.c	Sun Aug 31 10:42:52 2014	(r270873)
@@ -298,6 +298,9 @@ interrupt_polarity(UINT16 IntiFlags, UIN
 {
 
 	switch (IntiFlags & ACPI_MADT_POLARITY_MASK) {
+	default:
+		printf("WARNING: Bogus Interrupt Polarity. Assume CONFORMS\n");
+		/* FALLTHROUGH*/
 	case ACPI_MADT_POLARITY_CONFORMS:
 		if (Source == AcpiGbl_FADT.SciInterrupt)
 			return (INTR_POLARITY_LOW);
@@ -306,11 +309,8 @@ interrupt_polarity(UINT16 IntiFlags, UIN
 	case ACPI_MADT_POLARITY_ACTIVE_HIGH:
 		return (INTR_POLARITY_HIGH);
 	case ACPI_MADT_POLARITY_ACTIVE_LOW:
-		break;
-	default:
-		printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW");
+		return (INTR_POLARITY_LOW);
 	}
-	return (INTR_POLARITY_LOW);
 }
 
 static enum intr_trigger
@@ -318,6 +318,9 @@ interrupt_trigger(UINT16 IntiFlags, UINT
 {
 
 	switch (IntiFlags & ACPI_MADT_TRIGGER_MASK) {
+	default:
+		printf("WARNING: Bogus Interrupt Trigger Mode. Assume CONFORMS.\n");
+		/*FALLTHROUGH*/
 	case ACPI_MADT_TRIGGER_CONFORMS:
 		if (Source == AcpiGbl_FADT.SciInterrupt)
 			return (INTR_TRIGGER_LEVEL);
@@ -326,13 +329,8 @@ interrupt_trigger(UINT16 IntiFlags, UINT
 	case ACPI_MADT_TRIGGER_EDGE:
 		return (INTR_TRIGGER_EDGE);
 	case ACPI_MADT_TRIGGER_LEVEL:
-		break;
-	default:
-		printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger.");
-		
-		break;
+		return (INTR_TRIGGER_LEVEL);
 	}
-	return (INTR_TRIGGER_LEVEL);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408311042.s7VAgqcv061332>