Re: [ptmdm] - PCTel HSP MicroModem driver for FreeBSD

Oleksandr Tatmanyants <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
Here you are.
Not too much, just one line added and one more hacked ;)
And Makefile changed a bit.

cd .../sys/modules/ptmdm
make
(snip)
nm i8xxhal.o | grep -w U
         U __const_udelay_Reae3dfd6
         U __udelay_R9e7d6bd0
         U codecID
         U kfree_R037a0cba
         U kmalloc_R93d4cfe6
         U printk_R1b7d4074
         U schedule_timeout_R17d59d01

codecID is defined in amr/dsp.a
__udelay... could be directly mapped to DELAY(9)
kmalloc... and kfree... could be implemented using malloc(9) and free(9)
printk... could be implemented using printf(9)
But I have no idea how to deal with __const_udelay... and 
schedule_timeout...

Watanabe Kazuhiro wrote:
> Be careful that you don't crash your file system...
>   
> At Fri, 17 Feb 2006 17:32:23 +0200,
> Oleksandr Tatmanyants wrote:
>   
>> amrmdm0: <82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller> 
>> port 0xba00-0xbaff,0xb980-0xb9ff irq 11 at device 31.6 on pci0
>> amrmdm0: [GIANT-LOCKED]
>> amrmdm0: type Virtual 16550A
>>
>> But after that machine is completely locked and I need to power cycle it ;(
>> I suppose that the problem is in the HAL. There was unresolved symbols 
>> in the i8xxhal.o:
>>
>> __udelay_R9e7d6bd0
>> kmalloc_R93d4cfe6
>> printk_R1b7d4074
>> kfree_R037a0cba
>> schedule_timeout_R17d59d01
>> __const_udelay_Reae3dfd6
>>
>> unfortunately I've failed to find anything useful about them on the net.
>>     
>
> Hmm... will you show me the diff? (e.g. diff -ur ptmdm-0.3.4{.orig,})
> ---
> Watanabe Kazuhiro ([email protected])
> _______________________________________________
> [email protected] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
> To unsubscribe, send any mail to "[email protected]"
>   


-- 
Best regards,
Oleksandr Tatmanyants

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
ptmdm-0.3.4.diff (text/plain, 1.8 KB)
diff -urBb ptmdm-0.3.4.orig/sys/dev/ptmdm/ptmdmsio.c ptmdm-0.3.4/sys/dev/ptmdm/ptmdmsio.c
--- ptmdm-0.3.4.orig/sys/dev/ptmdm/ptmdmsio.c	Thu Feb  9 07:10:05 2006
+++ ptmdm-0.3.4/sys/dev/ptmdm/ptmdmsio.c	Mon Feb 20 17:42:42 2006
@@ -721,6 +721,7 @@
 
 static struct pci_ids pci_ids[] = {
     { 0x134d, 0x7890, 0x7897, "PCTel PCT789T" },
+    { 0x8086, 0x24c6, 0x24c6, "Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller" },
     { 0x0000, 0x0000, 0x0000, NULL }
 };
 
@@ -1403,7 +1404,7 @@
 #if 1
         PctelInitVUartVars();
         PctelInitCtrlVars(ptmdm_country_code);
-        HAL_Init(rman_get_start(com->iores[0]), 0);
+        HAL_Init(rman_get_start(com->iores[0]), rman_get_start(com->iores[1]));
 #endif
 
         /*
diff -urBb ptmdm-0.3.4.orig/sys/modules/ptmdm/Makefile ptmdm-0.3.4/sys/modules/ptmdm/Makefile
--- ptmdm-0.3.4.orig/sys/modules/ptmdm/Makefile	Wed Feb  9 06:01:26 2005
+++ ptmdm-0.3.4/sys/modules/ptmdm/Makefile	Mon Feb 20 17:48:58 2006
@@ -6,20 +6,21 @@
 
 .PATH:	${.CURDIR}/../../dev/ptmdm
 SRCS	= ptmdmsio.c bus_if.h pci_if.h device_if.h
-SRCS	+= vuart.s
-OBJS	+= control.a dsp.a pcthal.a
+SRCS	+= vuart.s i8xxhal.s
+OBJS	+= control.a dsp.a
 KMOD	= ptmdm
 CFLAGS  += -DCDEV_MAJOR=${PTMDM_DEV_MAJOR}
 CFLAGS  += -DCOUNTRY_CODE=${PTMDM_COUNTRY_CODE}
+CLEANFILES += vuart.s i8xxhal.s
 
 control.a:
 	ln -sf ${.CURDIR}/../../../../pctel-${PTMDM_OBJ_VERSION}/src/lib/${.TARGET} .
 
 dsp.a:
-	ln -sf ${.CURDIR}/../../../../pctel-${PTMDM_OBJ_VERSION}/src/lib/pct789/${.TARGET} .
+	ln -sf ${.CURDIR}/../../../../pctel-${PTMDM_OBJ_VERSION}/src/lib/amr/${.TARGET} .
 
-pcthal.a:
-	ln -sf ${.CURDIR}/../../../../pctel-${PTMDM_OBJ_VERSION}/src/lib/pct789/${.TARGET} .
+i8xxhal.s:
+	ln -sf ${.CURDIR}/../../../../pctel-${PTMDM_OBJ_VERSION}/src/${.TARGET} .
 
 vuart.s:
 	ln -sf ${.CURDIR}/../../../../pctel-${PTMDM_OBJ_VERSION}/src/${.TARGET} .
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.