Skip to content

Commit

Permalink
nforce busy status
Browse files Browse the repository at this point in the history
  • Loading branch information
1a2m3 committed Dec 10, 2023
1 parent 2b6b2fa commit cf9bc8e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/SpdReaderWriterCore/Smbus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,9 @@ private byte[] Scan(bool minimumResults) {

for (byte i = 0; i <= 7; i++) {
try {
if (ReadByte((byte)(i + 0x50))) {
result.Enqueue((byte)(i + 0x50));
byte address = (byte)(i + 0x50);
if (ProbeAddress(address)) {
result.Enqueue(address);
if (minimumResults) {
break;
}
Expand Down Expand Up @@ -1148,6 +1149,11 @@ public SmbStatus GetBusStatus() {
}

if (Info.VendorId == VendorId.Nvidia) {

if (IoPort.Read<byte>(NvidiaSmbusRegister.Protocol) != 0) {
return SmbStatus.Busy;
}

status = IoPort.Read<byte>(NvidiaSmbusRegister.Status);

switch (status) {
Expand Down

0 comments on commit cf9bc8e

Please sign in to comment.