Changeset 207 for trunk/src/os2ahci/ahci.c
- Timestamp:
- Feb 23, 2021, 10:10:11 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ahci.c
r205 r207 79 79 u32 version; 80 80 81 DPRINTF(2,"AHCI global registers for adapter %d %d:%d:%d irq=%d addr=0x%x\n",81 dprintf(0,"AHCI global registers for adapter %d %d:%d:%d irq=%d addr=0x%x\n", 82 82 ad_no(ai), 83 83 PCI_BUS_FROM_BDF(ai->bus_dev_func), PCI_DEV_FROM_BDF(ai->bus_dev_func), 84 84 PCI_FUNC_FROM_BDF(ai->bus_dev_func), ai->irq, ai->mmio_phys); 85 85 86 for (i = 0; i <= HOST_CAP2; i += sizeof(u32)) { 86 for (i = 0; i <= HOST_CAP2; i += sizeof(u32)) 87 { 87 88 u32 val; 88 89 … … 98 99 dprintf(0," %02x: %08lx", i, val); 99 100 100 if (i == HOST_CAP) { 101 if (i == HOST_CAP) 102 { 101 103 dprintf(0," -"); 102 104 if (val & HOST_CAP_64) dprintf(0," 64bit"); … … 119 121 dprintf(0," cmd_slots:%d", ((val >> 8) & 0x1f) + 1); 120 122 dprintf(0," ports:%d", (val & 0x1f) + 1); 121 } else if (i == HOST_CTL) { 123 } 124 else if (i == HOST_CTL) 125 { 122 126 dprintf(0," -"); 123 127 if (val & HOST_AHCI_EN) dprintf(0," ahci_enabled"); 124 128 if (val & HOST_IRQ_EN) dprintf(0," irq_enabled"); 125 129 if (val & HOST_RESET) dprintf(0," resetting"); 126 } else if (i == HOST_CAP2) { 130 } 131 else if (i == HOST_CAP2) 132 { 127 133 dprintf(0," -"); 128 134 if (val & HOST_CAP2_BOH) dprintf(0," boh"); … … 278 284 } 279 285 280 DUMP_HOST_REGS( 2,ai,1);286 DUMP_HOST_REGS(6,ai,1); 281 287 282 288 return(0); … … 529 535 int i; 530 536 531 DPRINTF( 1,__func__": completing initialization of adapter #%d\n", ad_no(ai));537 DPRINTF(2,__func__": completing initialization of adapter #%d\n", ad_no(ai)); 532 538 533 539 if (!ai->int_set) … … 609 615 /* pci_enable_int(ai->bus, ai->dev_func); */ 610 616 611 DPRINTF( 1,__func__": done\n");617 DPRINTF(2,__func__": done\n"); 612 618 return(0); 613 619 } … … 834 840 { 835 841 /* this port seems to have a device attached and ready for commands */ 836 DPRINTF( 1,__func__": port %d seems to be attached to a device; probing...\n", p);842 DPRINTF(2,__func__": port %d seems to be attached to a device; probing...\n", p); 837 843 838 844 #ifdef DAZ_NEW_CODE … … 909 915 TIMER Timer; 910 916 911 DPRINTF( 2,__func__": resetting port %d.%d\n", ad_no(ai), p);912 DUMP_PORT_REGS( 2,ai,p);917 DPRINTF(3,__func__": resetting port %d.%d\n", ad_no(ai), p); 918 DUMP_PORT_REGS(3,ai,p); 913 919 914 920 /* stop port engines (we don't care whether there is an error doing so) */ … … 944 950 945 951 /* wait for communication to be re-established after port reset */ 946 DPRINTF( 2,"Wait for communication...\n");952 DPRINTF(3,"Wait for communication...\n"); 947 953 TimerInit(&Timer, 500); 948 954 while (((tmp = readl(port_mmio + PORT_SCR_STAT)) & 3) != 3) … … 950 956 if (TimerCheckAndBlock(&Timer)) 951 957 { 952 DPRINTF( 0,"no device present after resetting port #%d (PORT_SCR_STAT = 0x%x)\n", p, tmp);958 DPRINTF(2,"no device present after resetting port #%d (PORT_SCR_STAT = 0x%x)\n", p, tmp); 953 959 return(-1); 954 960 } … … 960 966 961 967 /* start port so we can receive the COMRESET FIS */ 962 DPRINTF( 2,__func__": starting port %d again\n", p);968 DPRINTF(3,__func__": starting port %d again\n", p); 963 969 ahci_start_port(ai, p, ei); 964 970 … … 1794 1800 } 1795 1801 1796 dprintf(0,"port #%d interrupt error status: 0x%08lx; restarting port\n", p, irq_stat); 1802 #ifdef DEBUG 1803 dprintf(0,"port #%d interrupt error status: 0x%08x; restarting port\n", p, irq_stat); 1804 #else 1805 if (!ai->ports[p].devs[0].atapi || D32g_DbgLevel) 1806 { 1807 dprintf(0,"port #%d interrupt error status: 0x%08x; restarting port\n", p, irq_stat); 1808 } 1809 #endif 1797 1810 1798 1811 /* Handle device-specific errors. Those errors typically involve restarting
Note:
See TracChangeset
for help on using the changeset viewer.