R8 tracker sync:

Our UEFI Driver supports both SCSI Passthru (SPT) and Ext SCSI Passthru (That is our driver installs both SCSI Passthru and Ext SCSI Passthru). When we unload our driver SCSI Bus driver closes only ESPT and keeps SPT open. Due to this when I load my driver second time the SPT installation will fail and now attempting to unload will either crash the system or hang the system. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7906 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-03-19 07:03:01 +00:00
parent 533020ef80
commit 1e5914b54a
1 changed files with 14 additions and 0 deletions

View File

@ -531,12 +531,26 @@ SCSIBusDriverBindingStop (
// Close the bus driver
//
if (ScsiBusDev->ExtScsiSupport) {
//
// Close ExtPassThru Protocol from this controller handle
//
gBS->CloseProtocol (
Controller,
&gEfiExtScsiPassThruProtocolGuid,
This->DriverBindingHandle,
Controller
);
//
// When Start() succeeds to open ExtPassThru, it always tries to open PassThru BY_DRIVER.
// Its intent is to prevent another SCSI Bus Driver from woking on the same host handle.
// So Stop() needs to try to close PassThru if present here.
//
gBS->CloseProtocol (
Controller,
&gEfiScsiPassThruProtocolGuid,
This->DriverBindingHandle,
Controller
);
} else {
gBS->CloseProtocol (
Controller,