Re: [patch] support 8 port Decision serial card (pci) in 5.01
Oops, sorry, I meant to say that these would be fixed in the 5.03 release (since 5.02 had just gone out before you pointed out the problem, oops.) - Ted - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [EMAIL PROTECTED]
Re: [patch] support 8 port Decision serial card (pci) in 5.01
Date:Fri, 11 Aug 2000 09:06:23 +0200 From: Craig Schlenter <[EMAIL PROTECTED]> I cut and pasted the rs_init line from 2.2.16's serial.c originally to solve the problem but I suspect the real problem is that in the 5.01 serial.c rs_init is declared as static. Removing the static, makes it link ok. Ah, yes. I forgot about that 2.2 requires that rs_init not be static. Thanks for pointing this out!!! I'll have this (and the PCCOM8 support) in the 5.02 release. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [EMAIL PROTECTED]
Re: [patch] support 8 port Decision serial card (pci) in 5.01
> [Stu] > > If you didn't explicitly mean the subsystem and subvendor slots > > to be PCI_ANY_ID, then you should use lspci -v to find out > > what values those are and use them. > [me] > Well spotted. I cut-and-pasted large bits of it from lines above > and fiddled till it worked. I had a vague suspicion that PCI_ANY_ID > was probably a bit on the generous side but I lost motivation once > it started working ;) > > 00:0a.0 Serial controller: Decision Computer International Co. PCCOM8 (rev 02) >(prog-if 02 [16550]) > Subsystem: Unknown device 0008:0200 > > I'd assume it's these IDs that I'd use? Will test it later. Revised patch against serial-5.01 attached. I even tested it. It worked too :) --Craig diff -urN serial-5.01/serial.c serial-5.01.craig/serial.c --- serial-5.01/serial.cThu Jul 27 02:43:57 2000 +++ serial-5.01.craig/serial.c Fri Aug 11 09:29:48 2000 @@ -4559,6 +4559,10 @@ SPCI_FL_BASE0, 1, 520833, 64, 3, NULL, 0x300 }, #endif + { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8, + PCI_SUBVENDOR_ID_DCI, PCI_SUBDEVICE_ID_DCI_PCCOM8, + SPCI_FL_BASE3, 8, 115200, + 8 }, /* Generic serial board */ { 0, 0, 0, 0, @@ -5081,7 +5085,7 @@ /* * The serial driver boot-time initialization code! */ -static int __init rs_init(void) +int __init rs_init(void) { int i; struct serial_state * state; diff -urN serial-5.01/serial_compat.h serial-5.01.craig/serial_compat.h --- serial-5.01/serial_compat.h Thu Jul 27 02:30:51 2000 +++ serial-5.01.craig/serial_compat.h Fri Aug 11 09:31:58 2000 @@ -265,6 +265,12 @@ #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B #endif +#ifndef PCI_SUBVENDOR_ID_DCI +#define PCI_SUBVENDOR_ID_DCI 0x0008 +#define PCI_SUBDEVICE_ID_DCI_PCCOM80x0200 +#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 +#endif + #ifndef PCI_SUBVENDOR_ID_KEYSPAN #define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 #define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334
Re: [patch] support 8 port Decision serial card (pci) in 5.01
On Thu, Aug 10, 2000 at 02:22:02PM -0400, Theodore Ts'o wrote: > [me] > 5.01 wouldn't compile in 2.2.16. Had to change the rs_init thing as > in patch ... Ted? > > I haven't tried to compile a 5.x serial driver into a 2.2 kernel in a > while. How does it not work? __init has be defined in init.h since > before 2.2.0 was released. This is what I get with a vanilla 2.2.16 and doing the install-in-kernel with 5.01 (see below). I cut and pasted the rs_init line from 2.2.16's serial.c originally to solve the problem but I suspect the real problem is that in the 5.01 serial.c rs_init is declared as static. Removing the static, makes it link ok. gcc -D__KERNEL__ -I/usr/src/linux/include -E -C -P -I/usr/src/linux/include -imacros /usr/src/linux/include/asm-i386/page_offset.h -Ui386 arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \ --start-group \ arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \ fs/filesystems.a \ net/network.a \ drivers/block/block.a drivers/char/char.a drivers/misc/misc.a drivers/net/net.a drivers/scsi/scsi.a drivers/cdrom/cdrom.a drivers/pci/pci.a drivers/pnp/pnp.a drivers/video/video.a \ /usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a /usr/src/linux/arch/i386/lib/lib.a \ --end-group \ -o vmlinux drivers/char/char.a(tty_io.o): In function `tty_init': tty_io.o(.text.init+0x232): undefined reference to `rs_init' make: *** [vmlinux] Error 1 --Craig - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [EMAIL PROTECTED]
Re: [patch] support 8 port Decision serial card (pci) in 5.01
On Thu, Aug 10, 2000 at 12:15:27PM -0400, Stuart MacDonald wrote: > From: "Craig Schlenter" <[EMAIL PROTECTED]> > > 0x0002 should be replaced by PCI_DEVICE_ID_DCI_PCCOM8 with > > #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 > > in pci.h (pci_ids.h?) or something but then people without updated > > pci.h are in trouble - perhaps use a #ifdef PCI_DEVICE_ID_DCI_PCCOM8 > > so driver will still compile on older kernel/pci.h versions? Yukky > > either way. > > This is what serial_compat.h is for. Check in there and you will > see that the Connect Tech PCI IDs are setup if they don't > already exist. You should do the same. Cool. > If you didn't explicitly mean the subsystem and subvendor slots > to be PCI_ANY_ID, then you should use lspci -v to find out > what values those are and use them. Well spotted. I cut-and-pasted large bits of it from lines above and fiddled till it worked. I had a vague suspicion that PCI_ANY_ID was probably a bit on the generous side but I lost motivation once it started working ;) 00:0a.0 Serial controller: Decision Computer International Co. PCCOM8 (rev 02) ( prog-if 02 [16550]) Subsystem: Unknown device 0008:0200 I'd assume it's these IDs that I'd use? Will test it later. Flags: medium devsel, IRQ 10 Memory at f7101000 (32-bit, non-prefetchable) I/O ports at d000 I/O ports at cc00 > > PS. Decision have their own patches on their website against > > significantly older versions of serial.c which don't have the nifty > > generic pci functions. Those patches do support cards other than the > > PCCOM8. I've ported those patches to 2.2.16's serial.c if anyone wants > > a copy. Available under the no warranty, no support, "works for me but > > may eat your hard drive or do other nasty things" licence of course ... > > In the spirit of world domination, all info gleaned should go > into the driver. :-) Send them on. You might also want to > contact the company and mention "Oh BTW in my spare > time I hacked a driver for your boards." "Butchered an older patch without knowing what I was doing" would be a more apt description ;) Will post the patch against 2.2.16 later. Cheers, --Craig - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [EMAIL PROTECTED]
Re: [patch] support 8 port Decision serial card (pci) in 5.01
Date:Thu, 10 Aug 2000 17:15:17 +0200 From: Craig Schlenter <[EMAIL PROTECTED]> TODO: 0x0002 should be replaced by PCI_DEVICE_ID_DCI_PCCOM8 with #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 in pci.h (pci_ids.h?) or something but then people without updated pci.h are in trouble - perhaps use a #ifdef PCI_DEVICE_ID_DCI_PCCOM8 so driver will still compile on older kernel/pci.h versions? Yukky either way. The way to solve this is to drop the #define in serial_compat.h. When you run the install-in-kernel script, it will copy serial_comapt.h to /usr/src/linux/drivers/char/serial_compat.h, so that serial.c can find it. 5.01 wouldn't compile in 2.2.16. Had to change the rs_init thing as in patch ... Ted? I haven't tried to compile a 5.x serial driver into a 2.2 kernel in a while. How does it not work? __init has be defined in init.h since before 2.2.0 was released. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [EMAIL PROTECTED]
Re: [patch] support 8 port Decision serial card (pci) in 5.01
From: "Craig Schlenter" <[EMAIL PROTECTED]> > 0x0002 should be replaced by PCI_DEVICE_ID_DCI_PCCOM8 with > #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 > in pci.h (pci_ids.h?) or something but then people without updated > pci.h are in trouble - perhaps use a #ifdef PCI_DEVICE_ID_DCI_PCCOM8 > so driver will still compile on older kernel/pci.h versions? Yukky > either way. This is what serial_compat.h is for. Check in there and you will see that the Connect Tech PCI IDs are setup if they don't already exist. You should do the same. If you didn't explicitly mean the subsystem and subvendor slots to be PCI_ANY_ID, then you should use lspci -v to find out what values those are and use them. > Apparently you can jumper the card to do 400K instead of 115K in > which case the max baud speed will need to be tuned. There's a simple hack: Put the uart into loopback mode. Fill up the fifo and time the transmit. Figure the baud rate from the time it took to transmit the chars. size_fifo() already does everything except the timing. > PS. Decision have their own patches on their website against > significantly older versions of serial.c which don't have the nifty > generic pci functions. Those patches do support cards other than the > PCCOM8. I've ported those patches to 2.2.16's serial.c if anyone wants > a copy. Available under the no warranty, no support, "works for me but > may eat your hard drive or do other nasty things" licence of course ... In the spirit of world domination, all info gleaned should go into the driver. :-) Send them on. You might also want to contact the company and mention "Oh BTW in my spare time I hacked a driver for your boards." ..Stu - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [EMAIL PROTECTED]