[PATCH] Meaningless "Redundant entry in serial pci_table." message

Andrey Panin (pazke@orbita1.ru)
Mon, 11 Feb 2002 16:11:53 +0300


--MAH+hnPXVZWQ5cD/
Content-Type: multipart/mixed; boundary="s9fJI615cBHmzTOP"
Content-Disposition: inline

--s9fJI615cBHmzTOP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,

current serial driver emits annoying message "Redundant entry in=20
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.

--=20
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: wwwkeys.eu.pgp.net
--s9fJI615cBHmzTOP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-serial-rentry
Content-Transfer-Encoding: quoted-printable

diff -urN -X /usr/dontdiff /linux.vanilla/drivers/char/serial.c /linux/driv=
ers/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;
}
=20
+static inline int serial_is_redundant(const struct pci_board *board)
+{
+ return !((board->num_ports > 1) || (board->base_baud !=3D 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 =3D=3D pbn_default &&
serial_pci_guess_board(dev, board))
return -ENODEV;
- else if (serial_pci_guess_board(dev, &tmp) =3D=3D 0) {
+ else if ((serial_pci_guess_board(dev, &tmp) =3D=3D 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"

--s9fJI615cBHmzTOP--

--MAH+hnPXVZWQ5cD/
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8Z8MZBm4rlNOo3YgRAmQTAJ4hFuD9+JRXsee9RJGwmy/fwrC/SgCcCTEi
cQTRAkAzjOpiC6++1Ta71aM=
=D4o+
-----END PGP SIGNATURE-----

--MAH+hnPXVZWQ5cD/--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/