Subject: Re: Getting current install floppies
To: None <fvdl@wasabisystems.com>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: current-users
Date: 05/18/2001 14:18:07
Hi,

       From: Frank van der Linden <fvdl@wasabisystems.com>
    Subject: Re: Getting current install floppies
      Date : Thu, 17 May 2001 23:08:41 +0200
 Message-ID: <20010517230841.A5270@vaasje.org>

$ Btw, if you look at the FreeBSD ahc source code, you'll see that
$ AHC_ALLOW_MEMIO is not defined. Therefore, if enabling this
$ is needed to make it probe properly, I'm surprised that FreeBSD
$ does probe it correctly.

I don't know whether it make sense for this problem.

  - FreeBSD ahc driver has ahc_power_state_change() in ahc_pci_attach().
  - NetBSD ahc driver does not have it.
  - The other NetBSD driver (such as tlp_pci,rtk_pci) has 
    power state code in *_pci_attach().

tlp_pci has below in tlp_pci_attach():

       if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PWRMGMT, &pmreg, 0)) {
                reg = pci_conf_read(pc, pa->pa_tag, pmreg + 4);
                switch (reg & PCI_PMCSR_STATE_MASK) {
                case PCI_PMCSR_STATE_D1:
                case PCI_PMCSR_STATE_D2:
                        printf(": waking up from power state D%d\n%s",
                            reg & PCI_PMCSR_STATE_MASK, sc->sc_dev.dv_xname);
                        pci_conf_write(pc, pa->pa_tag, pmreg + 4,
                            (reg & ~PCI_PMCSR_STATE_MASK) |
                            PCI_PMCSR_STATE_D0);
                        break;
                case PCI_PMCSR_STATE_D3:
                        /*
                         * The card has lost all configuration data in
                         * this state, so punt.
                         */
                        printf(": unable to wake up from power state D3, "
                               "reboot required.\n");
                        pci_conf_write(pc, pa->pa_tag, pmreg + 4,
                            (reg & ~PCI_PMCSR_STATE_MASK) |
                            PCI_PMCSR_STATE_D0);
                        return;


                }
	}

        /*
         * Map the device.
         */

            ioh_valid = (pci_mapreg_map(pa, TULIP_PCI_IOBA,
            PCI_MAPREG_TYPE_IO, 0,
            &iot, &ioh, NULL, NULL) == 0);


Sorry,I don't know how to apply it for sys/dev/pci/ahc_pci.c
Regards!
---
 Masanori Kanaoka	kanaoka@ann.hi-ho.ne.jp