Ignore:
Timestamp:
Nov 9, 2010, 11:32:38 AM (15 years ago)
Author:
markus
Message:

added option to disable NCQ for all adapters/ports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/os2ahci.c

    r35 r40  
    126126  char _far *cmd_line;
    127127  char _far *s;
    128   int adapter_index;
    129   int port_index;
     128  int adapter_index = -1;
     129  int port_index = -1;
     130  int a, p;
    130131  u16 vendor;
    131132  u16 device;
     
    218219
    219220      case 'n':
    220         /* disable NCQ on this port */
    221         disable_ncq[adapter_index][port_index] = 1;
     221        /* disable NCQ */
     222        if (adapter_index == -1) {
     223          /* disable NCQ on all adapters and ports */
     224          memset(disable_ncq, 0xff, sizeof(disable_ncq));
     225        } else if (port_index == -1) {
     226          /* disable NCQ on all ports of this adapter */
     227          memset(disable_ncq[adapter_index], 0xff, sizeof(disable_ncq[0]));
     228        } else {
     229          /* disable NCQ for this adapter and port */
     230          disable_ncq[adapter_index][port_index] = 1;
     231        }
    222232        break;
    223233
Note: See TracChangeset for help on using the changeset viewer.