Changeset 155 for trunk


Ignore:
Timestamp:
Apr 15, 2013, 11:46:26 PM (12 years ago)
Author:
David Azarewicz
Message:

debugging updates

Location:
trunk/src/os2ahci
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/Makefile

    r154 r155  
    146146    @%append $^@ /* Autogenerated by Makefile */
    147147    @%append $^@ $#define VERSION $(BLD_MAJOR)$(BLD_MINOR) /* driver version (2 implied decimals) */
     148    @%append $^@ $#define DVENDOR "$(VENDOR)"
    148149    @AddToFile $^@,$#define BLD_YEAR,DATEYEAR
    149150    @AddToFile $^@,$#define BLD_MONTH,DATEMONTH
  • trunk/src/os2ahci/ahci.c

    r154 r155  
    559559    if (ai->port_map & (1UL << p)) {
    560560
    561       dprintf("ahci_scan_ports: Wait till not busy on port %d\n", p);
     561      ddprintf("ahci_scan_ports: Wait till not busy on port %d\n", p);
    562562      /* wait until all active commands have completed on this port */
    563563      while (ahci_port_busy(ai, p)) {
     
    720720  int timeout;
    721721
    722   ddprintf("ahci_reset_port: resetting port %d.%d\n", ad_no(ai), p);
     722  dprintf("ahci_reset_port: resetting port %d.%d\n", ad_no(ai), p);
    723723  if (debug > 1) {
    724724    printf(" PORT_CMD       = 0x%lx\n", readl(port_mmio + PORT_CMD));
     
    784784
    785785  /* start port so we can receive the COMRESET FIS */
    786   ddprintf("ahci_reset_port: starting port %d again\n", p);
     786  dprintf("ahci_reset_port: starting port %d again\n", p);
    787787  ahci_start_port(ai, p, ei);
    788788
     
    14571457  u32 done_mask;
    14581458
    1459   ddprintf("port interrupt for adapter #%d, port #%d, stack frame %Fp\n", ad_no(ai),
    1460            p, (void _far *) &done_queue);
    1461   memset(&done_queue, 0x00, sizeof(done_queue));
    1462 
    14631459  /* get interrupt status and clear it right away */
    14641460  irq_stat = readl(port_mmio + PORT_IRQ_STAT);
    14651461  writel(port_mmio + PORT_IRQ_STAT, irq_stat);
    14661462  readl(port_mmio + PORT_IRQ_STAT); /* flush */
     1463
     1464  ddprintf("port interrupt for adapter %d port %d stat %lx stack frame %Fp\n",
     1465        ad_no(ai), p, irq_stat, (void _far *)&done_queue);
     1466  memset(&done_queue, 0x00, sizeof(done_queue));
    14671467
    14681468  if (irq_stat & PORT_IRQ_ERROR) {
  • trunk/src/os2ahci/ahci.h

    r101 r155  
    5757 */
    5858#define AHCI_PCI_BAR            5
    59 #define AHCI_MAX_PORTS          32
     59#define AHCI_MAX_PORTS          16 /* Spec says 32, but we only support 16 */
    6060#define AHCI_MAX_SG             48 /* hardware max is 64K */
    6161#define AHCI_MAX_SG_ELEMENT_LEN (1UL << 22)
  • trunk/src/os2ahci/ata.c

    r154 r155  
    741741
    742742  io->BlocksXferred += add_workspace(iorb)->blocks;
    743   dprintf("ata_read_pp(): blocks transferred = %d\n", (int) io->BlocksXferred);
     743  ddprintf("ata_read_pp(): blocks transferred = %d\n", (int) io->BlocksXferred);
    744744
    745745  if (io->BlocksXferred >= io->BlockCount) {
     
    908908
    909909  io->BlocksXferred += add_workspace(iorb)->blocks;
    910   dprintf("ata_write_pp(): blocks transferred = %d\n", (int) io->BlocksXferred);
     910  ddprintf("ata_write_pp(): blocks transferred = %d\n", (int) io->BlocksXferred);
    911911
    912912  if (io->BlocksXferred >= io->BlockCount) {
  • trunk/src/os2ahci/atapi.c

    r112 r155  
    5151int atapi_get_geometry(IORBH _far *iorb, int slot)
    5252{
     53  dprintf("atapi_get_geometry called\n");
    5354  iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
    5455  return(-1);
     
    6061int atapi_unit_ready(IORBH _far *iorb, int slot)
    6162{
    62   ddprintf("atapi_unit_ready called\n");
     63  dprintf("atapi_unit_ready called\n");
    6364  iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
    6465  return(-1);
     
    274275  size_t sense_buf_len = ATAPI_SENSE_LEN;
    275276
     277  dprintf("atapi_req_sense\n");
     278
    276279  if ((iorb->RequestControl & IORB_REQ_STATUSBLOCK) &&
    277280      iorb->StatusBlockLen >= sizeof(*ssb) && iorb->pStatusBlock != 0) {
  • trunk/src/os2ahci/init.asm

    r153 r155  
    3434
    3535DEVHDR          SEGMENT WORD PUBLIC 'DATA'
    36 _dev_hdr        dd      _legacy_hdr             ; next device header
     36_dev_hdr        dd      _next_hdr               ; next device header
    3737                dw      DEVLEV_3 + DEV_CHAR_DEV + DEV_IDC ; flags for ADD drivers
    3838                dw      OFFSET _asm_strat       ; strategy routine
     
    4343                dw      0
    4444
     45if 1
    4546; This is here to support old SMART tools. This is a really bad thing to do as it will
    4647; cause problems in the future. The SMART tools should be fixed instead.
    47 _legacy_hdr     dd      -1                      ; no headers after this one
     48_next_hdr       dd      -1                      ; no headers after this one
    4849                dw      DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers
    4950                dw      OFFSET _asm_strat       ; strategy routine
     
    5354                dd      0
    5455                dw      0
     56else
     57_next_hdr       equ -1
     58endif
    5559
    5660DEVHDR          ENDS
  • trunk/src/os2ahci/os2ahci.c

    r154 r155  
    106106  drv_name,                        /* driver name */
    107107  "AHCI SATA Driver",              /* driver description */
    108   "GNU",                           /* vendor name */
     108  DVENDOR,                         /* vendor name */
    109109  CMVERSION_MAJOR,                 /* RM interface version major */
    110110  CMVERSION_MINOR,                 /* RM interface version minor */
     
    246246        /* set COM port base address for debug messages */
    247247        drv_parm_int(s, com_base, u16, 16);
     248        if (com_base == 1) com_base = 0x3f8;
     249        if (com_base == 2) com_base = 0x2f8;
    248250        break;
    249251
     
    811813
    812814      /* DAZ turn off COM port output if on */
    813       com_base = 0;
     815      //com_base = 0;
    814816
    815817      /* release all adapters */
     
    12411243    }
    12421244
    1243     if (debug >= min_debug) {
     1245    if (debug > min_debug) {
    12441246      printf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n",
    12451247             iorb, iorb->CommandCode, iorb->CommandModifier, queue, queue_type,
     
    13441346  iorb->Status |= IORB_DONE;
    13451347
    1346   dprintf("IORB %Fp complete (status = 0x%04x, error = 0x%04x)\n",
     1348  ddprintf("IORB %Fp complete (status = 0x%04x, error = 0x%04x)\n",
    13471349          iorb, iorb->Status, iorb->ErrorCode);
    13481350
Note: See TracChangeset for help on using the changeset viewer.