Re: [PATCH 4/4] usb: register usb port to usb_bus_type

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

 



On Fri, Mar 29, 2013 at 02:17:02AM +0800, Lan Tianyu wrote:
> On 2013/3/29 1:59, Greg KH wrote:
> >On Thu, Mar 28, 2013 at 01:11:04AM +0800, Lan Tianyu wrote:
> >>Usb port isn't assigned to any bus_type. This seems not good from
> >>Greg's comments.
> >>	http://marc.info/?l=linux-usb&m=136200364929942&w=2
> >>
> >>This patch is to register usb port to usb_bus_type. The usb port's
> >>original name is "portX". This will cause name confilct after adding
> >>usb port to usb_bus_type since the usb ports with same port num under
> >>different hub have the same name. So change the usb port's name format
> >>to "port + (hub dev name) + '.' + (port num)" for non-root hub and
> >>"port + (usb bus num) + '-' + (port num)" for root hub.
> >>
> >>ls /sys/bus/usb/devices
> >>1-0:1.0    2-0:1.0  port1-1      port1-1.3  port2-1.2  port2-2  port4-3
> >>1-1        2-1      port1-1.1    port1-1.4  port2-1.3  port3-1  port4-4
> >>1-1.1      2-1:1.0  port1-1.2    port1-1.5  port2-1.4  port3-2  usb1
> >>1-1:1.0    3-0:1.0  port1-1.2.1  port1-1.6  port2-1.5  port3-3  usb2
> >>1-1.1:1.0  3-1      port1-1.2.2  port1-2    port2-1.6  port3-4  usb3
> >>1-1.2      3-1:1.0  port1-1.2.3  port2-1    port2-1.7  port4-1  usb4
> >>1-1.2:1.0  4-0:1.0  port1-1.2.4  port2-1.1  port2-1.8  port4-2
> >
> >What does it look like if you reverse the naming scheme (hub dev name +
> >"port")?  Doesn't that show the devices in a bit more logical way?
> Hi Greg:
> 	Do you mean e.g "port1.2-1", originally it's "port2-1.1".
> 2-1 is hub dev name?

No, I mean "2-1.port1" as these are the ports on the device, the device
prefix should go first, right?

> 	If right, how about root hub port and it should be port2.usb1?

"usb1.port2"
--
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