Re: usbip port number limits

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

 



On Wed, Nov 15, 2017 at 07:58:24AM -0700, Shuah Khan wrote:
> Hi Juan,
> 
> On 11/15/2017 07:43 AM, Juan Zea wrote:
> > 
> >>> Also, will you be able to revert the usb3 commit 
> >>> 1c9de5bf428612458427943b724bea51abde520a 
> >>>
> >>> and see if any of the problems go away. 
> >>>
> >>> thanks, 
> >>> -- Shuah 
> >>>
> > 
> >> I'm on it and will send results later.
> > 
> >> Thanks,
> >> Juan
> > 
> > Ok, I'm back. The revert was quite complex, with several conflicts I was not able to resolve. So I started testing full checkouts around that series of changes by Yuyang.
> 
> I was hoping it will be easier. I was apprehensive it could be a com[ex revert. :(
> 
> > That led me to bisecting the problem with the fingerprint reader, and the culprit is here: 
> > 
> > 03cd00d538a6feb0492cd153edf256ef7d7bd95e is the first bad commit
> > commit 03cd00d538a6feb0492cd153edf256ef7d7bd95e
> > Author: Yuyang Du <yuyang.du@xxxxxxxxx>
> > Date:   Thu Jun 8 13:04:09 2017 +0800
> > 
> >     usbip: vhci-hcd: Set the vhci structure up to work
> >         
> >     This patch enables the new vhci structure. Its lock protects
> >     both the USB2 hub and the shared USB3 hub.
> >         
> >     Signed-off-by: Yuyang Du <yuyang.du@xxxxxxxxx>
> >     Acked-by: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx>
> >     Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > 
> > :040000 040000 b7b5c6b16db801c74354bb0d0a247855f64b0829 72524e78d281ebc8d36fa32cb93ed0278e99f880 M      drivers
> > 
> > The commit before, fingerprint reader works. Also, multicontroller works (no usb3 ports). 
> > In this bad commit, I get the errors I sent in the previous message.
> > 
> 
> Thanks for reporting and debugging the problem to isolate the commit. I was
> suspecting one of these commit based on the messages you are seeing.
> 
> I will see if I can fix this without doing a huge reverts.
> 
Hi,

Sorry for the latency. It seems now the bug is:

Nov 14 14:35:29 kernel-tester kernel: [  229.636543] kernel BUG at drivers/usb/usbip/vhci_hcd.c:683!

which is a hard one (you mentioned the lastest kernel is used).

Since you didn't post patch, lets first make sure we are on the same
page. Could you please try the following patch and see whether the
bug still exists?

Also, I'm assuming you are using a non-super-speed device.

Thanks,
Yuyang

-

diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
index 9bd2cd7..82367f9 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.c
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
@@ -328,9 +328,18 @@ int usbip_vhci_refresh_device_list(void)
 int usbip_vhci_get_free_port(uint32_t speed)
 {
 	for (int i = 0; i < vhci_driver->nports; i++) {
-		if (speed == USB_SPEED_SUPER &&
-		    vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
-			continue;
+		/*
+		 * Make sure hub speed (either SUPER or !SUPER) matches
+		 * device speed
+		 */
+		if (speed == USB_SPEED_SUPER) {
+			if  (vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
+				continue;
+		}
+		else {
+			if  (vhci_driver->idev[i].hub != HUB_SPEED_HIGH)
+				continue;
+		}
 
 		if (vhci_driver->idev[i].status == VDEV_ST_NULL)
 			return vhci_driver->idev[i].port;
--
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