mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Meaningless "Redundant entry in serial pci_table." message
@ 2002-02-11 13:11 Andrey Panin
  0 siblings, 0 replies; only message in thread
From: Andrey Panin @ 2002-02-11 13:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Russell King


[-- Attachment #1.1: Type: text/plain, Size: 552 bytes --]

Hi all,

current serial driver emits annoying message "Redundant entry in 
serial pci_table." for many unguilty PCI and CardBus cards.

So I made the attached patch, keeping in mind that:
	- cards with more than one port;
	- cards with nonstandard clock speed;
	- cards requiring special initialization;
	- cards with nonzero first_uart_offset.
cannot be properly guessed.

Please consider applying.

Best regards.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: wwwkeys.eu.pgp.net

[-- Attachment #1.2: patch-serial-rentry --]
[-- Type: text/plain, Size: 1017 bytes --]

diff -urN -X /usr/dontdiff /linux.vanilla/drivers/char/serial.c /linux/drivers/char/serial.c
--- /linux.vanilla/drivers/char/serial.c	Sat Feb  9 19:24:23 2002
+++ /linux/drivers/char/serial.c	Sat Feb  9 20:02:14 2002
@@ -4451,6 +4451,12 @@
 	return 1;
 }
 
+static inline int serial_is_redundant(const struct pci_board *board)
+{
+	return !((board->num_ports > 1) || (board->base_baud != 115200) ||
+		 (board->init_fn) || (board->first_uart_offset));
+}
+
 static int __devinit serial_init_one(struct pci_dev *dev,
 				     const struct pci_device_id *ent)
 {
@@ -4465,7 +4471,8 @@
 	if (ent->driver_data == pbn_default &&
 	    serial_pci_guess_board(dev, board))
 		return -ENODEV;
-	else if (serial_pci_guess_board(dev, &tmp) == 0) {
+	else if ((serial_pci_guess_board(dev, &tmp) == 0) &&
+		 (serial_is_redundant(board))) {
 		printk(KERN_INFO "Redundant entry in serial pci_table.  "
 		       "Please send the output of\n"
 		       "lspci -vv, this message (%04x,%04x,%04x,%04x)\n"

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-11 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-11 13:11 [PATCH] Meaningless "Redundant entry in serial pci_table." message Andrey Panin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®