Commit graph

1089 commits

Author SHA1 Message Date
Thomas Faber ec1eb52ebf
[PORTCLS] Do not rely on operator new to zero memory.
The standard operator new does not do this, and GCC will in fact
optimize out any zeroing done in the operator.
2022-02-15 08:43:05 -05:00
Hermès Bélusca-Maïto 78a7d7dc32
[CMIDRIVER] Remove useless Visual Studio resource editor file. 2022-02-12 16:21:32 +01:00
Hermès Bélusca-Maïto f73c0e08e2
[FDEBUG][CMIDRIVER] Add missing psdk dependency for user-mode code. 2022-02-12 16:21:30 +01:00
Hermès Bélusca-Maïto 9f201d462d
[BLUE][CONSRV][USETUP] Completely remove support for CAB font extraction from driver, and move it to CONSRV, much like what was done for USETUP.
Addendum to aaa416d3 and 2391e31c.
2022-01-15 17:41:36 +01:00
Serge Gautherie fdcefaa7cb [HDAUDBUS] HDA_PdoPnp(): Remove a redundant ASSERT()
Addendum to cf7fc81 (r68311).
2022-01-08 18:00:38 +03:00
Serge Gautherie cba4fd57d0 [KS] KsServiceBusEnumPnpRequest(): Remove a redundant ASSERT()
Addendum to c6b26fa (r50531).
2022-01-08 18:00:38 +03:00
Stanislav Motylkov 84cc81ee29
[NTOS:KE/x64] Detect CPU vendor properly and store value in PRCB
Also generate processor identifier properly based on this value
on the Configuration Manager machine-dependent initialization.

Update processor driver INF file accordingly.

CORE-17970 CORE-14922
2022-01-05 18:28:40 +03:00
Victor Perevertkin 951e52104a
[HDAUDBUS] Fix uninitialized variable usage 2022-01-05 03:22:15 +03:00
Michael Stamper 378294a7df
[PORTCLS] Fix races, fix WavePci Port Drivers
- Split buffers on page to prevent non-contiguous memory being passed to driver.
- Protect CIrpQueue::GetMappingWithTag, ReleaseMappingWithTag with spinlock to prevent race conditions
  (GetMapping, ReleaseMapping do not need spinlock, they are only called from a service routine).
- Remove ASSERT in CIrpQueue::ReleaseMappingWithTag, when mappings are released out of order. Just ignore
  the tag argument and release the next one in the list. This is what windows does, confirmed by calling
  PortWavePciStream::ReleaseMapping() with tag argument set to 0, absolutly no difference observed.
  Allowing out of order release is essential given that a driver is not permitted to hold a spinlock when calling
  ReleaseMapping().
- Remove IIrpQueue::HasLastMappingFailed(), it never worked and there is no way it could work.
  CPortPinWavePci::HandleKsStream() call MappingAvailable() non-conditionally, this is what Windows does,
  verified by debug prints in ac97 driver.
- Implement CIrpQueue::NumData().
- Remove incorrect interlocked operations/volatile variables and several (now unused) class fields.
2022-01-05 03:20:44 +03:00
Victor Perevertkin 7ed1883c8e
[DRIVERS] Use IoForwardIrpSynchronously in drivers
Instead of having an own routine in each driver
IoForwardIrpSynchronously can be used.
2022-01-05 02:17:56 +03:00
Stanislav Motylkov 6ebe2ed3a1
[UNIATA] Fix packing for port configuration information structures
Now it's consistent with our structure in sdk/include/ddk/srb.h.
Thanks to Hervé Poussineau for help with problem analysis.

Also MSDN doesn't say anything about the structure packing:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/srb/ns-srb-_port_configuration_information

CORE-17966
2022-01-04 14:30:27 +03:00
Victor Perevertkin 1a6bd2704a
[SCSIPORT] Reduce and improve debug printing 2021-12-28 04:23:51 +03:00
Serge Gautherie 5ba5051f79 [FLTMGR] CreateClientPort(): Fix ObInsertObject() error handling
Avoid extra ObDereferenceObject().

CORE-17904
2021-12-28 02:27:50 +03:00
Scott Maday 99a6d03786
[I8042PRT] Add Latitude D820 to the hack list (#4185)
Fixes the Dell Latitude D820 TouchPad not working.
2021-12-25 03:07:33 +01:00
Ronny Borchert 9d33a2056e
[NTFS][UDFS] Fix build with NDEBUG undefined (#4171)
- Fix DumpBTreeNode() parameters in ntfs/btree.c
- Comment out unused variable in env_spec.cpp
- Fix missed brackets in else clause in wcache_lib.cpp
2021-12-20 21:19:53 +01:00
Hervé Poussineau ac5536aa48 [SCSIPORT] Ignore LUNs not supported by the adapter
CORE-17641
2021-12-17 11:09:23 +01:00
Dmitry Borisov 3f97671319
[E1000] Minor improvements (#3904)
- Add support for 64-bit counters (Intel gigabit NICs)
- Properly handle OIDs
- Check that the packet filter is not 0
- Performance increase
2021-12-14 01:57:33 +03:00
Serge Gautherie cd991e3d63 [UNIATA] Fix copy-pasta on 5 Promise device ids
Addendum to 5783342 (r62493).
CORE-17898
2021-12-09 17:10:09 +03:00
Stanislav Motylkov 07c534c863
[BOOTDATA][USBSTOR] Add device definitions for SFF-8070i (ARMD-style devices)
Confirmed working with our usbstor driver by Vort.

CORE-17895
2021-12-08 17:52:07 +03:00
Thomas Faber 0af3689c2e
[REACTOS] Fix traces with missing arguments.
Courtesy of VS Code Analysis warning C6064:
Missing integer argument to 'DbgPrint' that corresponds to conversion specifier 'N'.
2021-11-21 12:57:35 -05:00
Dmitry Borisov 84fabd819d [ISAPNP] Add support for NEC PC-98 series 2021-11-17 13:56:29 +03:00
Hervé Poussineau 06fc9c43ed [PARTMGR] Mark partitions as removable if device is removable
CORE-17392
2021-10-30 08:47:38 +02:00
Thomas Faber fb3e2c7c8b
[USBUHCI] Fix always-false HcFlavor checks.
Powered by clang-cl.
2021-10-27 19:27:33 -04:00
Thomas Faber 555eec0306
[USBEHCI] Avoid uninitialized return status in EHCI_ReopenEndpoint.
Powered by clang-cl.
2021-10-27 19:27:33 -04:00
Thomas Faber e7574ee5e8
[USBPORT] Don't use NTAPI for variadic function.
Powered by clang-cl.
2021-10-27 19:27:33 -04:00
Thomas Faber 4be3bc682d
[SACDRV] Fix uninitialized variable usage.
Powered by clang-cl.
2021-10-27 19:27:32 -04:00
Thomas Faber 4eb45209ea
[NDIS] Allow timer initialization at DISPATCH_LEVEL.
Spotted by Mortal Wombat.
2021-10-27 19:27:27 -04:00
Efe Itietie c73c86419e
[USBUHCI] Fix wrong sizeof access (#4070)
Reviewed-by: Victor Perevertkin <victor.perevertkin@reactos.org>
Reviewed-by: Thomas Faber <thomas.faber@reactos.org>
2021-10-26 17:10:51 +03:00
Efe Itietie feae6fbc64
[USBEHCI] Fix coverity #1476930 "Wrong sizeOf access" (#4070)
Reviewed-by: Victor Perevertkin <victor.perevertkin@reactos.org>
Reviewed-by: Thomas Faber <thomas.faber@reactos.org>
2021-10-26 17:10:51 +03:00
Doug Lyons a91f5e8e4d
[UDFS] Fix crash on boot in release builds with UDFS removable media inserted (#4061) CORE-17598
Changes to specific files and their effects are as follows:
create.cpp - Allows booting past second stage with UDFS media inserted without BSOD
close.cpp - Allows shutdown without hang
dircntrl.cpp - Allows New Hardware Wizard not to hang on initial third phase install
2021-10-25 22:21:43 +02:00
Hervé Poussineau ac13f37d0a [ISAPNP] Generate a name for PDO, as required 2021-10-14 23:39:30 +02:00
Victor Perevertkin 55f1f3000a
[CMAKE] Remove /fallback compile flag from clang-cl builds
This option is not needed anymore and was removed from LLVM 13
2021-10-14 20:30:27 +03:00
Süleyman Poyraz 05c39d8d62
[TRANSLATION] Update Turkish (tr-TR) translations (#3958)
Reviewed-by: Can Taşan <ctasan99@hotmail.com>
Signed-off-by: Süleyman Poyraz <zaryob.dev@gmail.com>
2021-10-10 16:00:12 +03:00
Hervé Poussineau 7fdf078134 [UNIATA] Better split of model name between Vendor and Product
UNIATA is converting IDE identify data into SCSI identify data.
However, IDE model is described with a unique field of 20 chars,
while SCSI model is described with 2 fields of 16 + 8 chars.
When displaying SCSI model, a space is added between vendor and product
fields.

Try to split model into vendor and product on a space if possible.

CORE-17400
2021-10-03 23:09:55 +02:00
Hermès Bélusca-Maïto 38ce67162f
[FS_REC] Fix load-lock acquisition. 2021-09-26 03:02:56 +02:00
Hermès Bélusca-Maïto 618076dc47
[FS_REC] Register a recognizer for FAT filesystem on CD-ROMs.
This handles the \FatCdrom device, supported by MS fastfat.
2021-09-26 03:02:56 +02:00
Hermès Bélusca-Maïto 9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Hermès Bélusca-Maïto 9b1edceae1
[REACTOS] Fix some instances of DPRINTs with trailing whitespace before newlines. 2021-09-13 03:52:19 +02:00
Eric Kohl d389a5d10c [KBDHID] Fix returned Status for IOCTL_KEYBOARD_QUERY_*
Addendum to 6249d5ede31ee6ba81f8b0cde94f5c8f875fd9a.
2021-09-12 23:36:18 +02:00
Eric Kohl b6249d5ede [KBDHID] IOCTL_KEYBOARD_QUERY_ATTRIBUTES: Return proper KEYBOARD_ATTRIBUTES buffer size 2021-09-12 16:33:35 +02:00
Eric Kohl f81fb355ae [KBDHID] Implement IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION 2021-09-12 14:40:26 +02:00
Eric Kohl c1de553eba KBDHID: IOCTL_KEYBOARD_QUERY_* calls must return STATUS_BUFFER_TOO_SMALL if the output buffer is too small 2021-09-12 14:33:15 +02:00
Timo Kreuzer 0535332a69 [FASTFAT_NEW] "Fix" Flags bitfield to avoid RTC error
Since VS 16.11 the compiler sometimes emits calls to _RTC_UninitUse, when parts of a bitfield are initialized (See https://developercommunity.visualstudio.com/t/Broken-runtime-checks-with-CL-19293013/1503629). Fix this by using an ULONG instead of a bitfield.
Note: The structure uses a 24 bit bitfield plus an UCHAR, which is supposed to form a 32 bit field, but that doesn't work anyway.
2021-09-11 18:31:50 +02:00
Thomas Faber 0a656b574e
[ACPICA] Update to version 20210730. CORE-17760 2021-09-11 10:48:30 -04:00
Thomas Faber 3c2845607c
[ACPICA] Update to version 20210604. CORE-17760 2021-09-11 10:48:30 -04:00
Thomas Faber 6eb8cc4979
[ACPICA] Update to version 20210331. CORE-17760 2021-09-11 10:48:29 -04:00
Thomas Faber 05926c7ac5
[ACPICA] Update to version 20210105. CORE-17760 2021-09-11 10:48:17 -04:00
Julen Urizar Compains ea6e774050
[TRANSLATION] Fix minor typos and untranslated dialogs in Spanish (#3890)
- usetup: New bootsector page.
- shell32: Copy and paste, and moving elements.
  Also, some strings related to the shutdown and logoff.
- Minor Spanish grammar fix - some female words and minor latin american typos.
- First revision of the .inf, that includes the translation of the Services,
  audio, processors and other drivers and minor things.
2021-09-04 17:22:41 +03:00
Victor Perevertkin 3927ad9d47
[SFLOPPY] Move storage/floppy_new -> storage/class/sfloppy
This is a SCSI Floppy driver, which depends on classpnp.
Don't mix that with the other floppy (FDC) stack.
2021-08-08 02:42:34 +03:00
Victor Perevertkin 3088717b3f
[CDROM][DISK] Remove "_new" suffix from cdrom and disk drivers 2021-08-08 02:42:34 +03:00
Victor Perevertkin 49444127fd
[CDROM][CLASS2][DISK] Remove the old class drivers stack
These drivers are based on NT4 DDK sample code, were originally
started by Alexey Bragin and then constantly patched by Pierre
Schweitzer to fix compatibility with NT5+ storage stack.
Replaced with Microsoft drivers published on GitHub by an open
license.
These drivers were originally added as part of 4e7b22b216
2021-08-08 02:42:30 +03:00
Marat Nagayev 240dc77e42 [NTFS] Check file isn't encrypted 2021-08-04 16:07:18 +03:00
Marat Nagayev 9be382ec98 [NTFS] Add new defines for file attributes 2021-08-04 16:07:18 +03:00
Victor Perevertkin 49cfac17c5
[FFS] Remove the FFS/UFS driver
The upstream driver is not maintained and the file system itself
is in a semi-abandoned state.
Originally imported at 3a3ef631d1

The driver is written by Lee Jae-Hong, updated by Bo Brantén.
ReactOS porting made by Peter Hater and Pierre Schweitzer.
Follow updates at http://www.acc.umu.se/~bosse/

FS Recognizer code is left to keep the FS support as an
installable driver.

CORE-11040
2021-07-30 17:14:57 +03:00
Victor Perevertkin 2e2190df57
[REISERFS] Remove the ReiserFS driver
The upstream driver is not maintained and the file system itself
is in a semi-abandoned state.
Originally imported at e308102f4a

The driver is written by Mark W Piper, updated by Bo Brantén.
ReactOS porting made by Peter Hater and Pierre Schweitzer.
Follow updates at http://www.acc.umu.se/~bosse/

FS Recognizer code is left to keep the FS support as an
installable driver.

CORE-11005
2021-07-30 17:14:53 +03:00
Timo Kreuzer 41bc57ddf0 [REACTOS] Silence warnings in 3r-party code 2021-07-23 22:03:48 +02:00
Timo Kreuzer 5d8e834897 [REACTOS] Fix a number of MSVC warnings 2021-07-23 22:03:48 +02:00
Victor Perevertkin 4359f48838
[BTRFS] Do not rely on mountmgr when mounting volumes
This turns off mountmgr listening on new devices. Now
BTRFS will only be mounted on demand when OS asks for it. RAID
is not going to work this way probably (have anybody checked it at all?)

This is a temporary workaround for CORE-17469
2021-07-06 02:37:34 +03:00
Jérôme Gardou 6e0d8de013 [KDGDB] Support "int 0x2c" for x86 & amd64 targets 2021-07-05 10:55:47 +02:00
George Bișoc aa59e3ad00
[NPFS] The function call expects a pool type value, not a boolean value 2021-07-04 11:02:05 +02:00
Joachim Henze cb408102cc [EXT2] Fix filesystem corruption regressions CORE-17572 CORE-17195
It regressed when we upgraded Ext2Fsd to version 0.69 from version 0.68
via CORE-13980 in 0.4.8-dev-117-g a1d7e9936d

The fix is a partial revert of that.
Thanks to the patches author Doug Lyons.

VBox https://reactos.org/testman/compare.php?ids=77904,77908 LGTM
KVM https://reactos.org/testman/compare.php?ids=77903,77907 LGTM
2021-06-27 16:21:32 +02:00
Jérôme Gardou 27fcfe66a2 [TCPIP][IP] Use an ERESOURCE as mutex for address files & connection end points
Spinlocks are not reentrant (and this is done a lot), using them forces us to have
an horrible hack in the kernel, which unschedules threads which are at DISPATCH_LEVEL
thus allowing another thread to take ownership of the spinlock while the unscheduled
thread should already hold it.

CORE-6473
2021-06-21 11:42:01 +02:00
Stanislav Motylkov 5697b48583
[NE2000] Add description for Realtek RTL8019AS (emulated by 86Box) 2021-06-20 20:20:16 +03:00
Stanislav Motylkov 6924b8ff39
[NE2000] Combine two INF files into one for ISA and PCI cards 2021-06-20 20:16:33 +03:00
Dmitry Borisov 18b4cc1479 [ISAPNP] Start the driver early in the boot
Because our child devices can have boot-start drivers
2021-06-20 19:24:32 +06:00
Dmitry Borisov adac7dc2e5 [ISAPNP] Implement device configuration 2021-06-20 19:24:32 +06:00
Dmitry Borisov 8939abf113 [ISAPNP] Disable bus scan on unsupported platforms
This speeds up boot a bit and also decreases binary size.

- Introduce a new CMake define ISAPNP_ENABLE that defined only in x86 platform
  when ISA PnP is supported.
2021-06-20 19:24:32 +06:00
Dmitry Borisov e318d22940 [ISAPNP] Disable I/O range check before activation
See Table A-2 of "Plug and Play ISA Specification 1.0a"
2021-06-20 19:24:31 +06:00
Dmitry Borisov 367f4b1581 [ISAPNP] Map configuration states to PnP states
Rework the hardware support code to avoid unneeded transitions
between configuration states.
- Only call WaitForKey when needed.
- Each PnP state transition causes the bus to move to WaitForKey state.

Besides, deactivate logical device during processing remove request.
2021-06-20 19:24:31 +06:00
Dmitry Borisov d6dca83baf [ISAPNP] Reduce software delay 2021-06-20 19:24:31 +06:00
Dmitry Borisov 8ed43b6907 [ISAPNP] Fix descriptors and support alternative configurations
- Fix empty resource descriptors being created.
- Properly support IRQ descriptors.
- Introduce four helpers made to help search descriptors
  in the logical device's requirements.
- Implement support for memory descriptors and alternative configurations.
- DMA descriptors are always DMA_8.
2021-06-20 19:24:31 +06:00
Dmitry Borisov b29a3ac524 [ISAPNP] Read all resources when detecting devices 2021-06-20 19:24:31 +06:00
Dmitry Borisov ca42de9c31 [ISAPNP] Rewrite the tag parser
- Support all resource descriptors.
- Optimize card identification.
- Detect cards that is no longer present on the bus.
- Deactivate cards after the identification phase; they will be activated
  by start device IRP.
- Provide a device description and compatible IDs to the device manager.
- Prevent duplicate IDs across multiple logical devices.
- Suppress warning about the usage of literals in port addresses.
2021-06-20 19:24:31 +06:00
Dmitry Borisov 7c897dfbd1 [ISAPNP] Use the correct types for helper functions 2021-06-20 19:24:31 +06:00
Dmitry Borisov c4b6330b14 [ISAPNP] Implement the Read Port resource management
Currently disabled until the kernel is ready
2021-06-20 19:24:31 +06:00
Dmitry Borisov f15de15554 [ISAPNP] Fixes and improvements for IRP handling
- Implement device removal.
- Finish the Read Port special handling
  introduced in 21514e473f.
- Gracefully handle low memory situations.
- Implement IRQ translator.
- Correctly stub power IRP handling.
- Remove unneeded dispatch routines; implement WMI IRP handling.
- Do not handle requests like WRITE_CONFIG.
- Add a signature member to device extensions to make checks clearer.
2021-06-20 19:24:26 +06:00
Dmitry Borisov e19595572a [ISAPNP] Implement querying bus information 2021-06-20 19:24:25 +06:00
Dmitry Borisov 8f36dee6ff [ISAPNP] Properly count descriptors
Fixes random pool corruptions
2021-06-20 19:24:25 +06:00
Dmitry Borisov 2d367001bd [ISAPNP] Fix device capabilities
- The bus does not supply an address.
- Read Port ID is always unique.

This reverts commit fc0a0b9f84.
See also commit 21514e473f.

CORE-17034
2021-06-20 19:24:19 +06:00
Dmitry Borisov 21514e473f [ISAPNP] Make Read Data Port PDO unique
This PDO is created only once during start of first FDO.
Other buses will remain in an inactive state until
the first FDO receives a remove request.

CORE-17034
2021-06-20 19:22:32 +06:00
Dmitry Borisov c92bec609b [ISAPNP] Refactor string handling
- Don't allocate string buffers twice.
2021-06-20 19:22:32 +06:00
Dmitry Borisov 70ba96f164 [ISAPNP] Make the driver pageable 2021-06-20 19:22:31 +06:00
Dmitry Borisov 66c195755c [ISAPNP] Use pool tagging 2021-06-20 19:22:31 +06:00
Dmitry Borisov 8f44930f91 [ISAPNP] Code formatting
- Add SAL2 annotations.
- Use RTL_NUMBER_OF macro in kernel mode.
- Use better function/member names.
- Less hardcoded values.
- Add license information. See commit
  d9face83c6 for details.

No functional changes.
2021-06-20 19:22:31 +06:00
Serge Gautherie ba77a09c04
[UNIATA] Workaround random crashes on Virtual PC (#3377)
I am not sure why this line was added.
I don't know how I could improve that case.
Then, disable it, for the time being.

Addendum to 4b9cf2e (r71252). CORE-12441 CORE-17371
2021-06-20 00:44:09 +03:00
Serge Gautherie d65d4137d3 [UNIATA] BusMasterAdapters[]: 8086:7111 is really PIIX4, not PIIX3
Reverts a part of deaba45 (r57265).
2021-06-20 00:34:23 +03:00
Stanislav Motylkov a4405f9610
[PCI] Filter out devices with null vendor and device ID
Some virtual machines errorneously expose null PCI device function
on PIIX4 chipset where an USB controller should normally reside.

Windows pci.sys driver does not enumerate these devices.

Affected virtual machines:
- Connectix Virtual PC 5.1.370
- Connectix Virtual PC 5.2.418
- Microsoft Virtual PC 2004 SP1 (5.3.582.27)
- Microsoft Virtual PC 2007 SP1 (6.0.156.0)

Non-affected virtual machines:
- Connectix Virtual PC 4.0
- Microsoft Hyper-V

Fixes CORE-17636.
2021-06-19 20:58:27 +03:00
Victor Perevertkin 34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Timo Kreuzer e693d5ffc0 [USBPORT] Make unload work 2021-05-28 22:29:44 +02:00
Mark Jansen 9f549dba1e [USBHUB] Mute debug spam 2021-05-20 08:35:39 +02:00
Mark Jansen 17acec6d13 [USBCCGP] Mute debug spam 2021-05-20 08:35:39 +02:00
Piotr Hetnarowicz 07ad5eb338
[DISK_NEW] Add Polish (pl-PL) translation (#3660)
Addendum to f144b8c1 and da4ee18c. CORE-17129
2021-05-18 14:58:34 +03:00
Piotr Hetnarowicz 3a7cd6256b
[CDROM_NEW] Add Polish (pl-PL) translation (#3659)
Addendum to 83b85e21. CORE-17129

Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
2021-05-18 14:54:05 +03:00
Jérôme Gardou 3adf450867 [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build
Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes

CORE-17540
2021-05-12 11:04:29 +02:00
Jérôme Gardou 9930eeca76 [KDGDB] Implement TIB address retrieval 2021-05-11 11:00:49 +02:00
Dmitry Borisov 0fb3c1e91e
[PCIIDE] Make the resource section not discardable. CORE-17401 (#3594)
[PCIX] Make the resource section not discardable.

These drivers need to be able to access their message resources at any time.
2021-05-10 00:36:38 +02:00
Hervé Poussineau a1fc312a89 [NE2000] Use the real MAC address instead of a fake one
These lines were added 15 years ago, in r18445.
2021-04-28 17:28:38 +02:00
Jérôme Gardou 0ab44664b6 [KDGDB] Remove debugging leftover 2021-04-28 14:52:05 +02:00
Jérôme Gardou 3ee1eb42a5 [KDGDB] Avoid looping for ever when something unexpected happens 2021-04-28 13:10:23 +02:00
Jérôme Gardou 6f000979eb [BTRFS] Use addressing relative to RIP 2021-04-28 13:10:23 +02:00