--- ./serial-4.92/serial.c	Thu Jan 27 13:48:11 2000
+++ ./serial-4.92-new/serial.c	Tue Apr 25 16:20:09 2000
@@ -268,7 +268,7 @@
 		  UART_STARTECH }, 
 	{ "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO},
 	{ "Startech", 1, 0},	/* usurped by cyclades.c */
-	{ "16C950/954", 128, UART_CLEAR_FIFO | UART_USE_FIFO},
+	{ "16C950/952/954", 128, UART_CLEAR_FIFO | UART_USE_FIFO},
 	{ "ST16654", 64, UART_CLEAR_FIFO | UART_USE_FIFO |
 		  UART_STARTECH }, 
 	{ "XR16850", 128, UART_CLEAR_FIFO | UART_USE_FIFO |
@@ -420,7 +420,7 @@
 
 
 /*
- * For the 16C950
+ * For the 16C95x series
  */
 void serial_icr_write(struct async_struct *info, int offset, int  value)
 {
@@ -3329,7 +3329,10 @@
 	 * LSR register (which serial_icr_read does)
 	 */
 	if (state->type == PORT_16550A) {
-		/* Check for Oxford Semiconductor 16C950 */
+		/* Check for Oxford Semiconductor 16C95x series */
+		serial_out(info, UART_LCR, 0xBF);
+		serial_out(info, UART_EFR, UART_EFR_ECB);
+		serial_out(info, UART_LCR, 0x00);
 		scratch = serial_icr_read(info, UART_ID1);
 		scratch2 = serial_icr_read(info, UART_ID2);
 		scratch3 = serial_icr_read(info, UART_ID3);
@@ -3749,6 +3752,47 @@
 				      data & ~PCI_COMMAND_MEMORY);
 	return 0;
 }
+/*
+ * As the megawolf cards have the int pins active high, and have 2
+ * UART chips, both ints must be enabled on the 9050 and parity set.
+ */
+static int
+#ifndef MODULE
+__init
+#endif
+pci_plx9050_megawolf_fn(struct pci_dev *dev, struct pci_board *board, int enable)
+{
+	u8 data, scratch, *p;
+
+	pci_read_config_byte(dev, PCI_COMMAND, &data);
+
+	if (enable)
+	pci_write_config_byte(dev, PCI_COMMAND,
+		data | PCI_COMMAND_MEMORY | PCI_COMMAND_IO );
+
+	/* enable/disable interrupts & set parity */
+	p = ioremap(PCI_BASE_ADDRESS(dev, 0), 0x80);
+	writel(enable ? 0x5b : 0x00, p + 0x4c);
+	iounmap(p);
+
+	if (!enable)
+	pci_write_config_byte(dev, PCI_COMMAND,
+		data & ~PCI_COMMAND_MEMORY);
+
+	pci_read_config_byte(dev, PCI_CLASS_PROG, &scratch);
+
+	/* Both use the same device ID, so we distinguish them here */
+	if (scratch==0x42) {
+		board->num_ports=4;
+		board->first_uart_offset=3;
+		printk(KERN_INFO "Megawolf Romulus/4 found at 0x%lx\n", PCI_BASE_ADDRESS(dev, 2));
+	} else if (scratch==0x22) {
+		board->num_ports=2;
+		board->first_uart_offset=0x43;
+		printk(KERN_INFO "Megawolf Remus/2 found at 0x%lx\n", PCI_BASE_ADDRESS(dev, 2));
+	}
+	return 0;
+}
 
 /*
  * SIIG serial cards have an PCI interface chip which also controls
@@ -4171,6 +4215,11 @@
 	{	PCI_VENDOR_ID_USR, 0x1008,
 		PCI_ANY_ID, PCI_ANY_ID,
 		SPCI_FL_BASE0, 1, 115200 },
+	/* Megawolf Romulus/Remus cards, from Mike Hudson hudson@isys.ca */
+	{	PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_MEGAWOLF_ROM_REM,
+		PCI_ANY_ID, PCI_ANY_ID,
+		SPCI_FL_BASE2, 4, 921600,
+		0x20, 2, pci_plx9050_megawolf_fn, 3 }, 
 	/*
 	 * Untested PCI modems, sent in from various folks...
 	 */
