Re: Agere systems HDA modem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Folks,

 Attached is the patch to the agrsm-2.1.80-10mdv2009.0.tar.gz
 to make the 11c11040 work on the kernel 2.6.30-rc6.

 I run vanilla kernels, but it shall be close enough to what
 the recent Ubuntu has.
 
 Please test it and if it works roll out the dkms-*.deb for
 the uninitiated.

 The actual fix that did it for me is to serial26.c:
<<<
    if (!int_hooked)
    {
        int_hooked++;
+       lt_modem_ops.PortOpen();
    }
>>>

My understanding is that the PortOpen() call was unintentionally
removed in "10mdv".  The rest of the changes are the code cleanup. The
code that I wasn't sure about I #ifdef'ed with my initials NDZ.
Integrator shall just remove the code, if it is confirmed that it is
irrelevant old junk.  You can ignore the Makefile.mine if you have the dkms
installed and working. I don't have it, so after applying all the
patches in the patches/ directory (except for the FC9 patch), I apply
my patch and run make -f Makefile.mine:

sudo make -f Makefile.mine
sudo make -f Makefile.mine modules_install
sudo modprobe -r agrserial
sudo modprobe -r agrmodem
sudo modprobe agrmodem
sudo modprobe agrserial
sudo ln -s /dev/ttyAGS3 /dev/modem
sudo ln -s /dev/ttyAGS3 /dev/ttySAGR
$ sudo wvdialconf /etc/wvdial.conf

Just in case, I include my ModemData.txt and the output of wvdialconf.
I don't have a landline, but the modem seems to respond.

Have fun.

-- 
Nick Zhuravlev
www.auriga.com


Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0   S1   S2   S3   
ttySAGR<*1>: ATQ0 V1 E1 -- OK
ttySAGR<*1>: ATQ0 V1 E1 Z -- OK
ttySAGR<*1>: ATQ0 V1 E1 S0=0 -- OK
ttySAGR<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttySAGR<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttySAGR<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttySAGR<*1>: Modem Identifier: ATI -- Agere SoftModem Version 2.1.80.0
ttySAGR<*1>: Speed 4800: AT -- OK
ttySAGR<*1>: Speed 9600: AT -- OK
ttySAGR<*1>: Speed 19200: AT -- OK
ttySAGR<*1>: Speed 38400: AT -- OK
ttySAGR<*1>: Speed 57600: AT -- OK
ttySAGR<*1>: Speed 115200: AT -- OK
ttySAGR<*1>: Max speed is 115200; that should be safe.
ttySAGR<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttySAGR.
Modem configuration written to /etc/wvdial.conf.
ttySAGR<Info>: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

On Sat, Dec 05, 2009 at 06:52:30PM +0300, Nikolay Zhuravlev <nikolay.zhuravlev@xxxxxxxxx> wrote:

>  It doesn't work (yet) on the 2.6.3* kernels.
>  As an alternative, you can downgrade just the kernel
>  back to 2.6.27 or 2.6.28 (whatever you had in your
>  previous Ubuntu 9.04 install) and use the old
>  drivers that you mention on
> http://forum.ubuntu.ru/index.php?topic=56349.0
>   
>  Otherwise, you will have to wait till the driver
>  code is hacked some more to be in-sync with the
>  current kernel developments.
> 
> -- 
> Nick Zhuravlev
> www.auriga.com
> 
> 
> On Sat, Dec 05, 2009 at 03:08:16PM +0300, Плашинов Дмитрий <bulldog1972@xxxxxxx> wrote:
> 
> > Добрый день пожалуйста помогите разобраться с этим модемом (чип  
> > 11с11040) в ubuntu 9.04 все прекрасно работало а в 9.10 никак завести не  
> > могу, в 9.04 устанавливал так  
> > http://forum.ubuntu.ru/index.php?topic=56349.0 и все прекрасно работало  
> > а в 9.10 по всякому пробовал  
> > (http://forum.ubuntu.ru/index.php?topic=74024.msg579263#msg579263) ну  
> > никак не хочет.
> > Заранее признателен Плашинов Дмитрий
> > ACER Aspire 4720Z - ноутбук
> 
> > CLASS=0403
> > NAME="Audio device: Intel Corporation 82801H "
> > PCIDEV=8086:284b
> > SUBSYS=1025:011d
> > IRQ=22
> > HDA=8086:284b
> > SOFT=8086:284b.HDA
> > CodecDiagnosed=
> > slamrTest=
> > HDAchipVendorID=11c1
> > CHIP=0x11c11040
> > CodecClass=
> > IDENT=agrsm
> > Driver=agrsm
> > DRIVER=agrsm
> 
 Only plain text email is forwarded by the  Discuss@xxxxxxxxxxxxx List Server,
 as HTML can contain viruses. Use as the email Subject Line:
           YourName, YourCountry  kernel 2.6.30-rc6 
 With this Subject Line cogent experts will be alerted, and useful case names left in the Archive.
 YourCountry will enable Country specific guidance. Linux experts in YourCountry 
 can be found through: http://www.linux.org/groups/index.html.
They will know your Country's modem code, which may be essential for dialup service.
Responses from Discuss@xxxxxxxxxxxxx are sometimes blocked by an Internet Provider mail filters.
 So in a day, also check the Archived responses at http://www.linmodems.org 
--------------------------  System information ----------------------------
CPU=i686,  
Linux version 2.6.30-rc6 (ndz@toshi) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)) #1 SMP Mon May 25 23:19:43 MSD 2009
 scanModem update of:  2009_11_26


The dkms driver upgrade utilities are installed,

 There are no blacklisted modem drivers in /etc/modprobe*  files 

 Potentially useful modem drivers now loaded are:
       snd_hda_intel           

Attached USB devices are:
 ID 0bda:8197 Realtek Semiconductor Corp. 
 ID 1d6b:0002  
 ID 1d6b:0002  
 ID 1d6b:0001  
 ID 1d6b:0001  
 ID 1d6b:0001  
 ID 1d6b:0001  
 ID 1d6b:0001  
If a cellphone is not detected, see http://ubuntuforums.org/archive/index.php/t-878554.html
A sample report is:  http://linmodems.technion.ac.il/bigarch/archive-nineth/msg00578.html

If a USB modem or cellphone is attached and was not detected, please
provide available information in your request to discuss@xxxxxxxxxxxxx

For candidate card in slot 00:1b.0, firmware information and bootup diagnostics are:
 PCI slot	PCI ID		SubsystemID	Name
 ----------	---------	---------	--------------
 00:1b.0	8086:284b	1179:ff40	Audio device: Intel Corporation 82801H 

 Modem interrupt assignment and sharing: 
 22:        794   IO-APIC-fasteoi   HDA Intel
 --- Bootup diagnostics for card in PCI slot 00:1b.0 ----
[    0.120442] pci 0000:00:1b.0: reg 10 64bit mmio: [0xfeaf8000-0xfeafbfff]
[    0.120492] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    0.120496] pci 0000:00:1b.0: PME# disabled
[   17.967713] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[   17.967746] HDA Intel 0000:00:1b.0: setting latency timer to 64

 The PCI slot 00:1b.0 of the modem card may be disabled early in 
 a bootup process,  but then enabled later. If modem drivers load 
 but the  modem is not responsive, read DOCs/Bootup.txt about possible fixes.
 Send dmesg.txt along with ModemData.txt to discuss@xxxxxxxxxxxxx
 if help is needed.
 


===== Advanced Linux Sound Architecture (ALSA) diagnostics ===== 
The ALSA packages provide audio support and also drivers for some modems.
ALSA diagnostics are written during bootup to /proc/asound/ folders.

The ALSA verion is 1.0.20
The modem cards detected by "aplay -l"  are: None


The /proc/asound/pcm file reports:
-----------------------
00-00: ALC660-VD Analog : ALC660-VD Analog : playback 1 : capture 1

about /proc/asound/cards:
------------------------
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfeaf8000 irq 22

 PCI slot 00:1b.0 has a High Definition Audio Card
 The drivers are in the kernel modules tree at:
 /lib/modules/2.6.22-15-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
/lib/modules/2.6.27-rc9/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.29.1/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.22-16-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
/lib/modules/2.6.30-rc6/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-24-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-23-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-25-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.28.10/kernel/sound/pci/hda/snd-hda-intel.ko
 The modem codec file for the HDA card is: /proc/asound/card0/codec#1
--------------------------------------------------------
Codec: LSI ID 1040
Address: 1
Function Id: 0x2
Vendor Id: 0x11c11040
Subsystem Id: 0x11790001
Revision Id: 0x100200
Modem Function Group: 0x1

 The audio card hosts a softmodem chip:  0x11c11040
If not a Conexant modem, the driver agrsm with its dependent drivers:

----------
provide audio + modem support with the modem chip residing on the subsystem.
Any particular card can host any one of several soft modem chips. 

=== Finished firmware and bootup diagnostics, next deducing cogent software. ===

Predictive  diagnostics for card in bus 00:1b.0:
	Modem chipset  detected on
NAME="Audio device: Intel Corporation 82801H "
CLASS=0403
PCIDEV=8086:284b
SUBSYS=1179:ff40
IRQ=22
HDA=8086:284b
SOFT=8086:284b.HDA
HDAchipVendorID=11c1
CHIP=0x11c11040
IDENT=agrsm
Driver=agrsm

 For candidate modem in:  00:1b.0
   0403 Audio device: Intel Corporation 82801H 
      Primary device ID:  8086:284b
    Subsystem PCI_id  1179:ff40 
    Softmodem codec or chipset from diagnostics: 0x11c11040
                               from    Archives: 
                        The HDA card softmodem chip is 0x11c11040
      

Support type needed or chipset:	agrsm


Writing DOCs/Intel.txt

The AgereSystems/LSI agrsm code supports compiling of a agrmodem + agrserial driver pair.
There are a few different chipsets which use this driver pair, but they use different code resources:
Chipsets			KV*	PackageNames (most current as of November 2009)
----------------------------------------------------------------------------------------------
11c1:048c and 11c1:048f         2.6.29	agrsm048pci-2.1.60_20091022_i386.deb or agrsm048pci-2.1.60_20091022.tar.gz
11c1:0620                       2.6.28  agrsm06pci_2.1.80~20090825_i386.deb  or agrsm06pci_2.1.80~20090825_i386.tar.gz 
11c11040 (on HDA audio cards)   2.6.27  dkms-agrsm_2.1.80-9mdv2009.0_i386.deb or  agrsm-2.1.80-10mdv2009.0.tar.gz
   All available at: http://linmodems.technion.ac.il/packages/ltmodem/11c11040/   , whereat additionally
automation & testing                    agrsm-tools_0.0.1_all.deb or agrsm-tools-0.0.1-2.noarch.rpm
General background                      agrsm_howto.txt 
for rpm variants of dkms-agrsm , see  http://linux.zsolttech.com/linmodem/agrsm/
------------------------------------------------------------------------------------------------
* KV == latest kernel release with a reported success 

All of the above packages are dkms competent.  This means that if your Linux distros dkms package
is previously installed, if provides for future updates matching forthcoming kernels.

-------------- end Agere Systems section -------------------

 Completed candidate modem analyses.

 The base of the UDEV device file system is: /dev/.udev

 Versions adequately match for the compiler installed: 4.2.4
             and the compiler used in kernel assembly: 4.2.4


 
 Minimal compiling resources appear complete:
   make utility - /usr/bin/make
   Compiler version 4.2
   linuc_headers base folder /lib/modules/2.6.30-rc6/build

 However some compilations and executable functions may need additional files,
 in the FileNames.h (so called kernel "h"eaders) collection installed in  /usr/include/ .
 For martian_modem, additional required packages are needed. The also required headers of package libc6 are commonly installed by default. 
 Compiling hsfmodem drivers does require linux-libc-dev and libc6-dev packages, for kernels 2.6.24 and later versions.
 In not included on your install CD, search for them at http://packages.ubuntu.com
 or comparable Repository for other Linux distros.
 When compiling ALSA drivers, the utility "patch" will also be needed.


Compressed files at: /usr/src/kqemu.tar.bz2


If a driver compilation fails, with message including some lack of some FileName.h (stdio.h for example), then
Some additional kernel-header files need installation to /usr/include. The minimal additional packages are libc6-dev
and any of its dependents, under Ubuntu linux-libc-dev

If an alternate ethernet connection is available,
$  apt-get update
$  apt-get -s install linux-kernel-devel
will install needed packages.
For Debian/Ubuntu related distributions, run the following command to display the needed package list:

Otherwise packages have to be found through http://packages.ubuntu.com
Once downloaded and transferred into a Linux partition,
they can be installed alltogether with:
$ sudo dpkg -i *.deb


Checking pppd properties:
	-rwsr-xr-- 1 root dip 269256 2007-10-04 23:57 /usr/sbin/pppd

In case of an "error 17" "serial loopback" problem, see:
    http://linmodems.technion.ac.il/linmodems/archive-sixth/msg02637.html

To enable dialout without Root permission do:
	$ su - root  (not for Ubuntu)
        sudo chmod a+x /usr/sbin/pppd
or under Ubuntu related Linuxes
	sudo chmod a+x /usr/sbin/pppd

Checking settings of:	/etc/ppp/options
asyncmap 0
noauth
crtscts
lock
hide-password
modem
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
noipx

In case of a message like:
   Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
see http://linmodems.technion.ac.il/bigarch/archive-sixth/msg04656.html

Read Modem/DOCs/YourSystem.txt concerning other COMM channels: eth0 wlan0 wmaster0
Which can interfere with Browser naviagation.

 Don't worry about the following, it is for experts should trouble shooting be necessary.
==========================================================

 Checking for modem support lines:
 --------------------------------------
     /device/modem symbolic link:   
slmodemd created symbolic link /dev/ttySL0:  
     Within /etc/udev/ files:

     Within /etc/modprobe.conf files:
/etc/modprobe.d/alsa-base:options snd-atiixp-modem index=-2
/etc/modprobe.d/alsa-base:options snd-via82xx-modem index=-2
/etc/modprobe.d/blacklist-modem:# Uncomment these entries in order to blacklist unwanted modem drivers
/etc/modprobe.d/blacklist-modem:# blacklist snd-atiixp-modem
/etc/modprobe.d/blacklist-modem:# blacklist snd-via82xx-modem
     Within any ancient /etc/devfs files:

     Within ancient kernel 2.4.n /etc/module.conf files:

--------- end modem support lines --------

diff -Naur agrsm-2.1.80-10mdv2009.0/agrmodem.h agrsm-2.1.80-10mdv2009.0-modified/agrmodem.h
--- agrsm-2.1.80-10mdv2009.0/agrmodem.h	2008-06-05 16:43:35.000000000 +0400
+++ agrsm-2.1.80-10mdv2009.0-modified/agrmodem.h	2009-12-06 14:22:54.000000000 +0300
@@ -73,7 +73,7 @@
 /******************* Functions passed on to Kernel *****************/  
 void wrap_timertick_function ( unsigned long Instance ) { timertick_function (Instance);}
 void wrap_LXHardwareBottomHalf (void *hardware){LXHardwareBottomHalf(hardware);}
-irqreturn_t wrap_LX_isr_handler (int irq, void *_isr, struct pt_regs *regs){LX_isr_handler (irq, _isr, regs); return IRQ_HANDLED;}
+irqreturn_t wrap_LX_isr_handler (int irq, void *_isr){LX_isr_handler (irq, _isr, NULL); return IRQ_HANDLED;}
 
 /************************ Memory allocation ************************/
 void *x_vmalloc (unsigned int size) fnatr;
diff -Naur agrsm-2.1.80-10mdv2009.0/agrsoftmodem.c agrsm-2.1.80-10mdv2009.0-modified/agrsoftmodem.c
--- agrsm-2.1.80-10mdv2009.0/agrsoftmodem.c	2009-12-06 14:07:33.000000000 +0300
+++ agrsm-2.1.80-10mdv2009.0-modified/agrsoftmodem.c	2009-12-06 14:23:10.000000000 +0300
@@ -446,7 +446,7 @@
 #else
 	struct work_struct *x_tqueue = (struct work_struct *) task_x;
 
-    INIT_WORK(x_tqueue, wrap_LXHardwareBottomHalf);
+    INIT_WORK(x_tqueue, (work_func_t)wrap_LXHardwareBottomHalf);
 #endif
 }
 
@@ -458,7 +458,7 @@
 #else
 	struct work_struct *x_tqueue = (struct work_struct *) task_x;
 
-    INIT_WORK(x_tqueue, func);   
+    INIT_WORK(x_tqueue, (work_func_t)func);   
 #endif
 }
 
@@ -485,7 +485,7 @@
 #ifdef USB_MODEM
 
 #define to_uss_dev(d) container_of(d, struct usb_uss, kref)
-fnatr void *xkmalloc(d) { return kmalloc(d, GFP_KERNEL); }
+fnatr void *xkmalloc(size_t d) { return kmalloc(d, GFP_KERNEL); }
 fnatr void *kmalloc_dev(void) {
 	dev = kmalloc(sizeof(struct usb_uss), GFP_KERNEL);
     	if(dev) memset(dev, 0x00, sizeof(struct usb_uss));
@@ -507,7 +507,7 @@
 fnatr void *get_iface_desc(void *p) 	{return  (((struct usb_interface *)p)->cur_altsetting);}
 fnatr int  get_num_endpoints(void *p) 	{return (((struct usb_host_interface *)p)->desc.bNumEndpoints);}
 fnatr void x_kref_put(void *p) 		{if (dev)  kref_put(&dev->kref, p); }
-fnatr void x_kref_init()		{kref_init(&dev->kref);}
+fnatr void x_kref_init(void)		{kref_init(&dev->kref);}
 fnatr int  IsDirIn(int addr) 		{return (addr & USB_DIR_IN);}
 fnatr int  IsBulkXfer(int attr) 	{return ((attr & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK);}
 fnatr int  x_le16_to_cpu(int d) 	{
@@ -519,8 +519,8 @@
 fnatr int  get_urb_status(void *p) 	{return (((struct urb *)p)->status);}
 fnatr void *get_urb_context(void *p) 	{return (((struct urb *)p)->context);}
 fnatr void *get_dev(void) 		{return dev;}
-fnatr void *x_usb_alloc_urb_kernel() 	{return usb_alloc_urb(0, GFP_KERNEL);}
-fnatr void *x_usb_alloc_urb_atomic() 	{return usb_alloc_urb(0, GFP_ATOMIC);}
+fnatr void *x_usb_alloc_urb_kernel(void) 	{return usb_alloc_urb(0, GFP_KERNEL);}
+fnatr void *x_usb_alloc_urb_atomic(void) 	{return usb_alloc_urb(0, GFP_ATOMIC);}
 fnatr void x_udelay(unsigned long d) 	{udelay(d);}
 fnatr void *get_dev_control_urb(void) 	{return dev->control_urb;}
 fnatr int  usb_req_clear_feature(void) 	{return USB_REQ_CLEAR_FEATURE;}
diff -Naur agrsm-2.1.80-10mdv2009.0/HDA.c agrsm-2.1.80-10mdv2009.0-modified/HDA.c
--- agrsm-2.1.80-10mdv2009.0/HDA.c	2009-12-06 14:08:17.000000000 +0300
+++ agrsm-2.1.80-10mdv2009.0-modified/HDA.c	2009-12-06 14:23:20.000000000 +0300
@@ -228,11 +228,11 @@
 }
 
 
-unsigned long * GetHDABaseAddress()
+unsigned long * GetHDABaseAddress(void)
 {
 struct azx *chip_temp;
 struct hda_bus *bus_temp;
-unsigned long temp;
+unsigned long *temp;
 
 chip_temp = snd_cards[0]->private_data;
 bus_temp = chip_temp->bus;
diff -Naur agrsm-2.1.80-10mdv2009.0/Makefile.mine agrsm-2.1.80-10mdv2009.0-modified/Makefile.mine
--- agrsm-2.1.80-10mdv2009.0/Makefile.mine	1970-01-01 03:00:00.000000000 +0300
+++ agrsm-2.1.80-10mdv2009.0-modified/Makefile.mine	2009-12-06 14:05:04.000000000 +0300
@@ -0,0 +1,31 @@
+# Makefile for Agere Soft Modem Driver for Linux
+#
+# Copyright (c) 2002, 2003 Agere Systems, Inc.  All rights reserved.
+#
+# Description:
+# Makes the following modules
+#   - Agere Soft Modem Controller driver module 
+#   - Modem Serail Interface driver module
+#
+# Usage:
+#   make                 - build the module(s)
+#   make modules_install - install the module(s)
+#   make clean           - remove generated files in module directory only
+#
+# Revision History:
+#   Name                   Date          Change
+#   Soumyendu Sarkar       12/03/2002    Initial
+#
+
+PWD := $(shell pwd)
+KRELEASE = $(shell uname -r)
+KERNEL_DIR := /lib/modules/$(KRELEASE)/build
+
+default:
+	$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules
+
+modules_install:
+	$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules_install
+
+clean:
+	$(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean
diff -Naur agrsm-2.1.80-10mdv2009.0/serial26.c agrsm-2.1.80-10mdv2009.0-modified/serial26.c
--- agrsm-2.1.80-10mdv2009.0/serial26.c	2009-07-05 00:39:50.000000000 +0400
+++ agrsm-2.1.80-10mdv2009.0-modified/serial26.c	2009-12-06 14:53:38.000000000 +0300
@@ -170,12 +170,14 @@
 
 #define UART_NR	ARRAY_SIZE(old_serial_port)
 
+#if defined(NDZ)
 #if defined(CONFIG_SERIAL_8250_RSA) && defined(MODULE)
 
 #define PORT_RSA_MAX 4
 static int probe_rsa[PORT_RSA_MAX];
 static int force_rsa[PORT_RSA_MAX];
 #endif /* CONFIG_SERIAL_8250_RSA  */
+#endif
 
 struct uart_8250_port {
 	struct uart_port	port;
@@ -275,7 +277,7 @@
 
 struct ltmodem_ops lt_modem_ops;
 struct ltmodem_res lt_modem_res;
-static void agr_rs_interrupt (void);
+static void agr_rs_interrupt (unsigned long);
 static int intf_flag = 0;
 static int uart_flag = 0;
 static int tx_empty_flag = 0;
@@ -318,6 +320,7 @@
 	serial_out(up, UART_ICR, value);
 }
 
+#if defined(NDZ)
 static unsigned int serial_icr_read(struct uart_8250_port *up, int offset)
 {
 	unsigned int value;
@@ -332,6 +335,7 @@
 
 	return value;
 }
+#endif
 
 #ifdef CONFIG_SERIAL_8250_RSA
 /*
@@ -405,6 +409,7 @@
 }
 #endif /* CONFIG_SERIAL_8250_RSA */
 
+#if defined(NDZ)
 /*
  * This is a quickie test to see how big the FIFO is.
  * It doesn't work at all the time, more's the pity.
@@ -440,7 +445,9 @@
 
 	return count;
 }
+#endif
 
+#if defined(NDZ)
 /*
  * This is a helper routine to autodetect StarTech/Exar/Oxsemi UART's.
  * When this function is called we know it is at least a StarTech
@@ -532,7 +539,9 @@
 	else
 		up->port.type = PORT_16650V2;
 }
+#endif
 
+#if defined(NDZ)
 /*
  * We detected a chip without a FIFO.  Only two fall into
  * this category - the original 8250 and the 16450.  The
@@ -647,6 +656,7 @@
 		return;
 	}
 }
+#endif
 
 /*
  * This routine is called by rs_init() to initialize a specific serial
@@ -717,7 +727,7 @@
 	up->port.irq = (irq > 0) ? irq : 0;
 }
 
-static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
+static void serial8250_stop_tx(struct uart_port *port)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 
@@ -726,13 +736,13 @@
 		up->ier &= ~UART_IER_THRI;
 		serial_out(up, UART_IER, up->ier);
 	}
-	if (up->port.type == PORT_16C950 && tty_stop) {
+	if (up->port.type == PORT_16C950) {
 		up->acr |= UART_ACR_TXDIS;
 		serial_icr_write(up, UART_ACR, up->acr);
 	}
 }
 
-static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start)
+static void serial8250_start_tx(struct uart_port *port)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 
@@ -744,7 +754,7 @@
 	/*
 	 * We only do this from uart_start
 	 */
-	if (tty_start && up->port.type == PORT_16C950) {
+	if (up->port.type == PORT_16C950) {
 		up->acr &= ~UART_ACR_TXDIS;
 		serial_icr_write(up, UART_ACR, up->acr);
 	}
@@ -858,7 +868,7 @@
 		return;
 	}
 	if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
-		serial8250_stop_tx(&up->port, 0);
+		serial8250_stop_tx(&up->port);
 		return;
 	}
 
@@ -877,7 +887,7 @@
 	DEBUG_INTR("THRE...");
 
 	if (uart_circ_empty(xmit))
-		serial8250_stop_tx(&up->port, 0);
+		serial8250_stop_tx(&up->port);
 }
 
 static _INLINE_ void check_modem_status(struct uart_8250_port *up)
@@ -952,7 +962,7 @@
 	return IRQ_HANDLED;
 }
 
-static void agr_rs_interrupt (void)
+static void agr_rs_interrupt (unsigned long z)
 {
 	printk("%s lt_modem_res.Irq %d\n",__FUNCTION__,lt_modem_res.Irq);
 	serial8250_interrupt(lt_modem_res.Irq,NULL,NULL);
@@ -1073,6 +1083,7 @@
 	if (!int_hooked)
 	{
 		int_hooked++;
+	    lt_modem_ops.PortOpen();
 	}
 
 	up->capabilities = uart_config[up->port.type].flags;
@@ -1579,6 +1590,7 @@
 	//	int ret;
 
 	printk("%s:\n",__FUNCTION__);
+#if defined(NDZ)
 #ifdef CONFIG_MCA
 	/*
 	 * Don't probe for MCA ports on non-MCA machines.
@@ -1586,6 +1598,7 @@
 	if (up->port.flags & UPF_BOOT_ONLYMCA && !MCA_bus)
 		return;
 #endif
+#endif
 
 	/*
 	 * Find the region that we can probe for.  This in turn
@@ -1847,7 +1860,9 @@
 	.major			= 62,
 	.minor			= 64,
 	.nr			= UART_NR,
-	.cons			= 0,
+	.cons			= NULL,
+	.state  = NULL,
+	.tty_driver = NULL
 };
 
 /*
@@ -1968,9 +1983,11 @@
 MODULE_DESCRIPTION("Agere Modem Interface driver");
 MODULE_LICENSE("GPL");
 
+#if defined(NDZ)
 #if defined(CONFIG_SERIAL_8250_RSA) && defined(MODULE)
 //MODULE_PARM(probe_rsa, "1-" __MODULE_STRING(PORT_RSA_MAX) "i");
 MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");
 //MODULE_PARM(force_rsa, "1-" __MODULE_STRING(PORT_RSA_MAX) "i");
 MODULE_PARM_DESC(force_rsa, "Force I/O ports for RSA");
 #endif
+#endif

[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux