Ignore:
Timestamp:
Oct 8, 2011, 10:28:48 PM (14 years ago)
Author:
cjm
Message:

Version 1.21


  • Triggered by reports of performance loss with NCQ
  • New command line flag "/F" to force using write buffers even when upstream I/O requested non-buffered I/O; the primary purpose of this flag is to debug the NCQ performance drop but the flag may or may not remain.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/ioctl.h

    r87 r125  
    2828
    2929/* IOCTL categories and functions */
    30 #define OS2AHCI_IOCTL_CATEGORY         0x80
     30#define OS2AHCI_IOCTL_CATEGORY         0x87
    3131#define OS2AHCI_IOCTL_GET_DEVLIST      0x01
    3232#define OS2AHCI_IOCTL_PASSTHROUGH      0x02
     33
     34/* IOCTL definitions from s506oem.h (primarily required for SMART calls) */
     35#define DSKSP_CAT_SMART             0x80  /* SMART IOCTL category */
     36#define DSKSP_SMART_ONOFF           0x20  /* turn SMART on or off */
     37#define DSKSP_SMART_AUTOSAVE_ONOFF  0x21  /* turn SMART autosave on or off */
     38#define DSKSP_SMART_SAVE            0x22  /* force save of SMART data */
     39#define DSKSP_SMART_GETSTATUS       0x23  /* get SMART status (pass/fail) */
     40#define DSKSP_SMART_GET_ATTRIBUTES  0x24  /* get SMART attributes table */
     41#define DSKSP_SMART_GET_THRESHOLDS  0x25  /* get SMART thresholds table */
     42#define DSKSP_SMART_GET_LOG         0x26  /* get SMART log        table */
     43#define DSKSP_SMART_AUTO_OFFLINE    0x27  /* set SMART offline autosave timer */
     44#define DSKSP_SMART_EXEC_OFFLINE    0x28  /* execute SMART immediate offline */
     45
     46#define SMART_CMD_ON                   1  /* on value for related SMART functions */
     47#define SMART_CMD_OFF                  0  /* off value for related SMART functions */
     48
     49#define DSKSP_CAT_GENERIC           0x90  /* generic IOCTL category */
     50#define DSKSP_GEN_GET_COUNTERS      0x40  /* get general counter values table */
     51#define DSKSP_GET_UNIT_INFORMATION  0x41  /* get unit configuration and BM DMA counters */
     52#define DSKSP_GET_INQUIRY_DATA      0x42  /* get ATA/ATAPI inquiry data */
     53
     54/* unit information structure flags from s506oem.h */
     55#define UIF_VALID           0x8000U       /* unit information valid */
     56#define UIF_TIMINGS_VALID   0x4000U       /* timing information valid */
     57#define UIF_RUNNING_BMDMA   0x2000U       /* running Bus Master DMA on unit */
     58#define UIF_RUNNING_DMA     0x1000U       /* running slave DMA on unit */
     59#define UIF_SATA            0x0004U       /* SATA             */
     60#define UIF_SLAVE           0x0002U       /* slave on channel */
     61#define UIF_ATAPI           0x0001U       /* ATAPI device if 1, ATA otherwise */
    3362
    3463/* device flags */
     
    112141} OS2AHCI_PASSTHROUGH;
    113142
     143/******************************************************************************
     144 * DSKSP command parameters; copied from s506oem.h
     145 */
     146typedef struct _DSKSP_CommandParameters
     147{
     148  BYTE        byPhysicalUnit;             /* physical unit number 0-n */
     149                                          /* 0 = Pri/Mas, 1=Pri/Sla, 2=Sec/Mas, etc. */
     150} DSKSP_CommandParameters;
     151
     152/******************************************************************************
     153 * DSKSP device counters data; copied from s506oem.h
     154 */
     155typedef struct _DeviceCountersData
     156{
     157  USHORT      wRevisionNumber;            /* counter structure revision */
     158  ULONG       TotalReadOperations;        /* total read operations performed */
     159  ULONG       TotalWriteOperations;       /* total write operations performed */
     160  ULONG       TotalWriteErrors;           /* total write errors encountered */
     161  ULONG       TotalReadErrors;            /* total read errors encountered */
     162  ULONG       TotalSeekErrors;            /* total seek errors encountered */
     163  ULONG       TotalSectorsRead;           /* total number of sectors read */
     164  ULONG       TotalSectorsWritten;        /* total number of sectors written */
     165
     166  ULONG       TotalBMReadOperations;      /* total bus master DMA read operations */
     167  ULONG       TotalBMWriteOperations;     /* total bus master DMA write operations */
     168  ULONG       ByteMisalignedBuffers;      /* total buffers on odd byte boundary */
     169  ULONG       TransfersAcross64K;         /* total buffers crossing a 64K page boundary */
     170  USHORT      TotalBMStatus;              /* total bad busmaster status */
     171  USHORT      TotalBMErrors;              /* total bad busmaster error */
     172  ULONG       TotalIRQsLost;              /* total lost interrupts */
     173  USHORT      TotalDRQsLost;              /* total lost data transfer requests */
     174  USHORT      TotalBusyErrors;            /* total device busy timeouts        */
     175  USHORT      TotalBMStatus2;             /* total bad busmaster status */
     176  USHORT      TotalChipStatus;            /* total bad chip status */
     177  USHORT      ReadErrors[4];
     178  USHORT      WriteErrors[2];
     179  USHORT      SeekErrors[2];
     180  USHORT      SATAErrors;
     181} DeviceCountersData, NEAR *NPDeviceCountersData, FAR *PDeviceCountersData;
     182
     183/******************************************************************************
     184 * DSKSP unit information data; copied from s506oem.h
     185 */
     186typedef struct _UnitInformationData
     187{
     188  USHORT      wRevisionNumber;            /* structure revision number */
     189  union {
     190    struct {
     191      USHORT  wTFBase;                    /* task file register base addr */
     192      USHORT  wDevCtl;                    /* device control register addr */
     193    } rev0;
     194    ULONG     dTFBase;                    /* task file register base addr */
     195  };
     196  USHORT      wIRQ;                       /* interrupt request level */
     197  USHORT      wFlags;                     /* flags */
     198  UCHAR       byPIO_Mode;                 /* PIO transfer mode programmed */
     199  UCHAR       byDMA_Mode;                 /* DMA transfer mode programmed */
     200  ULONG       UnitFlags1;
     201  USHORT      UnitFlags2;
     202} UnitInformationData, NEAR *NPUnitInformationData, FAR *PUnitInformationData;
     203
     204
    114205#pragma pack()
    115206
Note: See TracChangeset for help on using the changeset viewer.