Re: [RFC RESEND 00/10] Create separate header for ehci-dbgp driver
2014-11-03 4:07 GMT+01:00 Chris Rorvick: fusbh200: Make Xen notificaiton consistent with EHCI fotg210: Make Xen notificaiton consistent with EHCI you may want to fix the spelling: s/notificaiton/notification/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] phy: exynos5-usbdrd: Adding Kconfig dependency for Exynos7
2014-08-28 10:02 GMT+02:00 Vivek Gautam: This USB 3.0 PHY controller is also present on Exynos7 platform, so adding the dependency on ARCH_EXYNOS7 for this driver. +++ b/drivers/phy/Kconfig @@ -186,7 +186,7 @@ config PHY_EXYNOS5250_USB2 config PHY_EXYNOS5_USBDRD tristate Exynos5 SoC series USB DRD PHY driver - depends on ARCH_EXYNOS5 OF + depends on (ARCH_EXYNOS5 || ARCH_EXYNOS7) OF shouldn't that prompt and its help text be updated to mention also Exynos7? -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 4/4] r8152: support firmware files
2014-08-20 10:58 GMT+02:00 Hayes Wang: The firmware file is composed of the fw header and the commands. Each command has the following type. cmd(2 bytes) + length(2 bytes) + data(variable bytes) +static bool rtl_fw_format_ok(struct rtl_fw *rtl_fw) + start = le32_to_cpu(fw_header-fw_start); + if (start fw-size) + goto out; since start is an offset in an array of size fw-size this should check for = and if a command is at least cmd(2 bytes) + length(2 bytes), shouldn't this check for start = fw-size - 4? -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] usb:serial:pl2303: add GPIOs interface on PL2303
2014-07-20 8:38 GMT+02:00 Wang YanQing: PL2303HX has two GPIOs, this patch add interface for it. checkpatch.pl shows 2 errors: ERROR: space required before the open parenthesis '(' #218: FILE: drivers/usb/serial/pl2303.c:309: + if(pl2303_vendor_read(gpio-serial, 0x0081, buf) 1) ERROR: that open brace { should be on the previous line #248: FILE: drivers/usb/serial/pl2303.c:381: + if (type == TYPE_HX) + { it also shows 3 warnings +#ifdef CONFIG_USB_SERIAL_PL2303_GPIO +struct pl2303_gpio { + /* +* 0..3: unknown (zero) +* 4: gp0 output enable (1: gp0 pin is output, 0: gp0 pin is input) +* 5: gp1 output enable (1: gp1 pin is output, 0: gp1 pin is input) +* 6: gp0 pin value +* 7: gp1 pin value +*/ + u8 index; + struct usb_serial *serial; + struct gpio_chip gpio_chip; +}; +#endif it would be nice to state what happens if you read pin 6 and 7 when they are set for output @@ -262,6 +377,37 @@ static int pl2303_startup(struct usb_serial *serial) + gpio-gpio_chip.ngpio = 2; you set ngpio but you don't use it you would save some code if each function that use index has if (index = gpio-gpio_chip.ngpio) return -EINVAL; and then read the constants from 2 arrays in file scope: gpio_index_mask = {0x10, 0x20}; gpio_value_mask = {0x40, 0x80}; so you can change this: + if (offset == 0) { + gpio-index |= 0x10; + if (value) + gpio-index |= 0x40; + else + gpio-index = ~0x40; + } else if (offset == 1) { + gpio-index |= 0x20; + if (value) + gpio-index |= 0x80; + else + gpio-index = ~0x80; + } else { + return -EINVAL; + } to this: if (index = gpio-gpio_chip.ngpio) return -EINVAL; gpio-index |= gpio_index_mask[offset]; if (value) gpio-index |= gpio_value_mask[offset]; else gpio-index = ~gpio_value_mask[offset]; do you find it less readable or less efficient? -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ARM: dts: sti: Add st-dwc3 devicetree bindings documentation
2014-07-04 13:13 GMT+02:00 Peter Griffin: +Required properties: + - compatible : must be st,stih407-dwc3 + - reg : glue logic base address and USB syscfg ctrl register offest + - reg-names : Should be reg-glue and syscfg-reg. + - st,syscon: should be phandle to system configuration node which + encompases the glue registers. + - resets : phandle pointing to the system powerdown controller minor knits: s/offest/offset/ s/encompases/encompasses/ Should is upper case while all other lines in this block start with a lower case letter; two lines end with a full stop, three lines without; colons the last lines do not align to the first three -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC
2014-07-04 13:13 GMT+02:00 Peter Griffin: diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 8eb996e..f7b0518 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -77,6 +77,15 @@ config USB_DWC3_KEYSTONE default USB_DWC3 help Support of USB2/3 functionality in TI Keystone2 platforms. + +config USB_DWC3_ST + tristate STMicroelectronics Platforms + depends on ARCH_STI OF + default USB_DWC3_HOST + help + STMicroelectronics SoCs chip with one DesignWare Core USB3 IP + inside (i.e. STiH407). + Say 'Y' or 'M' here if you have one such device comment Debugging features you are actually removing the line Say 'Y' or 'M' here if you have one such device from the previous item -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] Add support for GPIOs for SMSC LAN95xx chips.
2014-06-25 6:46 GMT+02:00 Evgeny Boger: There might be 11 GPIOs in total. do you mean 12 GPIOs? You say later they are 0-based and the last one is 11 Last three GPIOs (offsets 8-11, 0-based) are shared with FDX, LNKA, SPD LEDs respectively. so you mean the last four? and you may want to remove the extra space before the open parenthesis also there are still several unneeded newlines diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c @@ -68,6 +70,15 @@ struct smsc95xx_priv { spinlock_t mac_cr_lock; u8 features; u8 suspend_flags; + + struct usbnet *dev; +static int smsc95xx_gpio_request(struct gpio_chip *gpio, unsigned offset) + mutex_unlock(pdata-gpio_lock); + + + return (ret 0) ? ret : 0; +} + +static void smsc95xx_gpio_free(struct gpio_chip *gpio, unsigned offset) + if (ret 0) + netif_err(pdata-dev, ifdown, pdata-dev-net, + error freeing gpio %d\n, offset); + +} and in other places +static void smsc95xx_gpio_set(struct gpio_chip *gpio, unsigned offset, + int value) +{ + if (ret 0) { + netif_err(pdata-dev, ifdown, pdata-dev-net, + error writing gpio %d=%d\n, offset, value); + return; + } +} no need to put a return there at he end of the function (if it's defensive programming then you didn't put return in similar code in a previous function) -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] leds: USB: Add support for MSI GT683R led panels
2014-06-05 13:06 GMT+02:00: + dev_err(led-usb_dev-dev, Message to be send to device is too long\n); there's a typo: s/send/sent/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Patch V3 2/2] usbtest: Add interrupt EP testcases
2014-05-23 8:32 GMT+02:00 Amit Virdi: @@ -124,6 +130,9 @@ get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf) switch (usb_endpoint_type(e-desc)) { case USB_ENDPOINT_XFER_BULK: break; + case USB_ENDPOINT_XFER_INT: + if (dev-info-intr) + goto try_intr; case USB_ENDPOINT_XFER_ISOC: if (dev-info-iso) goto try_iso; @@ -139,6 +148,15 @@ get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf) I don't think you really mean to fall through to case USB_ENDPOINT_XFER_ISOC if the test is false, but the logic of that for-loop is becoming harder to follow in pseudo code, the switch statement is like this? case USB_ENDPOINT_XFER_BULK: set in or out; break; case USB_ENDPOINT_XFER_INT: set int_in or int_out; break; case USB_ENDPOINT_XFER_ISOC: set iso_in or iso_out; break; default: do nothing; it would be easier to follow even if it adds and indentation level -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC] usb: storage: shuttle_usbat: fix discs being detected twice
Even if the USB-to-ATAPI converter supported multiple LUNs, this driver would always detect the same physical device or media because it doesn't use srb-device-lun in any way. Tested with an Hewlett-Packard CD-Writer Plus 8200e. Signed-off-by: Daniele Forsi dfo...@gmail.com --- drivers/usb/storage/shuttle_usbat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index 4ef2a80..008d805 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c @@ -1851,7 +1851,7 @@ static int usbat_probe(struct usb_interface *intf, us-transport_name = Shuttle USBAT; us-transport = usbat_flash_transport; us-transport_reset = usb_stor_CB_reset; - us-max_lun = 1; + us-max_lun = 0; result = usb_stor_probe2(us); return result; -- 1.9.2 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] USB: serial: ftdi_sio: add id for Brainboxes VX-001 ExpressCard
2014-03-25 20:00 GMT+01:00 Michele Baldessari: Custom VID/PID for Brainboxes VX-001 ExpressCard RS232 as reported in + * Product: ExpressCard 1 Port RS2323 there is a stray trailing 3 -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] added fputs() fgets() error handling
2013/11/4 Stanislaw Wadas: @@ -127,6 +132,7 @@ static void gadget_write_buf(char *path, char *name, char *file, char *buf) { char p[MAX_LENGHT]; FILE *fp; + int ret; this new variable isn't used in the hunk that follows: sprintf(p, %s/%s/%s, path, name, file); @@ -136,7 +142,11 @@ static void gadget_write_buf(char *path, char *name, char *file, char *buf) return; } - fputs(buf, fp); + if (fputs(buf, fp) == EOF) { + ERROR(write error); + fclose(fp); + return; + } fclose(fp); } -- -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: choice =y selection becomes lost after having multiple entries =m with depends on
2013/10/30 Dirk Gouders: Those values are also written to the config file causing modules when they should not. this sentence of the commit message is missing something, I think you mean: s/causing modules/causing modules to be built/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 1/1] usb: gadget: zero: Add flexible auto remote wakeup test method
2013/9/19 Peter Chen: + milliseconds to increase successive wakup delays); there's a typo: s/wakup/wakeup/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]fsl/usb: Workarourd for USB erratum-A005697
2013/9/19 Ramneek Mehresh: + * we need to wait for 10ms for bus to fo into suspend mode after there's a typo: s/fo/go/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] USB: serial: add driver for Suunto ANT+ USB device
2013/7/26 Greg Kroah-Hartman: + Say Y here if you want to usb the Suunto ANT+ USB device. I think there might be a thinko: s/to usb/to use/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/4] proc_usb_info.txt: Correct documentation about endianness of config descriptors
2013/5/30 Hans de Goede: +are wTotalLength bytes apart. If a device returns less configuration +descriptor data then indicated by wTotalLength there will be a hole in s/then/than/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/4] Documentation sysfs-bus-usb: Document all files used by libusb
2013/5/30 Hans de Goede: + be trusted, as the device may have a smaller config descriptor + then it advertises. The bLength field of each (sub) descriptor as in the other text: s/then/than/ -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Testing phonet
2013/4/30 Andrzej Pietrasiewicz: As I already wrote I am now stuck with sending correct data, so that when I sendto() from host I can recvfrom() on device (or vice versa). payload data doesn't matter so you don't need my dumps, maybe you are using the same address on both sides of the link or you are sending to the wrong address or the route isn't set up correctly I'm attaching a test program that works with my phone but this is only the host part because I don't know how to set up the device part, can you share the details of your setup? According to Documentation/networking/phonet.txt it should be possible to do both parts on the same machine, that would test only the phonet module and not cdc_phonet (Each socket [...] can send and receive packets with any other peer). -- Daniele Forsi /* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2010, 2013 Daniele Forsi This is a test for accessing the phone via the phonet Linux kernel module. */ #include sys/socket.h #include linux/phonet.h #include stdio.h #include errno.h #include string.h #include unistd.h /* from gnokii's include/links/fbus-common.h */ #define FBUS_DEVICE_PHONE 0x00 int test(int fd) { struct sockaddr_pn addr = { .spn_family = AF_PHONET, .spn_dev = FBUS_DEVICE_PHONE }; unsigned char req[] = {0x03, 0x15, 0x01}; /* addr.spn_resource = 0x1b get product name */ char *port = usbpn0; unsigned char buf[1024]; ssize_t len; int i; if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, port, strlen(port))) { perror(setsockopt); return 1; } addr.spn_resource = 0x1b; if (sendto(fd, req, sizeof(req), 0, (const struct sockaddr *)addr, sizeof(addr)) == -1) { perror(sendto); return 1; } len = recvfrom(fd, buf, sizeof(buf), 0, NULL, NULL); if (len == (ssize_t)-1) { perror(recvfrom); return 1; } for (i = 0; i len; i++) printf(%02x , buf[i]); printf(\n); return 0; } int main(int argc, char *argv[]) { int fd, error; fd = socket(PF_PHONET, SOCK_DGRAM, 0); if (fd == -1) { perror(socket); return 1; } error = test(fd); close(fd); return error; }
Re: Testing phonet
Hello Andrzej, I removed people from CC On Monday, April 29, 2013 6:30 PM Daniele Forsi wrote: I can provide the OP with frames captured from a real phone when talking with gnokii You mean some kind of dump? What can it be useful for? Comparing the messages sequence to that of conversation with a real hardware? Simulating conversation with a real hardware without the hardware? both: you can compare the recorded conversation if you have the hardware or replay it without the hardware How can I get it from you? tell what you want to test and what kind of dump you can use and I'll see if I am able do it -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Testing phonet
2013/4/29 RĂ©mi Denis-Courmont: Host-side at least oFono used to support Phonet (not tried in a year); maybe ModemManager or Gnokii would work too (not tried ever). yes, gnokii supports Phonet with and without kernel the modules phonet and cdc_phonet; the kernel modules only support USB, but without the kernel modules gnokii supports Phonet over serial devices, USB with libusb, native Bluetooth and native IrDA EP IN is going to be difficult without Nokia or Renesas modem. I fear you would have to write your own C socket application to send Phonet packets over the wire. I can provide the OP with frames captured from a real phone when talking with gnokii -- Daniele Forsi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html