Subject: 3COM PCI driver Re: Dell and Linux
From: Marvin Stodolsky <stodolsk@rcn.com>
Date: Sat, 24 Feb 2001 07:31:42 -0500
Sat, 24 Feb 2001 07:31:42 -0500
> Athail Rangel Pulino Filho wrote:
> 
> I have a desktop Dell Dimension L733r. It seems that the modem is 3Com
> MDP3900V-U modem. I have a driver (3com56k.rpm) sent to me by Dell
> Computers.
> Unfortunatelly I don't know how to use this driver in Linux (Red Hat
> 7.0).
> 
> Help.
> 
> Athail.
Overall looks good, though its still Obscure how the binary will be
adapte to kernel changes.  Should not at all hurt for fold with 3Com PCI
modems to test it.


MarvS

=================================================== 
Package: 3commdm
Architecture: i386
Depends: ${shlibs:Depends}
Description: Enables 3Com PCI modems undel Red Hat 6.0 or newer
 This program scans the PCI configuration file /proc/bus/pci/devices
 for a 3Com PCI controller based modem. When found it will issue
 the appropriate setserial command and make the /dev/modem link.
 .
 If the file /etc/rc.d/rc.serial exists it will be renamed to
 /etc/.../rc.serial.old and a new .../rc.serial will be created. 

Ignore the debian/ folder created PURELY by the Debian alien unpacker
tool.  Otherwise installed components will be the standard rpm
registration info, plus
3ComMdm - the binary
rc.serial - a replacement for you current one, which is backed up.
3ComMdm.1 - a manual file displayed below. 

|-- bin
|   `-- 3ComMdm
|-- debian
|   |-- changelog
|   |-- conffiles
|   |-- control
|   |-- copyright
|   |-- postinst
|   `-- rules
|-- etc
|   `-- rc.d
|       `-- rc.serial
`-- usr
    `-- man
        `-- man1
            `-- 3ComMdm.1

Contens of the manual are:                           
===================================================================== 
3COMMDM(1)                                             3COMMDM(1)
 
NAME
       3ComMdm - Enables 3Com PCI controller based modems
 
SYNOPSIS
       3ComMdm [ port ]
 
DESCRIPTION
       3ComMdm parses the PCI device list created during boot. If
       it finds a 3Com controller based modem it will  then  call
       setserial with the appropriate parameters.
 
       3ComMdm  will  accept zero or one parameter. If given, the
       parameter specifies the serial port that is to be set  for
       the  modem.  It should be something like /dev/ttyS3. If no
       parameter is passed 3ComMdm will default to /dev/ttyS3.
 
       If you installed the 3ComMdm program from the RPM  archive
       3ComMdm-1.0-1.rpm  then  your system should be ready to go
       every  time  you  boot.  The  installation  provided   the
       /etc/rc.d/init.d/serial script and the proper linkage with
       /dev/modem
 
AUTHOR
       Bruno Marchevsky, 3Com Corp.
 
SEE ALSO
       setserial(1), rpm(8)
==============================================================
with replacement rc.serial ATTACHED.

#
# /etc/rc.serial 
#	Initializes the serial ports on your system
#
# chkconfig: 2345 50 75
# description: This initializes the settings of the serial port
#
# Distributed with setserial version 2.15
# 
# XXXX note: as of 2.15, the autosave feature doesn't work if you are
# using the multiport feature; it doesn't save the multiport configuration
# (for now).  Autosave also doesn't work for the hayes devices.  
#Will fix later...
#
#

SETSERIAL=/bin/setserial
RCLOCKFILE=/var/lock/subsys/serial

#
# Define location and serial port for PCI modem
#
COMMDM=/bin/3ComMdm
COMPORT=/dev/ttyS3


ALLDEVS="/dev/ttyS?"
if /bin/ls /dev/ttyS?? >& /dev/null ; then
	ALLDEVS="$ALLDEVS /dev/ttyS??"
fi

#
# Handle System V init conventions...
#
case $1 in
start)
	action="start";
	;;
stop)
	action="stop";
	;;
*)
	action="start";
esac

if test $action  = stop ; then
	if test `head -1 /etc/serial.conf`X = "###AUTOSAVE###X" ; then
		echo -n "Saving state of serial devices... "
		grep "^#" /etc/serial.conf > /etc/.serial.conf.new
		${SETSERIAL} -G -g ${ALLDEVS} >> /etc/.serial.conf.new
		mv /etc/serial.conf /etc/.serial.conf.old
		mv /etc/.serial.conf.new /etc/serial.conf
		echo "done."
	fi
	rm -f ${RCLOCKFILE}
	exit 0
fi

#
# If not stop, it must be a start....
#

if test -f /etc/serial.conf ; then
	grep -v ^# < /etc/serial.conf | while read device args
	do
	    ${SETSERIAL} -z $device $args
	done 
	${COMMDM} ${COMPORT}

else
	echo "###AUTOSAVE###" > /etc/serial.conf
	${COMMDM} ${COMPORT}
fi
rm -f /dev/modem
ln -s ${COMPORT} /dev/modem

touch ${RCLOCKFILE}
${SETSERIAL} -bg ${ALLDEVS}