Re: [PATCH 3/8] usb/dummy_hcd: always create the usb3 port

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

 



On Tue, 21 Jun 2011 12:12:25 +0200, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:

Let create both udcs 2.0 and 3.0. So if we have a 3.0 gadget it can
passed to the 3.0 hcd and and 2.0 and the 2.0 hcd.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 drivers/usb/gadget/dummy_hcd.c |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 0ab2f56..c61d3f3 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -2317,18 +2317,16 @@ static int dummy_hcd_probe(struct platform_device *pdev)
 		return retval;
 	}
-	if (mod_data.is_super_speed) {

Wait, what is it put on top of?  I cannot find this line in next/master,
greg/usb-next or linus/master.  And if it's put on top of some not yet
merged patch, shouldn't the other patch be just changed?

-		ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev,
-					dev_name(&pdev->dev), hs_hcd);
-		if (!ss_hcd) {
-			retval = -ENOMEM;
-			goto dealloc_usb2_hcd;
-		}
-
-		retval = usb_add_hcd(ss_hcd, 0, 0);
-		if (retval)
-			goto put_usb3_hcd;
+	ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev,
+			dev_name(&pdev->dev), hs_hcd);
+	if (!ss_hcd) {
+		retval = -ENOMEM;
+		goto dealloc_usb2_hcd;
 	}
+
+	retval = usb_add_hcd(ss_hcd, 0, 0);
+	if (retval)
+		goto put_usb3_hcd;
 	return 0;
put_usb3_hcd:
@@ -2432,8 +2430,7 @@ static int __init init (void)
 	retval = platform_device_add(the_hcd_pdev);
 	if (retval < 0)
 		goto err_add_hcd;
-	if (!the_controller.hs_hcd ||
-	    (!the_controller.ss_hcd && mod_data.is_super_speed)) {
+	if (!the_controller.hs_hcd || !the_controller.ss_hcd) {
 		/*
 		 * The hcd was added successfully but its probe function failed
 		 * for some reason.


--
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz    (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
--
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