NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/55926
The following reply was made to PR kern/55926; it has been noted by GNATS.
From: Kouichi Hashikawa <hashikaw%mail.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: knakahara%netbsd.org@localhost
Subject: Re: kern/55926
Date: Mon, 8 Feb 2021 01:15:10 +0900
--Apple-Mail-4648B2A4-56BD-4E84-8B8B-16F9B9293BA3
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF
(Patch 2 after Patch 1)
if struct msi is not initialized, turn off PCI_MSI_CTL_MSI_ENABLE or=20
PCI_MSIX_CTL_ENABLE flag on pci_msi_machdep.c.
--- src/sys/arch/arm/pci/pci_msi_machdep.c-1 2021-01-14 13:07:53.05331457=
1=20
+0900 =20
+++ src/sys/arch/arm/pci/pci_msi_machdep.c 2021-01-15 15:43:44.51924875=
4=20
+0900 =20
@@ -84,21 +84,38 @@
{ =20
pci_intr_handle_t *vectors;
struct arm_pci_msi *msi;
+ int error, off;
+ pcireg_t ctl;=20
- if ((pa->pa_flags & PCI_FLAGS_MSI_OKAY) =3D=3D 0)
- return ENODEV;
+ if ((pa->pa_flags & PCI_FLAGS_MSI_OKAY) =3D=3D 0) {
+ error =3D ENODEV;
+ goto fail;
+ }
msi =3D arm_pci_msi_lookup(pa);
- if (msi =3D=3D NULL || msi->msi_alloc =3D=3D NULL)
- return EINVAL;
+ if (msi =3D=3D NULL || msi->msi_alloc =3D=3D NULL) {
+ error =3D EINVAL;
+ goto fail;
+ }
vectors =3D msi->msi_alloc(msi, count, pa, exact);
- if (vectors =3D=3D NULL)
- return ENOMEM;
+ if (vectors =3D=3D NULL) {
+ error =3D ENOMEM;
+ goto fail;
+ }
*ihps =3D vectors;
return 0;
+
+ fail:
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSI, &off,
+ NULL)) {
+ ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag, off + PCI_MSI_C=
TL);
+ ctl &=3D ~PCI_MSI_CTL_MSI_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag, off + PCI_MSI_CTL, ctl=
);
+ }
+ return error;
}
static int
@@ -106,21 +123,38 @@
{
pci_intr_handle_t *vectors;
struct arm_pci_msi *msi;
+ int error, off;
+ pcireg_t ctl;
- if ((pa->pa_flags & PCI_FLAGS_MSIX_OKAY) =3D=3D 0)
- return ENODEV;
+ if ((pa->pa_flags & PCI_FLAGS_MSIX_OKAY) =3D=3D 0) {
+ error =3D ENODEV;
+ goto fail;
+ }
msi =3D arm_pci_msi_lookup(pa);
- if (msi =3D=3D NULL || msi->msix_alloc =3D=3D NULL)
- return EINVAL;
+ if (msi =3D=3D NULL || msi->msix_alloc =3D=3D NULL) {
+ error =3D EINVAL;
+ goto fail;
+ }
vectors =3D msi->msix_alloc(msi, table_indexes, count, pa, exact);
- if (vectors =3D=3D NULL)
- return ENOMEM;
+ if (vectors =3D=3D NULL) {
+ error =3D ENOMEM;
+ goto fail;
+ }
*ihps =3D vectors;
return 0;
+
+ fail:
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSIX, &off,
+ NULL)) {
+ ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag, off + PCI_MSIX_=
CTL)
;
+ ctl &=3D ~PCI_MSIX_CTL_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag, off + PCI_MSIX_CTL, ct=
l)
;
+ }
+ return error;
}
/*
@@ -203,8 +237,9 @@
int
pci_intr_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihps, i=
n
t
*counts, pci_intr_type_t max_type)
{
- int intx_count, msi_count, msix_count, error;
+ int intx_count, msi_count, msix_count, off, error;
struct arm_pci_msi *msi;
+ pcireg_t ctl;
error =3D EINVAL;
@@ -245,6 +280,14 @@
return 0;
}
}
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSIX,
+ &off, NULL)) {
+ ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSIX_CTL);
+ ctl &=3D ~PCI_MSIX_CTL_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSIX_CTL, ctl);
+ }
if (msi->msi_alloc !=3D NULL) {
if (msi_count =3D=3D -1)
@@ -257,6 +300,31 @@
return 0;
}
}
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSI,
+ &off, NULL)) {
+ ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSI_CTL);
+ ctl &=3D ~PCI_MSI_CTL_MSI_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSI_CTL, ctl);
+ }
+ } else {
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSIX,
+ &off, NULL)) {
+ ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSIX_CTL);
+ ctl &=3D ~PCI_MSIX_CTL_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSIX_CTL, ctl);
+ }
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSI,
+ &off, NULL)) {
+ ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSI_CTL);
+ ctl &=3D ~PCI_MSI_CTL_MSI_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag,
+ off + PCI_MSI_CTL, ctl);
+ }
}
if (intx_count > 0 && (error =3D pci_intx_alloc(pa, ihps)) =3D=3D 0) {=
--=20
Kouichi Hashikawa
--Apple-Mail-4648B2A4-56BD-4E84-8B8B-16F9B9293BA3
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div dir=3D"ltr">=EF=BB=BF</div><div dir=3D=
"ltr"><span style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit=
-text-size-adjust: auto;"> (Patch 2 after Patch 1)</span></div><span st=
yle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb=
(0, 0, 0);">if struct msi is not initialized, turn off PCI_MSI_CTL_MSI_ENABL=
E or </span><br style=3D"-webkit-text-size-adjust: auto; caret-color: r=
gb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">PCI_MSIX_CTL_ENABLE fl=
ag on pci_msi_machdep.c.</span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br style=3D"-webkit-text-si=
ze-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span styl=
e=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0=
, 0, 0);"></span><br style=3D"-webkit-text-size-adjust: auto; caret-color: r=
gb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">--- src/sys/arch/arm/p=
ci/pci_msi_machdep.c-1 2021-01-14 13:07:53.053314571 =
</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+0</span><span style=3D"-webkit=
-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">90=
0 </=
span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0);=
color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-=
color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+++ src/sys/arch/arm/pci/pci_msi_=
machdep.c 2021-01-15 15:43:44.519248754 <=
/span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret=
-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+0</span><span style=3D"-webkit-=
text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">900=
</span><br style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">@@ -84=
,21 +84,38 @@</span><br style=3D"-webkit-text-size-adjust: auto; caret-color=
: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjus=
t: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">{ &nbs=
p; </span><br style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">  =
; pci_intr_handle_t *vectors;</span><br style=3D"-web=
kit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"=
><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"> struct arm_pc=
i_msi *msi;</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: r=
gb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &n=
bsp; int error, off;</span><br style=3D"-webkit-text-size-adjust:=
auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
+ pcireg_t ctl; </span><br style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"></span><br style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">- &nbs=
p; if ((pa->pa_flags & PCI_FLAGS_MSI_OKA=
Y) =3D=3D 0)</span><br style=3D"-webkit-text-size-adjust: auto; caret-color:=
rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust=
: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">-  =
; return EN=
ODEV;</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0,=
0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
if ((pa->pa_flags & PCI_FLAGS_MSI_OKAY) =3D=3D 0) {</span=
><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);">+  =
; error =3D ENODEV;</span><br=
style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: r=
gb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rg=
b(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; goto fail;</span><br style=3D"-w=
ebkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0)=
;"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0);=
color: rgb(0, 0, 0);">+ }</span><br sty=
le=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(=
0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0=
, 0, 0); color: rgb(0, 0, 0);"></span><br style=3D"-webkit-text-size-adjust:=
auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
msi =3D arm_pci_msi_lookup(pa);</s=
pan><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);">- &nb=
sp;if (msi =3D=3D NULL || msi->msi_alloc =3D=3D NULL)</span><br style=3D"=
-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);">- &n=
bsp; return EINVAL;</span><br style=3D"-webkit-=
text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><sp=
an style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color=
: rgb(0, 0, 0);">+ if (msi =3D=3D NULL |=
| msi->msi_alloc =3D=3D NULL) {</span><br style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-w=
ebkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0)=
;">+  =
; error =3D EINVAL;</span><br style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit=
-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp;  =
; goto fail;</span><br style=3D"-webkit-text-size-adjust: auto; caret-c=
olor: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-a=
djust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
}</span><br style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span=
><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &=
nbsp;vectors =3D msi->msi_alloc(msi, count, pa, exact);</span><br style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);">- if (vectors =3D=
=3D NULL)</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rg=
b(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">- &n=
bsp; return ENOME=
M;</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0,=
0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; ca=
ret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nb=
sp; if (vectors =3D=3D NULL) {</span><br style=3D"-webkit-text-size-adj=
ust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-=
webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);">+ &nbs=
p; error =3D ENOMEM;</span><br style=3D"-webkit-text-size-adjust:=
auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
+ &n=
bsp; goto fail;</span><br style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-siz=
e-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nb=
sp; }</span><br style=3D"-webkit-text-size-adjust: au=
to; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-=
text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></s=
pan><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);">  =
; *ihps =3D vectors;</span><br style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span=
><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &=
nbsp;return 0;</span><br style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+</span><br style=
=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0,=
0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);">+ fail:</span><br style=3D"-webkit-text-size-adj=
ust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-=
webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);">+ if (pci_get_capability(pa->pa_p=
c, pa->pa_tag, PCI_CAP_MSI, &off,</span><br style=3D"-webkit-text-siz=
e-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=
=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0,=
0, 0);">+ NULL)=
) {</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &n=
bsp; ctl =3D pci_conf_r=
ead(pa->pa_pc, pa->pa_tag, off + PCI_MSI_CTL);</span><br style=3D"-web=
kit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"=
><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);">+  =
; ctl &=3D ~PCI_MSI_CTL_MSI_ENABLE;</span><=
br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color=
: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color:=
rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp; pci_conf_write(pa->pa_pc, p=
a->pa_tag, off + PCI_MSI_CTL, ctl);</span><br style=3D"-webkit-text-size-=
adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);">+ }</span><br style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);">+ return error;</span><br s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb=
(0, 0, 0); color: rgb(0, 0, 0);">}</span><br style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-w=
ebkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0)=
;"></span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">static int</span><br style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);">@@ -106,21 +123,38 @@</span><br style=3D"-webkit-te=
xt-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span=
style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: r=
gb(0, 0, 0);">{</span><br style=3D"-webkit-text-size-adjust: auto; caret-col=
or: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adj=
ust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &nbs=
p; pci_intr_handle_t *vectors;</span><br style=3D"-we=
bkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);=
"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"> struct arm_pc=
i_msi *msi;</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: r=
gb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &n=
bsp; int error, off;</span><br style=3D"-webkit-text-size-adjust:=
auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
+ pcireg_t ctl;</span><br style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
<span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); co=
lor: rgb(0, 0, 0);"></span><br style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-siz=
e-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">- &nb=
sp; if ((pa->pa_flags & PCI_FLAGS_MSIX_OKAY) =3D=
=3D 0)</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0=
, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto=
; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">-  =
; return ENODEV;<=
/span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret=
-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
if ((pa->pa_flags & PCI_FLAGS_MSIX_OKAY) =3D=3D 0) {</span><br s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb=
(0, 0, 0); color: rgb(0, 0, 0);">+  =
; error =3D ENODEV;</span><br style=
=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0,=
0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);">+ &nbs=
p; goto fail;</span><br style=3D"-webkit-=
text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><sp=
an style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color=
: rgb(0, 0, 0);">+ }</span><br style=3D"=
-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);"></span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &n=
bsp; msi =3D arm_pci_msi_lookup(pa);</span><br s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb=
(0, 0, 0); color: rgb(0, 0, 0);">- if (m=
si =3D=3D NULL || msi->msix_alloc =3D=3D NULL)</span><br style=3D"-webkit=
-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><s=
pan style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); colo=
r: rgb(0, 0, 0);">- &n=
bsp; return EINVAL;</span><br style=3D"-webkit-text-s=
ize-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span sty=
le=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(=
0, 0, 0);">+ if (msi =3D=3D NULL || msi-=
>msix_alloc =3D=3D NULL) {</span><br style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit=
-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp;  =
; error =3D EINVAL;</span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
&nbs=
p;goto fail;</span><br style=3D"-webkit-text-size-adjust: auto; caret-color:=
rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust=
: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+  =
; }</span><br style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-siz=
e-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span><br s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb=
(0, 0, 0); color: rgb(0, 0, 0);"> v=
ectors =3D msi->msix_alloc(msi, table_indexes, count, pa, exact);</span><=
br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color=
: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color:=
rgb(0, 0, 0); color: rgb(0, 0, 0);">- i=
f (vectors =3D=3D NULL)</span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">- =
&nbs=
p;return ENOMEM;</span><br style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-ad=
just: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp; if (vectors =3D=3D NULL) {</span><br style=3D"-webkit=
-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><s=
pan style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); colo=
r: rgb(0, 0, 0);">+ &n=
bsp; error =3D ENOMEM;</span><br style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);">+ &=
nbsp; goto fail;</span><br style=3D"-webkit-text-size-adjus=
t: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-we=
bkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);=
">+ }</span><br style=3D"-webkit-text-si=
ze-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span styl=
e=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0=
, 0, 0);"></span><br style=3D"-webkit-text-size-adjust: auto; caret-color: r=
gb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &nbs=
p; *ihps =3D vectors;</span><br style=3D"-webkit-text-size-=
adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);"></span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0=
, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto=
; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &=
nbsp; return 0;</span><br style=3D"-webkit-text-size-adjust: auto=
; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-te=
xt-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+</sp=
an><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ fail:</span><br style=3D"-webkit-=
text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><sp=
an style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color=
: rgb(0, 0, 0);">+ if (pci_get_capabilit=
y(pa->pa_pc, pa->pa_tag, PCI_CAP_MSIX, &off,</span><br style=3D"-w=
ebkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0)=
;"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0);=
color: rgb(0, 0, 0);">+ &nb=
sp; NULL)) {</span><br style=3D"-webkit-text-size-adjust: auto; caret-c=
olor: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-a=
djust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
ctl =3D=
pci_conf_read(pa->pa_pc, pa->pa_tag, off + PCI_MSIX_CTL)</span><br st=
yle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb=
(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(=
0, 0, 0); color: rgb(0, 0, 0);">;</span><br style=3D"-webkit-text-size-adjus=
t: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-we=
bkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);=
">+ =
ctl &=3D ~PCI_MSIX_CTL_ENABLE;</span><br style=3D"-webkit-te=
xt-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span=
style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: r=
gb(0, 0, 0);">+ =
pci_conf_write(pa->pa_pc, pa->pa_tag, off + PC=
I_MSIX_CTL, ctl)</span><br style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-ad=
just: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">;</span><br sty=
le=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(=
0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0=
, 0, 0); color: rgb(0, 0, 0);">+ }</span=
><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);">+  =
;return error;</span><br style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">}</span><br style=
=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0,=
0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);"></span><br style=3D"-webkit-text-size-adjust: au=
to; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-=
text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">/*<=
/span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret=
-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">@@ -203,8 +237,9 @@</span><br st=
yle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb=
(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(=
0, 0, 0); color: rgb(0, 0, 0);">int</span><br style=3D"-webkit-text-size-adj=
ust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-=
webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);">pci_intr_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihp=
s, in</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0,=
0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">t</span><br style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
<span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); co=
lor: rgb(0, 0, 0);">*counts, pci_intr_type_t max_type)</span><br style=3D"-w=
ebkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0)=
;"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0);=
color: rgb(0, 0, 0);">{</span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">- =
int intx_count, msi_count, msix_count, error;<=
/span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret=
-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
int intx_count, msi_count, msix_count, off, error;</span><br style=3D"=
-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);"> struct arm=
_pci_msi *msi;</span><br style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nb=
sp; pcireg_t ctl;</span><br style=3D"-webkit-text-size-adju=
st: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-w=
ebkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0)=
;"></span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &nbs=
p; error =3D EINVAL;</span><br style=3D"-webkit-text-size-adjust:=
auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webk=
it-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">=
</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">@@ -245,6 +280,14 @@</span><br s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb=
(0, 0, 0); color: rgb(0, 0, 0);"> &=
nbsp;  =
; return 0;=
</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &=
nbsp;  =
; }</span><br style=3D"-webkit-text-size-adjust=
: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-web=
kit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"=
> &nb=
sp; }</span><br style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-ad=
just: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp; if (p=
ci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSIX,</span><br style=
=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0,=
0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);">+ &nbs=
p; &off, NULL=
)) {</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &n=
bsp; =
ctl =3D pci_conf_read(pa->pa_pc, pa->pa_=
tag,</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0=
, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &n=
bsp; =
off + PCI_MSIX_CTL);</=
span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0);=
color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-=
color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp;  =
; ctl &=3D ~PCI_MSIX_CTL_ENABLE;</span><br style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);">+ &=
nbsp;  =
; pci_conf_write(pa->pa_pc, pa->pa_tag,</span><br style=3D"-webki=
t-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><=
span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);">+ &=
nbsp;  =
; off + PCI_MSIX_CTL, ctl);</span><br style=3D"-webki=
t-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><=
span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);">+ &=
nbsp; }</span><br style=3D"-webkit-text-size-adjust: a=
uto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit=
-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></=
span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0);=
color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-=
color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &nb=
sp; if (msi->msi_all=
oc !=3D NULL) {</span><br style=3D"-webkit-text-size-adjust: auto; caret-col=
or: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adj=
ust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &nbs=
p; &n=
bsp; if (msi_count =3D=3D -1)</span=
><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-colo=
r: rgb(0, 0, 0); color: rgb(0, 0, 0);">@@ -257,6 +300,31 @@</span><br style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"> &nb=
sp; &=
nbsp; return 0;</span><=
br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color=
: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color:=
rgb(0, 0, 0); color: rgb(0, 0, 0);"> &nb=
sp; &=
nbsp; }</span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> &n=
bsp; =
}</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(=
0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: aut=
o; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; if (pci_get_ca=
pability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSI,</span><br style=3D"-webki=
t-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><=
span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); col=
or: rgb(0, 0, 0);">+ &=
nbsp; &off, NULL)) {</spa=
n><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); co=
lor: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-col=
or: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; &n=
bsp; ctl =3D pci_conf_read(pa->pa_pc, pa->pa_tag,</sp=
an><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nb=
sp; &=
nbsp; off + PCI_MSI_CTL);</span><br=
style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: r=
gb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rg=
b(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; &n=
bsp; ctl &=3D ~PCI_MSI_CTL_MSI_ENABLE;</span><br style=3D"-we=
bkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);=
"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);">+  =
; &nb=
sp;pci_conf_write(pa->pa_pc, pa->pa_tag,</span><br style=3D"-webkit-te=
xt-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span=
style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: r=
gb(0, 0, 0);">+ =
&nbs=
p; off + PCI_MSI_CTL, ctl);</span><br style=3D"-webkit-text=
-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span s=
tyle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rg=
b(0, 0, 0);">+ &=
nbsp; }</span><br style=3D"-webkit-text-size-adjust: auto; c=
aret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
} else {</span><br style=3D"-webkit-text-size-=
adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);">+ &n=
bsp; if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_=
MSIX,</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0,=
0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
&nbs=
p; &off, NULL)) {</span><br style=3D"-webkit-text-size-adjust: auto=
; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-te=
xt-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nb=
sp; &=
nbsp; ctl =3D pci_conf_read(p=
a->pa_pc, pa->pa_tag,</span><br style=3D"-webkit-text-size-adjust: aut=
o; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-t=
ext-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &n=
bsp; =
&nbs=
p;off + PCI_MSIX_CTL);</span><br style=3D"-webkit-text-size-adjust: auto; ca=
ret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-s=
ize-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp;  =
; ctl &=3D ~PCI_MSIX_CTL_=
ENABLE;</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(=
0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: aut=
o; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; &n=
bsp; pci_conf_write(pa->pa_pc, pa->pa_tag=
,</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+  =
; &nb=
sp; off + PCI_MSIX_CTL, ctl);=
</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0=
); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; care=
t-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+  =
; }</span><br style=3D"=
-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0=
);"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0)=
; color: rgb(0, 0, 0);">+ &n=
bsp; if (pci_get_capability(pa->pa_pc, pa-&g=
t;pa_tag, PCI_CAP_MSI,</span><br style=3D"-webkit-text-size-adjust: auto; ca=
ret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-s=
ize-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &=
nbsp;  =
; &off, NULL)) {</span><br style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span st=
yle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb=
(0, 0, 0);">+ &n=
bsp; ctl =3D=
pci_conf_read(pa->pa_pc, pa->pa_tag,</span><br style=3D"-webkit-text-=
size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span st=
yle=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb=
(0, 0, 0);">+ &n=
bsp; =
off + PCI_MSI_CTL);</span><br style=3D"-webkit-text-size-a=
djust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D=
"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0,=
0);">+ &n=
bsp; ctl &=3D=
~PCI_MSI_CTL_MSI_ENABLE;</span><br style=3D"-webkit-text-size-adjust: auto;=
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-tex=
t-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; &n=
bsp; pci_conf_write(pa->pa=
_pc, pa->pa_tag,</span><br style=3D"-webkit-text-size-adjust: auto; caret=
-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size=
-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ &nbs=
p; &n=
bsp; off + P=
CI_MSI_CTL, ctl);</span><br style=3D"-webkit-text-size-adjust: auto; caret-c=
olor: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-a=
djust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">+ =
}</s=
pan><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: auto; caret-co=
lor: rgb(0, 0, 0); color: rgb(0, 0, 0);">  =
; }</span><br style=3D"-webkit-text-size-adjust: auto; caret-color: rgb=
(0, 0, 0); color: rgb(0, 0, 0);"><span style=3D"-webkit-text-size-adjust: au=
to; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span><br style=3D"-we=
bkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);=
"><span style=3D"-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); c=
olor: rgb(0, 0, 0);"> if (intx_coun=
t > 0 && (error =3D pci_intx_alloc(pa, ihps)) =3D=3D 0) {</span><=
div><font color=3D"#000000"><span style=3D"caret-color: rgb(0, 0, 0); -webki=
t-text-size-adjust: auto;"><br></span></font><div dir=3D"ltr"><span>-- </spa=
n><br><span>Kouichi Hashikawa</span><br><br><blockquote type=3D"cite"><span>=
</span></blockquote><blockquote type=3D"cite"><span></span></blockquote><blo=
ckquote type=3D"cite"><span></span></blockquote><blockquote type=3D"cite"><s=
pan></span></blockquote><blockquote type=3D"cite"><span></span></blockquote>=
<blockquote type=3D"cite"><span></span></blockquote><blockquote type=3D"cite=
"><span></span></blockquote><blockquote type=3D"cite"><span></span></blockqu=
ote></div></div></body></html>=
--Apple-Mail-4648B2A4-56BD-4E84-8B8B-16F9B9293BA3--
Home |
Main Index |
Thread Index |
Old Index