Changeset 82 for trunk/src/os2ahci/ahci.c
- Timestamp:
- Mar 2, 2011, 11:48:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ahci.c
r80 r82 298 298 ai->pci->vendor == PCI_VENDOR_ID_INTEL) { 299 299 300 /* This BIOS apparently accesses th iscontroller via SATA registers and300 /* This BIOS apparently accesses the controller via SATA registers and 301 301 * the AHCI spec says that we should issue a COMRESET on each port after 302 302 * disabling AHCI mode to allow the SATA controller to re-recognize attached … … 402 402 if (ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) { 403 403 /* BIOS uses AHCI, too, so we need to restore the port settings; 404 * restoring PORT_CMD way well start the port again but that's what404 * restoring PORT_CMD may well start the port again but that's what 405 405 * this function is all about. 406 406 */ … … 579 579 } 580 580 } 581 582 581 if (i >= irq_map_cnt) { 583 582 dprintf("registering interrupt #%d\n", ai->irq); 584 585 583 if (DevHelp_SetIRQ(mk_NPFN(irq_handlers[irq_map_cnt]), ai->irq, 1) != 0) { 586 584 dprintf("failed to register shared interrupt\n"); 587 588 585 if (DevHelp_SetIRQ(mk_NPFN(irq_handlers[irq_map_cnt]), ai->irq, 0) != 0) { 589 586 dprintf("failed to register exclusive interrupt\n"); … … 672 669 673 670 /* set link speed and power management options */ 671 ddprintf("setting link speed and power management options\n"); 674 672 tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x00000ff0UL; 675 673 tmp |= ((u32) link_speed[ad_no(ai)][p] & 0x0f) << 4; … … 678 676 679 677 /* issue COMRESET on the port */ 678 ddprintf("issuing COMRESET on port\n"); 680 679 tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x0000000fUL; 681 680 writel(port_mmio + PORT_SCR_CTL, tmp | 1); … … 704 703 705 704 /* start port so we can receive the COMRESET FIS */ 705 ddprintf("starting port again\n"); 706 706 ahci_start_port(ai, p, ei); 707 707 … … 989 989 990 990 if (!init_complete) { 991 /* no IRQ handlers or context hooks availabe at this point */ 991 992 ai->busy = 1; 992 993 spin_unlock(drv_lock); … … 1014 1015 1015 1016 if ((*cmds & (1UL << port->cmd_slot)) == 0) { 1016 /* prepare command */1017 /* found idle command slot; prepare command */ 1017 1018 if (func(iorb, port->cmd_slot)) { 1018 1019 /* Command preparation failed, or no HW command required; IORB
Note:
See TracChangeset
for help on using the changeset viewer.