lkml.org 
[lkml]   [2002]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Meaningless "Redundant entry in serial pci_table." message
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.netdiff -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"[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.022 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site