Skip to contentSkip to conversation

usb: don't hide bios bug warning

PATCH In review Yinghai Lu 3 participants 5 messages Jul 27, 2008

Subsystems (2)
lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 usb: don't hide bios bug warning

quirk_usb_disable_handoff will wait a while if there is BIOS bug. let the end user know the reason for that.

---
 drivers/usb/host/pci-quirks.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/usb/host/pci-quirks.c +6 -3
Index: linux-2.6/drivers/usb/host/pci-quirks.c
===================================================================
@@ -190,7 +190,8 @@ static void __devinit quirk_usb_handoff_
 			msleep(10);
 		}
 		if (wait_time <= 0)
-			dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
+			dev_printk(KERN_WARNING, &pdev->dev,
+					"OHCI: BIOS handoff failed"
 					" (BIOS bug?) %08x\n",
 					readl(base + OHCI_CONTROL));
 
@@ -242,7 +243,8 @@ static void __devinit quirk_usb_disable_
 		switch (cap & 0xff) {
 		case 1:			/* BIOS/SMM/... handoff support */
 			if ((cap & EHCI_USBLEGSUP_BIOS)) {
-				dev_dbg(&pdev->dev, "EHCI: BIOS handoff\n");
+				dev_printk(KERN_DEBUG, &pdev->dev,
+						"EHCI: BIOS handoff\n");
 
 #if 0
 /* [email protected] reports that some systems need SMI forced on,
@@ -283,7 +285,8 @@ static void __devinit quirk_usb_disable_
 				/* well, possibly buggy BIOS... try to shut
 				 * it down, and hope nothing goes too wrong
 				 */
-				dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
+				dev_printk(KERN_WARNING, &pdev->dev,
+						"EHCI: BIOS handoff failed"
 						" (BIOS bug?) %08x\n", cap);
 				pci_write_config_byte(pdev, offset + 2, 0);
 			}
#1 lore raw
Quoted 15 lines · Yinghai Lu

quirk_usb_disable_handoff will wait a while if there is BIOS bug. let the end user know the reason for that.

---
 drivers/usb/host/pci-quirks.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/usb/host/pci-quirks.c
===================================================================

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_handoff_ · line 194

Quoted 6 lines
drivers/usb/host/pci-quirks.c +2 -1
@@ -190,7 +190,8 @@ static void __devinit quirk_usb_handoff_
 			msleep(10);
 		}
 		if (wait_time <= 0)
-			dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
+			dev_printk(KERN_WARNING, &pdev->dev,
+					"OHCI: BIOS handoff failed"

This is the exact same thing here, no change.

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ · line 247

Quoted 7 lines
drivers/usb/host/pci-quirks.c +2 -1
@@ -242,7 +243,8 @@ static void __devinit quirk_usb_disable_
 		switch (cap & 0xff) {
 		case 1:			/* BIOS/SMM/... handoff support */
 			if ((cap & EHCI_USBLEGSUP_BIOS)) {
-				dev_dbg(&pdev->dev, "EHCI: BIOS handoff\n");
+				dev_printk(KERN_DEBUG, &pdev->dev,
+						"EHCI: BIOS handoff\n");

Is this what you really want to see? But you just made things noiser.

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ · line 289

Quoted 7 lines
drivers/usb/host/pci-quirks.c +2 -1
@@ -283,7 +285,8 @@ static void __devinit quirk_usb_disable_
 				/* well, possibly buggy BIOS... try to shut
 				 * it down, and hope nothing goes too wrong
 				 */
-				dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
+				dev_printk(KERN_WARNING, &pdev->dev,
+						"EHCI: BIOS handoff failed"

This is the exact same thing, no change.

confused,

greg k-h

author
#2 lore raw
Quoted 45 lines · Greg KH
Quoted 15 lines · Yinghai Lu

quirk_usb_disable_handoff will wait a while if there is BIOS bug. let the end user know the reason for that.

---
 drivers/usb/host/pci-quirks.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/usb/host/pci-quirks.c
===================================================================

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_handoff_ · line 194

Quoted 6 lines
drivers/usb/host/pci-quirks.c +2 -1
@@ -190,7 +190,8 @@ static void __devinit quirk_usb_handoff_
                      msleep(10);
              }
              if (wait_time <= 0)
-                     dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
+                     dev_printk(KERN_WARNING, &pdev->dev,
+                                     "OHCI: BIOS handoff failed"

This is the exact same thing here, no change.

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ · line 247

Quoted 7 lines
drivers/usb/host/pci-quirks.c +2 -1
@@ -242,7 +243,8 @@ static void __devinit quirk_usb_disable_
              switch (cap & 0xff) {
              case 1:                 /* BIOS/SMM/... handoff support */
                      if ((cap & EHCI_USBLEGSUP_BIOS)) {
-                             dev_dbg(&pdev->dev, "EHCI: BIOS handoff\n");
+                             dev_printk(KERN_DEBUG, &pdev->dev,
+                                             "EHCI: BIOS handoff\n");

Is this what you really want to see? But you just made things noiser.

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ · line 289

Quoted 7 lines
drivers/usb/host/pci-quirks.c +2 -1
@@ -283,7 +285,8 @@ static void __devinit quirk_usb_disable_
                              /* well, possibly buggy BIOS... try to shut
                               * it down, and hope nothing goes too wrong
                               */
-                             dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
+                             dev_printk(KERN_WARNING, &pdev->dev,
+                                             "EHCI: BIOS handoff failed"

This is the exact same thing, no change.

Quoted 1 line

confused,

end user will not set CONFIG_USB_DEBUG, so that dev_warn will do nothing.

YH

#3 lore raw
Quoted 9 lines
Quoted 7 lines

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ · line 289

Quoted 3 lines
drivers/usb/host/pci-quirks.c +2 -1
-                             dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
+                             dev_printk(KERN_WARNING, &pdev->dev,
+                                             "EHCI: BIOS handoff failed"

This is the exact same thing, no change.

confused,

end user will not set CONFIG_USB_DEBUG, so that dev_warn will do nothing.

Yes it does ... KERN_WARNING != KERN_DEBUG, and it's the latter which is toggled (via DEBUG) by CONFIG_USB_DEBUG...

author
#4 lore raw
Quoted 4 lines · David Brownell
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
drivers/usb/host/pci-quirks.c +2 -1
-                             dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
+                             dev_printk(KERN_WARNING, &pdev->dev,
+                                             "EHCI: BIOS handoff failed"
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

This is the exact same thing, no change.

confused,

end user will not set CONFIG_USB_DEBUG, so that dev_warn will do nothing.

Yes it does ... KERN_WARNING != KERN_DEBUG, and it's the latter which is toggled (via DEBUG) by CONFIG_USB_DEBUG...

you are right,

please forget about the patch.

YH