Home
About
Contact
Documentation
Applications
Download
Resources
Home
Irda-utils
Smcinit

SMCINIT

This package is good for you if you own a Linux machine that have SMC-IRCC based IrDA subsystem and the BIOS doesn't initialize it. Otherwise you don't need it at all.

If you reading here, then you may be the unhappy owner of laptop which have SMSC IrCC IrDA controler. There are many modern latops which have the LPC47N227 or LPC47N24x super I/O chipsets. Fortunatelly here are workarround tools which later should be ported in Linux kernel.

Contents
    Description
    Download
    Testing
    Install
    Configuration
    Documentation
    Change Log
    Contact
    Anonymous CVS access to source code
    Resources

Description

Toshiba Satellite 1800, Satellite 5100, Tecra 9100 laptops and may be many other models are provided with a SMCS LPC47N227 SuperIO chip which is IrDA SIR/FIR capable. The IrDA subsystem of the SuperIO chip is supported by the smc-ircc Linux kernel module. Unfortunately the BIOS neither configurates the SuperIO chip IrDA subsystem (SIR port, FIR port, dma, irq, IrDA mode, power) nor sets the PCI-ISA bridge to decode any usable port. Linux kernel is thus prevented to detect the second UART making impossible to use it in SIR mode. For the same reason, the FIR mode smc-ircc is able to detect the SuperIO chip but, once found the IrDA subsystem unconfigured, fails to install.

While this problem will be fixed in Linux 2.6.x kernel series, the 2.4.x users are frustrated. Daniele Peri, Rob Miller and Paul Hampson mananged to build little utilities that initialize the LPC47N227 SuperIO allowing smc-ircc IrDA kernel driver to detect and use the SMSC chip.

Thomas Pinz contributed a lot of hardware testing work and compiled the following compatibility and parameters table for working Toshiba laptops:

Model SIR I/O FIR I/O FIR IRQ FIR DMA ID PCI ID Notes
Satellite 3000 no Irda
Satellite 5100 0x3f8 0x130 3 3 0x5a 248c *
Satellite 5200 0x3f8 0x130 3 3 0x5a 248c *
SatPro 2100 0x3f8 0x130 4 3 0x5a 248c
SatPro 6100 0x3f8 0x130 3 1 0x5a 248c
SatPro M10 0x2f8 0x130 3 1 0x5a 248c
Satellite A10 no Irda
Satellite P10 0x3f8 0x6f8 3 3 0x5a 248c
Satellite P20 0x3f8 0x6f8 3 3 0x5a 248c
Satellite A30 0x3f8 0x6f8 3 3 0x5a 248c
Satellite M30 0x3f8 0x130 3 3 0x7a 24cc *
Satellite A40 no Irda
Portege A100 no Irda
Portege M100 0x3f8 0x130 3 1 0x5a 24cc
Portege M200 0x3f8 0x130 3 3 0x7a 24cc *
Portege R100 no Irda
Tecra 9100 0x3f8 0x130 3 1 0x5a 248c
Tecra M1 0x3f8 0x130 3 1 0x5a 24cc
Tecra M2 0x3f8 0x130 3 1 0x7a 24cc
Tecra S1 unknown IRDA-Chip
TE 2300 unknown IRDA-Chip

Legend:
    * = Compiled-in values; in this case, you don't need parameters

Jose Manuel Marino Marino hacked the old tosh5100-smcinit.c by Rob Miller and made the tosh2450-smcinit.c. This enable Toshiba Satellite 2450 too for Linux IrDA. The utility is included in SMCINIT 0.4-1, but no integration yet to run it automatically at boot. You may do that by manually add it on original smcinit init script in your favorite Linux distribution.

Victor Meghesan hacked a bit the tosh5100-smcinit.c, changed PCI and bus ID for Intel PCI-ISA bridge on HP-Compaq "nc6000" (series PP2090) laptop, device ID as seen on dmesg command output and voila, the Linux-IrDA work even on Hewlett Packard portables! The SMSC resources which may be used with smcinit from 0.4-1 release are:

SIR I/O = 0x3E8
FIR I/O = 0x130
FIR IRQ = 7
FIR DMA = 3
The PCI-ISA Brigde is 82801LPC with bus ID 00:1f.0 and device+vendor ID 8086:24CC. The LPC47N227 SMSC super I/O chip have device_id=0x5A (most important for hack) and base_address=0x4e.

Download

The current stable version of SMCINIT package is 0.4-1.

You can download it here:
  http://sourceforge.net/project/showfiles.php?group_id=5616&package_id=88282&release_id=232636

To grab the bleeding edge smcinit, see the Anonymous CVS access to source code section.

Testing

Bellow are configurations for which SMCINIT was tested. It's belived that it works on many systems. Please send your success / failure story to know and fix bugs:
Hardware Linux distro Reporter Notes
Toshiba Tecra 9100 SuSE 8.1 Claudiu Costin <claudiuc @ kde.org> none
Toshiba Tecra 9100 RedHat 9.0 Claudiu Costin <claudiuc @ kde.org> none
Toshiba Satellite 5100 Gentoo Linux Paul Kirk <paolokirk @ yahoo.com> none

Install

Here are the prerequisites to successfully compile and install SMCINIT package:

  • have a Linux 2.4.x based system. Preferably Linux 2.4.18 kernel or better.
  • have GCC compiler and glibc devel package installed
  • have pciutils and pciutils-devel packages installed

To compile and install run (as "root" user):

./configure
make
make install

NOTE: I tested the package on SuSE 8.1 and RedHat 9.0. It should work for any recent Linux distribution.

Here are relevant packages to compile on SuSE 8.1:

  pciutils-devel-2.1.10-33
  pciutils-2.1.10-33
  libgcc-3.2-39
  gcc-3.2-39
  glibc-2.2.5-153
  glibc-locale-2.2.5-154
  glibc-devel-2.2.5-154

Here are relevant packages to compile on RedHat 9.0:

  pciutils-2.1.10-7
  pciutils-devel-2.1.10-7
  gcc-3.2.2-5
  libgcc-3.2.2-5
  gcc-c++-3.2.2-5
  glibc-devel-2.3.2-11.9
  glibc-common-2.3.2-11.9
  glibc-2.3.2-11.9
  glibc-kernheaders-2.4-8.10

Here are relevant packages to compile on Gentoo Linux > 1.4:

  sys-apps/pciutils-2.1.10-r1
  sys-devel/gcc-3.2.3-r1
  sys-libs/glibc-2.3.2-r1
This information was provided by Paul Kirk <paolokirk @ yahoo.com>.

Send me your story and packages when you compile these package on a system other than above ones. Thank you very much!

Configuration

When system startup a script is run from /etc/init.d and which run appropriate SMC intialization utility. This is done before PCMCIA startup because on Tecra 9100 the orinoco_cs wireless driver will block the I/O region used 47N227 SuperIO.

The only configuration file is /etc/sysconfig/smcinit and the variable SMCCONFIG can be set to 1800 or 5100. By default 5100 value is used. Value can be:

1800
for Toshiba Satellite 1800
5100
for Toshiba Satellite 5100 and Toshiba Tecra 9100

The next step is to configure the kernel IrDA stack package to attach the smc-ircc driver. This is Linux distribution specific. The main thing is that the device should be set to irda0. Run the following command (as "root" user):

irattach irda0 -s

Distribution specific configuration:

SuSE
Edit the /etc/sysconfig/irda and set IRDA_PORT=irda0
RedHat
Edit the /etc/sysconfig/irda and set DEVICE=irda0

NOTES: The smc-ircc driver is preloaded in kernel. I tested the package only on Tecra 9100 without any additional step, but for Toshiba Satellite 1800 Daniele Peri sugest to put the following line in your /etc/modules.conf (on one line):

options smc-ircc ircc_dma=3 ircc_irq=7 ircc_cfg=0x2e \
        ircc_sir=0x2e8 ircc_fir=0x2f8
After that run the command (as "root" user):
depmod -a
If the laptop enter suspend mode, then resume operation the smc-ircc driver will stop working. You need to stop IrDA service, then SMCINIT, start SMCINIT, and finally start IrDA service. Simply put, the kernel driver must be unloaded, then reloaded.

Documentation

After you download the package and install it, read the man pages.

man 7 smcminit intro to smcinit utilities
man 8 smcinit command line options for the new implementation by Thomas Pinz
man tosh1800-smcinit built from Daniele Peri documentation and with my own additions

Read the very good documetation made by utilities authors. Note that man pages have been built from these docs.

README.Tom Thomas Pinz's README file
README.Peri Peri's README file
README.Rob Rob Miller irda.html page rendered as text file
RobMiller-irda.html The original Rob's irda.html page, renamed for posible name clashing reason
CHANGELOG.Peri Daniele Peri own changelog file
ChangeLog This package changelog
INSTALL Installation instruction for this package

Change Log

2003-04-20 0.4-1 release

2004-04-20 claudiuc
  * add: added tosh2450-smcinit.c from José Manuel Mariño Mariño
  It make Toshiba Satellite 2450-101 to work on IrDA. Probably
  will be integrated in the general smcinit utility.

2004-04-13 claudiuc
  * doc: Written man page for Thomas new smcinit, but still I need
  to clean up old info.
  * update: Thomas added more tweaks so we have more supported
  laptops.
  * fixes: getopt() fixes be me prevent crash when parsing command
  line.
  * rename: renamed tosh-smcinit.c to smcinit.c because it can be
  used not only with Toshiba laptops, but at least with any
  LPC 47Nxxx SMSC-based chipset

2003-07-10 claudiuc
  * doc: added README.Tom from Thomas Pinz
  * improvement: added tosh-smcinit.c and tosh-superio.h from Thomas
  Pinz which will replace the tosh5100-smcinit.c

2003-07-10 0.3-1 release

2003-07-10 claudiuc
  * doc:  written smcinit.8, improved the other 2 man pages,
  improved README and INSTALL.
  * compile: generate config.h because it's needed by *.c files
  (fixed in Makefile)

2003-07-08 claudiuc
  * doc: written INSTALL, updated AUTHORS, documentation from
  Rob Miller; fixed LSM file, written README, improved SuSE
  spec file
  * prog: added GPL notice in tosh5100-smcinit.c as Rob Miller pointed
  * redhat: RH 9.0 support (init script + spec file)

2003-07-02 claudiuc
  * build: SuSE spec improved to generated compatible SuSE RPM
  * compile: GNU'fied; now both utilities have --version and --help
  options;
  * doc: separated manual pages and some improvements
2003-07-01  claudiuc
  * cosmetic: renamed toshsat1800-irdasetup to tosh1800-smcinit
  * build: improved original Makefile, spec file for SuSE,
  my configure script for build system
  * compile: cleanup to remove warnings, broken compile; include
  headers for used libc functions
  * doc: first stage for my docs, manual page and renamed original
  docs to avoid confusion

Contact

The SMCINIT package home page is located at: http://irda.sourceforge.net/smcinit/

Please send the bugs and your wishes to the authors. The nice and important thing you can do is to send me your success story for a laptop or computer which is not listed here.

NOTE: tosh1800-smcinit.c and tosh5100-smcinit.c from SMCINIT package are modified versions of original toshsat1800-irdasetup.c by Daniele Peri and respectively tosh5100-smcinit.c by Rob Miller..

Author Responsibility
Thomas Pinz
<tom_d @ gmx.de>
smcinit rewritten and flexible toxhXXXX-smcinit implementation
Daniele Peri
<peri @ csai.unipa.it>
tosh1800-smcinit (a.k.a. toshsat1800-irdasetup.c)
Rob Miller
<rob @ janerob.com>
tosh5100-smcinit
Claudiu Costin
<claudiuc @ kde.org>
(not active anymore!) packaging & documentation, web page, modifications to utilities

Anonymous CVS access to source code

Development sources are available via anonymous CVS at sourceforge.net, if you don't have developer account. To grab them you should have cvs utility installed and at your prompt shell you must run:

cvs -d:pserver:anonymous@cvs.irda.sourceforge.net:/cvsroot/irda co smcinit

If you're interested to browse the CVS repository via its CVSWeb interface, the follow the address: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/irda/smcinit/

For updating you CVS copy then use:

cvs update -P -d
Note that this command must be run from inside your smcinit source directory.

Resources

Home | About | Contact | Documentation | Applications | Download | Resources 

Copyright 2002-2003 Linux-IrDA Project. Released under GNU FDL license.