Skip to content

Commit 8e29d23

Browse files
davidchen7davem330
authored andcommitted
r8152: Add support for MAC address pass through on RTL8153-BD
RTL8153-BD is used in Dell DA300 type-C dongle. It should be added to the whitelist of devices to activate MAC address pass through. Per confirming with Realtek all devices containing RTL8153-BD should activate MAC pass through and there won't use pass through bit on efuse like in RTL8153-AD. Signed-off-by: David Chen <david.chen7@dell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f2ffff0 commit 8e29d23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/usb/r8152.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ enum spd_duplex {
557557
/* MAC PASSTHRU */
558558
#define AD_MASK 0xfee0
559559
#define BND_MASK 0x0004
560+
#define BD_MASK 0x0001
560561
#define EFUSE 0xcfdb
561562
#define PASS_THRU_MASK 0x1
562563

@@ -1176,9 +1177,9 @@ static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa)
11761177
return -ENODEV;
11771178
}
11781179
} else {
1179-
/* test for RTL8153-BND */
1180+
/* test for RTL8153-BND and RTL8153-BD */
11801181
ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1);
1181-
if ((ocp_data & BND_MASK) == 0) {
1182+
if ((ocp_data & BND_MASK) == 0 && (ocp_data & BD_MASK)) {
11821183
netif_dbg(tp, probe, tp->netdev,
11831184
"Invalid variant for MAC pass through\n");
11841185
return -ENODEV;

0 commit comments

Comments
 (0)