- Timestamp:
- Apr 15, 2013, 11:46:26 PM (12 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r154 r155 146 146 @%append $^@ /* Autogenerated by Makefile */ 147 147 @%append $^@ $#define VERSION $(BLD_MAJOR)$(BLD_MINOR) /* driver version (2 implied decimals) */ 148 @%append $^@ $#define DVENDOR "$(VENDOR)" 148 149 @AddToFile $^@,$#define BLD_YEAR,DATEYEAR 149 150 @AddToFile $^@,$#define BLD_MONTH,DATEMONTH -
trunk/src/os2ahci/ahci.c
r154 r155 559 559 if (ai->port_map & (1UL << p)) { 560 560 561 d printf("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); 562 562 /* wait until all active commands have completed on this port */ 563 563 while (ahci_port_busy(ai, p)) { … … 720 720 int timeout; 721 721 722 d dprintf("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); 723 723 if (debug > 1) { 724 724 printf(" PORT_CMD = 0x%lx\n", readl(port_mmio + PORT_CMD)); … … 784 784 785 785 /* start port so we can receive the COMRESET FIS */ 786 d dprintf("ahci_reset_port: starting port %d again\n", p);786 dprintf("ahci_reset_port: starting port %d again\n", p); 787 787 ahci_start_port(ai, p, ei); 788 788 … … 1457 1457 u32 done_mask; 1458 1458 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 1463 1459 /* get interrupt status and clear it right away */ 1464 1460 irq_stat = readl(port_mmio + PORT_IRQ_STAT); 1465 1461 writel(port_mmio + PORT_IRQ_STAT, irq_stat); 1466 1462 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)); 1467 1467 1468 1468 if (irq_stat & PORT_IRQ_ERROR) { -
trunk/src/os2ahci/ahci.h
r101 r155 57 57 */ 58 58 #define AHCI_PCI_BAR 5 59 #define AHCI_MAX_PORTS 3259 #define AHCI_MAX_PORTS 16 /* Spec says 32, but we only support 16 */ 60 60 #define AHCI_MAX_SG 48 /* hardware max is 64K */ 61 61 #define AHCI_MAX_SG_ELEMENT_LEN (1UL << 22) -
trunk/src/os2ahci/ata.c
r154 r155 741 741 742 742 io->BlocksXferred += add_workspace(iorb)->blocks; 743 d printf("ata_read_pp(): blocks transferred = %d\n", (int) io->BlocksXferred);743 ddprintf("ata_read_pp(): blocks transferred = %d\n", (int) io->BlocksXferred); 744 744 745 745 if (io->BlocksXferred >= io->BlockCount) { … … 908 908 909 909 io->BlocksXferred += add_workspace(iorb)->blocks; 910 d printf("ata_write_pp(): blocks transferred = %d\n", (int) io->BlocksXferred);910 ddprintf("ata_write_pp(): blocks transferred = %d\n", (int) io->BlocksXferred); 911 911 912 912 if (io->BlocksXferred >= io->BlockCount) { -
trunk/src/os2ahci/atapi.c
r112 r155 51 51 int atapi_get_geometry(IORBH _far *iorb, int slot) 52 52 { 53 dprintf("atapi_get_geometry called\n"); 53 54 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED); 54 55 return(-1); … … 60 61 int atapi_unit_ready(IORBH _far *iorb, int slot) 61 62 { 62 d dprintf("atapi_unit_ready called\n");63 dprintf("atapi_unit_ready called\n"); 63 64 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED); 64 65 return(-1); … … 274 275 size_t sense_buf_len = ATAPI_SENSE_LEN; 275 276 277 dprintf("atapi_req_sense\n"); 278 276 279 if ((iorb->RequestControl & IORB_REQ_STATUSBLOCK) && 277 280 iorb->StatusBlockLen >= sizeof(*ssb) && iorb->pStatusBlock != 0) { -
trunk/src/os2ahci/init.asm
r153 r155 34 34 35 35 DEVHDR SEGMENT WORD PUBLIC 'DATA' 36 _dev_hdr dd _ legacy_hdr; next device header36 _dev_hdr dd _next_hdr ; next device header 37 37 dw DEVLEV_3 + DEV_CHAR_DEV + DEV_IDC ; flags for ADD drivers 38 38 dw OFFSET _asm_strat ; strategy routine … … 43 43 dw 0 44 44 45 if 1 45 46 ; This is here to support old SMART tools. This is a really bad thing to do as it will 46 47 ; cause problems in the future. The SMART tools should be fixed instead. 47 _ legacy_hdrdd -1 ; no headers after this one48 _next_hdr dd -1 ; no headers after this one 48 49 dw DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers 49 50 dw OFFSET _asm_strat ; strategy routine … … 53 54 dd 0 54 55 dw 0 56 else 57 _next_hdr equ -1 58 endif 55 59 56 60 DEVHDR ENDS -
trunk/src/os2ahci/os2ahci.c
r154 r155 106 106 drv_name, /* driver name */ 107 107 "AHCI SATA Driver", /* driver description */ 108 "GNU",/* vendor name */108 DVENDOR, /* vendor name */ 109 109 CMVERSION_MAJOR, /* RM interface version major */ 110 110 CMVERSION_MINOR, /* RM interface version minor */ … … 246 246 /* set COM port base address for debug messages */ 247 247 drv_parm_int(s, com_base, u16, 16); 248 if (com_base == 1) com_base = 0x3f8; 249 if (com_base == 2) com_base = 0x2f8; 248 250 break; 249 251 … … 811 813 812 814 /* DAZ turn off COM port output if on */ 813 com_base = 0;815 //com_base = 0; 814 816 815 817 /* release all adapters */ … … 1241 1243 } 1242 1244 1243 if (debug > =min_debug) {1245 if (debug > min_debug) { 1244 1246 printf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n", 1245 1247 iorb, iorb->CommandCode, iorb->CommandModifier, queue, queue_type, … … 1344 1346 iorb->Status |= IORB_DONE; 1345 1347 1346 d printf("IORB %Fp complete (status = 0x%04x, error = 0x%04x)\n",1348 ddprintf("IORB %Fp complete (status = 0x%04x, error = 0x%04x)\n", 1347 1349 iorb, iorb->Status, iorb->ErrorCode); 1348 1350
Note:
See TracChangeset
for help on using the changeset viewer.