Home | History | Annotate | Download | only in pci

Lines Matching refs:psc

299 	struct ahci_pci_softc *psc = (struct ahci_pci_softc *)sc;
308 KASSERT(psc->sc_pihp != NULL);
309 KASSERT(psc->sc_nintr > 0);
313 if (psc->sc_nintr == 1 || sc->sc_ghc_mrsm) {
319 if (psc->sc_ih[vec] != NULL) {
336 if (sc->sc_atac.atac_nchannels > psc->sc_nintr
337 && port >= (psc->sc_nintr - 1)) {
340 vec = psc->sc_nintr - 1;
342 if (psc->sc_ih[vec] != NULL) {
356 KASSERT(port < psc->sc_nintr);
357 KASSERT(psc->sc_ih[port] == NULL);
367 intrstr = pci_intr_string(psc->sc_pc, psc->sc_pihp[vec], intrbuf,
369 psc->sc_ih[vec] = pci_intr_establish_xname(psc->sc_pc,
370 psc->sc_pihp[vec], IPL_BIO, intr_handler, intr_arg, intr_xname);
371 if (psc->sc_ih[vec] == NULL) {
391 struct ahci_pci_softc *psc = device_private(self);
392 struct ahci_softc *sc = &psc->ah_sc;
406 psc->sc_pc = pa->pa_pc;
407 psc->sc_pcitag = pa->pa_tag;
418 if (pci_intr_alloc(pa, &psc->sc_pihp, counts, PCI_INTR_TYPE_MSIX)) {
423 psc->sc_nintr = counts[pci_intr_type(pa->pa_pc, psc->sc_pihp[0])];
424 psc->sc_ih = kmem_zalloc(sizeof(void *) * psc->sc_nintr, KM_SLEEP);
449 reg = pci_conf_read(psc->sc_pc, psc->sc_pcitag, PCI_COMMAND_STATUS_REG);
451 pci_conf_write(psc->sc_pc, psc->sc_pcitag, PCI_COMMAND_STATUS_REG, reg);
460 if (psc->sc_pihp != NULL) {
461 pci_intr_release(psc->sc_pc, psc->sc_pihp, psc->sc_nintr);
462 psc->sc_pihp = NULL;
476 struct ahci_pci_softc *psc = device_private(dv);
477 struct ahci_softc *sc = &psc->ah_sc;
485 struct ahci_pci_softc *psc;
489 psc = device_private(dv);
490 sc = &psc->ah_sc;
497 if (psc->sc_ih != NULL) {
498 for (int intr = 0; intr < psc->sc_nintr; intr++) {
499 if (psc->sc_ih[intr] != NULL) {
500 pci_intr_disestablish(psc->sc_pc,
501 psc->sc_ih[intr]);
502 psc->sc_ih[intr] = NULL;
506 kmem_free(psc->sc_ih, sizeof(void *) * psc->sc_nintr);
507 psc->sc_ih = NULL;
510 if (psc->sc_pihp != NULL) {
511 pci_intr_release(psc->sc_pc, psc->sc_pihp, psc->sc_nintr);
512 psc->sc_pihp = NULL;
523 struct ahci_pci_softc *psc = device_private(dv);
524 struct ahci_softc *sc = &psc->ah_sc;