Loading drivers/usb/gadget/function/f_gps.c +10 −1 Original line number Diff line number Diff line /* * Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -351,6 +351,15 @@ static void gps_resume(struct usb_function *f) return; dev->is_suspended = false; /* Check if the previous session is closed as part of suspend * and try to reconnect to open a new session. */ if (!atomic_read(&dev->ctrl_online)) { pr_debug("%s: ctrl disconnected, reconnect again\n", __func__); gport_ctrl_connect(dev); } spin_lock(&dev->lock); if (list_empty(&dev->cpkt_resp_q)) { spin_unlock(&dev->lock); Loading drivers/usb/gadget/function/u_glink.c +10 −1 Original line number Diff line number Diff line /* Copyright (c) 2017, Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -375,6 +375,15 @@ static void glink_notify_state(void *handle, const void *priv, unsigned event) if (gr && gr->disconnect) gr->disconnect(gr); glink_purge_tx_q(ch_info); /** * If the channel is closed on the REMOTE side, the channel * needs to be closed from the LOCAL as well so that the current * context is cleared and the channel can be opened afresh. */ if (ch_info->handle) { pr_debug("%s queue disconnect work\n", __func__); queue_work(glink_ctrl_wq, &ch_info->disconnect_w); } break; default: pr_err("%s: invalid channel state notification\n", __func__); Loading Loading
drivers/usb/gadget/function/f_gps.c +10 −1 Original line number Diff line number Diff line /* * Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -351,6 +351,15 @@ static void gps_resume(struct usb_function *f) return; dev->is_suspended = false; /* Check if the previous session is closed as part of suspend * and try to reconnect to open a new session. */ if (!atomic_read(&dev->ctrl_online)) { pr_debug("%s: ctrl disconnected, reconnect again\n", __func__); gport_ctrl_connect(dev); } spin_lock(&dev->lock); if (list_empty(&dev->cpkt_resp_q)) { spin_unlock(&dev->lock); Loading
drivers/usb/gadget/function/u_glink.c +10 −1 Original line number Diff line number Diff line /* Copyright (c) 2017, Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -375,6 +375,15 @@ static void glink_notify_state(void *handle, const void *priv, unsigned event) if (gr && gr->disconnect) gr->disconnect(gr); glink_purge_tx_q(ch_info); /** * If the channel is closed on the REMOTE side, the channel * needs to be closed from the LOCAL as well so that the current * context is cleared and the channel can be opened afresh. */ if (ch_info->handle) { pr_debug("%s queue disconnect work\n", __func__); queue_work(glink_ctrl_wq, &ch_info->disconnect_w); } break; default: pr_err("%s: invalid channel state notification\n", __func__); Loading