Re: [GIT PULL] USB driver patches for 4.6-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 18, 2016 at 04:01:51PM -0700, Linus Torvalds wrote:
> On Fri, Mar 18, 2016 at 3:51 PM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > The commit that ends up being marked bad is odd, but there it is:
> > 69bec7259853 "USB: core: let USB device know device node".
> 
> Confirmed. Not only did it bisect to that, reverting it on top of the
> current kernel fixes my machine.
> 
> So that commit is somehow buggy. I don't see what it does that would
> break even with OF disabled, but something does.
> 
> I'll just revert it. The way it is done seems bogus anyway.  It looks
> at of_node when OF is disabled, but generally that isn't even
> initialized as far as I can tell, and we have things like
> dev_of_node() helpers to make sure you don't do that.
> 

I am sorry to make things break, Nicolai Stange's found the root cause
for this problem, and his patch fixed it.

USB device structure (both struct usb_hcd and struct usb_device) is
initialized by kzalloc, so the struct device in it is initialized by
zero, and will not cause non-initialized for USB device, but you
are right, a good practice is using dev_of_node for all devices in
case the struct device is not zero-initialized.

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux