Hi Jeff,
I also had some strange problems with smc-ircc. After modprobing it, I
get
Apr 16 08:36:12 pickelbum kernel: SMC IrDA Controller found
Apr 16 08:36:12 pickelbum kernel: IrCC version 2.0, firport 0xe38,
sirport 0x300 dma=2, irq=3
Doing an "ifconfig up irda0" crashes my machine.
Under Windows, SIR port is 0x3e8 and FIR is 0x100.
I wrote some code to dump the configuration (using the PDF's on SMC's
website). They might help you too.
Let me know if you have any success,
Graeme
#include <stdio.h>
#include <sys/io.h>
main() {
unsigned short cfg_base=0xe0;
unsigned short fir_io;
unsigned short sir_io;
unsigned short irq;
unsigned short dma;
unsigned short fir_msb;
unsigned short fir_lsb;
unsigned short sir_msb;
unsigned short sir_lsb;
unsigned short mode;
unsigned short options;
unsigned short duplex;
unsigned short a;
unsigned short b;
// Need permission to go poking around
ioperm(cfg_base,8,1);
/* Enter configuration */
outb(0x55, cfg_base);
/* Select logical device (UART2) */
outb(0x07, cfg_base);
outb(0x05, cfg_base + 1);
/* Read SIR io */
outb(0x60, cfg_base);
sir_io = inb(cfg_base + 1) << 8;
outb(0x61, cfg_base);
sir_io |= inb(cfg_base + 1);
/* Read FIR io */
outb(0x62, cfg_base);
fir_msb = inb(cfg_base + 1);
fir_io = fir_msb << 8;
outb(0x63, cfg_base);
fir_lsb = inb(cfg_base + 1);
fir_io |= fir_lsb;
// IRQ
outb(0x70, cfg_base);
irq = inb(cfg_base + 1);
// DMA
outb(0x74, cfg_base);
dma = inb(cfg_base + 1);
// mode
outb(0xF0, cfg_base);
mode = inb(cfg_base + 1);
// options
outb(0xF1, cfg_base);
options = inb(cfg_base + 1);
// duplex
outb(0xF2, cfg_base);
duplex = inb(cfg_base + 1);
// a
outb(0xF7, cfg_base);
a = inb(cfg_base + 1);
// b
outb(0xF8, cfg_base);
b = inb(cfg_base + 1);
/* Exit configuration */
outb(0xaa, cfg_base);
printf("firport 0x%03x, sirport 0x%03x, irq %d, dma %d\n",fir_io,sir_io,irq,dma);
printf("mode 0x%02x\n",mode);
printf("options 0x%02x\n",options);
printf("duplex 0x%02x\n",duplex);
printf("a 0x%02x\n",a);
printf("b 0x%02x\n",b);
}
#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>
#include <linux/types.h>
main(int argc, char** argv) {
unsigned short cfg_base=0xe0;
//unsigned short mode=0x46;
// Need permission to go poking around
ioperm(cfg_base,8,1);
/* Enter configuration */
outb(0x55, cfg_base);
/* Select logical device (UART2) */
outb(0x07, cfg_base);
outb(0x05, cfg_base + 1);
// Write DMA
//outb(0xF1, cfg_base);
//outb(mode, cfg_base + 1);
unsigned short fir_io;
unsigned short sir_io;
unsigned short fir_msb;
unsigned short fir_lsb;
unsigned short sir_msb;
unsigned short sir_lsb;
unsigned short irq;
unsigned short dma;
//fir_io=0xe38;
//sir_io=0x3e8;
fir_io=0xe30;
sir_io=0x3e8;
irq=3;
dma=2;
fir_msb=fir_io>>8;
fir_lsb=fir_io&255;
sir_msb=sir_io>>8;
sir_lsb=sir_io&255;
printf("firport 0x%03x, sirport 0x%03x\n",fir_io,sir_io);
printf("firport MSB = %03x\n",fir_msb);
printf("firport LSB = %03x\n",fir_lsb);
printf("sirport MSB = %03x\n",sir_msb);
printf("sirport LSB = %03x\n",sir_lsb);
/* Write SIR base */
//printf("writing sirport msb\n");
//outb(0x60, cfg_base);
//outb(sir_msb, cfg_base + 1);
//printf("writing sirport lsb\n");
//outb(0x61, cfg_base);
//outb(sir_lsb, cfg_base + 1);
printf("writing firport\n");
/* Write FIR base */
//outb(0x62, cfg_base);
//outb(fir_msb, cfg_base + 1);
//outb(0x63, cfg_base);
//outb(fir_lsb, cfg_base + 1);
// Write IRQ
//outb(0x70, cfg_base);
//outb(irq, cfg_base + 1);
// Write DMA
//outb(0x74, cfg_base);
//outb(dma, cfg_base + 1);
// Write options
outb(0x74, cfg_base);
outb(0x4, cfg_base + 1);
/* Exit configuration */
outb(0xaa, cfg_base);
return 0;
}