* USB GADGET: have a question about usb2eth @ 2016-10-15 9:19 Lipengcheng 2016-10-17 1:56 ` Peter Chen 0 siblings, 1 reply; 6+ messages in thread From: Lipengcheng @ 2016-10-15 9:19 UTC (permalink / raw) To: balbi@ti.com Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Hi, I have a question about usb2eth. In the function gen_ndis_set_resp of the rndis.c, the value of *params->filter may be 0x20 from the pc set command; Howerver the value is used cdc_filter = dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. If we do not judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is 0x20, the broadcast packet can not send the pc win7; At the result, the linux ping the win7 is slow an the first. Best Regard Pengcheng Li ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: USB GADGET: have a question about usb2eth 2016-10-15 9:19 USB GADGET: have a question about usb2eth Lipengcheng @ 2016-10-17 1:56 ` Peter Chen 2016-10-17 6:50 ` Lipengcheng 0 siblings, 1 reply; 6+ messages in thread From: Peter Chen @ 2016-10-17 1:56 UTC (permalink / raw) To: Lipengcheng Cc: balbi@ti.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org On Sat, Oct 15, 2016 at 09:19:33AM +0000, Lipengcheng wrote: > Hi, > I have a question about usb2eth. In the function gen_ndis_set_resp of the rndis.c, the value of *params->filter may be 0x20 from the pc set command; Howerver the value is used cdc_filter = dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. If we do not judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is 0x20, the broadcast packet can not send the pc win7; At the result, the linux ping the win7 is slow an the first. > The Felipe's email has changed, please check MAINTAINERS. Besides, would you wrap up line to 75 characters please? -- Best Regards, Peter Chen ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: USB GADGET: have a question about usb2eth 2016-10-17 1:56 ` Peter Chen @ 2016-10-17 6:50 ` Lipengcheng 2016-10-17 9:28 ` Felipe Balbi 0 siblings, 1 reply; 6+ messages in thread From: Lipengcheng @ 2016-10-17 6:50 UTC (permalink / raw) To: Peter Chen, balbi@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Hi, thank you for your suggestion. I have a question about usb2eth. In the function gen_ndis_set_resp of the rndis.c, the value of *params->filter may be 0x20 from the pc set command; Howerver the value is used cdc_filter = dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. If we do not judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is 0x20, the broadcast packet can not send the pc win7; At the result, the linux ping the win7 is slow an the first. At the same time, Why are different value between RNDIS_PACKET_TYPE_PROMISCUOUS and USB_CDC_PACKET_TYPE_PROMISCUOUS? If the value of RNDIS_PACKET_TYPE_PROMISCUOUS and USB_CDC_PACKET_TYPE_PROMISCUOUS is same, then the linux ping the win7 is normal speed. Best Regards Pengcheng Li > -----Original Message----- > From: Peter Chen [mailto:hzpeterchen@gmail.com] > Sent: Monday, October 17, 2016 9:56 AM > To: Lipengcheng > Cc: balbi@ti.com; gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: USB GADGET: have a question about usb2eth > > On Sat, Oct 15, 2016 at 09:19:33AM +0000, Lipengcheng wrote: > > Hi, > > I have a question about usb2eth. In the function gen_ndis_set_resp of the rndis.c, the value of *params->filter may be 0x20 from the pc > set command; Howerver the value is used cdc_filter = dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. If we do not > judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is 0x20, the broadcast packet can not send the pc win7; At the result, the linux > ping the win7 is slow an the first. > > > > The Felipe's email has changed, please check MAINTAINERS. > Besides, would you wrap up line to 75 characters please? > > -- > > Best Regards, > Peter Chen ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: USB GADGET: have a question about usb2eth 2016-10-17 6:50 ` Lipengcheng @ 2016-10-17 9:28 ` Felipe Balbi 2016-10-18 3:21 ` Lipengcheng 0 siblings, 1 reply; 6+ messages in thread From: Felipe Balbi @ 2016-10-17 9:28 UTC (permalink / raw) To: Lipengcheng, Peter Chen Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1276 bytes --] Hi, (please, avoid top-posting: http://daringfireball.net/2007/07/on_top) Lipengcheng <lpc.li@hisilicon.com> writes: > Hi, > thank you for your suggestion. > > I have a question about usb2eth. In the function gen_ndis_set_resp > of the rndis.c, the value of *params->filter may be 0x20 from the > pc set command; Howerver the value is used cdc_filter = > dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. > If we do not judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is > 0x20, the broadcast packet can not send the pc win7; At the result, > the linux ping the win7 is slow an the first. At the same time, Why are > different value between RNDIS_PACKET_TYPE_PROMISCUOUS and > USB_CDC_PACKET_TYPE_PROMISCUOUS? If the value of RNDIS_PACKET_TYPE_PROMISCUOUS because they are defined by different specifications. You should read both CDC specification from USB.org and RNDIS spec from Microsoft to understand the details of that. > and USB_CDC_PACKET_TYPE_PROMISCUOUS is same, then the linux ping the win7 is > normal speed. I don't understand what's going on here. Care to describe which kernel you're using, which USB peripheral controller, what is the actual problem you're trying to solve? -- balbi [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 800 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: USB GADGET: have a question about usb2eth 2016-10-17 9:28 ` Felipe Balbi @ 2016-10-18 3:21 ` Lipengcheng 2016-10-18 7:14 ` Felipe Balbi 0 siblings, 1 reply; 6+ messages in thread From: Lipengcheng @ 2016-10-18 3:21 UTC (permalink / raw) To: Felipe Balbi, Peter Chen Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org > -----Original Message----- > From: Felipe Balbi [mailto:balbi@kernel.org] > Sent: Monday, October 17, 2016 5:29 PM > To: Lipengcheng; Peter Chen > Cc: gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: USB GADGET: have a question about usb2eth > > > Hi, > > (please, avoid top-posting: http://daringfireball.net/2007/07/on_top) > > Lipengcheng <lpc.li@hisilicon.com> writes: > > Hi, > > thank you for your suggestion. > > > > I have a question about usb2eth. In the function gen_ndis_set_resp of > > the rndis.c, the value of *params->filter may be 0x20 from the pc set > > command; Howerver the value is used cdc_filter = > > dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. > > If we do not judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is > > 0x20, the broadcast packet can not send the pc win7; At the result, > > the linux ping the win7 is slow an the first. At the same time, Why > > are different value between RNDIS_PACKET_TYPE_PROMISCUOUS and > > USB_CDC_PACKET_TYPE_PROMISCUOUS? If the value of > > RNDIS_PACKET_TYPE_PROMISCUOUS > > because they are defined by different specifications. You should read both CDC specification from USB.org and RNDIS spec from Microsoft to > understand the details of that. Ok. I will understand the different both CDC specification from USB.org and RNDIS spec from Microsoft. They should have transformational rule in the linux code between CDC spe and RNDIS spe. Through debugging, I found there has been no conversion about the filter. I feel a little problem. I will find the rule. > > > and USB_CDC_PACKET_TYPE_PROMISCUOUS is same, then the linux ping the > > win7 is normal speed. > > I don't understand what's going on here. Care to describe which kernel you're using, which USB peripheral controller, what is the actual > problem you're trying to solve? VERSION = 3.18.20 USB peripheral controller: Synopsys HS OTG Linux Software Driver. It's not the standard linux code. But I think the controller do not have problem. The probem is that I am using one controller board with Linux running on it. I want to interface my device to the Host computer (Windows OS) through USB. I have driver ready at device side (linux) and the bridge has been established. The device side ping the Host computer is very slow at the first time. It spends a few minutes. The problem is the first ping takes too long time. Now I have a way to quickly ping at the first , but I do not know the risk about the change.I will continue debug the problem. If it is valuable, I will submit the kernel community. Thanks very much! > > -- > Balbi Best Regards Pengcheng Li ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: USB GADGET: have a question about usb2eth 2016-10-18 3:21 ` Lipengcheng @ 2016-10-18 7:14 ` Felipe Balbi 0 siblings, 0 replies; 6+ messages in thread From: Felipe Balbi @ 2016-10-18 7:14 UTC (permalink / raw) To: Lipengcheng, Peter Chen Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 3134 bytes --] Hi, Lipengcheng <lpc.li@hisilicon.com> writes: >> -----Original Message----- >> From: Felipe Balbi [mailto:balbi@kernel.org] >> Sent: Monday, October 17, 2016 5:29 PM >> To: Lipengcheng; Peter Chen >> Cc: gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org >> Subject: RE: USB GADGET: have a question about usb2eth >> >> >> Hi, >> >> (please, avoid top-posting: http://daringfireball.net/2007/07/on_top) >> >> Lipengcheng <lpc.li@hisilicon.com> writes: >> > Hi, >> > thank you for your suggestion. >> > >> > I have a question about usb2eth. In the function gen_ndis_set_resp of >> > the rndis.c, the value of *params->filter may be 0x20 from the pc set >> > command; Howerver the value is used cdc_filter = >> > dev->port_usb->cdc_filter in the function eth_start_xmit of the u_ether.c. >> > If we do not judge the RNDIS_PACKET_TYPE_PROMISCUOUS and the value is >> > 0x20, the broadcast packet can not send the pc win7; At the result, >> > the linux ping the win7 is slow an the first. At the same time, Why >> > are different value between RNDIS_PACKET_TYPE_PROMISCUOUS and >> > USB_CDC_PACKET_TYPE_PROMISCUOUS? If the value of >> > RNDIS_PACKET_TYPE_PROMISCUOUS >> >> because they are defined by different specifications. You should read both CDC specification from USB.org and RNDIS spec from Microsoft to >> understand the details of that. > Ok. I will understand the different both CDC specification from USB.org and RNDIS spec from Microsoft. They should have transformational rule in the linux code > between CDC spe and RNDIS spe. Through debugging, I found there has been no conversion about the filter. I feel a little problem. I will find the rule. >> >> > and USB_CDC_PACKET_TYPE_PROMISCUOUS is same, then the linux ping the >> > win7 is normal speed. >> >> I don't understand what's going on here. Care to describe which kernel you're using, which USB peripheral controller, what is the actual >> problem you're trying to solve? > > VERSION = 3.18.20 why not v4.9-rc1? We can't help you with your kernel in this forum, I reckon you realise that :-) > USB peripheral controller: Synopsys HS OTG Linux Software Driver. It's > not the standard linux code. But I think the controller do not have > problem. so you're not using drivers/usb/dwc2? > The probem is that I am using one controller board with Linux running > on it. I want to interface my device to the Host computer (Windows OS) > through USB. many have tried and succeeded before you :-) > I have driver ready at device side (linux) and the bridge has been > established. The device side ping the Host computer is very slow at > the first time. It spends a few minutes. The problem is the first ping > takes too long time. Now I have a way to quickly ping at the first , > but I do not know the risk about the change.I will continue debug the > problem. If it is valuable, I will submit the kernel community. Well, if you can reproduce the same problem with v4.8 or v4.9-rc1, then we'll be happy to review your patch. Thank you -- balbi [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 800 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-18 7:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-15 9:19 USB GADGET: have a question about usb2eth Lipengcheng 2016-10-17 1:56 ` Peter Chen 2016-10-17 6:50 ` Lipengcheng 2016-10-17 9:28 ` Felipe Balbi 2016-10-18 3:21 ` Lipengcheng 2016-10-18 7:14 ` Felipe Balbi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).