Index: auixp.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/auixp.c,v retrieving revision 1.49 diff -u -p -u -r1.49 auixp.c --- auixp.c 29 Feb 2020 06:34:30 -0000 1.49 +++ auixp.c 14 May 2020 19:19:49 -0000 @@ -1058,9 +1058,11 @@ auixp_attach(device_t parent, device_t s static_sc = sc; #endif +printf("%s: %d\n", __func__, __LINE__); /* print information confirming attachment */ pci_aprint_devinfo(pa, "Audio controller"); +printf("%s: %d\n", __func__, __LINE__); /* set up details from our set of known `cards'/chips */ for (card = auixp_card_types; card->pci_vendor_id; card++) if (PCI_VENDOR(pa->pa_id) == card->pci_vendor_id && @@ -1069,18 +1071,21 @@ auixp_attach(device_t parent, device_t s break; } +printf("%s: %d\n", __func__, __LINE__); /* device only has 32 bit non prefetchable memory */ /* set MEM space access and enable the card's busmastering */ data = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG); data |= (PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE); pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, data); +printf("%s: %d\n", __func__, __LINE__); /* map memory; its not sized -> what is the size? max PCI slot size? */ if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_iot, &sc->sc_ioh, &sc->sc_iob, &sc->sc_ios)) { aprint_error_dev(sc->sc_dev, "can't map memory space\n"); return; } +printf("%s: %d\n", __func__, __LINE__); /* Initialize softc */ sc->sc_tag = tag; @@ -1088,26 +1093,31 @@ auixp_attach(device_t parent, device_t s sc->sc_dmat = pa->pa_dmat; SLIST_INIT(&sc->sc_dma_list); +printf("%s: %d\n", __func__, __LINE__); /* get us the auixp_dma structures */ auixp_allocate_dma_chain(sc, &sc->sc_output_dma); auixp_allocate_dma_chain(sc, &sc->sc_input_dma); +printf("%s: %d\n", __func__, __LINE__); /* when that fails we are dead in the water */ if (!sc->sc_output_dma || !sc->sc_input_dma) return; +printf("%s: %d\n", __func__, __LINE__); #if 0 /* could preliminary program DMA chain */ auixp_program_dma_chain(sc, sc->sc_output_dma); auixp_program_dma_chain(sc, sc->sc_input_dma); #endif +printf("%s: %d\n", __func__, __LINE__); /* map interrupt on the pci bus */ if (pci_intr_map(pa, &ih)) { aprint_error_dev(sc->sc_dev, "can't map interrupt\n"); return; } +printf("%s: %d\n", __func__, __LINE__); /* where are we connected at ? */ intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf)); @@ -1117,6 +1127,7 @@ auixp_attach(device_t parent, device_t s /* establish interrupt routine hookup at IPL_AUDIO level */ sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_AUDIO, auixp_intr, self, device_xname(self)); +printf("%s: %d\n", __func__, __LINE__); if (sc->sc_ih == NULL) { aprint_error_dev(sc->sc_dev, "can't establish interrupt"); if (intrstr != NULL) @@ -1124,8 +1135,10 @@ auixp_attach(device_t parent, device_t s aprint_error("\n"); return; } +printf("%s: %d\n", __func__, __LINE__); aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr); +printf("%s: %d\n", __func__, __LINE__); /* power up chip */ if ((error = pci_activate(pa->pa_pc, pa->pa_tag, self, pci_activate_null)) && error != EOPNOTSUPP) { @@ -1134,16 +1147,19 @@ auixp_attach(device_t parent, device_t s return; } +printf("%s: %d\n", __func__, __LINE__); /* init chip */ if (auixp_init(sc) == -1) { aprint_error_dev(sc->sc_dev, "auixp_attach: unable to initialize the card\n"); return; } +printf("%s: %d\n", __func__, __LINE__); if (!pmf_device_register(self, NULL, auixp_resume)) aprint_error_dev(self, "couldn't establish power handler\n"); +printf("%s: %d\n", __func__, __LINE__); /* * delay further configuration of codecs and audio after interrupts * are enabled.