LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1620|回复: 19

救救我的猫!Cirrus Logic CL-MD5620DT(56K)

[复制链接]
发表于 2003-5-5 11:19:37 | 显示全部楼层 |阅读模式
我用的猫是Cirrus Logic CL-MD5620DT(56K),我在网上下载了一个驱动程序CLModem-0.3.0+gg.tar.gz,在linux8.0下make出错,不知是什么原因,请大虾指点一二,在线等待(不然我在linux下不能上网)!!谢谢!!!

gcc -O2 -Wall -pipe -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -c clm_dspdrv.c -o clm_dspdrv.o
clm_dspdrv.c: In function `mt_CallProgressCallback':
clm_dspdrv.c:182: warning: implicit declaration of function `printk'
clm_dspdrv.c:182:41: warning: pasting "KERN_INFO" and ""RingState = %d\n"" does not give a valid preprocessing token
clm_dspdrv.c:182: `KERN_INFO' undeclared (first use in this function)
clm_dspdrv.c:182: (Each undeclared identifier is reported only once
clm_dspdrv.c:182: for each function it appears in.)
clm_dspdrv.c:182: parse error before string constant
clm_dspdrv.c: In function `delay':
clm_dspdrv.c:370: `current' undeclared (first use in this function)
clm_dspdrv.c:370: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
clm_dspdrv.c:371: warning: implicit declaration of function `schedule_timeout'
clm_dspdrv.c:371: `HZ' undeclared (first use in this function)
clm_dspdrv.c:951:49: warning: pasting "KERN_INFO" and ""DSP Code Location : Internal ROM\n"" does not give a valid preprocessing token
clm_dspdrv.c: In function `dsp_info':
clm_dspdrv.c:951: `KERN_INFO' undeclared (first use in this function)
clm_dspdrv.c:951: parse error before string constant
clm_dspdrv.c:953:50: warning: pasting "KERN_INFO" and ""DSP Code Location : External SRAM\n"" does not give a valid preprocessing token
clm_dspdrv.c:1369:37: warning: pasting "KERN_INFO" and ""Not implemented yet.\n"" does not give a valid preprocessing token
clm_dspdrv.c: In function `line_port_init':
clm_dspdrv.c:1369: `KERN_INFO' undeclared (first use in this function)
clm_dspdrv.c:1369: parse error before string constant
clm_dspdrv.c:1482:24: warning: pasting "KERN_INFO" and ""STATISTICS:\n"" does not give a valid preprocessing token
clm_dspdrv.c: In function `print_io_stats':
clm_dspdrv.c:1482: `KERN_INFO' undeclared (first use in this function)
clm_dspdrv.c:1482: parse error before string constant
clm_dspdrv.c:1483:43: warning: pasting "KERN_INFO" and ""RX chars  : %d\n"" does not give a valid preprocessing token
clm_dspdrv.c:1483: parse error before string constant
clm_dspdrv.c:1484:43: warning: pasting "KERN_INFO" and ""TX chars  : %d\n"" does not give a valid preprocessing token
clm_dspdrv.c:1484: parse error before string constant
clm_dspdrv.c:1485:44: warning: pasting "KERN_INFO" and ""RX errors : %d ?\n"" does not give a valid preprocessing token
clm_dspdrv.c:1485: parse error before string constant
clm_dspdrv.c:1583:51: warning: pasting "KERN_INFO" and ""New Call Progress : %x\n"" does not give a valid preprocessing token
clm_dspdrv.c: In function `v8_orig':
clm_dspdrv.c:1583: `KERN_INFO' undeclared (first use in this function)
clm_dspdrv.c:1583: parse error before string constant
clm_dspdrv.c:1583: warning: left-hand operand of comma expression has no effect
clm_dspdrv.c:1583: parse error before ')' token
make: *** [clm_dspdrv.o] Error 1
发表于 2003-5-5 12:05:10 | 显示全部楼层
我以前也有这个猫的,一直不能用,你这个驱动我用过,不好用的,建议换个MODEM吧
发表于 2003-5-5 12:18:09 | 显示全部楼层
感觉有点不对。要弄明白到芯是用的什么芯片组
#lspci
把这个结果发上来。
另外,把内核的版本也发上来
#uname -a
 楼主| 发表于 2003-5-5 13:20:58 | 显示全部楼层

我的linux版本和PCI信息

ver:
Linux huzi.free.com 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
GNU/Linux

pci:
00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev 44)
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 1b)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE (rev 06)
00:07.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 20)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 21)
00:08.0 Communication controller: Cirrus Logic: Unknown device 4000 (rev 01)
00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:00.0 VGA compatible controller: nVidia Corporation NV6 [Vanta] (rev 15)


我的猫上的集成块的编码:
NO.1
CL-MD5620DT-QC-C
NO.2
MD1724T-11VC-A

请北南南北大哥给我的猫治一治!谢谢!!
 楼主| 发表于 2003-5-5 17:35:58 | 显示全部楼层

cat /proc/pci信息如下

PCI devices found:
  Bus  0, device   0, function  0:
    Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev 68).
      Prefetchable 32 bit memory at 0xe0000000 [0xe3ffffff].
  Bus  0, device   1, function  0:
    PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP] rev0).
      Master Capable.  No bursts.  Min Gnt=12.
  Bus  0, device   7, function  0:
    ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 27).
  Bus  0, device   7, function  1:
    IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 6).
      Master Capable.  Latency=32.  
      I/O at 0xd000 [0xd00f].
  Bus  0, device   7, function  4:
    Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 32).
      IRQ 5.
  Bus  0, device   7, function  5:
    Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 33).
      IRQ 5.
      I/O at 0xdc00 [0xdcff].
      I/O at 0xe000 [0xe003].
      I/O at 0xe400 [0xe403].
  Bus  0, device   8, function  0:
    Communication controller: PCI device 1013:4000 (Cirrus Logic) (rev 1).
      IRQ 11.
      Non-prefetchable 32 bit memory at 0xe9001000 [0xe9001fff].
      I/O at 0xe800 [0xe8ff].
  Bus  0, device   9, function  0:
    Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C (rev 16).
      IRQ 5.
      Master Capable.  Latency=32.  Min Gnt=32.Max Lat=64.
      I/O at 0xec00 [0xecff].
      Non-prefetchable 32 bit memory at 0xe9000000 [0xe90000ff].
  Bus  1, device   0, function  0:
    VGA compatible controller: nVidia Corporation Vanta [NV6] (rev 21).
      IRQ 11.
      Master Capable.  Latency=32.  Min Gnt=5.Max Lat=1.
      Non-prefetchable 32 bit memory at 0xe4000000 [0xe4ffffff].
      Prefetchable 32 bit memory at 0xe6000000 [0xe7ffffff].
发表于 2003-5-5 21:49:21 | 显示全部楼层
 楼主| 发表于 2003-5-5 23:05:23 | 显示全部楼层
发表于 2003-5-5 23:37:13 | 显示全部楼层
---------------
CLModem README
---------------

This is CLModem-0.3.0, a Linux kernel module driver for the Cirrus Logic
(Ambient) CL-MD5620DT DSP-based controller-less modem (but maybe it works
with some other models; if you try this driver with another model please
tell me if it worked).

This driver is ALPHA software. USE IT AT YOUR OWN RISK!

Currently this driver can do the following:
    - reset the modem
    - get the modem off/on hook
    - dial a number using DTMF or Pulses
    - monitor Call Progress (dialtone, answer & Ring detection, etc)
    - originate a V.34 connection up to 33600bps
    - check modem status
    - send and receive data
    - behave like a normal Serial TTY device
    - understands some commands (not AT commands!!) [SEE NOTE]
    - works with minicom, pppd, asmodem, etc.

From version 0.3.0 the driver is a kernel module that can be inserted or
removed at any time (maybe from some initialization script). This change was
necessary for fixing some problems the user-space driver couldn't address.
As this is an ALPHA driver it's incomplete and has bugs, so it COULD block
your computer or leave your modem in an unsafe state under certain conditions.


NOTE
----
I, Gabriel Gambetta, included very basic AT command support and error messages, so
the driver can be used directly from KPPP.

I couldn't contact the author to submit the changes, so I'm posting this version
so you can use it. If you are able to contact the author, please tell him to contact
me at ggambett@internet.com.uy

The driver understands ATZ, ATR, ATI, ATDT, ATDP, ATM, and ATL. It returns CONNECT,
BUSY, NO DIALTONE, NO CARRIER and NO ANSWER.


Install
--------
First you must gather some information about your modem and be completely sure
of this information. What you need is your Modem Base IO address and IRQ number
which can be obtained from "/proc/pci" e.g: cat /proc/pci and looking for
something like:

  Bus  0, device  13, function  0:
  Communication controller: Cirrus Logic Unknown device (rev 1).
  Vendor id=1013. Device id=4000.
  Medium devsel.  IRQ 10.
  Non-prefetchable 32 bit memory at 0xebffe000 [0xebffe000].
  I/O at 0xde00 [0xde01].

or you can obtain them from within Windoze.

Next you MUST edit "clm_config.h" and configure CLM_BASE_IO_ADDRESS and
CLM_IRQ, for example:
        #define CLM_BASE_IO_ADDRESS     0xde00
        #define CLM_IRQ                 10

NOTE: This driver will try to find a PCI modem and will compare its settings
      with those provided, so they must match.

Once you have edited "clm_config.h" just run "make" and the module will be
compiled.
        $ make

NOTE: the kernel module is "clm.o"


Usage
------
First you must create a character special device file to access the modem, so
you should type:
    $ su
    # mknod /dev/clm c 121 0

Next you must load the CLM module
    # /sbin/insmod clm.o

Now you can use minicom and test your modem. See Modem Commands below.
Note: you must configure minicom first to use /dev/clm or symlink
      /dev/modem to /dev/clm.


Using PPP
----------
For configuring PPP I suggest you use linuxconf (rp3 & wvdial don't work well)
setting the modem port to "/dev/clm" and using the included "chat-ppp0" after
changing the phone number to call.

The "PP" script starts a PPP connection; but you must edit it first to suit
your specific needs. It uses "chat-ppp0" as the connection script
    # ./PPP

to stop PPP you can type "killall pppd" as root.


Modem Commands
--------------
The CLM device undertands some commands, that you can test using minicom.

  command       description
  -------       ----------------------
   INIT         Initializes the modem
   SPKR ON      turns on the speaker
   SPKR OFF     turns off the speaker
   SPKRVOL n    sets speaker volume to n (0-2)
   DIAL phone   dials phone number and originates a data modem connection

However, to hangup the modem you'll have to quit minicom.

Note: If you have problems establishing a connection take a look at your log
      files (e.g /var/log/messages)

Bugs
-----
    - Using V.34 increments RX errors too much depending on the line quality
      and there's no Error Correction protocol implemented yet.
    - The driver doesn't detect a remote hangup properly and if a retrain is
      started the driver will hangup the modem.

To Do
------
    - V.90 & X2
    - voice stuff
    - V.42 LAPM (for error correction)
    - test line quality during connection
    - retrains, rate renegotiations, etc

About CLModem
--------------
This driver was written by Mikhail Moreyra <mmv@Phreaker.net>
and is licensed under the terms of the GNU General Public License. See LICENSE.

    Copyright (C) 2000 Mikhail Moreyra

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
发表于 2003-5-5 23:44:02 | 显示全部楼层
做一个链接。
#cd /usr/src
#ln -s linux-2.4.18-14 linux
 楼主| 发表于 2003-5-6 09:13:12 | 显示全部楼层

Correct!

最初由 北南南北 发表
做一个链接。
#cd /usr/src
#ln -s linux-2.4.18-14 linux


I just according the README. This one "http://linmodems.technion.ac.il/packages/CLModem-0.3.0.tar.gz" only for kernel 2.2.x. So I made choice "http://www.idir.net/~gromitkc/clm/clm-20020412.tar.gz". This one can for 2.4.x.
Thanks! I will try again!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表