diff options
Diffstat (limited to 'payloads/libpayload/drivers/usb')
-rw-r--r-- | payloads/libpayload/drivers/usb/TODO | 2 | ||||
-rw-r--r-- | payloads/libpayload/drivers/usb/quirks.c | 4 | ||||
-rw-r--r-- | payloads/libpayload/drivers/usb/usb.c | 4 | ||||
-rw-r--r-- | payloads/libpayload/drivers/usb/usbhid.c | 12 | ||||
-rw-r--r-- | payloads/libpayload/drivers/usb/usbmsc.c | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/payloads/libpayload/drivers/usb/TODO b/payloads/libpayload/drivers/usb/TODO index 1dfc9d40ab..f42ef78ac7 100644 --- a/payloads/libpayload/drivers/usb/TODO +++ b/payloads/libpayload/drivers/usb/TODO @@ -14,7 +14,7 @@ handled tds get reactivated as a ring structure - added as child of the oldest td - queue header already dropped the td, so no issue there - + this setup ensures that: - the max latency of the device is honored - the client knows the right order of the data diff --git a/payloads/libpayload/drivers/usb/quirks.c b/payloads/libpayload/drivers/usb/quirks.c index 87878b08ae..96acd082ea 100644 --- a/payloads/libpayload/drivers/usb/quirks.c +++ b/payloads/libpayload/drivers/usb/quirks.c @@ -43,14 +43,14 @@ typedef struct { usb_quirks_t usb_quirks[] = { /* Working chips,... remove before next release */ - { 0x3538, 0x0054, USB_QUIRK_NONE, 0 }, // PQI 1GB + { 0x3538, 0x0054, USB_QUIRK_NONE, 0 }, // PQI 1GB { 0x13fd, 0x0841, USB_QUIRK_NONE, 0 }, // Samsung SE-S084 /* Silence the warning for known devices with more * than one interface */ { 0x1267, 0x0103, USB_QUIRK_NONE, 1 }, // Keyboard Trust KB-1800S - { 0x0a12, 0x0001, USB_QUIRK_NONE, 1 }, // Bluetooth Allnet ALL1575 + { 0x0a12, 0x0001, USB_QUIRK_NONE, 1 }, // Bluetooth Allnet ALL1575 /* Currently unsupported, possibly interesting devices: * FTDI serial: device 0x0403:0x6001 is USB 1.10 (class ff) diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c index 421a80ec04..d5f47e47b4 100644 --- a/payloads/libpayload/drivers/usb/usb.c +++ b/payloads/libpayload/drivers/usb/usb.c @@ -256,12 +256,12 @@ set_address (hci_t *controller, int speed) } mdelay (50); dev->address = adr; - dev->descriptor = get_descriptor (dev, gen_bmRequestType + dev->descriptor = get_descriptor (dev, gen_bmRequestType (device_to_host, standard_type, dev_recp), 1, 0, 0); dd = (device_descriptor_t *) dev->descriptor; printf ("device 0x%04x:0x%04x is USB %x.%x ", - dd->idVendor, dd->idProduct, + dd->idVendor, dd->idProduct, dd->bcdUSB >> 8, dd->bcdUSB & 0xff); dev->quirks = usb_quirk_check(dd->idVendor, dd->idProduct); diff --git a/payloads/libpayload/drivers/usb/usbhid.c b/payloads/libpayload/drivers/usb/usbhid.c index 7c638298da..84de0c8afb 100644 --- a/payloads/libpayload/drivers/usb/usbhid.c +++ b/payloads/libpayload/drivers/usb/usbhid.c @@ -86,7 +86,7 @@ char *countries[36][2] = { { "Persian (Farsi)", "ir" }, { "Poland", "pl" }, { "Portuguese", "pt" }, - { "Russia", "ru" }, + { "Russia", "ru" }, { "Slovakia", "sl" }, { "Spanish", "es" }, { "Swedish", "se" }, @@ -241,8 +241,8 @@ typedef union { #define INITIAL_REPEAT_DELAY 10 #define REPEAT_DELAY 2 -static void -usb_hid_process_keyboard_event(usb_hid_keyboard_event_t *current, +static void +usb_hid_process_keyboard_event(usb_hid_keyboard_event_t *current, usb_hid_keyboard_event_t *previous) { int i, keypress = 0, modifiers = 0; @@ -429,16 +429,16 @@ usb_hid_init (usbdev_t *dev) usb_hid_set_idle(dev, interface, KEYBOARD_REPEAT_MS); debug (" activating...\n"); - HID_INST (dev)->descriptor = + HID_INST (dev)->descriptor = (hid_descriptor_t *) get_descriptor(dev, gen_bmRequestType - (device_to_host, standard_type, iface_recp), + (device_to_host, standard_type, iface_recp), 0x21, 0, 0); countrycode = HID_INST(dev)->descriptor->bCountryCode; /* 35 countries defined: */ if (countrycode > 35) countrycode = 0; - printf (" Keyboard has %s layout (country code %02x)\n", + printf (" Keyboard has %s layout (country code %02x)\n", countries[countrycode][0], countrycode); /* Set keyboard layout accordingly */ diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c index 5af3330b2f..6658f2ca5c 100644 --- a/payloads/libpayload/drivers/usb/usbmsc.c +++ b/payloads/libpayload/drivers/usb/usbmsc.c @@ -295,7 +295,7 @@ readwrite_blocks (usbdev_t *dev, int start, int n, cbw_direction dir, u8 *buf) } cb.block = htonl (start); cb.numblocks = htonw (n); - + return execute_command (dev, dir, (u8 *) &cb, sizeof (cb), buf, n * MSC_INST(dev)->blocksize); } @@ -310,7 +310,7 @@ request_sense (usbdev_t *dev) cmdblock6_t cb; memset (&cb, 0, sizeof (cb)); cb.command = 0x3; - + return execute_command (dev, cbw_direction_data_in, (u8 *) &cb, sizeof (cb), buf, 19); } @@ -430,7 +430,7 @@ usb_msc_init (usbdev_t *dev) timeout = 30 * 10; /* SCSI/ATA specs say we have to wait up to 30s. Ugh */ while (test_unit_ready (dev) && --timeout) { mdelay (100); - if (!(timeout % 10)) + if (!(timeout % 10)) printf ("."); } if (test_unit_ready (dev)) { |