OpenCloudOS-Kernel/drivers/usb/typec
Peter Chen d5a4f93511 usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered
The port->logbuffer_head may be wrong if the two processes enters
_tcpm_log at the mostly same time. The 2nd process enters _tcpm_log
before the 1st process update the index, then the 2nd process will
not allocate logbuffer, when the 2nd process tries to use log buffer,
the index has already updated by the 1st process, so it will get
NULL pointer for updated logbuffer, the error message like below:

	tcpci 0-0050: Log buffer index 6 is NULL

Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-25 21:43:35 +08:00
..
fusb302 USB: typec: fsusb302: no need to check return value of debugfs_create_dir() 2018-05-31 16:03:59 +02:00
mux usb: typec: driver for Pericom PI3USB30532 Type-C cross switch 2018-03-22 13:49:28 +01:00
ucsi usb: typec: ucsi: Fix for incorrect status data issue 2018-06-25 21:30:12 +08:00
Kconfig typec: tcpm: Represent source supply through power_supply 2018-04-25 14:20:20 +02:00
Makefile usb: typec: driver for Pericom PI3USB30532 Type-C cross switch 2018-03-22 13:49:28 +01:00
class.c usb: typec: Separate the definitions for data and power roles 2018-03-22 13:40:10 +01:00
mux.c usb: typec: Fix htmldocs warning 2018-05-24 18:14:28 +02:00
tcpm.c usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered 2018-06-25 21:43:35 +08:00
tps6598x.c usb: typec: tps6598x: handle block reads separately with plain-I2C adapters 2018-05-03 10:55:31 -07:00
typec_wcove.c usb: typec: wcove: Remove dependency on HW FSM 2018-05-24 18:17:00 +02:00