Re: [PATCH] usbip: Remove unnecessary null check

2019-03-06 Thread shuah
_hcd(vdev); - priv = kzalloc(sizeof(struct vhci_priv), GFP_ATOMIC); if (!priv) { usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_MALLOC); Thanks for the patch. Looks good to me. Acked-by: Shuah Khan thanks, -- Shuah

Re: [PATCH] usb: usbip: fix isoc packet num validation in get_pipe

2019-04-23 Thread shuah
ed-off-by: Malte Leip Looks good to me. Acked-by: Shuah Khan thanks, -- Shuah

Re: [PATCH] usbip: stub_rx: tidy the indenting in is_clear_halt_cmd()

2019-04-25 Thread shuah
(req->wValue == USB_ENDPOINT_HALT); + return (req->bRequest == USB_REQ_CLEAR_FEATURE) && + (req->bRequestType == USB_RECIP_ENDPOINT) && + (req->wValue == USB_ENDPOINT_HALT); } static int is_set_interface_cmd(struct urb *urb)

Re: [PATCH v2 0/2] usbip: Implement SG support

2019-07-19 Thread shuah
91 insertions(+), 121 deletions(-) Hi Suwan, I have been traveling and would like to test this series before I ask Greg to pick it up. Just a quick note that I will get to this early next week. thanks, -- Shuah

Re: [PATCH v2 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-07-22 Thread shuah
struct hc_driver vhci_hc_driver = { .get_frame_number = vhci_get_frame_number, + .map_urb_for_dma = vhci_map_urb_for_dma, + .unmap_urb_for_dma = vhci_unmap_urb_for_dma, + .hub_status_data = vhci_hub_status, .hub_control = vhci_hub_control, .bus_suspend= vhci_bus_suspend, thanks, -- Shuah

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-07-22 Thread shuah
{ + ret = usb_unlink_urb(priv->urbs[i]); + if (ret != -EINPROGRESS) + dev_err(&priv->urbs[i]->dev->dev, + "failed to unlink a urb # %lu, ret %d\n", + priv->seqnum, ret); This could result in several error messages. This code path is much longer now compared to previous. This is how far I have gotten. I am going to take a look at the rest tomorrow. thanks, -- Shuah

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-07-23 Thread shuah
se them? + } txsize += urb->transfer_buffer_length; } @@ -93,25 +118,29 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) iso_buffer = usbip_alloc_iso_desc_pdu(urb, &len); if (!iso_buffer) { + kfree(iov); Consolidate error handling for kfree(iov) usbip_event_add(&vdev->ud, SDEV_EVENT_ERROR_MALLOC); return -1; } - iov[2].iov_base = iso_buffer; - iov[2].iov_len = len; + iov[iovnum].iov_base = iso_buffer; + iov[iovnum].iov_len = len; + iovnum++; txsize += len; } - ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, 3, txsize); + ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, iovnum, txsize); if (ret != txsize) { pr_err("sendmsg failed!, ret=%d for %zd\n", ret, txsize); + kfree(iov); kfree(iso_buffer); Consolidate error handling for kfree(iov) and kfree(iso_buffer) usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_TCP); return -1; } + kfree(iov); kfree(iso_buffer); usbip_dbg_vhci_tx("send txdata\n"); thanks, -- Shuah

Re: [PATCH v2] usbip: tools: fix GCC8 warning for strncpy

2019-07-25 Thread shuah
gt;busnum = 0; name = udev_device_get_sysname(plat); - strncpy(dev->busid, name, SYSFS_BUS_ID_SIZE); + strncpy(dev->busid, name, SYSFS_BUS_ID_SIZE - 1); + dev->busid[SYSFS_BUS_ID_SIZE - 1] = '\0'; strlcpy() would be better choice here. Any reason to not use that? return 0; err: fclose(fd); thanks, -- Shuah

Re: [PATCH v2] usbip: tools: fix GCC8 warning for strncpy

2019-07-25 Thread shuah
On 7/25/19 8:44 AM, Liu, Changcheng wrote: On 08:19 Thu 25 Jul, shuah wrote: On 7/25/19 7:22 AM, Liu, Changcheng wrote: GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size which could lead to non-zero terminated string being copied. Use

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-07-29 Thread shuah
On 7/29/19 8:52 AM, Suwan Kim wrote: Hi Shuah, On Tue, Jul 23, 2019 at 06:21:53PM -0600, shuah wrote: Hi Suwan, On 7/5/19 10:43 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. Originally, vhci doesn't supported SG, so USB storage driver on vhci breaks SG list

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-08-01 Thread shuah
On 8/1/19 12:38 AM, Suwan Kim wrote: On Mon, Jul 29, 2019 at 10:32:31AM -0600, shuah wrote: On 7/29/19 8:52 AM, Suwan Kim wrote: Hi Shuah, On Tue, Jul 23, 2019 at 06:21:53PM -0600, shuah wrote: Hi Suwan, On 7/5/19 10:43 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-08-02 Thread shuah
On 8/2/19 1:41 AM, Suwan Kim wrote: On Thu, Aug 01, 2019 at 08:03:59AM -0600, shuah wrote: On 8/1/19 12:38 AM, Suwan Kim wrote: On Mon, Jul 29, 2019 at 10:32:31AM -0600, shuah wrote: On 7/29/19 8:52 AM, Suwan Kim wrote: Hi Shuah, On Tue, Jul 23, 2019 at 06:21:53PM -0600, shuah wrote: Hi

Re: [PATCH v3 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-02 Thread shuah
&& urb->num_sgs) { + WARN_ON(1); Don't add WARN_ON. I cleaned them all up recently and don't want new ones added. thanks, -- Shuah

Re: [PATCH v3 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-02 Thread shuah
recv xbuf, %d\n", ret); - if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC) { - usbip_event_add(ud, SDEV_EVENT_ERROR_TCP); - } else { - usbip_event_add(ud, VDEV_EVENT_ERROR_TCP); - return -EPIPE; + if (urb->num_sgs) { + copy = size; + for_each_sg(urb->sg, sg, urb->num_sgs, i) { + int recv_size; + + if (copy < sg->length) + recv_size = copy; + else + recv_size = sg->length; + + recv = usbip_recv(ud->tcp_socket, sg_virt(sg), + recv_size); + + if (recv != recv_size) + goto error; + + copy -= recv; + ret += recv; } + + if (ret != size) + goto error; + } else { + ret = usbip_recv(ud->tcp_socket, urb->transfer_buffer, size); + if (ret != size) + goto error; } return ret; + +error: + dev_err(&urb->dev->dev, "recv xbuf, %d\n", ret); + if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC) Did you test VUDC and USB lowspeed cases? If you haven't please test those two cases for regressions. thanks, -- Shuah

Re: [PATCH v3 0/2] usbip: Implement SG support

2019-08-02 Thread shuah
fundamental solution of it is to add SG support to vhci. This patch works well with the USB 3.0 storage devices without Alan's patch, and we can revert Alan's patch if it causes some troubles. Why just 3.0? Please test with lowspeed and VUDC to make sure there are no regressions. thanks, -- Shuah

Re: [PATCH v3 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-05 Thread shuah
On 8/5/19 2:04 AM, Suwan Kim wrote: On Fri, Aug 02, 2019 at 04:41:52PM -0600, shuah wrote: Hi Suwan, On 8/2/19 11:36 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. This sentence doesn't make sense to me. What bugs? Ca you eloborate? Alan's patch descri

Re: [PATCH v3 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-05 Thread shuah
On 8/4/19 11:23 PM, Suwan Kim wrote: On Fri, Aug 02, 2019 at 04:22:27PM -0600, shuah wrote: On 8/2/19 11:36 AM, Suwan Kim wrote: vhci doesn’t do DMA for remote device. Actually, the real DMA operation is done by network card driver. vhci just passes virtual address of the buffer to the network

Re: [PATCH] USB: usbip: convert platform driver to use dev_groups

2019-08-05 Thread shuah
On 8/5/19 1:36 PM, Greg Kroah-Hartman wrote: Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" any sysfs files. Cc: Valentina Manea Cc: Shuah Khan Signed-of

Re: [PATCH v4 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-06 Thread shuah
sc) && urb->num_sgs) { + pr_err("SG is not supported for isochronous transfer\n"); Any reason to not use dev_err()? Looks good otherwise. thanks, -- Shuah

Re: [PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-06 Thread shuah
d if=/dev/sd iflag=direct of=/dev/null bs=1G count=1 Write - dd if= iflag=direct of=/dev/sd bs=1G count=1 Thanks for the test results. Were you able to test with USB lowspeed devices? thanks, -- Shuah

Re: [PATCH v4 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-06 Thread shuah
On 8/6/19 9:32 AM, Suwan Kim wrote: On Tue, Aug 06, 2019 at 09:11:30AM -0600, shuah wrote: On 8/6/19 6:31 AM, Suwan Kim wrote: vhci doesn’t do DMA for remote device. Actually, the real DMA operation is done by network card driver. vhci just passes virtual address of the buffer to the network

Re: [PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-06 Thread shuah
On 8/6/19 9:48 AM, Suwan Kim wrote: On Tue, Aug 06, 2019 at 09:13:54AM -0600, shuah wrote: On 8/6/19 6:31 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this

Re: [PATCH v5 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-08 Thread shuah
nst struct hc_driver vhci_hc_driver = { .get_frame_number = vhci_get_frame_number, + .map_urb_for_dma = vhci_map_urb_for_dma, + .unmap_urb_for_dma = vhci_unmap_urb_for_dma, + .hub_status_data = vhci_hub_status, .hub_control= vhci_hub_control, .bus_suspend =

Re: [PATCH v5 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-08 Thread shuah
+124,26 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) if (!iso_buffer) { usbip_event_add(&vdev->ud, SDEV_EVENT_ERROR_MALLOC); - return -1; + goto err_iso_buffer; } - iov[2].iov_base = iso_buffer; - iov[2].iov_len = len; + iov[iovnum].iov_base = iso_buffer; + iov[iovnum].iov_len = len; + iovnum++; txsize += len; } - ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, 3, txsize); + ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, iovnum, +txsize); if (ret != txsize) { pr_err("sendmsg failed!, ret=%d for %zd\n", ret, txsize); - kfree(iso_buffer); usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_TCP); - return -1; + err = -EPIPE; + goto err_tx; } + kfree(iov); kfree(iso_buffer); usbip_dbg_vhci_tx("send txdata\n"); @@ -119,6 +151,13 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) } return total_size; + +err_tx: + kfree(iso_buffer); +err_iso_buffer: + kfree(iov); + + return err; } static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev) Thanks for doing this work. Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH] USB: usbip: delete README file

2019-01-17 Thread shuah
On 1/17/19 1:23 AM, Greg Kroah-Hartman wrote: The README file ni the drivers/usb/usbip/ directory is not needed anymore, so just delete it. Cc: Valentina Manea Cc: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usbip/README | 7 --- 1 file changed, 7 deletions

Re: [PATCH] usbip: Fix vhci_urb_enqueue() URB null transfer buffer error path

2019-01-20 Thread shuah
On 1/19/19 9:58 AM, Sergei Shtylyov wrote: Hello! On 01/19/2019 12:29 AM, Shuah Khan wrote: From: Shuah Khan Fix vhci_urb_enqueue() to print error and return error instead of failing with WARN_ON. It's BUG_ON(). Thanks. I will fix it. -- Shuah

Re: [PATCH] usbip: Fix vep_free_request() null pointer checks on input args

2019-01-22 Thread shuah
On 1/19/19 1:17 AM, Greg KH wrote: On Fri, Jan 18, 2019 at 02:29:30PM -0700, Shuah Khan wrote: From: Shuah Khan Fix vep_free_request() to return when usb_ep and usb_request are null instead of calling WARN_ON. Signed-off-by: Shuah Khan --- drivers/usb/usbip/vudc_dev.c | 2 +- 1 file

Re: [PATCH] usbip: Fix vep_free_request() null pointer checks on input args

2019-01-25 Thread shuah
On 1/25/19 1:02 AM, Greg KH wrote: On Tue, Jan 22, 2019 at 04:05:28PM -0700, shuah wrote: On 1/19/19 1:17 AM, Greg KH wrote: On Fri, Jan 18, 2019 at 02:29:30PM -0700, Shuah Khan wrote: From: Shuah Khan Fix vep_free_request() to return when usb_ep and usb_request are null instead of calling

Re: [PATCH v5 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-13 Thread shuah
On 8/8/19 10:18 AM, shuah wrote: On 8/8/19 9:54 AM, Suwan Kim wrote: vhci doesn’t do DMA for remote device. Actually, the real DMA operation is done by network card driver. vhci just passes virtual address of the buffer to the network stack, so vhci doesn’t use and need dma address of the

Re: [PATCH v5 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-13 Thread shuah
On 8/8/19 10:21 AM, shuah wrote: On 8/8/19 9:54 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treat

Re: [PATCH v5 0/2] usbip: Implement SG support

2019-08-15 Thread shuah
assume DMA capabilities based on the presence of a DMA mask. I agree. Let's wait for Christoph's series to be applied before taking this one. Great. Thanks you both looking at these. Makes sense. thanks, -- Shuah

Re: [PATCH v6] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-24 Thread shuah
urb->transfer_buffer_length; + iovnum++; + } txsize += urb->transfer_buffer_length; } @@ -95,23 +127,26 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) if (!iso_buffer) { usbip_event_add(&vdev->ud, SDEV_EVENT_ERROR_MALLOC); - return -1; + goto err_iso_buffer; } - iov[2].iov_base = iso_buffer; - iov[2].iov_len = len; + iov[iovnum].iov_base = iso_buffer; + iov[iovnum].iov_len = len; + iovnum++; txsize += len; } - ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, 3, txsize); + ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, iovnum, +txsize); if (ret != txsize) { pr_err("sendmsg failed!, ret=%d for %zd\n", ret, txsize); - kfree(iso_buffer); usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_TCP); - return -1; + err = -EPIPE; + goto err_tx; } + kfree(iov); kfree(iso_buffer); usbip_dbg_vhci_tx("send txdata\n"); @@ -119,6 +154,13 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) } return total_size; + +err_tx: + kfree(iso_buffer); +err_iso_buffer: + kfree(iov); + + return err; } static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev) thanks, -- Shuah

Re: [PATCH v8] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-27 Thread shuah
URB_DMA_MAP_SG setting in urb->transfer_flags. That mean you are restoring v6 code change with the commit log updates from v8. This flag belongs with urb and not the cmd.submit. Having it in urb also helps when we debug and dump the urb from usbip_dump_urb() thanks, -- Shuah

Re: [PATCH v8] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-27 Thread shuah
On 8/27/19 8:38 AM, shuah wrote: On 8/26/19 11:23 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is tr

Re: [PATCH] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-15 Thread shuah
f elements is 0 and in other error cases it will return < # of elements. I would think you want to check ret != 1 here. thanks, -- Shuah

Re: [PATCH v2] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-16 Thread shuah
ad((char *) &descr, sizeof(descr), 1, fd); - if (ret < 0) + if (ret != 1) Why not print error message? goto err; fclose(fd); thanks, -- Shuah

Re: [PATCH v2] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-17 Thread shuah
On 10/16/19 11:26 PM, GwanYeong Kim wrote: On Wed, 16 Oct 2019 20:33:39 -0600 shuah wrote: On 10/16/19 8:25 PM, GwanYeong Kim wrote: cannot be less than 0 - fread() returns 0 on error. This isn't really accurate right. fread() doesn't always return 0 in error. It could return &

Re: [PATCH v3] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-21 Thread shuah
udc device descr file: %s", strerror(errno)); goto err; + } fclose(fd); copy_descr_attr(dev, &descr, bDeviceClass); Looks good. Acked-by: Shuah Khan thanks, -- Shuah

Re: [PATCH v13 00/10] usbip: exporting devices

2016-11-23 Thread Shuah Khan
his code could actually review these patch series. I don't think I've > seen that happen yet, which isn't good... > > {hint hint hint} > > greg k-h > I started reviewing the patch series. Didn't get a chance to go through all of them yet. thanks, -- Shu

Re: [PATCH v13 00/10] usbip: exporting devices

2016-11-23 Thread Shuah Khan
see server side and client side operations clearly. It would help me understand the use-case you are trying to add. I do have some concerns about security on client side. User sits on the client side and it should be a pull from client side as opposed to push from server side. It sounds like th

Re: [PATCH v13 01/10] usbip: exporting devices: modifications to network header

2016-11-23 Thread Shuah Khan
On 11/21/2016 11:48 PM, Nobuo Iwata wrote: > Modification to export and un-export response in > tools/usb/usbip/src/usbip_network.h. It just changes return code type > from int to uint32_t as same as other responses. > > Signed-off-by: Nobuo Iwata Looks fine to me. Acked

Re: [PATCH v13 02/10] usbip: exporting devices: modifications to host side libraries

2016-11-23 Thread Shuah Khan
Any reason why you have to change the user interface to go to char *busid? I would like to see a good explanation why this user interface change is necessary. thanks, -- Shuah > > Here, connect and disconnect is NEW-3 and NEW-4 respactively in diagram > below. > &g

Re: [PATCH v13 03/10] usbip: exporting devices: new connect operation

2016-11-23 Thread Shuah Khan
unbind_device: > + if (bind) > + usbip_unbind_device(busid); > +err_out: > + return -1; > +} > + > +int usbip_connect(int argc, char *argv[]) > +{ > + static const struct option opts[] = { > + { "remote", required_argument, NUL

Re: [PATCH v13 00/10] usbip: exporting devices

2016-12-01 Thread Shuah Khan
ver and client. In this new proposed model, how does this work? Who sets up the server to export or push exports to clients. How does server know which clients to push exports to? With a feature like this, it is important to understand the use-cases in detail. thanks, -- Shuah > --- > &g

Re: [PATCH v2] usbip: vudc: fix: Clear already_seen flag also for ep0

2016-12-02 Thread Shuah Khan
as you pulling in the USB/IP patches with Ack. This patch looks good. Please pick this up. If you want me to maintain USB/IP tree and send you pull request, I can do that as well. Whatever works for you. Acked-by: Shuah Khan thanks, -- Shuah > --- > Changes since v1: > - Use first 12 dig

Re: [PATCH] usbip: vudc: Refactor init_vudc_hw() to be more obvious

2016-12-02 Thread Shuah Khan
On 12/02/2016 08:27 AM, Krzysztof Opasiak wrote: > > > On 12/02/2016 04:15 PM, Shuah Khan wrote: >> Hi Krzysztof, >> >> Thanks for the patch. >> >> On 12/01/2016 10:02 AM, Krzysztof Opasiak wrote: >>> Current implementation of init_vudc_hw() adds e

Re: [PATCH] usbip: vudc: Refactor init_vudc_hw() to be more obvious

2016-12-02 Thread Shuah Khan
it(&ep->ep, ~0); > - ep->ep.max_streams = 16; > - ep->gadget = &udc->gadget; > - ep->desc = NULL; > - INIT_LIST_HEAD(&ep->req_queue); > + list_add_tail(&ep->ep.ep_list, &udc->g

Re: [PATCH v13 00/10] usbip: exporting devices

2016-12-02 Thread Shuah Khan
er why the current model doesn't work. Doesn't making sure port 3240 isn't blocked on the firewall help? btw: could you please re-run get_maintainers - my email address in the MAINTAINERS file changed a while ago. I think your email might be outdated. thanks, -- Shuah > > I&#x

Re: usb: warning in vhci_hcd_probe/lockdep_init_map

2016-12-02 Thread Shuah Khan
platform_device.h:140 >>> [< inline >] add_platform_device drivers/usb/usbip/vhci_hcd.c:1213 >>> [] vhci_hcd_init+0x215/0x305 >>> drivers/usb/usbip/vhci_hcd.c:1254 >>> [] do_one_initcall+0xf6/0x360 init/main.c:778 >>> [< inlin

Re: usb: warning in vhci_hcd_probe/lockdep_init_map

2016-12-02 Thread Shuah Khan
On 12/02/2016 09:23 AM, Shuah Khan wrote: > On 12/02/2016 09:09 AM, Andrey Konovalov wrote: >> On Fri, Dec 2, 2016 at 4:58 PM, Greg Kroah-Hartman >> wrote: >>> On Fri, Dec 02, 2016 at 03:35:44PM +0100, Andrey Konovalov wrote: >>>> Hi! >>>> >&g

Re: [PATCH v13 09/10] usbip: exporting devices: chage to documenattion

2016-12-02 Thread Shuah Khan
e donor (machine which > provides the device) and acceptor (machine which accepts the device) > would be better? > > Best regards, > Please don't introduce new terminology. The current terminology is correct and makes sense: Server - system with device physically attached that exp

Re: [PATCH v2] usbip: vudc: Refactor init_vudc_hw() to be more obvious

2016-12-02 Thread Shuah Khan
. Greg, Here is my ack. Could you please pick this up. Acked-by: Shuah Khan thanks, -- Shuah > --- > drivers/usb/usbip/vudc_dev.c | 35 ++- > 1 file changed, 18 insertions(+), 17 deletions(-) > > diff --git a/drivers/usb/usbip/vudc_dev.c b/

[PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

2016-12-05 Thread Shuah Khan
p/vhci_hcd.c:978 [] usb_add_hcd+0x8da/0x1c60 drivers/usb/core/hcd.c:2867 [] vhci_hcd_probe+0x97/0x130 drivers/usb/usbip/vhci_hcd.c:1103 --- --- ---[ end trace c33c7b202cf3aac8 ]--- Signed-off-by: Shuah Khan Reported-by: Andrey Konovalov --- drivers/usb/usbip/vhci_sysfs.c | 1 + 1 fil

Re: [PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

2016-12-05 Thread Shuah Khan
Hi Andrey, On 12/05/2016 12:56 PM, Shuah Khan wrote: > vhci_hcd calls sysfs_create_group() with dynamically allocated sysfs > attributes triggering the lock-class key not persistent warning. Call > sysfs_attr_init() for dynamically allocated sysfs attributes to fix it. > > vhci_hc

[PATCH] usbip: add missing compile time generated files to .gitignore

2016-12-05 Thread Shuah Khan
Add the following files to .gitignore compile libsrc/libusbip_la-sysfs_utils.lo libsrc/libusbip_la-usbip_device_driver.lo libsrc/libusbip_la-usbip_host_common.lo Signed-off-by: Shuah Khan --- tools/usb/usbip/.gitignore | 4 1 file changed, 4 insertions(+) diff --git a/tools/usb/usbip

Re: [PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

2016-12-07 Thread Shuah Khan
\ do {\ static struct lock_class_key __key; \ \ (attr)->key = &__key; \ } while (0) Are you concerned about something else?

Re: [PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

2016-12-08 Thread Shuah Khan
On 12/07/2016 09:12 PM, fx IWATA NOBUO wrote: > Dear Shuah, > >> I noticed that in many places sysfs_attr_init() is called before populating >> the fields such as name etc. However, I don't think the order matters. >> >> sysfs_attr_init() doesn't depe

Re: vUDC

2016-12-08 Thread Shuah Khan
with --log option and send the syslog Krzysztof, Any ideas. Maybe it is time the documentation is updated with vudc details. thanks, -- Shuah > > i.A. Elen Niedermeyer > Duale Studentin Informatik > __ > > BIOTRONIK SE & Co. KG > Woermannkehre 1 > 12

Re: vUDC

2016-12-08 Thread Shuah Khan
On 12/08/2016 08:07 AM, Krzysztof Opasiak wrote: > Hi, > > On 12/08/2016 03:33 PM, Shuah Khan wrote: >> Hi Elen, >> >> Adding k.opas...@samsung.com >> >> On Thu, Dec 8, 2016 at 7:07 AM, Elen Niedermeyer >> wrote: >>> Dear Sir or Madam, &g

Re: [PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

2016-12-08 Thread Shuah Khan
On 12/08/2016 05:08 PM, fx IWATA NOBUO wrote: > Dear Shuah, > > Sorry for taking time. > > It's caused by my patch. > It was included "vhci number of ports extension" patch set. > The set consists of 3 patches. > > The fixing was included in v5. > O

Re: Fwd: Antwort: Re: vUDC

2016-12-09 Thread Shuah Khan
p; Co. KG > Woermannkehre 1 > 12359 Berlin, Germany > > Phone: +49 (0) 30 68905-2459 > Fax: +49 (0) 30 68905 2940 > Mail: elen.niederme...@biotronik.com > > -Krzysztof Opasiak schrieb: - > An: Shuah Khan , Elen Niedermeyer > > Von: Krzysztof Opasiak > Datum: 08.

Re: [PATCH v2] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-09 Thread Shuah Khan
Hi Krzysztof, Thanks for getting to this so quickly. Couple of comments below: On 12/09/2016 10:15 AM, Krzysztof Opasiak wrote: > Add some simple script which creates a USB gadget using ConfigFS > and then exports it using vUDC. > > This may be useful for people who just started playing with > U

Re: [PATCH v2] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-12 Thread Shuah Khan
Hi Krzysztof, On 12/12/2016 05:05 AM, Krzysztof Opasiak wrote: > > Hi, > > On 12/09/2016 10:40 PM, Shuah Khan wrote: >> Hi Krzysztof, >> >> Thanks for getting to this so quickly. Couple of comments below: >> >> On 12/09/2016 10:15 AM, Krzysztof Opasi

Re: [PATCH v3] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-12 Thread Shuah Khan
> > Signed-off-by: Krzysztof Opasiak > --- Thanks Krzysztof. Acked-by: Shuah Khan -- Shuah > Changes since v2: > - mention about loading usbip-vhci before listing available devices > > Changes since v1: > - Fix terminology mistake (server instead o

Re: [PATCH] tools: usb: usbip: Update README

2016-12-14 Thread Shuah Khan
bip port > - Show virtual port status. > @@ -192,6 +244,8 @@ Detach the imported device: > - http://usbip.wiki.sourceforge.net/how-to-debug-usbip > - usbip-host.ko must be bound to the target device. > - See /proc/bus/usb/devices and find "Driver=...&qu

Re: [PATCH] usbip: vudc: check for NULL before use

2016-12-20 Thread Shuah Khan
udc = ep_to_vudc(ep); > if (!udc->driver) > return -ESHUTDOWN; > thanks, -- Shuah -- 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] usbip: vudc: check for NULL before use

2016-12-21 Thread Shuah Khan
Hi Sudip, On Wed, Dec 21, 2016 at 6:33 AM, Sudip Mukherjee wrote: > On Tue, Dec 20, 2016 at 07:31:44AM -0700, Shuah Khan wrote: >> On 12/18/2016 03:44 PM, Sudip Mukherjee wrote: >> > to_vep() is doing a container_of() on _ep. It is better to do the NULL >> >

Re: [PATCH v14 00/10] usbip: exporting devices

2016-12-26 Thread Shuah Khan
Hi Nobuo Iwata, On 12/26/2016 12:08 AM, Nobuo Iwata wrote: > Dear all, > > This series of patches adds exporting device operation to USB/IP. > > NOTE: > This patch set modifies only userspace codes in tools/usb/usbip. > Existing operation is still available. > New operation will not be enabled u

Re: [PATCH v2] tools: usb: usbip: Update README

2017-01-04 Thread Shuah Khan
On 12/20/2016 12:53 PM, Krzysztof Opasiak wrote: > Update README file: > - remove outdated parts > - clarify terminology and general structure > - add some description of vUDC > > Signed-off-by: Krzysztof Opasiak Thanks. Acked-by: Shuah Khan -- Shuah > --- > Changes

Re: [PATCH v8 1/2] usbip: vhci extension: modifications to userspace

2017-01-09 Thread Shuah Khan
On 12/26/2016 12:18 AM, Nobuo Iwata wrote: > Modification to the userspace tools including usbip/libsrc and > usbip/src. Modification to do what? Could you please write a concise change log describing what this patch does and why? Please note that the information in the cover-letter doesn't go in

Re: [PATCH v8 2/2] usbip: vhci extension: dynamic extension

2017-01-09 Thread Shuah Khan
n't summarize the changes. Please note that the information in the cover-letter doesn't go into this commit. It helps to have a clear change log so it is easier for me to review the patch. thanks, -- Shuah > > 1. kernel config > > Following parameters are added. > >

[PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-09 Thread Shuah Khan
Fix dwc3_exynos_probe() to call clk_prepare_enable() only when suspend clock is specified. Call clk_disable_unprepare() from remove and probe error path only when susp_clk has been set from remove and probe error paths. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/dwc3-exynos.c | 10

Re: [PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-10 Thread Shuah Khan
On 01/10/2017 05:05 AM, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Monday, January 09, 2017 07:21:31 PM Shuah Khan wrote: >> Fix dwc3_exynos_probe() to call clk_prepare_enable() only when suspend >> clock is specified. Call clk_disable_unprepare() from remove and

Re: [PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-10 Thread Shuah Khan
On 01/10/2017 07:16 AM, Shuah Khan wrote: > On 01/10/2017 05:05 AM, Bartlomiej Zolnierkiewicz wrote: >> >> Hi, >> >> On Monday, January 09, 2017 07:21:31 PM Shuah Khan wrote: >>> Fix dwc3_exynos_probe() to call clk_prepare_enable() only when

Re: [PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-10 Thread Shuah Khan
On 01/10/2017 04:20 AM, Sergei Shtylyov wrote: > Hello! > > On 01/10/2017 05:21 AM, Shuah Khan wrote: > >> Fix dwc3_exynos_probe() to call clk_prepare_enable() only when suspend >> clock is specified. Call clk_disable_unprepare() from remove and probe >> error pa

Re: [PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-10 Thread Shuah Khan
On 01/10/2017 09:05 AM, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Tuesday, January 10, 2017 07:36:35 AM Shuah Khan wrote: >> On 01/10/2017 07:16 AM, Shuah Khan wrote: >>> On 01/10/2017 05:05 AM, Bartlomiej Zolnierkiewicz wrote: >>>> >>>>

Re: [PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-10 Thread Shuah Khan
On 01/10/2017 11:23 AM, Bartlomiej Zolnierkiewicz wrote: > On Tuesday, January 10, 2017 07:03:57 PM Bartlomiej Zolnierkiewicz wrote: >> >> Hi, >> >> On Tuesday, January 10, 2017 11:23:38 PM Anand Moon wrote: >>> Hi Shuah, >>> >>> On 10 Januar

Re: [PATCH] usb: dwc3-exynos fix unspecified suspend clk error handling

2017-01-10 Thread Shuah Khan
On 01/10/2017 11:59 AM, Krzysztof Kozlowski wrote: > On Tue, Jan 10, 2017 at 11:37:24AM -0700, Shuah Khan wrote: >> On 01/10/2017 11:23 AM, Bartlomiej Zolnierkiewicz wrote: >>> I also think that regardless of what is decided on making susp_clk >>> non-optional for

[PATCH] usb: dwc3-exynos remove suspend clock unspecified debug message

2017-01-10 Thread Shuah Khan
dwc3-exynos prints debug message when suspend clock is not specified. The suspend clock is optional and driver can work without it. This debug message doesn't add any value and leads to confusion and concern. Remove it. Signed-off-by: Shuah Khan --- This patch is a result of the disussi

[PATCH] usb: dwc3-exynos fix axius clock error path to do cleanup

2017-01-10 Thread Shuah Khan
Axius clock error path returns without disabling clock and suspend clock. Fix it to disable them before returning error. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/dwc3-exynos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers

Re: [PATCH] usb: dwc3-exynos remove suspend clock unspecified debug message

2017-01-10 Thread Shuah Khan
On 01/10/2017 05:18 PM, Javier Martinez Canillas wrote: > Hello Shuah, > > On 01/10/2017 06:20 PM, Shuah Khan wrote: >> dwc3-exynos prints debug message when suspend clock is not specified. >> The suspend clock is optional and driver can work without it. >> >> T

Re: [PATCH] usb: dwc3-exynos fix axius clock error path to do cleanup

2017-01-10 Thread Shuah Khan
On 01/10/2017 05:27 PM, Javier Martinez Canillas wrote: > Hello Shuah, > > Patch looks good to me, I've just one comment. > > On 01/10/2017 08:05 PM, Shuah Khan wrote: >> Axius clock error path returns without disabling clock and suspend clock. >> Fix it to dis

Re: [PATCH] usb: dwc3-exynos fix axius clock error path to do cleanup

2017-01-10 Thread Shuah Khan
On 01/10/2017 05:32 PM, Javier Martinez Canillas wrote: > Hello Shuah, > > On 01/10/2017 09:30 PM, Shuah Khan wrote: > > [snip] > >>>>clk_disable_unprepare(exynos->axius_clk); >>>> +axius_clk_err: >>> >>> This label isn't

[PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names

2017-01-11 Thread Shuah Khan
Change goto labels to meaningful names from a series of errNs. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/dwc3-exynos.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index f7421c2

[PATCH] usb: dwc3-exynos Fix dma_mask WARN_ON from xhci_plat_probe()

2017-01-11 Thread Shuah Khan
] (__device_attach) from [] (bus_probe_devi) [3.644857] [] (bus_probe_device) from [] (deferred_prob) [3.653798] [] (deferred_probe_work_func) from [] (proce) Signed-off-by: Shuah Khan --- Arnd! I isolated the smallest change to avoid the WARN_ON. Please let me know if this problem could

Re: [PATCH] usb: dwc3-exynos Fix dma_mask WARN_ON from xhci_plat_probe()

2017-01-12 Thread Shuah Khan
On 01/12/2017 12:26 AM, Felipe Balbi wrote: > > Hi, > > Shuah Khan writes: >> During dwc3_exynos_probe(), WARN_ON(!pdev->dev.dma_mask) is triggered from >> xhci_plat_probe(). dwc3_host_init() doesn't configure DMA prior to adding >> the platform device. >

Re: [PATCH v14 01/10] usbip: exporting devices: modifications to network header

2017-01-12 Thread Shuah Khan
Maintain the indentation for the last entry. > uint32_t status; /* op_code status (for reply) */ > > } __attribute__((packed)); > @@ -93,7 +95,6 @@ struct op_export_request { > } __attribute__((packed)); > > struct op_export_reply { > - int returncode; > }

Re: [PATCH v14 02/10] usbip: exporting devices: modifications to host side libraries

2017-01-12 Thread Shuah Khan
On 12/26/2016 12:08 AM, Nobuo Iwata wrote: > Modifications to host driver wrapper and its related operations (i.e. > bind/unbind). Way too many changes in this one patch. > > usbip_get_device() method was not used. The implementation of the > method searches a bound devices list by list index.

Re: [PATCH v14 03/10] usbip: exporting devices: new connect operation

2017-01-12 Thread Shuah Khan
On 12/26/2016 12:08 AM, Nobuo Iwata wrote: > Implementation of new connect operation. This is linked as a part of > usbip command. With this patch, usbip command has following operations. > > bind > unbind > list (local/remote) > attach > detach > port > connect ... this patch Don't inclu

Re: [PATCH v14 04/10] usbip: exporting devices: new disconnect operation

2017-01-12 Thread Shuah Khan
On 12/26/2016 12:08 AM, Nobuo Iwata wrote: > Implementation of new disconnect operation. This is linked as a part of > usbip command. With this patch, usbip command has following operations. > > bind > unbind > list (local/remote) > attach > detach > port > connect ... previous patch > di

Re: [PATCH v14 09/10] usbip: exporting devices: chage to documenattion

2017-01-12 Thread Shuah Khan
On 12/26/2016 12:08 AM, Nobuo Iwata wrote: > This patch adds function and usage of new connect operation, disconnect > operation and application(vhci)-side daemon to README and manuals. This should be the first patch for the series. That would have saved me lot of time. Please move this patch up.

Re: [PATCH v14 02/10] usbip: exporting devices: modifications to host side libraries

2017-01-13 Thread Shuah Khan
On 01/13/2017 04:55 AM, Krzysztof Opasiak wrote: > > > On 01/12/2017 10:14 PM, Shuah Khan wrote: >> On 12/26/2016 12:08 AM, Nobuo Iwata wrote: >>> Modifications to host driver wrapper and its related operations (i.e. >>> bind/unbind). >> &g

[PATCH] tools: usb usbip - update README USB/IP driver location

2017-01-13 Thread Shuah Khan
Update USB/IP driver location in README. Signed-off-by: Shuah Khan --- tools/usb/usbip/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/usb/usbip/README b/tools/usb/usbip/README index 831f49f..f349ef4 100644 --- a/tools/usb/usbip/README +++ b/tools/usb/usbip

Re: [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names

2017-01-17 Thread Shuah Khan
On 01/16/2017 03:33 AM, Felipe Balbi wrote: > > Hi, > > Shuah Khan writes: >> Change goto labels to meaningful names from a series of errNs. >> >> Signed-off-by: Shuah Khan > > doesn't apply to testing/next, please rebase. > Hi Felipe, This patc

Re: [PATCH] tools: usb usbip - update README USB/IP driver location

2017-01-19 Thread Shuah Khan
On 01/19/2017 02:35 AM, Greg KH wrote: > On Fri, Jan 13, 2017 at 04:38:32PM -0700, Shuah Khan wrote: >> Update USB/IP driver location in README. >> >> Signed-off-by: Shuah Khan >> Reviewed-by: Krzysztof Opasiak >> --- >> tools/usb/usbip/README | 2 +

Re: [PATCH] tools: usb usbip - update README USB/IP driver location

2017-01-19 Thread Shuah Khan
On 01/19/2017 07:15 AM, Shuah Khan wrote: > On 01/19/2017 02:35 AM, Greg KH wrote: >> On Fri, Jan 13, 2017 at 04:38:32PM -0700, Shuah Khan wrote: >>> Update USB/IP driver location in README. >>> >>> Signed-off-by: Shuah Khan >>> Reviewed-by: Krzysztof

Re: USB Sound oops in Linus's latest tree

2016-03-18 Thread Shuah Khan
this problem - I can't find the link to this. It is coming in through Linux Media tree. thanks, -- Shuah The patch: With commit aebb2b89bff0 ("[media] sound/usb: Use Media Controller API to share media resources") an access to quirk->media_device without che

[PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names

2017-01-30 Thread Shuah Khan
Change goto labels to meaningful names from a series of errNs. Signed-off-by: Shuah Khan --- Rebased to usb-next drivers/usb/dwc3/dwc3-exynos.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3

Re: [PATCH] drivers: usb: usbip: Add missing break statement to switch

2017-02-09 Thread Shuah Khan
%x\n", > wValue); > Looks good to me. Acked-by: Shuah Khan thanks, -- Shuah -- 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 v4 1/2] usbip: Fix-format-overflow

2017-03-16 Thread Shuah Khan
eter Senna Tschudin > Signed-off-by: Jonathan Dieter Greg, Please pick this up. Acked-by: Shuah Khan thanks, -- Shuah > --- > Changes since v3 > * Cast sizeof to long unsigned when printing errors to fix building for > 32-bit >architectures > > tools/usb/usb

  1   2   3   4   >