svn commit: r215810 - head/sys/dev/usb

[ Available lists | Index of svn-src-all | Month of Nov 2010 | Week of 25 Nov 2010 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Weongyo Jeong <weongyo@FreeBSD.org>
Date
25 Nov 2010 03:02:54
Subject
svn commit: r215810 - head/sys/dev/usb
Message-ID
201011250302.oAP32r6R091758@svn.freebsd.org


[ Hide this part ]
Author: weongyo
Date: Thu Nov 25 03:02:53 2010
New Revision: 215810
URL: http://svn.freebsd.org/changeset/base/215810

Log:
Assigning the unit number for each interfaces could not use ubus->parent
because it could differ depending on the host controller type. It could
lead the duplicate unit number assignment.

Modified:
head/sys/dev/usb/usb_pf.c

Modified: head/sys/dev/usb/usb_pf.c
==============================================================================
--- head/sys/dev/usb/usb_pf.c Wed Nov 24 22:44:10 2010 (r215809)
+++ head/sys/dev/usb/usb_pf.c Thu Nov 25 03:02:53 2010 (r215810)
@@ -61,9 +61,10 @@ void
usbpf_attach(struct usb_bus *ubus)
{
struct ifnet *ifp;
+ devclass_t dc = devclass_find("usbus");

ifp = ubus->ifp = if_alloc(IFT_USB);
- if_initname(ifp, "usbus", device_get_unit(ubus->parent));
+ if_initname(ifp, "usbus", devclass_get_count(dc));
if_attach(ifp);

KASSERT(sizeof(struct usbpf_pkthdr) == USBPF_HDR_LEN,


Elapsed time: 0.076 seconds