summaryrefslogtreecommitdiff
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-10-08 16:22:22 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-08 16:22:22 -0400
commit64b1f00a0830e1c53874067273a096b228d83d36 (patch)
treedd547b0f1d431d0995b8eaa711cedb92399f31fe /drivers/net/usb
parent16b99a4f6644d58c94acb4b4253e84049de588c5 (diff)
parent5301e3e117d88ef0967ce278912e54757f1a31a2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/asix_devices.c2
-rw-r--r--drivers/net/usb/r8152.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index 5d194093f3e1..2c05f6cdb12f 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -890,7 +890,7 @@ static const struct driver_info ax88772_info = {
.unbind = ax88772_unbind,
.status = asix_status,
.link_reset = ax88772_link_reset,
- .reset = ax88772_reset,
+ .reset = ax88772_link_reset,
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET,
.rx_fixup = asix_rx_fixup_common,
.tx_fixup = asix_tx_fixup,
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 65326204baa0..5cfd414b9a3e 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -980,9 +980,14 @@ static int rtl8152_set_mac_address(struct net_device *netdev, void *p)
{
struct r8152 *tp = netdev_priv(netdev);
struct sockaddr *addr = p;
+ int ret = -EADDRNOTAVAIL;
if (!is_valid_ether_addr(addr->sa_data))
- return -EADDRNOTAVAIL;
+ goto out1;
+
+ ret = usb_autopm_get_interface(tp->intf);
+ if (ret < 0)
+ goto out1;
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
@@ -990,7 +995,9 @@ static int rtl8152_set_mac_address(struct net_device *netdev, void *p)
pla_ocp_write(tp, PLA_IDR, BYTE_EN_SIX_BYTES, 8, addr->sa_data);
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_NORAML);
- return 0;
+ usb_autopm_put_interface(tp->intf);
+out1:
+ return ret;
}
static int set_ethernet_addr(struct r8152 *tp)