public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <richardho@ami.com>,
	"'Rebecca Cran'" <rebecca@quicinc.com>
Cc: "'Andrew Fish'" <afish@apple.com>,
	"'Leif Lindholm'" <quic_llindhol@quicinc.com>,
	"'Michael D Kinney'" <michael.d.kinney@intel.com>,
	"'Michael Kubacki'" <michael.kubacki@microsoft.com>,
	"'Zhiguang Liu'" <zhiguang.liu@intel.com>,
	"'TonyLo [羅金松]'" <TonyLo@ami.com>
Subject: 回复: 回复: [edk2-devel] [PATCH] UsbNetworkPkg: add USB network devices support
Date: Fri, 23 Sep 2022 15:17:43 +0800	[thread overview]
Message-ID: <02b101d8cf1c$92cf9060$b86eb120$@byosoft.com.cn> (raw)
In-Reply-To: <DM5PR10MB1660F3E2BB41D9FF6616A589B0519@DM5PR10MB1660.namprd10.prod.outlook.com>

Richard: 
  We are investigating how to get MAC address in USB RNDIS device from open BMC.

  For this patch, I find some definitions in Edk2\UsbNetworkPkg\Include\Protocol\UsbEthernetProtocol.h are from the industry spec. 
  I suggest to move those definitions to new file in Edk2\MdePkg\Include\IndustryStandard directory.

  And, for RNDIS driver, I suggest you update the description to specify how it gets network information. 

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 RichardHo
> [何明忠] via groups.io
> 发送时间: 2022年9月23日 13:54
> 收件人: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io;
> 'Rebecca Cran' <rebecca@quicinc.com>
> 抄送: 'Andrew Fish' <afish@apple.com>; 'Leif Lindholm'
> <quic_llindhol@quicinc.com>; 'Michael D Kinney'
> <michael.d.kinney@intel.com>; 'Michael Kubacki'
> <michael.kubacki@microsoft.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>;
> TonyLo [羅金松] <TonyLo@ami.com>
> 主题: Re: 回复: [edk2-devel] [PATCH] UsbNetworkPkg: add USB network
> devices support
> 
> Hi Liming,
> 
> RNDIS specification is not defines this.
> We're follow the ECM (5.4 Ethernet Networking Functional Descriptor) and
> NCM (5.2.1 NCM Functional Descriptor)specification to implement RNDIS
> driver.
> 
> If RNDIS device has other way to know the networking functional information.
> We could implement the code to GetUsbHeaderFunDescriptor,
> GetUsbUnionFunDescriptor, and GetUsbRndisFunDescriptor routine.
> 
> Thanks,
> Richard
> 
> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: 2022年9月23日 1:03 PM
> To: devel@edk2.groups.io; RichardHo [何明忠] <RichardHo@ami.com>;
> 'Rebecca Cran' <rebecca@quicinc.com>
> Cc: 'Andrew Fish' <afish@apple.com>; 'Leif Lindholm'
> <quic_llindhol@quicinc.com>; 'Michael D Kinney'
> <michael.d.kinney@intel.com>; 'Michael Kubacki'
> <michael.kubacki@microsoft.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>;
> TonyLo [羅金松] <TonyLo@ami.com>
> Subject: [EXTERNAL] 回复: [edk2-devel] [PATCH] UsbNetworkPkg: add USB
> network devices support
> 
> 
> **CAUTION: The e-mail below is from an external source. Please exercise
> caution before opening attachments, clicking links, or following guidance.**
> 
> Richard:
>   We also verify USB RNDIS module with open BMC. It reports USB RNDIS
> device descriptor type is USB_DESC_TYPE_INTERFACE (0x04). It is not
> supported by Rndis module.
> 
>   But in UsbNetworkPkg\Include\Protocol\UsbEthernetProtocol.h, it defines
> CS_INTERFACE as 0x24. Rndis module only supports this descriptor type.
> 
>   So, I want to confirm which specification defines device descriptor type
> 0x24 and its related structure HEADER_FUN_DESCRIPTOR/
> UNION_FUN_DESCRIPTOR/ ETHERNET_FUN_DESCRIPTOR.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 RichardHo
> > [何明忠] via groups.io
> > 发送时间: 2022年9月7日 13:31
> > 收件人: Rebecca Cran <rebecca@quicinc.com>; devel@edk2.groups.io
> > 抄送: Andrew Fish <afish@apple.com>; Leif Lindholm
> > <quic_llindhol@quicinc.com>; Michael D Kinney
> > <michael.d.kinney@intel.com>; Michael Kubacki
> > <michael.kubacki@microsoft.com>; Zhiguang Liu
> > <zhiguang.liu@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> > TonyLo [羅金松]
> > <TonyLo@ami.com>
> > 主题: Re: [edk2-devel] [PATCH] UsbNetworkPkg: add USB network devices
> > support
> >
> > Hi Rebecca,
> >
> > We didn't check it in QEMU.
> > Is QEMU report standard USB RNDIS protocol?
> >
> > We only test it in physical device. Below is device lists.
> >
> > USB RNDIS:
> > AST2500    : BMC report the RNDIS device
> >
> > USB NCM:
> > DisplayLink HIS USB3.0 Portable Dock(DisplayLink (UK) Ltd.) Vendor ID:
> > 0x17E9 Product ID: 0x4301
> >
> > USB ECM:
> > DM9621(Davicom Semiconductor, Inc.)
> > Vendor ID: 0x0A46
> > Product ID: 0x1269
> >
> > Thanks,
> > Richard
> >
> > -----Original Message-----
> > From: Rebecca Cran <rebecca@quicinc.com>
> > Sent: 2022年9月6日 11:05 PM
> > To: devel@edk2.groups.io; RichardHo [何明忠] <RichardHo@ami.com>
> > Cc: Andrew Fish <afish@apple.com>; Leif Lindholm
> > <quic_llindhol@quicinc.com>; Michael D Kinney
> > <michael.d.kinney@intel.com>; Michael Kubacki
> > <michael.kubacki@microsoft.com>; Zhiguang Liu
> > <zhiguang.liu@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> > TonyLo [羅金松]
> > <TonyLo@ami.com>
> > Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] UsbNetworkPkg: add USB
> > network devices support
> >
> >
> > **CAUTION: The e-mail below is from an external source. Please
> > exercise caution before opening attachments, clicking links, or following
> guidance.
> **
> >
> > Is it expected that this will work with QEMU (with the usb-net fixes
> > from
> > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> > u
> b.com%2Fmcb30%2Fqemu%2Ftree%2Fusbnet3&amp;data=05%7C01%7Crich
> >
> ardho%40ami.com%7C1dd20e124cd64659b4e908da90193dd3%7C27e97857
> >
> e15f486cb58e86c2b3040f93%7C1%7C0%7C637980735342252066%7CUnkno
> >
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> >
> aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=xHRQc%2Fnv7fP
> > k%2BPEVavIlfFpaXj6Gq8NiHUsRdd5HD%2Fc%3D&amp;reserved=0),
> > for example using the SBSA-REF machine for Arm or OVMF for X64?
> >
> > I'm adding the following parameters to QEMU:
> >
> > -netdev user,id=net0,net=192.168.10.0/24,dhcpstart=192.168.10.1
> > -device
> > usb-net,netdev=net0
> >
> >
> > On OVMF I get the following crash when loading UsbRndis.efi after
> > NetworkCommon.efi:
> >
> > Support(): UNDI3.1 found on handle 6550D18
> > Support(): supported on 6550D18
> > Start(): UNDI3.1 found
> > !!!! X64 Exception Type - 06(#UD - Invalid Opcode)  CPU Apic ID -
> > 00000000 !!!!
> > RIP  - 00000000000B0001, CS  - 0000000000000038, RFLAGS -
> > 0000000000000283 RAX  - 000000000653AF80, RCX - 00000000065DC382,
> RDX
> > - 0000000000005441 RBX  - 00000000065D8000, RSP -
> 0000000007E8EA48,
> > RBP - 00000000065DB001 RSI  - 0000000000000048, RDI -
> 0000000006CE82C0
> > R8   - 0000000007E8EA60, R9  - 0000000007E8EAD0, R10 -
> > 0000000007E8E804
> > R11  - 0000000000000000, R12 - 8000000000000003, R13 -
> > 0000000000000001
> > R14  - 0000000006CEE640, R15 - 0000000000000006
> > DS   - 0000000000000030, ES  - 0000000000000030, FS  -
> > 0000000000000030
> > GS   - 0000000000000030, SS  - 0000000000000030
> > CR0  - 0000000080010033, CR2 - 0000000000000000, CR3 -
> > 0000000007C01000
> > CR4  - 0000000000000668, CR8 - 0000000000000000
> > DR0  - 0000000000000000, DR1 - 0000000000000000, DR2 -
> > 0000000000000000
> > DR3  - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 -
> > 0000000000000400 GDTR - 00000000079DE000 0000000000000047, LDTR
> -
> > 0000000000000000
> > IDTR - 000000000753C018 0000000000000FFF,   TR - 0000000000000000
> > FXSAVE_STATE - 0000000007E8E6A0
> > !!!! Can't find image information. !!!!
> >
> >
> > On Arm, I don't get a crash but no network interface gets created.
> > I've checked the QEMU RNDIS interface is working: if I boot to Linux I
> > can
> get
> > an IP address and communicate with the outside world.
> >
> > --
> > Rebecca Cran
> >
> >
> > On 9/1/22 23:24, RichardHo [何明忠] via groups.io wrote:
> > > UsbNetworkPkg provides network functions for USB ACM, USB NCM, and
> > USB
> > > RNDIS network device.
> > >
> > > Signed-off-by: Richard Ho <richardho@ami.com>
> > > Cc: Andrew Fish <afish@apple.com>
> > > Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Michael Kubacki <michael.kubacki@microsoft.com>
> > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Reviewed-by: Tony Lo <tonylo@ami.com>
> > > ---
> > >   UsbNetworkPkg/Config/UsbNetworkPkg.inc.dsc    |    9 +
> > >   .../Config/UsbNetworkPkgComponentsDxe.inc.dsc |   20 +
> > >   .../Config/UsbNetworkPkgComponentsDxe.inc.fdf |   20 +
> > >   .../Config/UsbNetworkPkgDefines.inc.dsc       |   23 +
> > >   .../Include/Protocol/UsbEthernetProtocol.h    |  872 +++++++++
> > >   UsbNetworkPkg/NetworkCommon/ComponentName.c   |  264 +++
> > >   UsbNetworkPkg/NetworkCommon/DriverBinding.c   |  583 ++++++
> > >   UsbNetworkPkg/NetworkCommon/DriverBinding.h   |  263 +++
> > >   UsbNetworkPkg/NetworkCommon/NetworkCommon.inf |   43 +
> > >   UsbNetworkPkg/NetworkCommon/PxeFunction.c     | 1734
> > +++++++++++++++++
> > >   UsbNetworkPkg/ReadMe.md                       |   65 +
> > >   UsbNetworkPkg/ReleaseNotes.md                 |   11 +
> > >   UsbNetworkPkg/UsbCdcEcm/ComponentName.c       |  170 ++
> > >   UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.c           |  504
> +++++
> > >   UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.h           |  211 ++
> > >   UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.inf         |   41 +
> > >   UsbNetworkPkg/UsbCdcEcm/UsbEcmFunction.c      |  861
> > ++++++++
> > >   UsbNetworkPkg/UsbCdcNcm/ComponentName.c       |  170 ++
> > >   UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.c           |  508
> +++++
> > >   UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.h           |  245 +++
> > >   UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.inf         |   41 +
> > >   UsbNetworkPkg/UsbCdcNcm/UsbNcmFunction.c      |  946
> > +++++++++
> > >   UsbNetworkPkg/UsbNetworkPkg.dec               |   32 +
> > >   UsbNetworkPkg/UsbRndis/ComponentName.c        |  172 ++
> > >   UsbNetworkPkg/UsbRndis/UsbRndis.c             |  848
> ++++++++
> > >   UsbNetworkPkg/UsbRndis/UsbRndis.h             |  569 ++++++
> > >   UsbNetworkPkg/UsbRndis/UsbRndis.inf           |   41 +
> > >   UsbNetworkPkg/UsbRndis/UsbRndisFunction.c     | 1587
> > +++++++++++++++
> > >   28 files changed, 10853 insertions(+)
> > >   create mode 100644 UsbNetworkPkg/Config/UsbNetworkPkg.inc.dsc
> > >   create mode 100644
> > UsbNetworkPkg/Config/UsbNetworkPkgComponentsDxe.inc.dsc
> > >   create mode 100644
> > UsbNetworkPkg/Config/UsbNetworkPkgComponentsDxe.inc.fdf
> > >   create mode 100644
> > UsbNetworkPkg/Config/UsbNetworkPkgDefines.inc.dsc
> > >   create mode 100644
> > UsbNetworkPkg/Include/Protocol/UsbEthernetProtocol.h
> > >   create mode 100644
> > UsbNetworkPkg/NetworkCommon/ComponentName.c
> > >   create mode 100644
> UsbNetworkPkg/NetworkCommon/DriverBinding.c
> > >   create mode 100644
> UsbNetworkPkg/NetworkCommon/DriverBinding.h
> > >   create mode 100644
> > UsbNetworkPkg/NetworkCommon/NetworkCommon.inf
> > >   create mode 100644 UsbNetworkPkg/NetworkCommon/PxeFunction.c
> > >   create mode 100644 UsbNetworkPkg/ReadMe.md
> > >   create mode 100644 UsbNetworkPkg/ReleaseNotes.md
> > >   create mode 100644 UsbNetworkPkg/UsbCdcEcm/ComponentName.c
> > >   create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.c
> > >   create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.h
> > >   create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbCdcEcm.inf
> > >   create mode 100644 UsbNetworkPkg/UsbCdcEcm/UsbEcmFunction.c
> > >   create mode 100644
> UsbNetworkPkg/UsbCdcNcm/ComponentName.c
> > >   create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.c
> > >   create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.h
> > >   create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbCdcNcm.inf
> > >   create mode 100644 UsbNetworkPkg/UsbCdcNcm/UsbNcmFunction.c
> > >   create mode 100644 UsbNetworkPkg/UsbNetworkPkg.dec
> > >   create mode 100644 UsbNetworkPkg/UsbRndis/ComponentName.c
> > >   create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndis.c
> > >   create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndis.h
> > >   create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndis.inf
> > >   create mode 100644 UsbNetworkPkg/UsbRndis/UsbRndisFunction.c
> >
> > -The information contained in this message may be confidential and
> > proprietary to American Megatrends (AMI). This communication is
> > intended
> to
> > be read only by the individual or entity to whom it is addressed or by
> their
> > designee. If the reader of this message is not the intended recipient,
> > you
> are
> > on notice that any distribution of this message, in any form, is
> > strictly prohibited. Please promptly notify the sender by reply e-mail
> > or by
> telephone
> > at 770-246-8600, and then delete or destroy all copies of the
> transmission.
> >
> >
> >
> >
> 
> 
> 
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is intended to
> be read only by the individual or entity to whom it is addressed or by their
> designee. If the reader of this message is not the intended recipient, you are
> on notice that any distribution of this message, in any form, is strictly
> prohibited. Please promptly notify the sender by reply e-mail or by telephone
> at 770-246-8600, and then delete or destroy all copies of the transmission.
> 
> 
> 
> 




  reply	other threads:[~2022-09-23  7:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02  5:24 [PATCH] UsbNetworkPkg: add USB network devices support RichardHo [何明忠]
2022-09-02 21:48 ` [edk2-devel] " Rebecca Cran
2022-09-09  7:06   ` Chang, Abner
2022-09-12  3:48     ` RichardHo [何明忠]
2022-09-12  7:55       ` Chang, Abner
2022-09-21  2:34         ` RichardHo [何明忠]
2022-09-22 12:52           ` Chang, Abner
2022-09-06 15:05 ` Rebecca Cran
2022-09-07  5:31   ` RichardHo [何明忠]
2022-09-07 17:46     ` Rebecca Cran
2022-09-23  5:03     ` 回复: " gaoliming
2022-09-23  5:54       ` RichardHo [何明忠]
2022-09-23  7:17         ` gaoliming [this message]
2022-11-26 18:56 ` Rebecca Cran
2022-11-28  5:24   ` RichardHo [何明忠]
2022-12-05  3:14 ` Rebecca Cran
2022-12-06  9:15   ` RichardHo [何明忠]

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-list 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='02b101d8cf1c$92cf9060$b86eb120$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /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