Commit graph

142 commits

Author SHA1 Message Date
Victor Perevertkin 74ec94e12c [CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
2021-04-09 03:58:19 +03:00
Eric Kohl a959d6e473 [PARTMGR] Volume devices do not have compatible IDs and their instance IDs are not unique 2021-04-05 15:35:21 +02:00
Serge Gautherie 0cf1169dd0
[CDROM_NEW] CMakeLists.txt: Add cdrom.rc (#3513)
Addendum to 83b85e2.
CORE-17129
2021-03-08 19:10:43 +01:00
Nikolay Burshtyn 87a76a3b53
[CDROM_NEW][DISK_NEW] Add Russian translation (#3427) 2021-02-04 14:14:33 +03:00
Stanislav Motylkov df0261e799
[SCSIPORT] Append GEN_SCSIADAPTER compatible ID for legacy adapters (#3441)
Fixes UniATA root SCSI devices detection in the Device Manager.

Based on the description of GEN_SCSIADAPTER from Windows pnpscsi.inf:
- https://community.osr.com/discussion/41967/installing-isa-scsi-miniport-driver-through-f6-on-fresh-install-of-windows-2000-problem
- https://chat.reactos.org/reactos/pl/qii1w36wu7yrxyukh9b5dzwnje
- https://chat.reactos.org/reactos/pl/f5tanc9nfjdb5m17nhrq33994a

CORE-17398
2021-02-02 01:38:06 +03:00
Victor Perevertkin b0c931ac91
[PARTMGR] Remove hacks as PnP manager should not send bogus IRPs anymore 2021-01-27 05:15:16 +03:00
Victor Perevertkin 66cf1d20f4
[SCSIPORT] Use pointer alignment for MiniPortDeviceExtension
This seems logical and some miniport drivers (uniata) actually rely on
that.

CORE-17424
2021-01-17 01:46:35 +03:00
Jérôme Gardou c8d07514c8 [CMAKE] Fix GCC -fstack-protector usage 2021-01-05 13:38:57 +01:00
Stanislav Motylkov 8cf363feb1
[UNIATA] Fix one of INF sections that made device unrecognized
In fact, UniATA todo.txt file mentions it implicitly:
- 159.fix bug with invalid INF section under XP+    (43e2)

CORE-17398
2021-01-05 02:58:04 +03:00
Victor Perevertkin 06bff99edb
[I8042PRT][RAMDISK] Fix usage of the RegistryPath in DriverEntry
We can't rely on it being zero-terminated, so ensure that it's
duplicated first before usage in RtlQueryRegistryValues
2021-01-04 17:19:12 +03:00
Victor Perevertkin 9029f51d8c
[UNIATA] Reduce the stack usage in AtapiDmaInit 2021-01-04 16:43:23 +03:00
Stanislav Motylkov 88d36c93a2
[UNIATA] Properly mark ReactOS diff from upstream
Addendum to 4b9cf2e (r71252), d14a872 (r73324), 7d65f2a (r71262), and 6c0ff7b.

CORE-11157 CORE-16078
2020-12-31 22:14:39 +03:00
Stanislav Motylkov 0ed5db45a4
[UNIATA] Emulate SCSI INQUIRY to properly recognize Xbox DVD drives
CORE-16692
2020-12-31 15:54:42 +03:00
Victor Perevertkin 62a4f9d42b
[MOUNTMGR] Do not handle device removal notification
Do not treat target device change notification as
DEVICE_INTERFACE_CHANGE_NOTIFICATION. The notification have to be
unregistered while handling GUID_DEVICE_INTERFACE_REMOVAL, so
GUID_TARGET_DEVICE_REMOVE_COMPLETE should never be sent to mountmgr in a
normal case.

CORE-16106
2020-12-27 18:35:52 +03:00
Victor Perevertkin 97cf947919
[CDROM_NEW] Add the registry file to CMakeLists.txt
Addendum to 2f6abcc4c3
2020-12-19 21:41:52 +03:00
Victor Perevertkin 2f6abcc4c3
[CDROM_NEW] Add a registry file for use on livecd and setup 2020-12-19 21:24:24 +03:00
Victor Perevertkin f9f5a78715
[MOUNTMGR] Fix bugs in MountMgrQueryDosVolumePath
- Do not access uninitialized SymlinkInformation on failure case
  and just return
- Do not make an assumption that MOUNTMGR_TARGET_NAME has a zero-string
2020-12-16 01:13:57 +03:00
Eric Kohl f095ff418b [SCSIPORT] Append the missing "SCSI <device type> Device" string to the device description 2020-12-13 16:24:58 +01:00
Eric Kohl e64984cabb [SCSIPORT] Trim the Device ID and the Device Description
- Extend CopyField to support a default character and trimming.
- Use CopyField instead of CopyFieldTruncate.

CORE-17396
2020-12-12 12:46:11 +01:00
Eric Kohl 8ba87f972d [SCSIPORT] Fix the hardware IDs and remove the superfluous one 2020-12-10 23:25:06 +01:00
Eric Kohl 5099f24373 [SCSIPORT] Add the enumerator (SCSI) to the Compatible IDs 2020-12-09 23:58:12 +01:00
Jérôme Gardou b089903520 [SCSIPORT] Addendum to 58ad5d9e02 2020-12-09 12:40:51 +01:00
Jérôme Gardou 58ad5d9e02 [SCSIPORT] Fix locking the device extension.
From MSDN:
It is an error to call KeReleaseSpinLockFromDpcLevel if the specified spin lock was acquired by calling KeAcquireSpinLock because the caller's original IRQL is not restored, which can cause deadlocks or fatal page faults.
2020-12-09 12:24:23 +01:00
Victor Perevertkin da1f4ed6af
[SCSIPORT] Fix setting the "Driver" field in the DeviceMap\Scsi registry key 2020-12-08 01:32:15 +03:00
Victor Perevertkin 2d6c6fa38d
[PARTMGR] Register a disk interface for disk PDO
CORE-14187
2020-12-06 19:47:15 +03:00
Eric Kohl cac7b003c0 Implement IRP_MN_QUERY_DEVICE_TEXT.DeviceTextLocationInformation 2020-12-06 12:42:50 +01:00
Victor Perevertkin cbe88e287f
[USBSTOR][SCSIPORT] Use STORAGE_ADAPTER_DESCRIPTOR from WIN8
This way, these drivers are more compatible with classpnp and cdrom used
by ReactOS (and don't fire asserts)
2020-12-06 01:57:56 +03:00
Victor Perevertkin 139e8f5308
[BOOTDATA] Fix boot (addendum to dd56e065bc)
- GenCdRom is actually required now to be in CDDB
- Forgot to add partmgr registry keys

CORE-6264
2020-12-06 01:55:20 +03:00
Victor Perevertkin dd56e065bc
[REACTOS] Enable PnP storage stack
- Use PnP storage class drivers
- Make partmgr an upper filter driver for Disk class
- Fill upper filters in txtsetup and usetup/devinst
- Add cdrom driver to the critical device database

CORE-6264
2020-12-05 22:30:43 +03:00
Victor Perevertkin fb155b4ea4
[SCSIPORT] Fix Sense request sending
- Pass all SRB flags which Windows scsiport passes
- Correctly reset the queue after completion

This fixes the bug when MS cdrom driver hangs after media ejection
2020-12-05 22:28:54 +03:00
Victor Perevertkin a97c6e0aa9
[SCSIPORT] Make the driver PnP-aware
Basic functions are implemented in order to work in PnP stack,
only legacy (non-pnp) miniport drivers are supported.
Tested mostly with uniata

CORE-17132
2020-12-05 22:28:54 +03:00
Victor Perevertkin 15a7b9dd2f
[CLASSPNP][CDROM_NEW][DISK_NEW] Fix clang build
CORE-17129
2020-12-05 22:15:29 +03:00
Victor Perevertkin fe1b98fc36
[CLASSPNP] Fix amd64 build
CORE-17129
2020-12-05 22:15:10 +03:00
Victor Perevertkin eb682bbfab
[DISK_NEW] Various small fixes
- Silence a (possibly wrong) assert in DiskShutdownFlush
- Fix build with GCC and MSVC amd64

CORE-17129
2020-12-05 22:14:50 +03:00
Victor Perevertkin 99f16dc8a7
[STORAHCI] Do not put the driver onto cd
Meanwhile, fix add_registry_inf usage (it is really a driver inf)
2020-12-05 18:06:42 +03:00
Jérôme Gardou 6488440a6a [PARTMGR] Use FORCEINLINE 2020-11-16 16:58:10 +01:00
Jérôme Gardou 1f8db9824e [STORAHCI] Use FORCEINLINE instead of __inline 2020-11-16 16:58:10 +01:00
Victor Perevertkin 4fc9467815
[PARTMGR] Disable driver startup 2020-11-13 04:13:32 +03:00
Victor Perevertkin bd8226afe7
[PARTMGR] Add the Partition Manager driver
This driver works as complement to disk.sys/classpnp.sys from Windows 10
Manages partition PDOs and exposes them as volumes to mountmgr.sys.
The driver is almost complete, just some minor IOCTLs missing (will be
added on demand)
2020-11-13 03:04:15 +03:00
Victor Perevertkin bbfc515eb3
[MOUNTMGR] Volumes with NO_DRIVE_LETTER attribute should not be mounted, not the opposite 2020-11-12 19:19:27 +03:00
Victor Perevertkin b8525ce7a5
[MOUNTMGR] Fix ReparseFile concatenation in OnlineMountedVolumes
- ReparseFile was concatenated with itself, instead of ReparseIndex
- Meanwhile, use RtlAppendUnicodeStringToString for concatenating
  strings instead of raw memory operations
2020-11-08 23:32:25 +03:00
Victor Perevertkin ae72f18b55
[UNIATA] Add an inf file for UniATA Management Port 2020-11-03 23:23:35 +03:00
Victor Perevertkin da4ee18cc9
[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation
- Take a proper inf file for disk.sys
- Add class information into cdrom.inf
- Make a correct stub for storprop!DvdClassInstaller
2020-11-03 23:12:40 +03:00
Victor Perevertkin 5c7ce4475e
[REACTOS] Cleanup INIT and some PAGE section allocations
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
2020-11-02 21:45:31 +03:00
Victor Perevertkin ba447018c8
[MOUNTMGR] Move the driver to drivers/storage
Effectively mountmgr.sys is an essential part of the storage stack
2020-11-01 12:35:56 +03:00
Jérôme Gardou d6ea8659c8 [CMAKE] Get rid of the set_cpp macro
Instead of messing with global variables and the like, we introduce two target properties:
 - WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
 - WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
 - cpprt: for C++ runtime routines
 - cppstl: for the C++ standard template library

NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++

Finally, we manage the relevant flags with the ad-hoc generator expressions

So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
2020-10-20 21:44:54 +02:00
Victor Perevertkin 1b45d9ee4b
[SCSIPORT] Split scsiport.c file into several ones, prepare for the refactoring
CORE-17132
2020-10-17 04:06:36 +03:00
Victor Perevertkin 83b85e2124
[CDROM_NEW] Import Microsoft CDROM class driver from GitHub
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (microsoft/Windows-driver-samples@master/storage/class/cdrom/)
Synched with commit 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc
The driver is written for Windows 10 and uses KMDF so we compile it with ntoskrnl_vista
and wdf01000 statically linked (for wdf01000 this will likely be changed in future)

CORE-17129
2020-10-16 04:37:10 +03:00
Katayama Hirofumi MZ 1062a297bf [DRIVERS][SCSIPORT] Fix build fdc47e7 2020-09-26 11:20:11 +09:00
Victor Perevertkin fdc47e7ea7
[SCSIPORT][FORMATTING] Fix formatting and PCH generation 2020-09-26 03:47:52 +03:00