Ignore:
Timestamp:
Apr 10, 2013, 6:47:05 PM (12 years ago)
Author:
David Azarewicz
Message:

Begin adding user info output.
Added LVM support.

File:
1 edited

Legend:

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

    r148 r154  
    144144  ddprintf("ahci_save_bios_config: BIOS AHCI mode is %d\n", ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN);
    145145
     146#if 0
    146147  if ((ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) == 0 &&
    147148      ai->pci->vendor == PCI_VENDOR_ID_INTEL) {
     
    151152    init_reset = 1;
    152153  }
     154#endif
    153155
    154156  /* HOST_CAP2 only exists for AHCI V1.2 and later */
     
    676678    if (ai->port_map & (1UL << p)) {
    677679      if (init_reset) {
    678         dprintf("ahci_complete_init: resetting port %d\n", p);
     680        ddprintf("ahci_complete_init: resetting port %d\n", p);
    679681        ahci_reset_port(ai, p, 1);
    680682      } else {
    681         dprintf("ahci_complete_init: restarting port #%d\n", p);
     683        ddprintf("ahci_complete_init: restarting port #%d\n", p);
    682684        ahci_stop_port(ai, p);
    683685        ahci_start_port(ai, p, 1);
     
    718720  int timeout;
    719721
    720   dprintf("ahci_reset_port: resetting port %d.%d\n", ad_no(ai), p);
     722  ddprintf("ahci_reset_port: resetting port %d.%d\n", ad_no(ai), p);
    721723  if (debug > 1) {
    722724    printf(" PORT_CMD       = 0x%lx\n", readl(port_mmio + PORT_CMD));
     
    749751  /* set link speed and power management options */
    750752  ddprintf("ahci_reset_port: setting link speed and power management options\n");
    751   tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x00000fffUL; //DAZ
     753  tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x00000fffUL;
    752754  tmp |= ((u32) link_speed[ad_no(ai)][p] & 0x0f) << 4;
    753755  tmp |= ((u32) link_power[ad_no(ai)][p] & 0x0f) << 8;
    754   //DAZ writel(port_mmio + PORT_SCR_CTL, tmp);
     756  writel(port_mmio + PORT_SCR_CTL, tmp);
    755757
    756758  /* issue COMRESET on the port */
    757759  ddprintf("ahci_reset_port: issuing COMRESET on port %d\n", p);
    758   //DAZ tmp = readl(port_mmio + PORT_SCR_CTL) & ~0x0000000fUL;
    759760  writel(port_mmio + PORT_SCR_CTL, tmp | 1);
    760761  readl(port_mmio + PORT_SCR_CTL);  /* flush */
     
    810811  u8 _far *port_mmio = port_base(ai, p);
    811812  u32 status;
    812   //int timeout;
    813 
    814   dprintf("ahci_start_port %d.%d\n", ad_no(ai), p);
     813
     814  ddprintf("ahci_start_port %d.%d\n", ad_no(ai), p);
    815815  /* check whether device presence is detected and link established */
    816 
    817 #if 0
    818   /* wait for communication to be re-established after port reset */
    819   timeout = 5000;
    820   while (((status = readl(port_mmio + PORT_SCR_STAT)) & 3) != 3) {
    821     mdelay(10);
    822     timeout -= 10;
    823     if (timeout <= 0) {
    824       dprintf("ahci_start_port #%d (PORT_SCR_STAT = 0x%lx)\n", p, status);
    825       return(-1);
    826     }
    827   }
    828 #endif
    829816
    830817  status = readl(port_mmio + PORT_SCR_STAT);
     
    920907  int rc;
    921908
    922   dprintf("ahci_stop_port %d.%d\n", ad_no(ai), p);
     909  ddprintf("ahci_stop_port %d.%d\n", ad_no(ai), p);
    923910
    924911  /* disable port interrupts */
     
    11951182
    11961183  /* restart/reset port (includes the necessary port configuration) */
    1197   if ((ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) == 0 &&
    1198       ai->pci->vendor == PCI_VENDOR_ID_INTEL) {
     1184  if (init_reset) {
    11991185    /* As outlined in ahci_restore_bios_config(), switching back and
    12001186     * forth between SATA and AHCI mode requires a COMRESET to force
     
    18031789}
    18041790
    1805 
Note: See TracChangeset for help on using the changeset viewer.