Ignore:
Timestamp:
Nov 5, 2010, 4:01:49 PM (15 years ago)
Author:
markus
Message:

changed serial port setup (still not working ok), prolonged timeout during port reset

File:
1 edited

Legend:

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

    r36 r37  
    576576  u8 _far *port_mmio = port_base(ai, p);
    577577  u32 tmp;
    578   int timeout = 500;
     578  int timeout = 5000;
    579579
    580580  dprintf("resetting port %d.%d\n", ad_no(ai), p);
     
    10461046  ddprintf("sending IDLE=%d command to port %d\n", idle, p);
    10471047  return ahci_exec_polled_cmd(ai, p, 0, 500, ATA_CMD_IDLE, AP_COUNT,
    1048                               idle ? 1 : 0, AP_END);
     1048                              idle ? 1 : 0, AP_END);
    10491049}
    10501050
     
    10911091  if ((tmp = readl(port_mmio + PORT_SCR_ERR)) != 0) {
    10921092    dprintf("SERR = 0x%08lx\n", tmp);
    1093     return(-1);
     1093    timeout = 0;
    10941094  }
    10951095  if (((tmp = readl(port_mmio + PORT_TFDATA)) & 0x89) != 0) {
    10961096    dprintf("TFDATA = 0x%08lx\n", tmp);
     1097    timeout = 0;
     1098  }
     1099
     1100  if (timeout <= 0) {
     1101    ahci_reset_port(ai, p, 0);
    10971102    return(-1);
    10981103  }
    1099 
    1100   return((timeout <= 0) ? -1 : 0);
     1104  return(0);
    11011105}
    11021106
Note: See TracChangeset for help on using the changeset viewer.