Commit graph

24326 commits

Author SHA1 Message Date
Aleksey Bragin b684c23b8e - Remove audit brake / svn:needs-lock property, since these drivers are going to become svn history soon.
svn path=/trunk/; revision=26227
2007-04-01 16:29:16 +00:00
Aleksey Bragin 1d3fb59485 - Move handlers of SRB_FUNCTION_ATTACH and RELEASE to a standalone function, and don't do reference/dereference of the DeviceObject
- Implement RELEASE_QUEUE and FLUSH_QUEUE srb functions
- Turn off DPRINTs, since scsiport seems to finally work (without advanced features, but enough to install and boot using ATAPI and DISK drivers)!

svn path=/trunk/; revision=26226
2007-04-01 12:13:55 +00:00
Aleksey Bragin 01da330bc2 - More DPRINTs added to ease debugging
- Bugfixes: IOCTL_SCSI_GET_CAPABILITIES fixed, setting inquiry operation in CDB fixed, storing information about bus scanning fixed

svn path=/trunk/; revision=26225
2007-04-01 11:17:48 +00:00
KJK::Hyperion 643b171651 !!! ATTENTION EVERYONE - do a make clean after getting this revision !!!
!!! ATTENTION PSEH USERS - new features & a change in rules !!!

modified   include/reactos/libs/pseh/framebased.h
modified   include/reactos/libs/pseh/framebased/internal.h
deleted    include/reactos/libs/pseh/setjmp.h
modified   lib/pseh/framebased.c
deleted    lib/pseh/i386/setjmp.asm
modified   lib/pseh/pseh.rbuild
   Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever
   !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors
   !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision
   !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles
   Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG
   On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs
   Use inline code to enter/leave trylevels; yields much better binary code
   Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages
   Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements
   Removed bitrotten old syntax, because it wasn't being used nor maintained

modified   dll/3rdparty/freetype/freetype.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   drivers/network/tcpip/tcpip.rbuild
modified   lib/drivers/ip/ip.rbuild
modified   lib/rtl/rtl.rbuild
modified   ntoskrnl/ntoskrnl.rbuild
modified   subsystems/win32/win32k/win32k.rbuild
   Removed obsolete _SEH_NO_NATIVE_NLG define

modified   drivers/network/afd/afd/lock.c
modified   drivers/network/afd/afd/tdi.c
modified   subsystems/csr/csrsrv/api.c
modified   subsystems/win32/win32k/ntuser/clipboard.c
modified   subsystems/win32/win32k/ntuser/window.c
   Use the new _SEH_YIELD macro to return/goto from SEH blocks

modified   tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/backend/mingw/modulehandler.h
modified   tools/rbuild/module.cpp
modified   tools/rbuild/project.dtd
modified   tools/rbuild/rbuild.h
   Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore
   Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing

modified   lib/3rdparty/mingw/mingw.rbuild
   Build with underscoresymbols="true"

svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
Dmitry Gorbachev 9ce1b28fc1 Fix the bug introduced in r26219.
svn path=/trunk/; revision=26223
2007-03-31 22:18:16 +00:00
Aleksey Bragin ebf23937a3 - Fix a few obvious bugs (incorrect DeviceExtension pointer arithmetic, non-initialized field usage).
- Packets are sequentially numbered.

Now all devices are perfectly enumerated (SpBuildDeviceMap() may still need work, but later), and problem occurs later when servicing IOCTLs.

svn path=/trunk/; revision=26222
2007-03-31 20:47:42 +00:00
Aleksey Bragin fd27183f35 - Implement timeouts / retrying after timeout.
svn path=/trunk/; revision=26221
2007-03-31 20:03:07 +00:00
Aleksey Bragin fc3d38d1cb - Finish ScsiPortInitialize() refactoring / improving. Only DMA stuff and 2-interrupts case are missing now.
svn path=/trunk/; revision=26220
2007-03-31 18:37:07 +00:00
Dmitry Gorbachev c08f45390a Do not wait for explorer startup. Hack.
svn path=/trunk/; revision=26219
2007-03-31 11:52:24 +00:00
Magnus Olsen 151cc9133b more compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26218
2007-03-30 22:58:02 +00:00
Magnus Olsen 898210e00d more compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26217
2007-03-30 21:17:33 +00:00
Dmitry Gorbachev fda50948f1 Fix a bug.
svn path=/trunk/; revision=26216
2007-03-30 21:08:23 +00:00
Magnus Olsen 1ca4f18dc7 more compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26215
2007-03-30 21:08:09 +00:00
Magnus Olsen 043a16c1dc more compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26214
2007-03-30 20:49:26 +00:00
Magnus Olsen a6246fbb17 more compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26213
2007-03-30 20:04:05 +00:00
Aleksey Bragin 7ea1266acd - Fix ScsiPortGetDeviceBase() / ScsiPortSetDeviceBase().
svn path=/trunk/; revision=26212
2007-03-30 19:24:11 +00:00
Aleksey Bragin c891e7315a - Further work on ScsiPortInitialize(): old PortConfig section is deleted.
- SpiGetPciData() code improved, part of the code is transferred into a new function.

Right now a crash is introduced in ScsiPortFreeDeviceBase(), because of the changes in ScsiPortInitialize(): will be fixed by the next commit.

svn path=/trunk/; revision=26211
2007-03-30 19:10:29 +00:00
Aleksey Bragin 1f9a18b920 - Revert useless commit:
* No need to copy stuff from DDK, it's prohibited (#define _INC_NEWDEV)
 * #pragma was put there especially, and no reason to remove it was said
 * pushpack / poppack does not do anything if there are no structs definitions

svn path=/trunk/; revision=26210
2007-03-30 15:39:27 +00:00
Magnus Olsen dedbc24d60 more compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26209
2007-03-30 15:32:34 +00:00
Magnus Olsen 7b9e24ee13 moref compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26208
2007-03-30 15:24:03 +00:00
Magnus Olsen 07ec644063 moref compatible fix betwin reactos ddk and ms DDK version 3790.1830
svn path=/trunk/; revision=26207
2007-03-30 15:13:14 +00:00
Magnus Olsen d255db35bf fixing usb.h compatible with DDK version 3790.1830
adding usb200.h compatible with DDK version 3790.1830

svn path=/trunk/; revision=26206
2007-03-30 14:50:01 +00:00
Aleksey Bragin b33dcd50d9 - Start ScsiPortInitialize() refactoring: moving code to separate functions, adding support for various registry-defined options / tweaks (like DisableTaggedQueuing).
- Fixed a bug with using wrong spinlock (IrpLock instead of SpinLock).
- Doesn't fix anything yet, just makes work with the ScsiPortInitialize() more comfortable and initializing needed fields correctly. Also the "PortConfig" filling inside ScsiPortInitialize() will go away once it works fine in the standalone function.

svn path=/trunk/; revision=26205
2007-03-30 13:17:06 +00:00
Magnus Olsen e3701e4987 remove VidMemFree and HeapVidMemAllocAligned
they are protoypes belong to dmemmgr.h

ddrawi.h need be rewiten it is from wine so I add some hacks for now getting it works simluare to ms ddk version. 
This fix gdi32.dll break in the build

svn path=/trunk/; revision=26204
2007-03-30 09:53:34 +00:00
Magnus Olsen b18be77063 fixing newdev.h compatible with DDK version 3790.1830
it did not have #include <pshpack1.h>  and #include <poppack.h>

svn path=/trunk/; revision=26203
2007-03-30 08:47:54 +00:00
Magnus Olsen 0772fa79b5 adding ieverp.h compatible with DDK version 3790.1830
svn path=/trunk/; revision=26202
2007-03-30 08:41:21 +00:00
Magnus Olsen 94bc12cc65 fixing ddrawint.h compatible with DDK version 3790.1830
adding polarity.h compatible with DDK version 3790.1830

svn path=/trunk/; revision=26201
2007-03-30 08:34:20 +00:00
Aleksey Bragin fe868c7d45 - Implement a simple error handling branch, however it gets hit due to an error somewhere else.
svn path=/trunk/; revision=26200
2007-03-29 21:18:28 +00:00
Aleksey Bragin 3ff7da19ca - Massive changes due to a rewrite of the core logic related to ISR, DPC, IRP completion and commands delivery. Fixes a lot of race conditions which existed in hbirr-scsiport.
- Add some helper functions, and fields inside device extension structures.
- Reorganize flags a little, dividing them into flags for scsi port device extension and logical unit device extension. (however some of the flags are still messed up)
- This gets us further, but still not enough / bugs may exist.

svn path=/trunk/; revision=26199
2007-03-29 21:05:41 +00:00
Aleksey Bragin 3d4fc31db6 - Change unclear flag name to a better one.
- Set needed flags in a few places (which I forgot to set) - this fixes the hang introduced by the previous commit.
- Further code prettification.

svn path=/trunk/; revision=26198
2007-03-28 19:26:41 +00:00
Hervé Poussineau e2ab9cb060 Don't use ntoskrnl.RtlDuplicateUnicodeString, as it is not exported on MS Windows
svn path=/trunk/; revision=26197
2007-03-28 18:47:35 +00:00
Aleksey Bragin d8175ef0a6 - Rearrange code inside ScsiPortStartIo() routine (some code for dma-support added, but currently disabled), also change time when spinlock is being held.
- Respective changes in ScsiPortStartPacket(), also some code is missing for rare kind of requests.
- Add flags check into ScsiPortIsr(), so that we skip unwanted interrupts (and change to usage of the new interrupt flags structure instead of a strange and unclear "IrpFlags" field).

svn path=/trunk/; revision=26196
2007-03-28 18:29:15 +00:00
Johannes Anderwald d7f6674119 - fix memory leak
svn path=/trunk/; revision=26195
2007-03-28 17:43:44 +00:00
Hervé Poussineau 71bef156c4 Fix interrupt resources (related to r21188 fix)
svn path=/trunk/; revision=26194
2007-03-28 17:40:57 +00:00
Aleksey Bragin 93f480d223 Fix HalGetInterruptVector() calls. Should enable input devices after 26188 fix.
svn path=/trunk/; revision=26193
2007-03-28 17:14:16 +00:00
Aleksey Bragin ce0e0958b4 - Start putting all data, needed for ISR into a dedicated structure.
- Use DEVICE_QUEUEs.
- Add a function to retrieve SRB information help structure (is a shared code between Notify(), and in future - ScsiPortGetSrb()).
- Rework RequestComplete part of ScsiPortNotification().
- Rework ScsiPortDispatchScsi() a bit - shutdown/flush can share the same code as execute_scsi/ioctl requests, also added a few more DPRINTs in error conditions to help debugging.

svn path=/trunk/; revision=26192
2007-03-28 10:41:03 +00:00
Aleksey Bragin 24387402f3 - Fix a few simple mistakes / typos.
- Enumerating buses almost works.

svn path=/trunk/; revision=26191
2007-03-28 09:44:37 +00:00
Magnus Olsen 95c38a9cf1 change ObpDosDevicesShortName match the ob.h header prototype
svn path=/trunk/; revision=26190
2007-03-27 21:21:32 +00:00
Aleksey Bragin dfd6a60128 - Rewrite bus scanning / inquiry handling (was BSODing).
- Change a way LUN extensions are stored inside DeviceExtension.

svn path=/trunk/; revision=26189
2007-03-27 21:15:09 +00:00
Aleksey Bragin f5af63ddda - Fix HalGetInterruptVector()'s usage of level vs. vector. At least Windows seems to use Level parameter.
- No need in special hacks (e.g. in scsiport), as a result.

svn path=/trunk/; revision=26188
2007-03-27 12:55:57 +00:00
Aleksey Bragin 379a566aa8 Change code, fix warnings, so it finally builds.
svn path=/trunk/; revision=26187
2007-03-27 11:07:12 +00:00
Aleksey Bragin 285adfefbe - Remove old crap files
- Put new .def, add .rbuild

svn path=/trunk/; revision=26186
2007-03-27 10:12:59 +00:00
Aleksey Bragin 86476d7a1b Branch scsiport from the "before hbirr rewrite" state (rev. 8950).
svn path=/trunk/; revision=26185
2007-03-27 10:07:57 +00:00
Timo Kreuzer 9c00af1b5f fix a tiny mem leak
svn path=/trunk/; revision=26184
2007-03-27 02:52:42 +00:00
Hervé Poussineau 76f7f2d03a Include nci.mak later, as it needs $(ARCH) variable
Fix a typo in ncitool

svn path=/trunk/; revision=26183
2007-03-26 23:43:07 +00:00
Hervé Poussineau cd21248e88 Add missing file
svn path=/trunk/; revision=26182
2007-03-26 23:00:58 +00:00
Hervé Poussineau 0e5cca2a4e - Move NCI generated files to arch-specific directories
- Replace ncitool by the one from powerpc branch, which supports code generation for multiple architectures

svn path=/trunk/; revision=26181
2007-03-26 22:56:22 +00:00
Hervé Poussineau acad1159c3 Cleanup code for easier porting to other architectures
svn path=/trunk/; revision=26180
2007-03-26 20:28:13 +00:00
Aleksey Bragin 87d76d8d95 Commit to test SVN 1.4.3 upgrade...
svn path=/trunk/; revision=26179
2007-03-26 18:56:35 +00:00
Magnus Olsen 24f90dc0c9 we now resive DrvGetDirectDrawInfo DD_HALINFO from the driver to win32k from win32k to gdi32.dll or d3dthk.dll or direcly syscall. it take care of allot bugs in my test case. tested with vmware driver
svn path=/trunk/; revision=26178
2007-03-26 07:49:05 +00:00