mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: VizXu <xujiweigo@163.com>, valentina.manea.m@gmail.com
Cc: shuah@kernel.org, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add code to support USBIP Project for Windows
Date: Mon, 18 Mar 2019 09:52:34 -0700	[thread overview]
Message-ID: <bc5c3cdb-2fa8-ba99-5bc8-31a367c1e040@infradead.org> (raw)
In-Reply-To: <1552927048-15857-1-git-send-email-xujiweigo@163.com>

On 3/18/19 9:37 AM, VizXu wrote:
> Signed-off-by: VizXu <xujiweigo@163.com>
> ---
>  drivers/usb/usbip/stub_dev.c     |  4 ++++
>  drivers/usb/usbip/stub_rx.c      | 37 +++++++++++++++++++++++++++++++++++++
>  drivers/usb/usbip/usbip_common.h | 16 ++++++++++++++++
>  3 files changed, 57 insertions(+)
> 

> diff --git a/drivers/usb/usbip/usbip_common.h b/drivers/usb/usbip/usbip_common.h
> index bf8afe9..b5189e6 100644
> --- a/drivers/usb/usbip/usbip_common.h
> +++ b/drivers/usb/usbip/usbip_common.h
> @@ -122,6 +122,17 @@ extern struct device_attribute dev_attr_usbip_debug;
>  #define USBIP_DIR_IN	0x01
>  
>  /**

This comment block is not kernel-doc notation so it should not begin
with /**.

> +* Support USBIP project for Windows: http://usbip.sourceforge.net/
> +*	The configuration is not initialized after an USB device bound in Linux
> +* 	and that would make Linux kernel crash if usbip.exe attach it.
> +*	I've analysized this process with wireshark and found that usbip.exe

	     analyzed

> +*	would not "SET CONFIGURATION Request". I suppose the process of loading
> +*	a USB device is different between Linux and Windows.
> +*	Make a usb_set_configuration at the first time would fix this issue.
> +*/
> +#define SUPPORT_WIN
> +
> +/**
>   * struct usbip_header_basic - data pertinent to every request
>   * @command: the usbip request type
>   * @seqnum: sequential number that identifies requests; incremented per
> @@ -257,6 +268,11 @@ struct usbip_device {
>  	spinlock_t lock;
>  
>  	int sockfd;
> +
> +#ifdef SUPPORT_WIN
> +	bool is_configured;
> +#endif
> +
>  	struct socket *tcp_socket;
>  
>  	struct task_struct *tcp_rx;
> 


-- 
~Randy

  reply	other threads:[~2019-03-18 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 16:37 VizXu
2019-03-18 16:52 ` Randy Dunlap [this message]
2019-03-18 17:42 ` Greg KH

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=bc5c3cdb-2fa8-ba99-5bc8-31a367c1e040@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=valentina.manea.m@gmail.com \
    --cc=xujiweigo@163.com \
    /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

all inboxes | Powered by JetHome®