Skip to content

Commit cf9bc8e

Browse files
committed
nforce busy status
1 parent 2b6b2fa commit cf9bc8e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/SpdReaderWriterCore/Smbus.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,9 @@ private byte[] Scan(bool minimumResults) {
651651

652652
for (byte i = 0; i <= 7; i++) {
653653
try {
654-
if (ReadByte((byte)(i + 0x50))) {
655-
result.Enqueue((byte)(i + 0x50));
654+
byte address = (byte)(i + 0x50);
655+
if (ProbeAddress(address)) {
656+
result.Enqueue(address);
656657
if (minimumResults) {
657658
break;
658659
}
@@ -1148,6 +1149,11 @@ public SmbStatus GetBusStatus() {
11481149
}
11491150

11501151
if (Info.VendorId == VendorId.Nvidia) {
1152+
1153+
if (IoPort.Read<byte>(NvidiaSmbusRegister.Protocol) != 0) {
1154+
return SmbStatus.Busy;
1155+
}
1156+
11511157
status = IoPort.Read<byte>(NvidiaSmbusRegister.Status);
11521158

11531159
switch (status) {

0 commit comments

Comments
 (0)