linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fix supprot for AFAVLAB 8port boards in 2.6.x
@ 2004-03-05 11:24 Harald Welte
  2004-03-05 14:15 ` Roman Kurakin
  2004-03-05 20:38 ` Russell King
  0 siblings, 2 replies; 4+ messages in thread
From: Harald Welte @ 2004-03-05 11:24 UTC (permalink / raw)
  To: rmk+serial; +Cc: linux-serial

[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]

Hi!

I didn't yet use one of my AFAVLAB boards with 2.6.x until now.  The
upper 4 ports are not detected at all.  I suppose the bug was introduced
while porting the driver from 2.4.x.

Please consider applying the following patch.  It also adds support for
a new 8port board called P030.

Thanks,


diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/pci/pci.ids linuxppc25bh-040218-serial/drivers/pci/pci.ids
--- linuxppc25bh-040218-test/drivers/pci/pci.ids	2004-02-16 09:43:49.000000000 +0100
+++ linuxppc25bh-040218-serial/drivers/pci/pci.ids	2004-03-05 12:10:09.685724629 +0100
@@ -5601,6 +5601,8 @@
 14da  National Aerospace Laboratories
 14db  AFAVLAB Technology Inc
 	2120  TK9902
+	2180  P028
+	2182  P030
 14dc  Amplicon Liveline Ltd
 	0000  PCI230
 	0001  PCI242
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/serial/8250_pci.c linuxppc25bh-040218-serial/drivers/serial/8250_pci.c
--- linuxppc25bh-040218-test/drivers/serial/8250_pci.c	2004-02-16 09:44:28.000000000 +0100
+++ linuxppc25bh-040218-serial/drivers/serial/8250_pci.c	2004-03-05 12:23:02.331325424 +0100
@@ -141,13 +141,15 @@
 	      struct serial_struct *req, int idx)
 {
 	unsigned int bar, offset = board->first_offset;
 	
 	bar = FL_GET_BASE(board->flags);
 	if (idx < 4)
 		bar += idx;
-	else
+	else {
+		bar = 4;
 		offset += (idx - 4) * board->uart_offset;
+	}
 
 	return setup_port(dev, req, bar, offset, board->reg_shift);
 }
 
@@ -1891,6 +1895,9 @@
 	{	PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 		pbn_b0_bt_8_115200 },
+	{	PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		pbn_b0_bt_8_115200 },
 
 	{	PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-- 
- Harald Welte <laforge@gnumonks.org>               http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-05 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-05 11:24 Fix supprot for AFAVLAB 8port boards in 2.6.x Harald Welte
2004-03-05 14:15 ` Roman Kurakin
2004-03-05 14:13   ` Harald Welte
2004-03-05 20:38 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).