Don't flush cache on ATAPI devices.
Modified:
branches/ros-branch-0_2_5/reactos/drivers/storage/atapi/atapi.c
_____
Modified:
branches/ros-branch-0_2_5/reactos/drivers/storage/atapi/atapi.c
--- branches/ros-branch-0_2_5/reactos/drivers/storage/atapi/atapi.c
2005-01-02 19:27:53 UTC (rev 12732)
+++ branches/ros-branch-0_2_5/reactos/drivers/storage/atapi/atapi.c
2005-01-02 19:36:33 UTC (rev 12733)
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: atapi.c,v 1.56 2004/11/18 08:32:32 gvg Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS ATAPI miniport driver
@@ -2224,6 +2224,17 @@
DPRINT("SCSIOP_SYNCRONIZE_CACHE: TargetId: %lu\n",
Srb->TargetId);
+ if (DeviceExtension->DeviceFlags[Srb->TargetId] & DEVICE_ATAPI)
+ {
+ /* NOTE: Don't flush the cache for ATAPI devices. Although
+ * the ATAPI-6 standard allows that, it has been experimentally
+ * proved that it can damage some broken LG drives. Afterall
+ * it doesn't make sense to flush cache on devices we don't
+ * write to.
+ */
+ return STATUS_SUCCESS;
+ }
+
/* Wait for BUSY to clear */
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES; Retries++)
{
Allocate enough bytes for the adapter object.
Modified: trunk/reactos/hal/halx86/generic/adapter.c
_____
Modified: trunk/reactos/hal/halx86/generic/adapter.c
--- trunk/reactos/hal/halx86/generic/adapter.c 2005-01-02 17:55:06 UTC
(rev 12728)
+++ trunk/reactos/hal/halx86/generic/adapter.c 2005-01-02 18:00:31 UTC
(rev 12729)
@@ -1,4 +1,4 @@
-/* $Id: adapter.c,v 1.1 2004/12/03 20:10:43 gvg Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -203,7 +203,7 @@
/* Check if this is the Master Adapter, in which case we need to
allocate the bitmap */
if (IsMaster) {
/* Size due to the Bitmap + Bytes in the Bitmap Buffer
(8 bytes, 64 bits)*/
- BitmapSize = sizeof(RTL_BITMAP) + AllowedMapRegisters /
8;
+ BitmapSize = sizeof(RTL_BITMAP) + (AllowedMapRegisters +
7) / 8;
/* We will put the Bitmap Buffer after the Adapter
Object for simplicity */
ObjectSize = sizeof(ADAPTER_OBJECT) + BitmapSize;
Removed file/folder
Deleted: trunk/reactos/README.txt
_____
Deleted: trunk/reactos/README.txt
--- trunk/reactos/README.txt 2005-01-02 17:46:46 UTC (rev 12725)
+++ trunk/reactos/README.txt 2005-01-02 17:46:51 UTC (rev 12726)
@@ -1,9 +0,0 @@
-This is a Subversion repository; use the 'svnadmin' tool to examine
-it. Do not add, delete, or modify files here unless you know how
-to avoid corrupting the repository.
-
-If the directory "db" contains a Berkeley DB environment,
-you may need to tweak the values in "db/DB_CONFIG" to match the
-requirements of your site.
-
-Visit http://subversion.tigris.org/ for more information.