From owner-freebsd-stable Thu Jul 4 21: 8:36 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC34D37B400 for ; Thu, 4 Jul 2002 21:08:31 -0700 (PDT) Received: from t-mta7.odn.ne.jp (mfep7.odn.ne.jp [143.90.131.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16F6243E09 for ; Thu, 4 Jul 2002 21:08:30 -0700 (PDT) (envelope-from aab10490@pop16.odn.ne.jp) Received: from pop16.odn.ne.jp ([61.209.161.124]) by t-mta7.odn.ne.jp with ESMTP id <20020705040827729.HICS.2063.t-mta7.odn.ne.jp@mta7.odn.ne.jp>; Fri, 5 Jul 2002 13:08:27 +0900 Message-ID: <3D2516F8.1215C102@pop16.odn.ne.jp> Date: Fri, 05 Jul 2002 12:58:08 +0900 From: WATANABE Kiyoshi To: Gianmarco Giovannelli Cc: stable@freebsd.org, darius@dons.net.au Subject: Re: ltmdm panic on 4.6-STABLE References: <5.1.1.6.2.20020704074735.01f92ec0@194.184.65.4> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 04 Jul 2002 08:08:52 +0200, Gianmarco Giovannelli wrote: > I have a smp box running 4.6-STABLE (cvsupped src and ports this morning). > > FreeBSD freebsd.giovannelli.com 4.6-STABLE FreeBSD 4.6-STABLE #3: Wed -snip- > I have installed the ltmdm port for using a lucent winmodem. > ltmdm-1.4_3 Driver for the Lucent LT Winmodem chipset > (I compiled and installed it before and after the make world without the > same results) > > freebsd:/home/gmarco# pciconf -l -snip- > none2@pci0:12:0: class=0x078000 card=0x044c11c1 chip=0x044c11c1 rev=0x02 hdr=0x00 -snip- > As soon as the port start (or I kldloaded the ltmdm.ko mod) the box panics. > > Here it is what I succeded in grab from video: > > panic:register_swi:bad intr 16 > mp_lock=00000001; cpuid=0; lapic.id=01000000 > boot() called on cpu0 -snip- > Any idea ??? The linux driver ltmodem-6.00c2.tar.gz which is derived from the original Agere's linux600.zip includes a document about SMP. DOCs/SMP.txt ================================================================================ FileName DOCs/SMP.txt -snip- ... The current problem is merely that the Lucent modem drivers under Linux have not yet been refined to function with SMP kernels. This code change will eventually reside in the proprietary component of the driver code, and is outside the effective access of the Maintainers of this kit. -snip- FileName DOCs/SMP.txt 2002March5 ================================================================================ So I ignored SMP case when I ported the driver from Linux. But I don't know whether the problem on SMP is really in the core code. If you have time to try it, please test the following patches in order, and tell me if it works. ports/comms/ltmdm/files/patch-ae (1st bet) ================================================================================ --- sys/dev/ltmdm-1.4_3/ltmdmsio.c +++ sys/dev/ltmdm/ltmdmsio.c @@ -123,8 +123,13 @@ #define lt_enable_intr() critical_exit(savecrit) #endif #else +#ifdef SMP +#define lt_disable_intr() COM_DISABLE_INTR() +#define lt_enable_intr() COM_ENABLE_INTR() +#else #define lt_disable_intr() disable_intr() #define lt_enable_intr() enable_intr() +#endif #endif #if __FreeBSD_version >= 500023 /* >= 20010912 */ ================================================================================ ports/comms/ltmdm/files/patch-ae (2nd bet) ================================================================================ --- sys/dev/ltmdm-1.4_3/ltmdmsio.c +++ sys/dev/ltmdm/ltmdmsio.c @@ -123,8 +123,15 @@ #define lt_enable_intr() critical_exit(savecrit) #endif #else +#ifdef SMP +#undef COM_LOCK +#define COM_LOCK() MPINTR_LOCK() +#undef COM_UNLOCK +#define COM_UNLOCK() MPINTR_UNLOCK() +#else #define lt_disable_intr() disable_intr() #define lt_enable_intr() enable_intr() +#endif #endif #if __FreeBSD_version >= 500023 /* >= 20010912 */ ================================================================================ ports/comms/ltmdm/files/patch-ae (3rd bet) ================================================================================ --- sys/dev/ltmdm-1.4_3/ltmdmsio.c +++ sys/dev/ltmdm/ltmdmsio.c @@ -123,6 +123,10 @@ #define lt_enable_intr() critical_exit(savecrit) #endif #else +#ifdef SMP +#define COM_LOCK() disable_intr() +#define COM_UNLOCK() enable_intr() +#endif #define lt_disable_intr() disable_intr() #define lt_enable_intr() enable_intr() #endif ================================================================================ -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message