From: Amit kumar <akamit91@hotmail.com>
To: "Tian, Feng" <feng.tian@intel.com>, Andrew Fish <afish@apple.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: DisconnectController API not working.
Date: Wed, 5 Apr 2017 03:38:00 +0000 [thread overview]
Message-ID: <MWHPR11MB1822804B06E8F551C810B730DC0A0@MWHPR11MB1822.namprd11.prod.outlook.com> (raw)
In-Reply-To: <7F1BAD85ADEA444D97065A60D2E97EE5699DD64D@SHSMSX101.ccr.corp.intel.com>
No i am not trying to disconnect USB controller in use.
________________________________
From: Tian, Feng <feng.tian@intel.com>
Sent: Wednesday, April 5, 2017 8:21:36 AM
To: Andrew Fish; Amit kumar
Cc: edk2-devel@lists.01.org; Tian, Feng
Subject: RE: [edk2] DisconnectController API not working.
Kumar,
Do "map -r" at first please.
PS: for the issue you encounter, are you trying to disconnect the usb controller in use? Please note at this time you are reading the file from usb key. It means the disconnect will never succeed.
Thanks
Feng
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Andrew Fish
Sent: Tuesday, April 4, 2017 12:07 AM
To: Amit kumar <akamit91@hotmail.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] DisconnectController API not working.
> On Apr 3, 2017, at 2:58 AM, Amit kumar <akamit91@hotmail.com> wrote:
>
> Hi Andrew ,
>
> I did some testing and found out, same code works fine on Server boards but it fails on desktop boards.
>
Servers tend to connect less things as it can take a long time.
> I Have double checked the ControllerHandle by printing its handle index using ConvertHandleToHandleIndex(ControllerHandle), the ControllerHandle looks correct.
>
>
> I have one new query;
>
> i have made a startup.nsh file in which i am issuing load driver.efi , i am getting file not found.
>
> i have also tried using load fs0:driver.efi, and again i get file not found. I have been trying to run this script from internal shell as well as usb shell.
>
Does that command work if you boot the shell?
Thanks,
Andrew Fish
>
> Regards
>
> Amit Kumar
>
> ________________________________
> From: afish@apple.com <afish@apple.com> on behalf of Andrew Fish
> <afish@apple.com>
> Sent: Friday, March 31, 2017 10:42:08 PM
> To: Amit kumar
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] DisconnectController API not working.
>
>
> On Mar 31, 2017, at 5:26 AM, Amit kumar <akamit91@hotmail.com<mailto:akamit91@hotmail.com>> wrote:
>
>
> Hi ,
>
> I am trying to disconnect a controller from the usb mass storage
> driver, for which i am using
>
> Status = gBS->DisconnectController (
> ControllerHandle,
> NULL,
> NULL
> );
>
> after the call i get Status = SUCCESS , but when i run drivers command in shell, i find it still being manged by the same old driver handle.
> Although when i run disconnect command from shell (e.g disconnect 163
> ...output disconnect(163,0,0):Status = SUCCESS) it works as expected and detaches the controller from the driver.
> Can some body point me out what could be the reason.
>
> Amit,
>
> It is always good to double check you are using the right ControllerHandle.
>
> Sequence of events matters. There are boot flows and Shell commands that do ConnectController.
> ~/work/src/edk2/ShellPkg(master)>git grep ConnectController
> Library/UefiShellDebug1CommandsLib/LoadPciRom.c:402: gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);
> Library/UefiShellDriver1CommandsLib/Connect.c:54: Status = gBS->ConnectController (Handle, NULL, RemainingDevicePath, FALSE);
> Library/UefiShellDriver1CommandsLib/Connect.c:95: gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE);
> Library/UefiShellDriver1CommandsLib/Connect.c:116:ConnectControllers (
> Library/UefiShellDriver1CommandsLib/Connect.c:150: // This is where we call the gBS->ConnectController function.
> Library/UefiShellDriver1CommandsLib/Connect.c:158: Status = gBS->ConnectController(*HandleWalker, DriverHandleList, NULL, Recursive);
> Library/UefiShellDriver1CommandsLib/Connect.c:167: Status = gBS->ConnectController(ControllerHandle, DriverHandleList, NULL, Recursive);
> Library/UefiShellDriver1CommandsLib/Connect.c:298: Status = gBS->ConnectController (
> Library/UefiShellDriver1CommandsLib/Connect.c:354:ConvertAndConnectCon
> trollers (
> Library/UefiShellDriver1CommandsLib/Connect.c:391: return (ConnectControllers(Handle1, Handle2, Recursive, Output, (BOOLEAN)(Handle2 != NULL && Handle1 != NULL)));
> Library/UefiShellDriver1CommandsLib/Connect.c:536: Status = ConvertAndConnectControllers(Handle1, Handle2, ShellCommandLineGetFlag(Package, L"-r"), (BOOLEAN)(Count!=0));
> Library/UefiShellDriver1CommandsLib/DrvCfg.c:492: EFI_HANDLE ConnectControllerContextOverride[2];
> Library/UefiShellDriver1CommandsLib/DrvCfg.c:514: ConnectControllerContextOverride[0] = DriverImageHandle;
> Library/UefiShellDriver1CommandsLib/DrvCfg.c:515: ConnectControllerContextOverride[1] = NULL;
> Library/UefiShellDriver1CommandsLib/DrvCfg.c:516: gBS->ConnectController (ControllerHandle, ConnectControllerContextOverride, NULL, TRUE);
> Library/UefiShellLevel2CommandsLib/Load.c:52: Status = gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);
>
>
> Thanks,
>
> Andrew Fish
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2017-04-05 3:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 12:26 DisconnectController API not working Amit kumar
2017-03-31 17:12 ` Andrew Fish
2017-04-03 9:58 ` Amit kumar
2017-04-03 16:07 ` Andrew Fish
2017-04-05 2:51 ` Tian, Feng
2017-04-05 3:38 ` Amit kumar [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-06-27 22:54 TVKR
2017-06-28 12:36 ` TVKR
2017-06-28 14:07 ` Amit kumar
2017-06-28 14:35 ` TVKR
2017-06-28 15:29 ` Amit kumar
2017-06-28 17:15 ` TVKR
2017-06-28 17:50 ` Amit kumar
2017-06-28 17:51 ` TVKR
2017-06-28 17:56 ` Amit kumar
2017-06-28 18:01 ` TVKR
2017-06-28 18:02 ` TVKR
2017-06-28 18:11 ` Amit kumar
2017-06-28 18:23 ` Amit kumar
2017-06-28 19:27 ` TVKR
2017-06-28 19:34 ` Andrew Fish
2017-06-28 19:37 ` Amit kumar
2017-06-28 19:53 ` TVKR
2017-06-29 19:58 ` TVKR
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=MWHPR11MB1822804B06E8F551C810B730DC0A0@MWHPR11MB1822.namprd11.prod.outlook.com \
--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