Ignore:
Timestamp:
Mar 2, 2011, 11:48:03 PM (14 years ago)
Author:
chris
Message:

Version 1.09
============

  • Added new command line parameter, "/4", which will force a track size of 56 sectors to be reported in geometry requests. This will improve performance for newer HDs with 4K sectors and file systems which use block sizes larger than 512 bytes (FAT, JFS, ...) because all partitions will be aligned on 4K (8 sector) boundaries.
  • Changed AP_DEVICE parameter to ata_cmd() from 16 bits to 8 bits -- the corresponding field in ATA_CMD has always been 8 bits and there's no point discarding the lower 8 bits of the AP_DEVICE parameter as a general rule. Besides, it confused me in the end...
  • Always return some kind of error in ata_req_sense() because this function will only be called when we received an error interrupt; atapi_req_sense() already does this.
  • Cosmetic changes
File:
1 edited

Legend:

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

    r80 r82  
    298298      ai->pci->vendor == PCI_VENDOR_ID_INTEL) {
    299299
    300     /* This BIOS apparently accesses this controller via SATA registers and
     300    /* This BIOS apparently accesses the controller via SATA registers and
    301301     * the AHCI spec says that we should issue a COMRESET on each port after
    302302     * disabling AHCI mode to allow the SATA controller to re-recognize attached
     
    402402  if (ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) {
    403403    /* BIOS uses AHCI, too, so we need to restore the port settings;
    404      * restoring PORT_CMD way well start the port again but that's what
     404     * restoring PORT_CMD may well start the port again but that's what
    405405     * this function is all about.
    406406     */
     
    579579    }
    580580  }
    581 
    582581  if (i >= irq_map_cnt) {
    583582    dprintf("registering interrupt #%d\n", ai->irq);
    584 
    585583    if (DevHelp_SetIRQ(mk_NPFN(irq_handlers[irq_map_cnt]), ai->irq, 1) != 0) {
    586584      dprintf("failed to register shared interrupt\n");
    587 
    588585      if (DevHelp_SetIRQ(mk_NPFN(irq_handlers[irq_map_cnt]), ai->irq, 0) != 0) {
    589586        dprintf("failed to register exclusive interrupt\n");
     
    672669
    673670  /* set link speed and power management options */
     671  ddprintf("setting link speed and power management options\n");
    674672  tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x00000ff0UL;
    675673  tmp |= ((u32) link_speed[ad_no(ai)][p] & 0x0f) << 4;
     
    678676
    679677  /* issue COMRESET on the port */
     678  ddprintf("issuing COMRESET on port\n");
    680679  tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x0000000fUL;
    681680  writel(port_mmio + PORT_SCR_CTL, tmp | 1);
     
    704703
    705704  /* start port so we can receive the COMRESET FIS */
     705  ddprintf("starting port again\n");
    706706  ahci_start_port(ai, p, ei);
    707707
     
    989989
    990990    if (!init_complete) {
     991      /* no IRQ handlers or context hooks availabe at this point */
    991992      ai->busy = 1;
    992993      spin_unlock(drv_lock);
     
    10141015
    10151016      if ((*cmds & (1UL << port->cmd_slot)) == 0) {
    1016         /* prepare command */
     1017        /* found idle command slot; prepare command */
    10171018        if (func(iorb, port->cmd_slot)) {
    10181019          /* Command preparation failed, or no HW command required; IORB
Note: See TracChangeset for help on using the changeset viewer.