From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hayes Wang Date: Thu, 11 Jun 2020 03:18:52 +0000 Subject: [PATCH u-boot 1/4] eth/r8152: reset bmu after disabling Tx/Rx In-Reply-To: References: <1394712342-15778-377-Taiwan-albertk@realtek.com> <1394712342-15778-378-Taiwan-albertk@realtek.com> <7a990a57-a944-bbde-65d2-e0a2be4e1389@denx.de> Message-ID: <9189724c51094532afa30ec97abcb222@realtek.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Marek Vasut [mailto:marex at denx.de] > Sent: Wednesday, June 10, 2020 7:05 PM [...] > >>> +static void rtl_reset_bmu(struct r8152 *tp) > >>> +{ > >>> + u32 ocp_data; > >> > >> You're writing a byte, shouldn't that be u8 ? > > > > The minimum length which is used to read or write > > the register of the device through control transfer > > is 4-byte. Therefore, I always use "u32" to access > > 1, 2, or 4 bytes data. Then, I don't need another > > variable to deal with it. > > ocp_read_byte() returns u8, and while ocp_write_byte() expects u32 as > data, it masks away all but the LSByte, so it should be OK to use u8? Yes, you are right. Best Regards, Hayes