Skip to content

Commit 9f235cc

Browse files
mkjcminyard
authored andcommitted
ipmi: ipmb: initialise event handler read bytes
IPMB doesn't use i2c reads, but the handler needs to set a value. Otherwise an i2c read will return an uninitialised value from the bus driver. Fixes: 63c4eb3 ("ipmi:ipmb: Add initial support for IPMI over IPMB") Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Message-ID: <20260113-ipmb-read-init-v1-1-a9cbce7b94e3@codeconstruct.com.au> Signed-off-by: Corey Minyard <corey@minyard.net>
1 parent 1d90e6c commit 9f235cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/char/ipmi/ipmi_ipmb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,16 @@ static int ipmi_ipmb_slave_cb(struct i2c_client *client,
202202
break;
203203

204204
case I2C_SLAVE_READ_REQUESTED:
205+
*val = 0xff;
206+
ipmi_ipmb_check_msg_done(iidev);
207+
break;
208+
205209
case I2C_SLAVE_STOP:
206210
ipmi_ipmb_check_msg_done(iidev);
207211
break;
208212

209213
case I2C_SLAVE_READ_PROCESSED:
214+
*val = 0xff;
210215
break;
211216
}
212217

0 commit comments

Comments
 (0)