That is a part of my DSDT
CODE
Device (RP04)
{
Name (_ADR, 0x001C0003)
OperationRegion (P4CS, PCI_Config, 0x00, 0x0100)
Field (P4CS, AnyAcc, NoLock, WriteAsZeros)
{
Offset (0x3E),
, 6,
SBSR, 1,
Offset (0x52),
, 13,
LSTS, 1,
Offset (0x5A),
ABP4, 1,
, 2,
PDC4, 1,
, 2,
PDS4, 1,
Offset (0x5B),
LASC, 1,
Offset (0x60),
Offset (0x62),
PSP4, 1,
Offset (0xDC),
, 30,
HPCS, 1,
PMCS, 1,
Offset (0xE2),
Offset (0xE3),
WXME, 2
}

Device (PXS4)
{
Name (_ADR, 0x00)
Method (_RMV, 0, NotSerialized)
{
Return (0x01)
}
}

Name (_PRW, Package (0x02)
{
0x09,
0x03
})
Method (_PRT, 0, NotSerialized)
{
If (\GPIC)
{
Return (Package (0x04)
{
Package (0x04)
{
0xFFFF,
0x00,
0x00,
0x13
},

Package (0x04)
{
0xFFFF,
0x01,
0x00,
0x10
},

Package (0x04)
{
0xFFFF,
0x02,
0x00,
0x11
},

Package (0x04)
{
0xFFFF,
0x03,
0x00,
0x12
}
})
}
Else
{
Return (Package (0x04)
{
Package (0x04)
{
0xFFFF,
0x00,
\_SB.PCI0.LNKD,
0x00
},

Package (0x04)
{
0xFFFF,
0x01,
\_SB.PCI0.LNKA,
0x00
},

Package (0x04)
{
0xFFFF,
0x02,
\_SB.PCI0.LNKB,
0x00
},

Package (0x04)
{
0xFFFF,
0x03,
\_SB.PCI0.LNKC,
0x00
}
})
}
}
}


RP04 is PCIE root port in this I have one card, windows see this as PCI bus 13, device 0, function 0.
Removable method is not usefull so can be removed (already did that,that is original code)

What I need is to control power state of that card,that is done by writing at offset 58h in pci register value 00h for D0 state,01h for D1 state,10h for D2 state and 11h for D3 state.Since only D0 and D3 are used just that two are needed.


Also how can I access pci register?
Windows see this as PCIROOT(0)#PCI(1C03)#PCI(0000)

This one is good?

CODE
Device (RP04)
{
Name (_ADR, 0x001C0003)
OperationRegion (P4CS, PCI_Config, 0x00, 0x0100)
Field (P4CS, AnyAcc, NoLock, WriteAsZeros)
{
Offset (0x3E),
, 6,
SBSR, 1,
Offset (0x52),
, 13,
LSTS, 1,
Offset (0x5A),
ABP4, 1,
, 2,
PDC4, 1,
, 2,
PDS4, 1,
Offset (0x5B),
LASC, 1,
Offset (0x60),
Offset (0x62),
PSP4, 1,
Offset (0xDC),
, 30,
HPCS, 1,
PMCS, 1,
Offset (0xE2),
Offset (0xE3),
WXME, 2
}

Device (PXS4)
{
Name (_ADR, 0x000D0000)
OperationRegion (D0D3, PCI_Config, 0x58, 0x2)
Field (D0D3, AnyAcc, NoLock, Preserve)
{
D0D3, 8
}
}

Name (_PRW, Package (0x02)
{
0x09,
0x03
})
Method (_PRT, 0, NotSerialized)
{
If (\GPIC)
{
Return (Package (0x04)
{
Package (0x04)
{
0xFFFF,
0x00,
0x00,
0x13
},

Package (0x04)
{
0xFFFF,
0x01,
0x00,
0x10
},

Package (0x04)
{
0xFFFF,
0x02,
0x00,
0x11
},

Package (0x04)
{
0xFFFF,
0x03,
0x00,
0x12
}
})
}
Else
{
Return (Package (0x04)
{
Package (0x04)
{
0xFFFF,
0x00,
\_SB.PCI0.LNKD,
0x00
},

Package (0x04)
{
0xFFFF,
0x01,
\_SB.PCI0.LNKA,
0x00
},

Package (0x04)
{
0xFFFF,
0x02,
\_SB.PCI0.LNKB,
0x00
},

Package (0x04)
{
0xFFFF,
0x03,
\_SB.PCI0.LNKC,
0x00
}
})
}
}
}


Look at Device PXS4 is that correct?
Is WriteAsZeros or Preserve correct one?

Then add method before _PTS
CODE
    Method (PINI, 0, NotSerialized)
     {
         Store (0x00, \_SB.PCI0.RP04.PXS4.D0D3)
     }

and call to PINI under _WAK method and under Device PCI0

That's for wake - D0 state

Now I think I need to add another method,name is important or I can use anything? without some reserved or conflicting ones.

something like
CODE
    Method (PIN0, 0, NotSerialized)
     {
         Store (0x03, \_SB.PCI0.RP04.PXS4.D0D3)
     }

but where to add?
and then call it from _PTS method

Is that OK?

Can somebody give some help?
Thanks.