Loading drivers/net/usb/r8152.c +12 −2 Original line number Diff line number Diff line Loading @@ -690,6 +690,9 @@ static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size, } } if (ret == -ENODEV) set_bit(RTL8152_UNPLUG, &tp->flags); return ret; } Loading Loading @@ -757,6 +760,9 @@ static int generic_ocp_write(struct r8152 *tp, u16 index, u16 byteen, } error1: if (ret == -ENODEV) set_bit(RTL8152_UNPLUG, &tp->flags); return ret; } Loading Loading @@ -1083,6 +1089,7 @@ static void read_bulk_callback(struct urb *urb) result = r8152_submit_rx(tp, agg, GFP_ATOMIC); if (result == -ENODEV) { set_bit(RTL8152_UNPLUG, &tp->flags); netif_device_detach(tp->netdev); } else if (result) { spin_lock(&tp->rx_lock); Loading Loading @@ -1187,12 +1194,14 @@ static void intr_callback(struct urb *urb) resubmit: res = usb_submit_urb(urb, GFP_ATOMIC); if (res == -ENODEV) if (res == -ENODEV) { set_bit(RTL8152_UNPLUG, &tp->flags); netif_device_detach(tp->netdev); else if (res) } else if (res) { netif_err(tp, intr, tp->netdev, "can't resubmit intr, status %d\n", res); } } static inline void *rx_agg_align(void *data) { Loading Loading @@ -1755,6 +1764,7 @@ static void tx_bottom(struct r8152 *tp) struct net_device *netdev = tp->netdev; if (res == -ENODEV) { set_bit(RTL8152_UNPLUG, &tp->flags); netif_device_detach(netdev); } else { struct net_device_stats *stats = &netdev->stats; Loading Loading
drivers/net/usb/r8152.c +12 −2 Original line number Diff line number Diff line Loading @@ -690,6 +690,9 @@ static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size, } } if (ret == -ENODEV) set_bit(RTL8152_UNPLUG, &tp->flags); return ret; } Loading Loading @@ -757,6 +760,9 @@ static int generic_ocp_write(struct r8152 *tp, u16 index, u16 byteen, } error1: if (ret == -ENODEV) set_bit(RTL8152_UNPLUG, &tp->flags); return ret; } Loading Loading @@ -1083,6 +1089,7 @@ static void read_bulk_callback(struct urb *urb) result = r8152_submit_rx(tp, agg, GFP_ATOMIC); if (result == -ENODEV) { set_bit(RTL8152_UNPLUG, &tp->flags); netif_device_detach(tp->netdev); } else if (result) { spin_lock(&tp->rx_lock); Loading Loading @@ -1187,12 +1194,14 @@ static void intr_callback(struct urb *urb) resubmit: res = usb_submit_urb(urb, GFP_ATOMIC); if (res == -ENODEV) if (res == -ENODEV) { set_bit(RTL8152_UNPLUG, &tp->flags); netif_device_detach(tp->netdev); else if (res) } else if (res) { netif_err(tp, intr, tp->netdev, "can't resubmit intr, status %d\n", res); } } static inline void *rx_agg_align(void *data) { Loading Loading @@ -1755,6 +1764,7 @@ static void tx_bottom(struct r8152 *tp) struct net_device *netdev = tp->netdev; if (res == -ENODEV) { set_bit(RTL8152_UNPLUG, &tp->flags); netif_device_detach(netdev); } else { struct net_device_stats *stats = &netdev->stats; Loading