[ros-kernel] latest cvs ISO boot failure...

Hartmut Birr hartmut.birr at gmx.de
Sat Sep 25 00:30:36 CEST 2004


Hi,    

I've made this changes because a slave atapi device was never detect on my
two test pc's. Currently I've modified my source a little bit, that only one
soft reset is necessary. I haven't commit this changes, because Eric says he
will commit some changes to atapi.c. I attach my changes.

- Hartmut


> -----Original Message-----
> From: ros-kernel-bounces at reactos.com 
> [mailto:ros-kernel-bounces at reactos.com] On Behalf Of Casper Hornstrup
> Sent: Thursday, September 23, 2004 11:17 PM
> To: 'ReactOS Kernel List'
> Subject: RE: [ros-kernel] latest cvs ISO boot failure...
> 
> 
> The change below causes this. Hartmut, do you have any idea 
> why? Maybe it is just a problem with Vmware?
> 
> Casper
> 
> Index: drivers/storage/atapi/atapi.c 
> ===================================================================
> RCS file: /CVS/ReactOS/reactos/drivers/storage/atapi/atapi.c,v
> retrieving revision 1.53
> retrieving revision 1.54
> diff -u -r1.53 -r1.54
> --- drivers/storage/atapi/atapi.c	12 Sep 2004 18:50:03 
> -0000	1.53
> +++ drivers/storage/atapi/atapi.c	14 Sep 2004 22:09:06 
> -0000	1.54
> @@ -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.53 2004/09/12 18:50:03 weiden Exp $
> +/* $Id: atapi.c,v 1.54 2004/09/14 22:09:06 hbirr Exp $
>   *
>   * COPYRIGHT:   See COPYING in the top level directory
>   * PROJECT:     ReactOS ATAPI miniport driver
> @@ -1138,29 +1138,6 @@
>         return FALSE;
>       }
>  
> -   /* Soft reset */
> -   IDEWriteDriveHead(CommandPortBase, IDE_DH_FIXED);
> -   IDEWriteDriveControl(ControlPortBase, IDE_DC_SRST);
> -   ScsiPortStallExecution(500);
> -   IDEWriteDriveControl(ControlPortBase, IDE_DC_nIEN);
> -   ScsiPortStallExecution(200);
> -
> -   /* Wait for busy to clear */
> -   if (!AtapiWaitForStatus(CommandPortBase, IDE_SR_BUSY, 0, 20000))
> -     {
> -       DPRINT("Timeout on drive %lu\n", UnitNumber);
> -       return FALSE;
> -     }
> -   else
> -     {
> -       Status = IDEReadStatus(DeviceExtension->CommandPortBase);
> -       if (Status & IDE_SR_ERR)
> -         {
> -           DPRINT("Error while doing software reset\n");
> -           return FALSE;
> -         }
> -     }
> -
>    for (UnitNumber = 0; UnitNumber < 2; UnitNumber++)
>      {
>        /* Skip initilization of non-existent units */
> @@ -1172,6 +1149,27 @@
>        /* Select drive */
>        IDEWriteDriveHead(CommandPortBase, IDE_DH_FIXED |
>                          (UnitNumber ? IDE_DH_DRV1 : IDE_DH_DRV0));
> +      /* Soft reset */
> +      IDEWriteDriveControl(ControlPortBase, IDE_DC_SRST);
> +      ScsiPortStallExecution(500);
> +      IDEWriteDriveControl(ControlPortBase, IDE_DC_nIEN);
> +      ScsiPortStallExecution(200);
> +
> +      /* Wait for busy to clear */
> +      if (!AtapiWaitForStatus(CommandPortBase, IDE_SR_BUSY, 
> 0, 20000))
> +        {
> +          DPRINT("Timeout on drive %lu\n", UnitNumber);
> +          return FALSE;
> +        }
> +      else
> +        {
> +          Status = IDEReadStatus(DeviceExtension->CommandPortBase);
> +          if (Status & IDE_SR_ERR)
> +           {
> +             DPRINT("Error while doing software reset\n");
> +             return FALSE;
> +           }
> +        }
>  
>        High = IDEReadCylinderHigh(CommandPortBase);
>        Low = IDEReadCylinderLow(CommandPortBase);
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atapi.c.diff
Type: application/octet-stream
Size: 5089 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-kernel/attachments/20040924/24472f38/atapi.c-0001.obj


More information about the Ros-kernel mailing list