]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
r8152: add byte_enable for ocp_read_word function
authorhayeswang <hayeswang@realtek.com>
Thu, 15 Jun 2017 06:44:04 +0000 (14:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jun 2017 18:31:56 +0000 (14:31 -0400)
commitd8fbd27469fc02049c674de296a3263bef089131
treec2259eda1f85597f19254e2a09e2c111c5274106
parent65b82d696b9e84fda6dd7df61801b57d3e7fb976
r8152: add byte_enable for ocp_read_word function

Add byte_enable for ocp_read_word() to replace reading 4
bytes data with reading the desired 2 bytes data.

This is used to avoid the issue which is described in
commit b4d99def0938 ("r8152: remove sram_read"). The
original method always reads 4 bytes data, and it may
have problem when reading the PHY registers.

The new method is supported since RTL8153B, but it
doesn't influence the previous chips. The bits of the
byte_enable for the previous chips are the reserved
bits, and the hw would ignore them.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c