On Aug 7, 2014, at 4:49 PM, Chris Cuthbert <nd6...@hotmail.com> wrote:

> Hi Andrew,
> 
> Sorry, is this what you are saying ?
> 
> Shell> disconnect 7a -r
> Error. Too many arguments specified.
> Shell> 
> 

It helps to look at the APIs

https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/Include/Uefi/UefiSpec.h
typedef
EFI_STATUS
(EFIAPI *EFI_CONNECT_CONTROLLER)(
  IN  EFI_HANDLE                    ControllerHandle,
  IN  EFI_HANDLE                    *DriverImageHandle,   OPTIONAL
  IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath, OPTIONAL
  IN  BOOLEAN                       Recursive
  );

typedef
EFI_STATUS
(EFIAPI *EFI_DISCONNECT_CONTROLLER)(
  IN  EFI_HANDLE                     ControllerHandle,
  IN  EFI_HANDLE                     DriverImageHandle, OPTIONAL
  IN  EFI_HANDLE                     ChildHandle        OPTIONAL
  );


So when you disconnect you have to disconnect all the children, before you 
disconnect your driver. When you connect you have the option or recursively 
connecting the children or not. 

This is why the connect/disconnect commands are not symmetric. 

Thanks,

Andrew Fish

> 
> From: af...@apple.com
> Date: Thu, 7 Aug 2014 16:43:55 -0700
> To: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] UEFI Shell Command "ifconfig" Error‏
> 
> 
> On Aug 7, 2014, at 4:37 PM, Chris Cuthbert <nd6...@hotmail.com> wrote:
> 
> Hi Laszlo,
> 
> The '-r' option only works for all drivers and not for individual drivers.
> 
> 
> I think the -r is down stream of the handle you are connecting. So if you 
> don’t pass DeviceHandle  then it is a connect all. If not it is down stream 
> of DeviceHandle.
> 
> Thanks,
> 
> Andrew Fish
> 
> 
> > Date: Fri, 8 Aug 2014 01:02:12 +0200
> > From: ler...@redhat.com
> > To: edk2-devel@lists.sourceforge.net
> > Subject: Re: [edk2] UEFI Shell Command "ifconfig" Error‏
> > 
> > On 08/08/14 00:39, Chris Cuthbert wrote:
> > > Hi Laszlo,
> > > 
> > > This is what is happening. When I boot the system and run 'devtree'
> > > shell command, I get the following. Parent @7A and child @7B.
> > > 
> > > Ctrl[33] PciRoot(0x2)
> > > Ctrl[78] PciRoot(0x2)/Pci(0x1,0x0)
> > > Ctrl[79] PciRoot(0x2)/Pci(0x2,0x0)
> > > Ctrl[7A] PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)
> > > Ctrl[7B] PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(121212121212,0x1)
> > > 
> > > Then I issue 'disconnect 7A' command and see the following.
> > > 
> > > Ctrl[33] PciRoot(0x2)
> > > Ctrl[78] PciRoot(0x2)/Pci(0x1,0x0)
> > > Ctrl[79] PciRoot(0x2)/Pci(0x2,0x0)
> > > Ctrl[7A] PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)
> > > 
> > > Then I issue 'connect 7A' and see the following from 'devtree' command.
> > > 
> > > Ctrl[33] PciRoot(0x2)
> > > Ctrl[78] PciRoot(0x2)/Pci(0x1,0x0)
> > > Ctrl[79] PciRoot(0x2)/Pci(0x2,0x0)
> > > Ctrl[7A] PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)
> > > Ctrl[89] PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(121212121212,0x1)
> > > 
> > > Now if I issue 'connect 89', then the MNP Support function will get
> > > called to bind the MNP driver to the SNP protocol produced by '89'.
> > > 
> > > Looks to me, that connecting the parent does not result in child handles
> > > being connected recursively.
> > 
> > Of course they won't be connected recursively if you don't request
> > recursive connecting! I specifically emphasized the -r (DASH R) option
> > of the "connect" shell command before. I referenced the -r option two
> > times. Please pay attention.
> > 
> > > This can happen if the child counting loop
> > > that is looking for protocol opened by child does not see the protocol
> > > opened by child.
> > 
> > It can also happen if that loop is not reached at all because you pass
> > Recursive=FALSE to CoreConnectController().
> > 
> > Laszlo
> > 
> > ------------------------------------------------------------------------------
> > Infragistics Professional
> > Build stunning WinForms apps today!
> > Reboot your WinForms applications with our WinForms controls. 
> > Build a bridge from your legacy apps to the future.
> > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls. 
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> ------------------------------------------------------------------------------
>  Infragistics Professional Build stunning WinForms apps today! Reboot your 
> WinForms applications with our WinForms controls. Build a bridge from your 
> legacy apps to the future. 
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________ edk2-devel mailing list 
> edk2-devel@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls. 
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to