From 0f9f5421099d1dabed11d988b3144fb8f6bfed3b Mon Sep 17 00:00:00 2001 From: Owen Smith Date: Tue, 27 Oct 2015 11:15:42 +0000 Subject: [PATCH] Remove PdoPnpSrb, since StorPort doesn't call for targets Signed-off-by: Owen Smith SRB_FUNCTION_PNP case removed. Signed-off-by: Paul Durrant --- src/xenvbd/fdo.c | 21 --------------------- src/xenvbd/pdo.c | 27 --------------------------- src/xenvbd/pdo.h | 6 ------ 3 files changed, 54 deletions(-) diff --git a/src/xenvbd/fdo.c b/src/xenvbd/fdo.c index 724d8ea..9d1fb7d 100644 --- a/src/xenvbd/fdo.c +++ b/src/xenvbd/fdo.c @@ -1565,23 +1565,6 @@ FdoFindAdapter( return SP_RETURN_FOUND; } -static FORCEINLINE VOID -__FdoSrbPnp( - __in PXENVBD_FDO Fdo, - __in PSCSI_PNP_REQUEST_BLOCK Srb - ) -{ - if (!(Srb->SrbPnPFlags & SRB_PNP_FLAGS_ADAPTER_REQUEST)) { - PXENVBD_PDO Pdo; - - Pdo = __FdoGetPdo(Fdo, Srb->TargetId); - if (Pdo) { - PdoSrbPnp(Pdo, Srb); - PdoDereference(Pdo); - } - } -} - BOOLEAN FdoBuildIo( __in PXENVBD_FDO Fdo, @@ -1599,10 +1582,6 @@ FdoBuildIo( return TRUE; // dont pass to StartIo - case SRB_FUNCTION_PNP: - __FdoSrbPnp(Fdo, (PSCSI_PNP_REQUEST_BLOCK)Srb); - Srb->SrbStatus = SRB_STATUS_SUCCESS; - break; case SRB_FUNCTION_ABORT_COMMAND: Srb->SrbStatus = SRB_STATUS_ABORT_FAILED; break; diff --git a/src/xenvbd/pdo.c b/src/xenvbd/pdo.c index c0447db..172fa67 100644 --- a/src/xenvbd/pdo.c +++ b/src/xenvbd/pdo.c @@ -2210,33 +2210,6 @@ PdoStartIo( } } -VOID -PdoSrbPnp( - __in PXENVBD_PDO Pdo, - __in PSCSI_PNP_REQUEST_BLOCK Srb - ) -{ - switch (Srb->PnPAction) { - case StorQueryCapabilities: { - PSTOR_DEVICE_CAPABILITIES DeviceCaps = Srb->DataBuffer; - PXENVBD_CAPS Caps = FrontendGetCaps(Pdo->Frontend); - - if (Caps->Removable) - DeviceCaps->Removable = 1; - if (Caps->Removable) - DeviceCaps->EjectSupported = 1; - if (Caps->SurpriseRemovable) - DeviceCaps->SurpriseRemovalOK = 1; - - DeviceCaps->UniqueID = 1; - - } break; - - default: - break; - } -} - //============================================================================= // PnP Handler static FORCEINLINE VOID diff --git a/src/xenvbd/pdo.h b/src/xenvbd/pdo.h index fbd6681..1211174 100644 --- a/src/xenvbd/pdo.h +++ b/src/xenvbd/pdo.h @@ -212,12 +212,6 @@ PdoStartIo( __in PSCSI_REQUEST_BLOCK Srb ); -extern VOID -PdoSrbPnp( - __in PXENVBD_PDO Pdo, - __in PSCSI_PNP_REQUEST_BLOCK Srb - ); - // PnP Handler __checkReturn extern NTSTATUS -- 2.39.5