Skip to content

Commit

Permalink
[viostor] clean up pre-Win10 code
Browse files Browse the repository at this point in the history
Signed-off-by: Vadim Rozenfeld <[email protected]>
  • Loading branch information
vrozenfe committed Jan 17, 2024
1 parent c408c18 commit e1693d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 123 deletions.
107 changes: 0 additions & 107 deletions viostor/viostor_no_msi.inx

This file was deleted.

10 changes: 0 additions & 10 deletions viostor/virtio_stor.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,10 @@ CompleteDPC(
IN ULONG MessageID
);

#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
UCHAR FirmwareRequest(
IN PVOID DeviceExtension,
IN PSRB_TYPE Srb
);
#endif

VOID
ReportDeviceIdentifier(
Expand Down Expand Up @@ -576,9 +574,7 @@ VirtIoFindAdapter(
RhelDbgPrint(TRACE_LEVEL_FATAL, " pmsg_affinity = %p Status = %lu\n",adaptExt->pmsg_affinity, Status);
}

#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
adaptExt->fw_ver = '0';
#endif
return SP_RETURN_FOUND;
}

Expand Down Expand Up @@ -631,11 +627,9 @@ RhelSetGuestFeatures(
}
}

#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
if (CHECKBIT(adaptExt->features, VIRTIO_F_ACCESS_PLATFORM)) {
guestFeatures |= (1ULL << VIRTIO_F_ACCESS_PLATFORM);
}
#endif

if (CHECKBIT(adaptExt->features, VIRTIO_F_ANY_LAYOUT)) {
guestFeatures |= (1ULL << VIRTIO_F_ANY_LAYOUT);
Expand Down Expand Up @@ -917,12 +911,10 @@ VirtIoStartIo(
PSRB_IO_CONTROL srbControl = (PSRB_IO_CONTROL)srbDataBuffer;
UCHAR srbStatus = SRB_STATUS_INVALID_REQUEST;
switch (srbControl->ControlCode) {
#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
case IOCTL_SCSI_MINIPORT_FIRMWARE:
srbStatus = FirmwareRequest(DeviceExtension, (PSRB_TYPE)Srb);
RhelDbgPrint(TRACE_LEVEL_INFORMATION, " <--> IOCTL_SCSI_MINIPORT_FIRMWARE\n");
break;
#endif
default:
RhelDbgPrint(TRACE_LEVEL_INFORMATION, " <--> Unsupport control code 0x%x\n", srbControl->ControlCode);
break;
Expand Down Expand Up @@ -2159,7 +2151,6 @@ VioStorPoolAlloc(
return NULL;
}

#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
UCHAR FirmwareRequest(
IN PVOID DeviceExtension,
IN PSRB_TYPE Srb
Expand Down Expand Up @@ -2270,4 +2261,3 @@ UCHAR FirmwareRequest(

return srbStatus;
}
#endif
6 changes: 0 additions & 6 deletions viostor/virtio_stor.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ typedef struct VirtIOBufferDescriptor VIO_SG, *PVIO_SG;

#define VIOBLK_POOL_TAG 'BoiV'

#ifndef NTDDI_WINTHRESHOLD
#define NTDDI_WINTHRESHOLD 0x0A000000 /* ABRACADABRA_THRESHOLD */
#endif

#pragma pack(1)
typedef struct virtio_blk_config {
/* The capacity (in 512-byte sectors). */
Expand Down Expand Up @@ -250,9 +246,7 @@ typedef struct _ADAPTER_EXTENSION {
blk_discard_write_zeroes blk_discard[16];
REQUEST_LIST processing_srbs[MAX_CPU];
BOOLEAN reset_in_progress;
#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
ULONGLONG fw_ver;
#endif
#ifdef DBG
LONG srb_cnt;
LONG inqueue_cnt;
Expand Down

0 comments on commit e1693d5

Please sign in to comment.