Ignore:
Timestamp:
Sep 23, 2010, 4:39:43 PM (15 years ago)
Author:
markus
Message:

watcom calling conventions...

File:
1 edited

Legend:

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

    r14 r25  
    103103#define call_ahci_intr(i)   return(ahci_intr(irq_map[i]) >> 1)
    104104
    105 static USHORT _far irq_handler_00(void)  { call_ahci_intr(0); }
    106 static USHORT _far irq_handler_01(void)  { call_ahci_intr(1); }
    107 static USHORT _far irq_handler_02(void)  { call_ahci_intr(2); }
    108 static USHORT _far irq_handler_03(void)  { call_ahci_intr(3); }
    109 static USHORT _far irq_handler_04(void)  { call_ahci_intr(4); }
    110 static USHORT _far irq_handler_05(void)  { call_ahci_intr(5); }
    111 static USHORT _far irq_handler_06(void)  { call_ahci_intr(6); }
    112 static USHORT _far irq_handler_07(void)  { call_ahci_intr(7); }
     105static USHORT _far APIENTRY irq_handler_00(void)  { call_ahci_intr(0); }
     106static USHORT _far APIENTRY irq_handler_01(void)  { call_ahci_intr(1); }
     107static USHORT _far APIENTRY irq_handler_02(void)  { call_ahci_intr(2); }
     108static USHORT _far APIENTRY irq_handler_03(void)  { call_ahci_intr(3); }
     109static USHORT _far APIENTRY irq_handler_04(void)  { call_ahci_intr(4); }
     110static USHORT _far APIENTRY irq_handler_05(void)  { call_ahci_intr(5); }
     111static USHORT _far APIENTRY irq_handler_06(void)  { call_ahci_intr(6); }
     112static USHORT _far APIENTRY irq_handler_07(void)  { call_ahci_intr(7); }
    113113
    114114PFN irq_handlers[] = {
     
    185185        if (val & HOST_CAP2_NVMHCI)    printf(" nvmhci");
    186186        if (val & HOST_CAP2_APST)      printf(" apst");
    187      
     187
    188188      }
    189189      printf("\n");
     
    427427    goto exit_port_scan;
    428428  }
    429  
     429
    430430  /* perform port scan */
    431431  dprintf("scanning ports on adapter #%d\n", ad_no(ai));
     
    456456      /* this port has a device attached and is ready to accept commands */
    457457      ddprintf("port #%d seems to be attached to a device; probing...\n", p);
    458       rc = ahci_exec_polled_cmd(ai, p, 0, 500, ATA_CMD_ID_ATA, 
     458      rc = ahci_exec_polled_cmd(ai, p, 0, 500, ATA_CMD_ID_ATA,
    459459                                AP_VADDR, (void _far *) id_buf, 512,
    460460                                AP_END);
     
    865865    if (aws->is_ncq && port->reg_cmds == 0 || !aws->is_ncq && port->ncq_cmds == 0) {
    866866
    867       /* Find next available command slot. We use a simple round-robin 
     867      /* Find next available command slot. We use a simple round-robin
    868868       * algorithm for this to prevent commands with higher slot indexes
    869869       * from stalling when new commands are coming in frequently.
     
    954954    goto restore_bios_config;
    955955  }
    956  
     956
    957957  /* save port configuration */
    958958  if ((pc = ahci_save_port_config(ai, p)) == NULL) {
     
    11321132  u32 active_cmds;
    11331133  u32 done_mask;
    1134  
     1134
    11351135  ddprintf("port interrupt for adapter #%d, port #%d\n", ad_no(ai), p);
    11361136  memset(&done_queue, 0x00, sizeof(done_queue));
     
    11401140  writel(port_mmio + PORT_IRQ_STAT, irq_stat);
    11411141  readl(port_mmio + PORT_IRQ_STAT); /* flush */
    1142  
     1142
    11431143  if (irq_stat & PORT_IRQ_ERROR) {
    11441144    /* this is an error interrupt */
     
    12581258    /* no point analyzing device errors after a reset... */
    12591259    return;
    1260   } 
     1260  }
    12611261
    12621262  /* Handle device-specific errors. Those errors typically involve restarting
     
    12691269  }
    12701270}
    1271    
     1271
    12721272/******************************************************************************
    12731273 * Get device or media geometry. Device and media geometry are expected to be
     
    13041304
    13051305  ahci_exec_iorb(iorb, 1, cmd_func(iorb, read));
    1306 } 
     1306}
    13071307
    13081308/******************************************************************************
     
    13441344        ((IORB_ADAPTER_PASSTHRU _far *) iorb)->ControllerCmdLen,
    13451345        "ahci_execute_cdb(%d.%d.%d)", a, p, d);
    1346  
     1346
    13471347  if (ad_infos[a].ports[p].devs[d].atapi) {
    13481348    ahci_exec_iorb(iorb, 0, atapi_execute_cdb);
     
    13611361  int p = iorb_unit_port(iorb);
    13621362  int d = iorb_unit_device(iorb);
    1363  
     1363
    13641364  dphex(((IORB_ADAPTER_PASSTHRU _far *) iorb)->pControllerCmd,
    13651365        ((IORB_ADAPTER_PASSTHRU _far *) iorb)->ControllerCmdLen,
    13661366        "ahci_execute_cdb(%d.%d.%d)", a, p, d);
    1367  
     1367
    13681368  if (ad_infos[a].ports[p].devs[d].atapi) {
    13691369    iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
Note: See TracChangeset for help on using the changeset viewer.