Commit graph

121 commits

Author SHA1 Message Date
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
Victor Perevertkin d01518da7c
[XDK] Add definitions required for newer storage class drivers (cdrom)
That introduced some warnings in the current code which were corrected as well

CORE-17129
2020-09-24 22:30:52 +03:00
Serge Gautherie 889b077b23
[REACTOS] *.spec: Fix some function/parameter types (#3154) 2020-09-20 19:21:11 +02:00
Dmitry Borisov 0f8de896aa
[PCIIDEX] Implement missing PciIdeXDebugPrint function (#3146)
It's useful for debugging IDE controller minidrivers, and it makes pciidex.sys work on Windows XP/2003.
- https://user-images.githubusercontent.com/37072976/92856412-39d56b80-f415-11ea-880f-48998c11112d.png

CORE-17256
2020-09-15 15:10:52 +03:00
Kyle Katarn 038daa6367
[SHELL32][PAINT][DRIVERS][SHELLEXT] French translation update (#3092)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-03 15:16:44 +02:00
Victor Perevertkin f144b8c10d
[DISK_NEW] Import Microsoft Disk class driver from GitHub
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (https://github.com/microsoft/Windows-driver-samples/tree/master/storage/class/disk/)
Synched with commit 3428c5feaac7c1a5e2a09db0ed93392f7568f9e6
The driver is written for Windows 8+, so we compile it with ntoskrnl_vista
statically linked and with NTDDI_WIN8 defined

CORE-17129
2020-08-30 03:43:14 +03:00
Victor Perevertkin fa8ce680d4
[CLASSPNP] Add the license text along with the driver
Addendum to bf1b3cb175
2020-08-30 03:40:37 +03:00
Victor Perevertkin bf1b3cb175
[CLASSPNP] Import Microsoft SCSI class driver from GitHub
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (https://github.com/microsoft/Windows-driver-samples/tree/master/storage/class/classpnp/)
Synched with commit 88541f70c4273ecd30c8c7c72135bc038a00fd88
The driver is written for Windows 8+, so we compile it with ntoskrnl_vista
statically linked and with NTDDI_WIN8 defined

CORE-17129
2020-08-29 06:06:22 +03:00
Victor Perevertkin c57350e295
[CLASSPNP][DISK_NEW][CDROM_NEW] Remove the drivers
Due to WDK/DDK licensing issues

CORE-17129
2020-08-28 05:47:27 +03:00
Stanislav Motylkov 27ad576ff1
[RAMDISK] Add Russian (ru-RU) translation to INF file
Addendum to c166933.
2020-08-27 02:36:27 +03:00
Adam Słaboń c166933135
[RAMDISK] Add setup information file for the ramdisk driver (#3100) 2020-08-27 01:28:31 +03:00
Joachim Henze 011a9e2ae8 [SCSIPORT] Demote a noisy DPRINT1 to DPRINT CORE-17200
It started to spam when more components of the MountMgr
were coded during 0.4.14dev.

According to Victor Perevertkin it is not crucial for us
to see it, as those are 'optional MountMgr features'.
Imho this points towards unimplemented stuff.

No official ros release has been affected, because I did
revert most of the new MountMgr features for 0.4.14release
earlier.
2020-08-15 12:50:45 +02:00
Trevor Thompson b338fb7beb [CLASS2]: Set DiskSize member of deviceExtension->DiskGeometry in ScsiClassReadDriveCapacity(). Consolidate code and comment for setting media capacity in bytes. CORE-17166 2020-07-21 01:21:16 +03:00
Serge Gautherie 89971a3757
[CDFS][FLOPPY_NEW] Simplify unsupported NT6.2+ workarounds (#2956) 2020-07-18 15:31:48 +02:00
Amine Khaldi 139a3d6661
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905 2020-06-06 21:58:41 +03:00
Joachim Henze 6c0ff7bd84 [UNIATA] Workaround regression CORE-16078, booting broke on specific Intel Z170
JIRA-user "Illen" reported booting from his Z170 controller worked up to
0.4.12-dev-936-g89aaf0e
and would refuse booting - beginning with uniata commit
0.4.12-dev-937-g
b546130731

For sure this workaround is just a temporary and no proper solution,
but was confirmed to be working by "Illen".
We have no clear understanding of the real bug yet.
Can be replaced by something better at any time.
It was already committed into 0.4.12, 0.4.13, 0.4.14.
We never had an affected release therefore.

Since no one took care of this bug ever,
the workaround will now be committed to master as well.

cherry picked from commit 0.4.13-RC-9-g
11178f38e4
2020-05-12 21:13:21 +02:00
Serge Gautherie 8ae1702a16
[PCIIDEX] Increase command port length to 8 from 7. CORE-9922 (#2711)
Co-Authored-By: Vadim Galyant <vgal@rambler.ru>
2020-05-07 10:16:18 +03:00
Victor Perevertkin 019f21ee1d
[MEDIA][CMAKE] Create add_driver_inf cmake function
*.inf files for drivers can now be placed along with the driver code
2020-04-26 20:28:04 +03:00
Victor Perevertkin 7e069ccdb2
[CMAKE] Replace custom functions to built-in ones
add_target_compile_definitions -> target_compile_definitions
add_target_compile_flags -> target_compile_options
add_target_include_directories -> target_include_directories
2020-04-16 15:59:38 +03:00
Hervé Poussineau f5658fd3b4 [STORAHCI] Replace some __inline by FORCEINLINE
Functions were declared as __inline, then used, and then defined.
This leads to some linking errors with some compilers.
2020-03-26 16:39:16 +01:00
Serge Gautherie 82d2f13cea [FLOPPY_NEW] WindowsSync to 8fb512a (#2238)
* [FLOPPY_NEW] Make 6 '#ifdef' explicit about '__REACTOS__'

* [FLOPPY_NEW] RtlStringCbPrintf?() need bytes, not chars

Import
8fb512ac67
2020-01-14 18:50:19 +01:00
Thomas Faber 0d745e0698
[DISK_NEW] Return correct info size in failure case of DiskIoctlGetPartitionInfoEx. 2020-01-02 16:36:15 +01:00