Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/pci Apply patch (requested by bouyer in ticket #1...
details: https://anonhg.NetBSD.org/src/rev/439408c77412
branches: netbsd-8
changeset: 371224:439408c77412
user: snj <snj%NetBSD.org@localhost>
date: Thu Sep 29 14:38:24 2022 +0000
description:
Apply patch (requested by bouyer in ticket #1767):
Convert from pci_intr_map() to pci_intr_alloc(); makes the driver use
MSI/MSI-x when available.
diffstat:
sys/dev/pci/mpii.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 47b46691109f -r 439408c77412 sys/dev/pci/mpii.c
--- a/sys/dev/pci/mpii.c Fri Sep 16 18:40:23 2022 +0000
+++ b/sys/dev/pci/mpii.c Thu Sep 29 14:38:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.8.10.6 2020/08/09 14:17:48 martin Exp $ */
+/* $NetBSD: mpii.c,v 1.8.10.7 2022/09/29 14:38:24 snj Exp $ */
/* OpenBSD: mpii.c,v 1.115 2012/04/11 13:29:14 naddy Exp */
/*
* Copyright (c) 2010 Mike Belopuhov <mkb%crypt.org.ru@localhost>
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.6 2020/08/09 14:17:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.7 2022/09/29 14:38:24 snj Exp $");
#include "bio.h"
@@ -168,6 +168,7 @@
pcitag_t sc_tag;
void *sc_ih;
+ pci_intr_handle_t *sc_pihp;
struct scsipi_adapter sc_adapt;
struct scsipi_channel sc_chan;
@@ -459,7 +460,6 @@
struct pci_attach_args *pa = aux;
pcireg_t memtype;
int r;
- pci_intr_handle_t ih;
struct mpii_ccb *ccb;
struct scsipi_adapter *adapt = &sc->sc_adapt;
struct scsipi_channel *chan = &sc->sc_chan;
@@ -506,13 +506,14 @@
MPII_INTR_MASK_DOORBELL);
/* hook up the interrupt */
- if (pci_intr_map(pa, &ih) != 0) {
+ if (pci_intr_alloc(pa, &sc->sc_pihp, NULL, 0)) {
aprint_error_dev(self, "unable to map interrupt\n");
goto unmap;
}
- intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, sizeof(intrbuf));
- pci_intr_setattr(pa->pa_pc, &ih, PCI_INTR_MPSAFE, true);
- sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, ih, IPL_BIO,
+ intrstr = pci_intr_string(pa->pa_pc, sc->sc_pihp[0],
+ intrbuf, sizeof(intrbuf));
+ pci_intr_setattr(pa->pa_pc, &sc->sc_pihp[0], PCI_INTR_MPSAFE, true);
+ sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, sc->sc_pihp[0], IPL_BIO,
mpii_intr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt");
Home |
Main Index |
Thread Index |
Old Index