Skip to contentSkip to conversation

8139x: reduce message severity on driver overlap

PATCH Applied Stephen Hemminger 2 participants 2 messages Oct 22, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 8139x: reduce message severity on driver overlap

The 8139 drivers are a source of error messages that confuse users. Since this device can not be disambiguated by normal PCI device id's two drivers match the same info. But the module utilities seem to correctly handle this overlap, they try one driver, then if that doesn't load try the other. Therefore there is no need for a message to be logged with error level severity, just using info level instead. Can't be completely silent because user might have configure one driver and forgot the other one.

drivers/net/8139cp.c +2 -3
@@ -1836,10 +1836,9 @@ static int cp_init_one (struct pci_dev *
 
 	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
 	    pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision < 0x20) {
-		dev_err(&pdev->dev,
-			   "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
+		dev_info(&pdev->dev,
+			   "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip, use 8139too\n",
 		           pdev->vendor, pdev->device, pdev->revision);
-		dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n");
 		return -ENODEV;
 	}
 
drivers/net/8139too.c +2 -3
@@ -946,10 +946,9 @@ static int __devinit rtl8139_init_one (s
 	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
 	    pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision >= 0x20) {
 		dev_info(&pdev->dev,
-			   "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
+			   "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip, use 8139cp\n",
 		       	   pdev->vendor, pdev->device, pdev->revision);
-		dev_info(&pdev->dev,
-			   "Use the \"8139cp\" driver for improved performance and stability.\n");
+		return -ENODEV;
 	}
 
 	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
Applied
#1 lore raw
Quoted 30 lines · Stephen Hemminger

The 8139 drivers are a source of error messages that confuse users. Since this device can not be disambiguated by normal PCI device id's two drivers match the same info. But the module utilities seem to correctly handle this overlap, they try one driver, then if that doesn't load try the other. Therefore there is no need for a message to be logged with error level severity, just using info level instead. Can't be completely silent because user might have configure one driver and forgot the other one.

drivers/net/8139cp.c +2 -3
@@ -1836,10 +1836,9 @@ static int cp_init_one (struct pci_dev *
 
 	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
 	    pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision < 0x20) {
-		dev_err(&pdev->dev,
-			   "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
+		dev_info(&pdev->dev,
+			   "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip, use 8139too\n",
 		           pdev->vendor, pdev->device, pdev->revision);
-		dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n");
 		return -ENODEV;
 	}
 
drivers/net/8139too.c +0 -0
@@ -946,10 +946,9 @@ static int __devinit rtl8139_init_one (s
 	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
 	    pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision >= 0x20) {

drivers/net/8139too.c static int __devinit rtl8139_init_one (s · line 954

Quoted 10 lines
drivers/net/8139too.c +2 -3
 		dev_info(&pdev->dev,
-			   "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
+			   "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip, use 8139cp\n",
 		       	   pdev->vendor, pdev->device, pdev->revision);
-		dev_info(&pdev->dev,
-			   "Use the \"8139cp\" driver for improved performance and stability.\n");
+		return -ENODEV;
 	}
 
 	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&

applied