--- linux-2.4.0-plain/include/linux/pci_ids.h	Wed Jan  3 01:58:45 2001
+++ linux-2.4.0-sermod/include/linux/pci_ids.h	Thu Feb  1 11:47:36 2001
@@ -1265,6 +1265,7 @@
 
 #define PCI_VENDOR_ID_AFAVLAB		0x14db
 #define PCI_DEVICE_ID_AFAVLAB_TK9902	0x2120
+#define PCI_DEVICE_ID_AFAVLAB_P028	0x2180
 
 #define PCI_VENDOR_ID_SYBA		0x1592
 #define PCI_DEVICE_ID_SYBA_2P_EPP	0x0782
--- linux-2.4.0-plain/drivers/char/serial.c	Thu Feb  1 11:33:44 2001
+++ linux-2.4.0-sermod/drivers/char/serial.c	Thu Feb  1 11:45:14 2001
@@ -3861,7 +3861,14 @@
 			case 6: /* BAR 4*/
 			case 7: base_idx=idx-2; /* BAR 5*/
 		}
-  
+
+	/* AVAVLAB uses a different mixture of BARs and offsets */
+	/* Not that ugly ;) -- HW */
+	if (dev->vendor == PCI_VENDOR_ID_AFAVLAB &&  idx >= 4) {
+		base_idx = 4;
+		offset = (idx - 4) * 8;
+	}
+
 	port =  pci_resource_start(dev, base_idx) + offset;
 
 	if ((board->flags & SPCI_FL_BASE_TABLE) == 0)
@@ -4548,6 +4555,10 @@
 	{	PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B,
 		PCI_ANY_ID, PCI_ANY_ID,
 		SPCI_FL_BASE0, 4, 921600 },
+	/* AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org> */
+	{	PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
+		PCI_ANY_ID, PCI_ANY_ID,
+		SPCI_FL_BASE_TABLE, 8, 115200 },
 	/* EKF addition for i960 Boards form EKF with serial port */
 	{	PCI_VENDOR_ID_INTEL, 0x1960,
 		0xE4BF, PCI_ANY_ID,
