Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 2010 20:20:03 GMT
From:      Sevan / Venture37 <venture37@gmail.com>
To:        freebsd-acpi@FreeBSD.org
Subject:   Re: i386/136008: [acpi] Dell Vostro 1310 will not shutdown (Requires user intervention)
Message-ID:  <201001112020.o0BKK3X9015457@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/136008; it has been noted by GNATS.

From: Sevan / Venture37 <venture37@gmail.com>
To: bug-followup@FreeBSD.org, dan@dburkland.com
Cc:  
Subject: Re: i386/136008: [acpi] Dell Vostro 1310 will not shutdown (Requires
 user intervention)
Date: Mon, 11 Jan 2010 20:08:40 +0000

 This is a multi-part message in MIME format.
 --------------010201010104070900050707
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Unmangled version of the diff attached for the 8.0-RELEASE source, I've 
 been using this diff on 8.0-RELEASE AMD64 for the past few month & it 
 kind of works (issuing halt -p when running off battery works, but not 
 if I'm running from the mains, there are lots of errors when switching 
 power sources aswell)
 
 
 Sevan / Venture37
 
 --------------010201010104070900050707
 Content-Type: text/plain;
  name="acpi_ec.c.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="acpi_ec.c.txt"
 
 --- sys/dev/acpica/acpi_ec.c.orig	2009-12-16 03:21:36.283295223 +0000
 +++ sys/dev/acpica/acpi_ec.c	2009-12-16 03:38:44.410426185 +0000
 @@ -197,6 +197,10 @@
  SYSCTL_INT(_debug_acpi_ec, OID_AUTO, timeout, CTLFLAG_RW, &ec_timeout,
      EC_TIMEOUT, "Total time spent waiting for a response (poll+sleep)");
  
 +static int	ec_disable_polling;
 +SYSCTL_INT(_debug_acpi_ec, OID_AUTO, disable_polling, CTLFLAG_RW, &ec_disable_polling, 0,
 +    "Totally disable use of polled mode (Dell EC problem workaround)");
 +
  static ACPI_STATUS
  EcLock(struct acpi_ec_softc *sc)
  {
 @@ -577,7 +581,9 @@
  
      /* Disable the GPE so we don't get EC events during shutdown. */
      sc = device_get_softc(dev);
 -    AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR);
 +    if (!ec_disable_polling){
 +    AcpiDisableGpe(sc->ec_gpehandle,sc->ec_gpebit,ACPI_NOT_ISR);
 +    }
      return (0);
  }
  
 @@ -814,7 +820,7 @@
  
      ACPI_SERIAL_ASSERT(ec);
      Status = AE_NO_HARDWARE_RESPONSE;
 -    int need_poll = cold || rebooting || ec_polled_mode || sc->ec_suspending;
 +    int need_poll = ( cold || rebooting || ec_polled_mode || sc->ec_suspending ) && !ec_disable_polling;
      /*
       * The main CPU should be much faster than the EC.  So the status should
       * be "not ready" when we start waiting.  But if the main CPU is really
 @@ -894,7 +900,11 @@
  	    device_printf(sc->ec_dev,
  		"wait timed out (%sresponse), forcing polled mode\n",
  		Status == AE_OK ? "" : "no ");
 +	if (ec_disable_polling) {
 +	    device_printf(sc->ec_dev,"Polling explicitily disabled! Continue waiting for generated GPEs...\n");
 +	} else {
  	    ec_polled_mode = TRUE;
 +		}
  	}
      }
      if (Status != AE_OK)
 
 --------------010201010104070900050707--



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