From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 25 17:28:05 2007 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37FA116A469 for ; Thu, 25 Oct 2007 17:28:05 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from s200aog12.obsmtp.com (s200aog12.obsmtp.com [207.126.144.126]) by mx1.freebsd.org (Postfix) with SMTP id D0A4C13C4C2 for ; Thu, 25 Oct 2007 17:28:02 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from source ([217.206.187.80]) by eu1sys200aob012.postini.com ([207.126.147.11]) with SMTP; Thu, 25 Oct 2007 17:28:01 UTC Received: from [10.0.0.89] (bill.mintel.co.uk [10.0.0.89]) by rodney.mintel.co.uk (Postfix) with ESMTP id BEA2D181422; Thu, 25 Oct 2007 18:28:00 +0100 (BST) Message-ID: <4720D21F.7050909@tomjudge.com> Date: Thu, 25 Oct 2007 18:27:59 +0100 From: Tom Judge User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: John Baldwin References: <471CCA24.4080400@tomjudge.com> <200710232328.18947.jhb@freebsd.org> <471FCE4C.70303@tomjudge.com> <200710251234.59272.jhb@freebsd.org> In-Reply-To: <200710251234.59272.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: njl@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: ACPI Attach (acpi_ibm) stops mouse from working X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2007 17:28:05 -0000 John Baldwin wrote: > On Wednesday 24 October 2007 06:59:24 pm Tom Judge wrote: >> John Baldwin wrote: >>> On Monday 22 October 2007 12:04:52 pm Tom Judge wrote: >>>> Hi, >>>> >>>> >>>> I have recently setup an IBM/Lenovo T43 with RELENG_7 as of mid last >>>> week, however I have a problem with the acpi_ibm module. >>>> >>>> If I add acpi_ibm_load="YES" to loader.conf I get the following message >>>> during boot: >>>> >>>> psm0: unable to allocate IRQ >>>> >>>> This is followed by a message stating that the acpi_ibm module has >>>> attached to IRQ 12. >>>> >>>> If I remove this module from loader.conf and boot the system the mouse >>>> attaches and works as expected. If I then kldload acpi_ibm the module >>>> attaches to acpi0. >>>> >>>> >>>> Is there any way to make this work without loading the acpi module after >>>> boot? >>> Can you provide your acpidump as well as devinfo -rv output from both > cases? >>> (i.e. when it is loaded at boot and when it is kldloaded after boot) >>> >> Hi, >> >> After spending many hours trying to reproduce this I have narrowed it >> down to the order in which the modules are loaded (and by nature listed >> in /boot/loader.conf). It seems that the psm will only attach when >> acpi_ibm is listed at the end of loader.conf. >> >> I have run a sequence of tests and gathered the following data >> >> acpidump -dt >> devinfo -rv >> /var/run/dmesg.boot >> Kernel config (T43) >> >> The file names are in the format {data}-{acpi_ibm_load line number in >> loader.conf}-{good=psm attached/bad=psm failed to attach} >> >> The files are avaliable here: http://www.tomjudge.com/tmp/debug.tgz >> >> If you want any more information please let me know. > > You BIOS makes your PS/2 mouse show up as an acpi_ibm(4) device which is your > problem. acpi_ibm(4) looks for two different IDs: > > static char *ibm_ids[] = {"IBM0057", "IBM0068", NULL}; > > Your hotkey device shows up as "IBM0068": > > Device (HKEY) > { > Name (_HID, EisaId ("IBM0068")) > ... > } > > You mouse has a split personality and picks the "IBM" ID during boot via the > MOU.MHID() method: > > Scope (\_SB) > { > Method (_INI, 0, NotSerialized) > { > ... > \_SB.PCI0.LPC.MOU.MHID () > ... > } > > ... > Device (MOU) > { > Name (_HID, EisaId ("IBM3780")) > Name (_CID, 0x130FD041) > Name (_CRS, ResourceTemplate () > { > IRQNoFlags () > {12} > }) > Method (MHID, 0, NotSerialized) > { > If (\_SB.PCI0.LPC.PADD) > { > Store (0x80374D24, _HID) > } > Else > { > Store (0x57004D24, _HID) > } > } > } > ... > } > > So, it starts out as "IBM3780", but if 'PADD' is zero (maybe changed via a > BIOS setting?) it uses "IBM0057" which causes acpi_ibm(4) to attach to this > device if it sees it before the psm(4) driver sees it. > > The linux acpi_ibm driver only attaches to IBM0068 FWIW. You can try > removing "IBM0057" from the ID list in acpi_ibm.c, that should fix your mouse > issue. > The only bios settings relevent to the mouse are whether to disable it, or have it automatically disabled if an external mouse is detected, presumable connected to the dock mouse port (which I don't have). Why would the psm/ibm_acpi attach order be changed by where abouts acpi_ibm_load is in loader.conf? Thanks for the help with this. Tom