Re: suspend/resume and the freebsd usb stack

2010-07-30 Thread Hans Petter Selasky
On Friday 30 July 2010 16:53:22 b. f. wrote: Are these criticisms of suspend/resume for the usb stack justified?: http://lists.freebsd.org/pipermail/svn-src-head/2010-July/018974.html If so, are there any plans to fix the problem(s)? Regards, b. Hi, Suspend and resume

MacBookPro 5,1

2010-10-12 Thread Hans Petter Selasky
Hi, My MacBookPro 5,1 does not boot using -current because memory inside the ACPI kernel module is used after free. The following patch temporily mitigates the problem: /usr/src/sys/dev/acpica/Osd/OsdMemory.c void AcpiOsFree(void *Memory) { + if (cold == 0) free(Memory, M_ACPICA); } Is

Re: MacBookPro 5,1

2010-10-13 Thread Hans Petter Selasky
On Tuesday 12 October 2010 22:43:46 Andriy Gapon wrote: on 12/10/2010 15:25 Hans Petter Selasky said the following: On Tuesday 12 October 2010 13:15:26 Andriy Gapon wrote: on 12/10/2010 13:09 Hans Petter Selasky said the following: Hi, My MacBookPro 5,1 does not boot using -current

Re: MacBookPro 5,1

2010-10-17 Thread Hans Petter Selasky
Hi, After debugging for some time now I've found the issue. 1) I extended all allocations from ACPI to PAGE_SIZE. 2) Then I filled the extra area with zero. 3) Then at free I checked if some buffers were overwritten, and indeed I got bingo this time. The printout has the format: printf(Dirty

Re: MacBookPro 5,1

2010-10-17 Thread Hans Petter Selasky
On Sunday 17 October 2010 10:56:12 Hans Petter Selasky wrote: Hi, After debugging for some time now I've found the issue. 1) I extended all allocations from ACPI to PAGE_SIZE. 2) Then I filled the extra area with zero. 3) Then at free I checked if some buffers were overwritten, and indeed I

Re: MacBookPro 5,1

2010-10-17 Thread Hans Petter Selasky
Hi, CC'ing the Linux guys, hence I belive you are using the same ACPI code like in FreeBSD. It appears that when a string is present in the extended interrupt descriptor (6.4.3.6, ACPIspec30.pdf), then this is not handled correctly, meaning that the precomputed buffer space when encoding to

Re: MacBookPro 5,1

2010-10-20 Thread Hans Petter Selasky
On Tuesday 19 October 2010 07:47:02 Lin Ming wrote: On Tue, 2010-10-19 at 04:21 +0800, Hans Petter Selasky wrote: On Monday 18 October 2010 02:01:09 Moore, Robert wrote: Can you send us the acpidump for the machine? Also, tell us which control method is failing. Thanks Hi

Re: MacBookPro 5,1

2010-10-20 Thread Hans Petter Selasky
On Wednesday 20 October 2010 08:55:09 Andriy Gapon wrote: on 20/10/2010 09:34 Hans Petter Selasky said the following: On Tuesday 19 October 2010 07:47:02 Lin Ming wrote: On Tue, 2010-10-19 at 04:21 +0800, Hans Petter Selasky wrote: On Monday 18 October 2010 02:01:09 Moore, Robert wrote

Re: MacBookPro 5,1

2010-10-20 Thread Hans Petter Selasky
On Wednesday 20 October 2010 08:36:31 Lin Ming wrote: On Wed, 2010-10-20 at 14:34 +0800, Hans Petter Selasky wrote: On Tuesday 19 October 2010 07:47:02 Lin Ming wrote: On Tue, 2010-10-19 at 04:21 +0800, Hans Petter Selasky wrote: On Monday 18 October 2010 02:01:09 Moore, Robert wrote

Re: MacBookPro 5,1

2010-10-21 Thread Hans Petter Selasky
Hi, I will get you the debug output from this patch in about 8 hours. --HPS On Thursday 21 October 2010 09:12:27 Lin Ming wrote: Hi, Could you apply below debug patch and attach the output? I'll try to reproduce this bug with the output. It will print something like below, Passed

Re: MacBookPro 5,1

2010-10-21 Thread Hans Petter Selasky
On Thursday 21 October 2010 09:12:27 Lin Ming wrote: On Thu, 2010-10-21 at 11:39 +0800, Lin Ming wrote: On Wed, 2010-10-20 at 16:06 +0800, Hans Petter Selasky wrote: On Wednesday 20 October 2010 08:36:31 Lin Ming wrote: On Wed, 2010-10-20 at 14:34 +0800, Hans Petter Selasky wrote

Re: MacBookPro 5,1

2010-10-22 Thread Hans Petter Selasky
On Friday 22 October 2010 07:19:47 Lin Ming wrote: On Fri, 2010-10-22 at 10:39 +0800, Lin Ming wrote: On Fri, 2010-10-22 at 04:57 +0800, Hans Petter Selasky wrote: Here is the relevant output. First note, the buffer length is 512 and (uint8_t)512 = 0, so I modified the code to print out

Re: MacBookPro 5,1

2010-10-22 Thread Hans Petter Selasky
On Friday 22 October 2010 07:19:47 Lin Ming wrote: diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c index 2a019d1..17b88e2 100644 --- a/source/components/resources/rsxface.c +++ b/source/components/resources/rsxface.c @@ -394,6 +394,7 @@

Re: Event based scheduling and USB.

2010-10-27 Thread Hans Petter Selasky
By default USB devices are not suspended. You can use usbconfig power_save to enable automatic power save for all devices. --HPS ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any

Re: Event based scheduling and USB.

2010-10-27 Thread Hans Petter Selasky
On Wednesday 27 October 2010 10:14:18 Alexander Motin wrote: As I understand, if respective USB port is not used, USB stack should put it into power_save mode not poll so often to deny entering C3 state. USB will stop the hardware from polling RAM, but still a 4 second root HUB software

Re: MacBookPro 5,1

2010-11-04 Thread Hans Petter Selasky
On Tuesday 02 November 2010 20:29:01 Jung-uk Kim wrote: Hans, could you please test the following patch? diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c index dcf101d..e842635 100644 --- a/sys/dev/acpica/acpi_pci_link.c +++

Re: MacBookPro 5,1

2010-11-04 Thread Hans Petter Selasky
On Wednesday 03 November 2010 21:25:28 Jung-uk Kim wrote: On Wednesday 03 November 2010 01:51 pm, Jung-uk Kim wrote: On Wednesday 03 November 2010 12:47 pm, John Baldwin wrote: On Wednesday, November 03, 2010 12:25:37 pm Jung-uk Kim wrote: On Wednesday 03 November 2010 08:28 am, John

Re: Suspend to ram almost work on desktop computer

2012-01-10 Thread Hans Petter Selasky
On Tuesday 10 January 2012 19:55:57 David Demelier wrote: On 10/01/2012 20:06, Bernhard Schmidt wrote: On Tuesday 10 January 2012 17:18:43 David Demelier wrote: Hello, I have a desktop computer on a Intel DH55HC mainboard. Suspend to ram almost works on 9.0-RELEASE. The resume

Re: Suspend to ram almost work on desktop computer

2012-01-11 Thread Hans Petter Selasky
On Tuesday 10 January 2012 22:20:48 David Demelier wrote: On 10/01/2012 22:08, Hans Petter Selasky wrote: On Tuesday 10 January 2012 19:55:57 David Demelier wrote: On 10/01/2012 20:06, Bernhard Schmidt wrote: On Tuesday 10 January 2012 17:18:43 David Demelier wrote: Hello, I have

Re: Suspend to ram almost work on desktop computer

2012-01-11 Thread Hans Petter Selasky
On Wednesday 11 January 2012 19:58:11 David Demelier wrote: On 11/01/2012 19:12, Hans Petter Selasky wrote: On Tuesday 10 January 2012 22:20:48 David Demelier wrote: On 10/01/2012 22:08, Hans Petter Selasky wrote: On Tuesday 10 January 2012 19:55:57 David Demelier wrote: On 10/01/2012 20

Re: USB ACPI namespace mapping.

2012-07-31 Thread Hans Petter Selasky
On Tuesday 31 July 2012 05:19:12 Takanori Watanabe wrote: I'm trying to map USB devices and hub into acpi handle, and I want ideas to cope with a problem. The problem is that there is no easy way to get port number from child usb device in hub device. usb_attach_arg structure have one, but

Re: ACPI locking bugs?

2013-02-27 Thread Hans Petter Selasky
On Wednesday 27 February 2013 15:54:53 Andriy Gapon wrote: kib drew my attention to this issue some time ago and I also pinged jkim about it. I completely agree with you that the signal handling should be removed. Are you willing to make the change or would you prefer me doing it? Thank

Re: ACPI locking bugs?

2013-02-28 Thread Hans Petter Selasky
On Wednesday 27 February 2013 14:28:12 Jung-uk Kim wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2013-02-27 08:53:43 -0500, Hans Petter Selasky wrote: Hi, What is the reason for using cv_wait_sig() and cv_timedwait_sig() instead of cv_wait() and cv_timedwait() inside

RE: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Hans Petter Selasky
mailto:adr...@freebsd.org Sent: Sunday 7th July 2013 18:43 To: Hans Petter Selasky hans.petter.sela...@bitfrost.no mailto:hans.petter.sela...@bitfrost.no Cc: freebsd-acpi@freebsd.org mailto:freebsd-acpi@freebsd.org ; freebsd-sta...@freebsd.org mailto:freebsd-sta...@freebsd.org ; Ian Smith

Re: ACPI error messages on Lenovo W540

2014-06-17 Thread Hans Petter Selasky
On 06/17/14 15:54, Eric McCorkle wrote: I suspect these might have something to do with the USB 3.0 system not working, though I don't have experience with either the ACPI or USB subsystems. Regarding USB 3.0, does pciconf -lv list xhci? --HPS ___

Re: Regarding Wake On USB input from S3 Sleep

2016-02-11 Thread Hans Petter Selasky
On 02/11/16 13:08, Dee Zay wrote: Hello, So, is the BIOS handover to the USB stack a prerequisite when resuming from standby mode HC (not completely off HC)? Hi, I'm not sure. You'll have to find out. It is what happens when you suspend which decides if you get the resume event or not. Once

Re: Regarding Wake On USB input from S3 Sleep

2016-02-11 Thread Hans Petter Selasky
On 02/11/16 15:39, Ian Smith wrote: Do you have any rough idea of the difference in battery power used in S3 with HC(s?) running, or in standby, or off? No, I don't have any numbers. I know that USB.org has defined some rules how many mA that each individual USB device can draw in suspended

Re: Regarding Wake On USB input from S3 Sleep

2016-02-11 Thread Hans Petter Selasky
On 02/11/16 11:09, Dee Zay wrote: Hello, How do I NOT put XHCI into sleep and keep standby for USB keyboard interrupts? I cannot find system tunables for this option.. As for the debugging, how do I see the interactions between the BIOS and HC? Hi, You need to edit the code in xhci.c then.

Re: Regarding Wake On USB input from S3 Sleep

2016-02-11 Thread Hans Petter Selasky
On 02/11/16 12:30, Dee Zay wrote: Hello, I am a bit confused about the resume problem and its procedures. Could you explain briefly about the difference between resuming from standby(powered) and completely off HC? Thank you, Julian Hi, Only the XHCI can resume completely off HC. It knows

Re: Regarding Wake On USB input from S3 Sleep

2016-02-14 Thread Hans Petter Selasky
On 02/14/16 09:48, Ian Smith wrote: On Sat, 13 Feb 2016 11:17:31 -0800, Luke wrote: > > I searched the wiki on 'USB power' but noticed only sections 4 and 10 of > > https://wiki.freebsd.org/TuningPowerConsumption seemed to relate at all. > > If that's it or not, I'd appreciate some more

Re: ACPI Error on HP ProBook 430 G2

2017-01-02 Thread Hans Petter Selasky
On 12/22/16 21:04, Moore, Robert wrote: ACPICA version 20161222 happened today, with a fix for the problem below. +1 When will the fix be merged to -head ? --HPS ___ freebsd-acpi@freebsd.org mailing list

Re: [Bug 220096][PATCH] acpi_thermal: Fix a possible sleep-under-mutex bug in acpi_tz_thread

2017-06-30 Thread Hans Petter Selasky
On 06/18/17 11:52, Jia-Ju Bai wrote: The driver may sleep under a mutex, and the code path is: acpi_tz_thread [line 992: acquire the mutex] acpi_tz_thread [line 993] acpi_tz_thread [line 1003] acpi_tz_thread [line 1004] (msleep is excuted) acpi_tz_thread [line 1008] acpi_tz_thread [line 970]

ACPI display brightness control not detected

2017-06-18 Thread Hans Petter Selasky
Hi, I've dumped the relevant ACPI tables below. Does anyone know why the parsing of the ACPI DOD fails in acpi_video.c ? Any patch suggestions? --HPS acpidump: Scope (\_SB.PCI0.GFX0) { Method (_DOS, 1, NotSerialized) // _DOS: Disable Output Switching {