The RefOf() operator doesn't do what was expected (at least on Linux)
- issuing "Store(1, RefOf(PRQ0))" doesn't write to the PRQ0 Field
defined on the OperationRegion. Instead, it seems to redefine PRQ0 to
be an integer.
Fix this by defining the _DIS and _SRS methods as pre-processor
macros. This way the RefOf() operator isn't needed.
- Method (IQDI, 1, NotSerialized) {
- // _DIS method - disable interrupt
- Or(DerefOf(Arg0), 0x80, Arg0)
- }
Method (IQCR, 1, NotSerialized) {
// _CRS method - get current settings
Name (PRR0, ResourceTemplate ()
Method (IQCR, 1, NotSerialized) {
// _CRS method - get current settings
Name (PRR0, ResourceTemplate ()
- Method (IQSR, 2, NotSerialized) {
- // _SRS method - set interrupt
- CreateDWordField (Arg1, 0x05, PRRI)
- Store (PRRI, Arg0)
- }
+ // _DIS method - disable interrupt
+#define DISIRQ(PRQVAR) \
+ Or(PRQVAR, 0x80, PRQVAR) \
+ // _SRS method - set interrupt
+#define SETIRQ(PRQVAR, IRQINFO) \
+ CreateDWordField (IRQINFO, 0x05, PRRI) \
+ Store (PRRI, PRQVAR)
Device(LNKA) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
Device(LNKA) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
- Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ0)) }
+ Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ0) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
- Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ0), Arg0) }
+ Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ0, Arg0) }
}
Device(LNKB) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
}
Device(LNKB) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ1)) }
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ1)) }
- Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ1)) }
+ Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ1) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ1)) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ1)) }
- Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ1), Arg0) }
+ Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ1, Arg0) }
}
Device(LNKC) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
}
Device(LNKC) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ2)) }
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ2)) }
- Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ2)) }
+ Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ2) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ2)) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ2)) }
- Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ2), Arg0) }
+ Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ2, Arg0) }
}
Device(LNKD) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
}
Device(LNKD) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ3)) }
{ 5, 10, 11 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ3)) }
- Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ3)) }
+ Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ3) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ3)) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ3)) }
- Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ3), Arg0) }
+ Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ3, Arg0) }
}
Device(LNKS) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
}
Device(LNKS) {
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
{ 9 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
{ 9 }
})
Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
- Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ0)) }
+ Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ0) }
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
}
}
Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
}
}
-0xc,
-0x49,
-0x51,
-0x44,
-0x49,
-0x1,
-0x7d,
-0x83,
-0x68,
-0xa,
-0x80,
-0x68,
-0x14,
-0x14,
-0x14,
-0x49,
-0x51,
-0x53,
-0x52,
-0x2,
-0x8a,
-0x69,
-0xa,
-0x5,
-0x50,
-0x52,
-0x52,
-0x49,
-0x70,
-0x50,
-0x52,
-0x52,
-0x49,
-0x68,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x53,
0x52,
0x53,
0x1,
0x5f,
0x53,
0x52,
0x53,
0x1,
+0x8a,
+0x68,
+0xa,
+0x5,
+0x50,
+0x52,
+0x52,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x53,
0x52,
0x53,
0x1,
0x5f,
0x53,
0x52,
0x53,
0x1,
+0x8a,
+0x68,
+0xa,
+0x5,
+0x50,
+0x52,
+0x52,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x53,
0x52,
0x53,
0x1,
0x5f,
0x53,
0x52,
0x53,
0x1,
+0x8a,
+0x68,
+0xa,
+0x5,
+0x50,
+0x52,
+0x52,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x53,
0x52,
0x53,
0x1,
0x5f,
0x53,
0x52,
0x53,
0x1,
+0x8a,
+0x68,
+0xa,
+0x5,
+0x50,
+0x52,
+0x52,
0x5f,
0x44,
0x49,
0x53,
0x0,
0x5f,
0x44,
0x49,
0x53,
0x0,