From 62fd554211951d2af7b4155cf4049c1102a6afa5 Mon Sep 17 00:00:00 2001 From: dumbbell Date: Sat, 14 Dec 2013 00:40:47 +0000 Subject: [PATCH] MFC r259236: MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD The code was unmodified compared to Linux and returned the amount of received bytes from the i2c bus. This led to non-working i2c bus and failure to eg. read monitor's EDID, if connected to DisplayPort. Tested by: Mikaël Urankar Approved by: re (gjb) git-svn-id: svn://svn.freebsd.org/base/releng/10.0@259370 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/drm2/radeon/atombios_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/drm2/radeon/atombios_dp.c b/sys/dev/drm2/radeon/atombios_dp.c index 3c0f7f56..f92df621 100644 --- a/sys/dev/drm2/radeon/atombios_dp.c +++ b/sys/dev/drm2/radeon/atombios_dp.c @@ -272,7 +272,7 @@ int radeon_dp_i2c_aux_ch(device_t dev, int mode, u8 write_byte, u8 *read_byte) case AUX_I2C_REPLY_ACK: if (mode == MODE_I2C_READ) *read_byte = reply[0]; - return ret; + return (0); /* Return ret on Linux. */ case AUX_I2C_REPLY_NACK: DRM_DEBUG_KMS("aux_i2c nack\n"); return -EREMOTEIO; -- 2.42.0