mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/9] usb: add parameters info on usb device
Date: Mon, 21 Jan 2013 21:09:48 +0100	[thread overview]
Message-ID: <1358798996-26595-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20130121200712.GJ26329@game.jcrosoft.org>

   iManufacturer = 0
        iProduct = 1
   iSerialNumber = 0
    Manufacturer =
         Product = OHCI Root Hub
    SerialNumber =
        idVendor = 0000
       idProduct = 0000

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/usb/core/usb.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 9dc931b..a813be5 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -300,6 +300,7 @@ static int usb_new_device(struct usb_device *dev)
 	int port = -1;
 	struct usb_device *parent = dev->parent;
 	unsigned short portstatus;
+	char str[16];
 
 	buf = dma_alloc(USB_BUFSIZ);
 
@@ -438,6 +439,19 @@ static int usb_new_device(struct usb_device *dev)
 	print_usb_device(dev);
 
 	register_device(&dev->dev);
+	sprintf(str, "%d", dev->descriptor->iManufacturer);
+	dev_add_param_fixed(&dev->dev, "iManufacturer", str);
+	sprintf(str, "%d", dev->descriptor->iProduct);
+	dev_add_param_fixed(&dev->dev, "iProduct", str);
+	sprintf(str, "%d", dev->descriptor->iSerialNumber);
+	dev_add_param_fixed(&dev->dev, "iSerialNumber", str);
+	dev_add_param_fixed(&dev->dev, "Manufacturer", dev->mf);
+	dev_add_param_fixed(&dev->dev, "Product", dev->prod);
+	dev_add_param_fixed(&dev->dev, "SerialNumber", dev->serial);
+	sprintf(str, "%04x", le16_to_cpu(dev->descriptor->idVendor));
+	dev_add_param_fixed(&dev->dev, "idVendor", str);
+	sprintf(str, "%04x", le16_to_cpu(dev->descriptor->idProduct));
+	dev_add_param_fixed(&dev->dev, "idProduct", str);
 	list_add_tail(&dev->list, &usb_device_list);
 
 	err = 0;
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-01-21 20:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 20:07 [PATCH 0/9] atmel: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-21 20:09   ` [PATCH 2/9] usb: fix for USB_ST_STALLED status reporting in ehci_submit_async() Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 3/9] ehci: if caps ressource is not provided discover it via cr_capbase Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 4/9] ehci: add atmel support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 5/9] at91: usb: allow to specicfy inverted vbus Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 6/9] at91sam9g45: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 7/9] at91sam9m10g45ek: add usb support Jean-Christophe PLAGNIOL-VILLARD
2013-01-22  8:30     ` Sascha Hauer
2013-01-22 14:15       ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-22 14:24         ` Sascha Hauer
2013-01-22 14:46           ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 8/9] at91sam9x5: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 9/9] at91sam9x5ek: add usb support Jean-Christophe PLAGNIOL-VILLARD
2013-01-23 19:28 ` [PATCH 0/9] atmel: add ehci support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358798996-26595-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox