RE: usb device to ether is not identification in 64bit Windows OS

2016-09-18 Thread Lipengcheng
Hi,
In windows official web, download a new linux.inf file, and add our 
hisilicon usb id. Now it can be used correct identification in PC windows 64bit 
OS. At the same time, it can also be used correctly in PC windows 32bit OS.
windows official web: 
https://msdn.microsoft.com/zh-cn/windows/hardware/drivers/network/remote-ndis-inf-template
the new file(add hisilicon usb id):

; Remote NDIS template device setup file
; Copyright (c) Microsoft Corporation
;
; This is the template for the INF installation script  for the RNDIS-over-USB
; host driver that leverages the newer NDIS 6.x miniport (rndismp6.sys) for
; improved performance. This INF works for Windows 7, Windows Server 2008 R2,
; and later operating systems on x86, amd64 and ia64 platforms.

[Version]
Signature   = "$Windows NT$"
Class   = Net
ClassGUID   = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider= %Microsoft%
DriverVer   = 07/21/2008,6.0.6000.16384
;CatalogFile= device.cat

[Manufacturer]
%Microsoft% = RndisDevices,NTx86,NTamd64,NTia64

; Decoration for x86 architecture
[RndisDevices.NTx86]
%RndisDevice%= RNDIS.NT.6.0, USB\VID_0525_a4a2, 
USB\VID_1d6b_0104_00, USB\VID_0525_A4A2_0318

; Decoration for x64 architecture
[RndisDevices.NTamd64]
%RndisDevice%= RNDIS.NT.6.0, USB\VID_0525_a4a2, 
USB\VID_1d6b_0104_00, USB\VID_0525_A4A2_0318

; Decoration for ia64 architecture
[RndisDevices.NTia64]
%RndisDevice%= RNDIS.NT.6.0, USB\VID_0525_a4a2, 
USB\VID_1d6b_0104_00, USB\VID_0525_A4A2_0318

;@@@ This is the common setting for setup
[ControlFlags]
ExcludeFromSelect=*

; DDInstall section
; References the in-build Netrndis.inf
[RNDIS.NT.6.0]
Characteristics = 0x84   ; NCF_PHYSICAL + NCF_HAS_UI
BusType = 15
; NEVER REMOVE THE FOLLOWING REFERENCE FOR NETRNDIS.INF
include = netrndis.inf
needs   = usbrndis6.ndi
AddReg  = Rndis_AddReg
*IfType= 6; IF_TYPE_ETHERNET_CSMACD.
*MediaType = 16   ; NdisMediumNative802_11
*PhysicalMediaType = 14   ; NdisPhysicalMedium802_3

; DDInstal.Services section
[RNDIS.NT.6.0.Services]
include = netrndis.inf
needs   = usbrndis6.ndi.Services

; Optional registry settings. You can modify as needed.
[RNDIS_AddReg] 
HKR, NDI\params\RndisProperty, ParamDesc,  0, %Rndis_Property%
HKR, NDI\params\RndisProperty, type,   0, "edit"
HKR, NDI\params\RndisProperty, LimitText,  0, "12"
HKR, NDI\params\RndisProperty, UpperCase,  0, "1"
HKR, NDI\params\RndisProperty, default,0, " "
HKR, NDI\params\RndisProperty, optional,   0, "1"

; No sys copyfiles - the sys files are already in-build 
; (part of the operating system).

; Modify these strings for your device as needed.
[Strings]
Microsoft = "Microsoft Corporation"
RndisDevice   = "Remote NDIS6 based Device"
Rndis_Property = "Optional RNDIS Property"

> -Original Message-
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 19, 2016 12:46 AM
> To: Lipengcheng
> Cc: cor...@lwn.net; linux-...@vger.kernel.org; linux-doc@vger.kernel.org; 
> linux-ker...@vger.kernel.org
> Subject: Re: usb device to ether is not identification in 64bit Windows OS
> 
> On Sun, Sep 18, 2016 at 01:16:59PM +, Lipengcheng wrote:
> > Hi,
> > kernel version:4.8.0
> > file:Documentation / usb / linux.inf
> > problem:PC windows is 32bit OS, using Ethernet gadget driver, it can
> > be correct identification. But PC windows is 64bit OS, while modifying
> > linux.inf file LinuxDevice parameters, it can not correct
> > identification, the serial port can be printed correctly:g_ether
> > gadget: high-speed config # 2: RNDIS. I suspect that the linux.inf
> > files are not mismatch 64bit windows OS.
> 
> Given that everyone here does not use Windows at all, you are going to be on 
> your own here, sorry.  If you do come up with an updated .inf
> file, we will be glad to take a patch.
> 
> good luck,
> 
> greg k-h

Best regards,
Pengcheng Li


Re: [PATCH v10 3/3] Documentation: kdump: add description of enable multi-cpus support

2016-09-18 Thread Baoquan He
On 09/19/16 at 12:01pm, Baoquan He wrote:
> From: Zhou Wenjian 
> 
> Multi-cpu support is useful to improve the performance of kdump in
> some cases. So add the description of enable multi-cpu support in
> dump-capture kernel.
> 
> Signed-off-by: Zhou Wenjian 
> Acked-by: Baoquan He 
> Acked-by: Xunlei Pang 
> Signed-off-by: Baoquan He 

Oh, sorry. My git config caused this Signed-off-by adding automatically.
Will resend. Nack this patchset.

> ---
>  Documentation/kdump/kdump.txt | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
> index f7ef340..b0eb27b 100644
> --- a/Documentation/kdump/kdump.txt
> +++ b/Documentation/kdump/kdump.txt
> @@ -396,6 +396,13 @@ Notes on loading the dump-capture kernel:
>Note, though maxcpus always works, you had better replace it with
>nr_cpus to save memory if supported by the current ARCH, such as x86.
>  
> +* You should enable multi-cpu support in dump-capture kernel if you intend
> +  to use multi-thread programs with it, such as parallel dump feature of
> +  makedumpfile. Otherwise, the multi-thread program may have a great
> +  performance degradation. To enable multi-cpu support, you should bring up 
> an
> +  SMP dump-capture kernel and specify maxcpus/nr_cpus, disable_cpu_apicid=[X]
> +  options while loading it.
> +
>  * For s390x there are two kdump modes: If a ELF header is specified with
>the elfcorehdr= kernel parameter, it is used by the kdump kernel as it
>is done on all other architectures. If no elfcorehdr= kernel parameter is
> -- 
> 2.5.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v10 1/3] docs: kernel-parameter : Improve the description of nr_cpus and maxcpus

2016-09-18 Thread Baoquan He
>From the old description people still can't get what's the exact
difference between nr_cpus and maxcpus. Especially in kdump kernel
nr_cpus is always suggested if it's implemented in ARCH. The reason
is nr_cpus is used to limit the max number of possible cpu in system,
the sum of already plugged cpus and hot plug cpus can't exceed its
value. However maxcpus is used to limit how many cpus are allowed to
be brought up during bootup.

Signed-off-by: Baoquan He 
---
 Documentation/kernel-parameters.txt | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index a4f4d69..98d6406 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2161,10 +2161,13 @@ bytes respectively. Such letter suffixes can also be 
entirely omitted.
than or equal to this physical address is ignored.
 
maxcpus=[SMP] Maximum number of processors that an SMP kernel
-   should make use of.  maxcpus=n : n >= 0 limits the
-   kernel to using 'n' processors.  n=0 is a special case,
-   it is equivalent to "nosmp", which also disables
-   the IO APIC.
+   will bring up during bootup.  maxcpus=n : n >= 0 limits
+   the kernel to bring up 'n' processors. Surely after
+   bootup you can bring up the other plugged cpu by 
executing
+   "echo 1 > /sys/devices/system/cpu/cpuX/online". So 
maxcpus
+   only takes effect during system bootup.
+   While n=0 is a special case, it is equivalent to 
"nosmp",
+   which also disables the IO APIC.
 
max_loop=   [LOOP] The number of loop block devices that get
(loop.max_loop) unconditionally pre-created at init time. The default
@@ -2773,9 +2776,12 @@ bytes respectively. Such letter suffixes can also be 
entirely omitted.
 
nr_cpus=[SMP] Maximum number of processors that an SMP kernel
could support.  nr_cpus=n : n >= 1 limits the kernel to
-   supporting 'n' processors. Later in runtime you can not
-   use hotplug cpu feature to put more cpu back to online.
-   just like you compile the kernel NR_CPUS=n
+   support 'n' processors. It could be larger than the
+   number of already plugged CPU during bootup, later in
+   runtime you can physically add extra cpu until it 
reaches
+   n. So during boot up some boot time memory for per-cpu
+   variables need be pre-allocated for later physical cpu
+   hot plugging.
 
nr_uarts=   [SERIAL] maximum number of UARTs to be registered.
 
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v10 2/3] Documentation: kdump: remind user of nr_cpus

2016-09-18 Thread Baoquan He
From: Zhou Wenjian 

nr_cpus can help to save memory. So we should remind user of it.

Signed-off-by: Zhou Wenjian 
Acked-by: Baoquan He 
Acked-by: Xunlei Pang 
Signed-off-by: Baoquan He 
---
 Documentation/kdump/kdump.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 88ff63d..f7ef340 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -393,6 +393,8 @@ Notes on loading the dump-capture kernel:
 * We generally don' have to bring up a SMP kernel just to capture the
   dump. Hence generally it is useful either to build a UP dump-capture
   kernel or specify maxcpus=1 option while loading dump-capture kernel.
+  Note, though maxcpus always works, you had better replace it with
+  nr_cpus to save memory if supported by the current ARCH, such as x86.
 
 * For s390x there are two kdump modes: If a ELF header is specified with
   the elfcorehdr= kernel parameter, it is used by the kdump kernel as it
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v10 3/3] Documentation: kdump: add description of enable multi-cpus support

2016-09-18 Thread Baoquan He
From: Zhou Wenjian 

Multi-cpu support is useful to improve the performance of kdump in
some cases. So add the description of enable multi-cpu support in
dump-capture kernel.

Signed-off-by: Zhou Wenjian 
Acked-by: Baoquan He 
Acked-by: Xunlei Pang 
Signed-off-by: Baoquan He 
---
 Documentation/kdump/kdump.txt | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index f7ef340..b0eb27b 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -396,6 +396,13 @@ Notes on loading the dump-capture kernel:
   Note, though maxcpus always works, you had better replace it with
   nr_cpus to save memory if supported by the current ARCH, such as x86.
 
+* You should enable multi-cpu support in dump-capture kernel if you intend
+  to use multi-thread programs with it, such as parallel dump feature of
+  makedumpfile. Otherwise, the multi-thread program may have a great
+  performance degradation. To enable multi-cpu support, you should bring up an
+  SMP dump-capture kernel and specify maxcpus/nr_cpus, disable_cpu_apicid=[X]
+  options while loading it.
+
 * For s390x there are two kdump modes: If a ELF header is specified with
   the elfcorehdr= kernel parameter, it is used by the kdump kernel as it
   is done on all other architectures. If no elfcorehdr= kernel parameter is
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v10 0/3] Documentation: add description of enable multi-cpus support for kdump

2016-09-18 Thread Baoquan He
This is v10 post. In this patchset patch 1/3 is added to give more details
about nr_cpus and maxcpus in kernel-parameters.txt. This is suggested by
Jonathan since the description of them is unclear so that people can't see
what's the exact difference between them. Otherwise no big further change
for 2/3 and 3/3 which comprise the old post.

Please access below link to check the previous changelog.
https://lkml.org/lkml/2016/8/17/646

Baoquan He (1):
  docs: kernel-parameter : Improve the description of nr_cpus and
maxcpus

Zhou Wenjian (2):
  Documentation: kdump: remind user of nr_cpus
  Documentation: kdump: add description of enable multi-cpus support

 Documentation/kdump/kdump.txt   |  9 +
 Documentation/kernel-parameters.txt | 20 +---
 2 files changed, 22 insertions(+), 7 deletions(-)

-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usb device to ether is not identification in 64bit Windows OS

2016-09-18 Thread gre...@linuxfoundation.org
On Sun, Sep 18, 2016 at 01:16:59PM +, Lipengcheng wrote:
> Hi,
> kernel version:4.8.0
> file:Documentation / usb / linux.inf
> problem:PC windows is 32bit OS, using Ethernet gadget driver, it can
> be correct identification. But PC windows is 64bit OS, while modifying
> linux.inf file LinuxDevice parameters, it can not correct
> identification, the serial port can be printed correctly:g_ether
> gadget: high-speed config # 2: RNDIS. I suspect that the linux.inf
> files are not mismatch 64bit windows OS.

Given that everyone here does not use Windows at all, you are going to
be on your own here, sorry.  If you do come up with an updated .inf
file, we will be glad to take a patch.

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: pyc files in source dir with O=

2016-09-18 Thread Markus Heiser

Am 07.09.2016 um 15:28 schrieb Jani Nikula :

> On Wed, 07 Sep 2016, Geert Uytterhoeven  wrote:
>> When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
>> in the source tree instead of in the build tree:
>> 
>>$ git ls-files -o
>>Documentation/sphinx/kernel-doc.pyc
>>Documentation/sphinx/kernel_include.pyc
>>Documentation/sphinx/rstFlatTable.pyc
>>$
>> 
>> This is with v4.8-rc5.
>> 
>> With next-20160907, two more files appear:
>> 
>>Documentation/sphinx/cdomain.pyc
>>Documentation/sphinx/load_config.pyc
> 
> This should help
> 
> diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
> index 92deea30b183..a4cba2d1aaf1 100644
> --- a/Documentation/Makefile.sphinx
> +++ b/Documentation/Makefile.sphinx
> @@ -53,6 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
> 
> quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
>   cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) 
> $(build)=Documentation/media all;\
> + PYTHONDONTWRITEBYTECODE=1 \
>   BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath 
> $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
>   $(SPHINXBUILD) \
>   -b $2 \
> 
> 
> Side note, I'm really sad the Sphinx build has grown so ugly and
> complicated now. :(

Hi Jani, I feel guilty about this ... 

the "sub-folder" build functionality brought some complexity to
the cmd_sphinx. In the hope, that it helps a bit, I added a small
comment on top ...

# $2 sphinx builder e.g. "html"
# $3 name of the build subfolder / e.g. "media", used as:
#* dest folder relative to $(BUILDDIR) and
#* cache folder relative to $(BUILDDIR)/.doctrees
# $4 dest subfolder e.g. "man" for man pages at media/man
# $5 reST source folder relative to $(srctree)/$(src),
#e.g. "media" for the linux-tv book-set at ./Documentation/media

quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
  cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) 
$(build)=Documentation/media all;\
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath 
$(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(SPHINXBUILD) \
-b $2 \
-c $(abspath $(srctree)/$(src)) \
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
$(ALLSPHINXOPTS) \
$(abspath $(srctree)/$(src)/$5) \
$(abspath $(BUILDDIR)/$3/$4);

But you are right, it is very compact / complicated.

--Markus--

> 
> BR,
> Jani.
> 
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
> --
> To unsubscribe from this list: send the line "unsubscribe linux-doc" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


usb device to ether is not identification in 64bit Windows OS

2016-09-18 Thread Lipengcheng
Hi,
kernel version:4.8.0
file:Documentation / usb / linux.inf
problem:PC windows is 32bit OS, using Ethernet gadget driver, it can be correct 
identification. But PC windows is 64bit OS, while modifying linux.inf file 
LinuxDevice parameters, it can not correct identification, the serial port can 
be printed correctly:g_ether gadget: high-speed config # 2: RNDIS. I suspect 
that the linux.inf files are not mismatch 64bit windows OS.

Best regards,
Pengcheng Li