lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Jan 2014 09:30:38 -0600
From:	Felipe Balbi <balbi@...com>
To:	Josh Boyer <jwboyer@...oraproject.org>
CC:	Alan Stern <stern@...land.harvard.edu>,
	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	<valentine.barshak@...entembedded.com>
Subject: Re: [PATCH] usb: phy: Quiet unable to find transceiver message

On Sat, Jan 25, 2014 at 03:24:55PM -0500, Josh Boyer wrote:
> On Sat, Jan 25, 2014 at 10:37 AM, Alan Stern <stern@...land.harvard.edu> wrote:
> > On Sat, 25 Jan 2014, Josh Boyer wrote:
> >
> >> commit 1ae5799ef6317 ("usb: hcd: Initialize USB phy if needed") allows
> >> the USB layer to initialize external PHYs if needed.  However, a PHY is
> >> not needed in all cases.  The usb_get_phy_device function will print
> >> an error message, "unable to find transceiver" but everything still
> >> functions normally.
> >>
> >> Drop the severity of this message to pr_debug.
> >>
> >> Signed-off-by: Josh Boyer <jwboyer@...oraproject.org>
> >> ---
> >>  drivers/usb/phy/phy.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
> >> index e6f61e4..c7fe880 100644
> >> --- a/drivers/usb/phy/phy.c
> >> +++ b/drivers/usb/phy/phy.c
> >> @@ -228,7 +228,7 @@ struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
> >>
> >>       phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
> >>       if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
> >> -             pr_err("unable to find transceiver\n");
> >> +             pr_debug("unable to find transceiver\n");
> >>               goto err0;
> >>       }
> >
> > Wouldn't it make more sense to change this to dev_debug?  As it stands,
> > the user has no idea which device is lacking a transceiver.
> 
> Quite possibly, yes.  I'm not overly familiar with the subsystem and
> was just writing up what Felipe suggested.
> 
> > (The same is probably true for other log messages in this source file.)
> 
> I don't disagree, but I'd rather someone with more experience in the
> USB subsystem do that kind of broader audit/change.  I'd be happy to
> test.

yeah, I just sent a patch where I forgot to switch over to dev_dbg(), if
you can do that for both messages and remove the out of memory message,
I'd be glad to take your patch instead of mine.

cheers

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ