Changeset 42


Ignore:
Timestamp:
Nov 10, 2010, 11:14:21 AM (15 years ago)
Author:
markus
Message:

fixed NCQ disabling via switch

Location:
trunk/src/os2ahci
Files:
4 edited

Legend:

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

    r37 r42  
    14411441  ai->ports[p].devs[d].removable = (id_buf[ATA_ID_CONFIG] & 0x0080U) != 0;
    14421442  ai->ports[p].devs[d].dev_type  = UIB_TYPE_DISK;
    1443 
     1443 
    14441444  if (id_buf[ATA_ID_CONFIG] & 0x8000U) {
    14451445    /* this is an ATAPI device; augment device information */
     
    14531453      /* MT: set ncq_max to 1 if NCQ is disabled for this port */
    14541454      ai->ports[p].devs[d].ncq_max = 1;
     1455      dprintf("NCQ off for a:%d p:%d\n", (int) ad_no(ai), p);
    14551456    } else {
    14561457      ai->ports[p].devs[d].ncq_max = id_buf[ATA_ID_QUEUE_DEPTH] & 0x001fU;
     1458      dprintf("NCQ max=%d for a:%d p:%d\n", ai->ports[p].devs[d].ncq_max, (int) ad_no(ai), p);
    14571459    }
    14581460
  • trunk/src/os2ahci/os2ahci.c

    r41 r42  
    155155  /* parse command line parameters */
    156156  cmd_line = (char _far *) ((u32) ddd_pl & 0xffff0000l) + ddd_pl->cmd_line_args;
    157   adapter_index = 0;
    158   port_index = 0;
    159157
    160158  for (s = cmd_line; *s != 0; s++) {
     
    238236    }
    239237  }
     238
     239  phex(disable_ncq, sizeof(disable_ncq), "disable_ncq dump:\n");
    240240
    241241  /* scan PCI bus for supported devices */
  • trunk/src/os2ahci/os2ahci.def

    r40 r42  
    11library os2ahci
    2 Description '$@#thi.guten (www.thiguten.de):1.00.20101109#@OS/2 AHCI Adapter Device Driver'
     2Description '$@#thi.guten (www.thiguten.de):1.00.20101110#@OS/2 AHCI Adapter Device Driver'
    33protmode
    44
  • trunk/src/os2ahci/pci.c

    r39 r42  
    3434 * OEMHLP constants for PCI access
    3535 */
    36 #define GENERIC_IOCTL       0x10 
     36#define GENERIC_IOCTL       0x10
    3737#define OH_CATEGORY         0x00
    3838#define OH_FUNC_PCI         0x0b
     
    100100
    101101} OH_PARM;
    102  
     102
    103103/******************************************************************************
    104104 * OEMHLP IOCtl data union. The data area is generally used as output from the
     
    238238
    239239  /* ATI */
    240   { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600,        "SB600"      }, /* ATI SB600 */
     240  { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600,        chip_sb600   }, /* ATI SB600 */
    241241  { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700,        chip_sb700   }, /* ATI SB700/800 */
    242242  { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb700,        chip_sb700   }, /* ATI SB700/800 */
     
    415415  }
    416416
    417   /* Go through the list of PCI IDs and search for each device 
     417  /* Go through the list of PCI IDs and search for each device
    418418   *
    419419   * NOTES:
     
    538538  if (pci_read_conf(bus, dev_func, 0x08, sizeof(ULONG), &val) != OH_SUCCESS) {
    539539    return;
    540   } 
     540  }
    541541  class = (u32) (val >> 8);
    542542
     
    744744  ad_info->irq      = irq;
    745745  ad_info->mmio_phys = resource.MEMResource.MemBase;
    746    
     746
    747747  /* allocate memory for port-specific DMA scratch buffers */
    748748  if (DevHelp_AllocPhys((long) AHCI_PORT_PRIV_DMA_SZ * AHCI_MAX_PORTS,
     
    925925   * to be called to a stack variable because the inter-device driver calling
    926926   * convention forces us to set DS to the device driver's data segment and ES
    927    * to the segment of the request packet. 
     927   * to the segment of the request packet.
    928928   */
    929929  func = oemhlp.ProtIDCEntry;
     
    970970
    971971  switch(id) {
    972    
     972
    973973    case PCI_VENDOR_ID_AL:
    974974      return "Ali";
     
    10031003      break;
    10041004    }
    1005    
     1005
    10061006  return "Generic";
    10071007
     
    10171017
    10181018  for (i = 0; pci_ids[i].vendor != 0; i++) {
    1019    
     1019
    10201020    if (pci_ids[i].device == device) {
    10211021      return pci_ids[i].chipname;
    10221022    }
    1023  
     1023
    10241024  }
    10251025
Note: See TracChangeset for help on using the changeset viewer.