All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] usb: typec: ucsi: Minor improvements
@ 2024-08-16 13:58 Heikki Krogerus
  2024-08-16 13:58 ` [PATCH v2 1/6] usb: typec: ucsi: Remove unused fields from struct ucsi_connector_status Heikki Krogerus
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Heikki Krogerus @ 2024-08-16 13:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jameson Thies, Benson Leung, Prashant Malani, Dmitry Baryshkov,
	linux-usb, Pilla, Siva sai kumar, Abhishek Pandit-Subedi,
	Bartosz Szpila

Hi,

The first three patches remove potential problems. I prepared
especially the second one as a protection against similar issues that
I had to fix earlier. The rest is just cleanups.

What changed since v1:

In this version I refactored the code so that UCSI_MAX_DATA_LENGTH()
is introduced in the first patch where it is used.

I also added one more patch, the first one, where I remove the unused
fields from struct ucsi_connector_status. Those fields are beyond the
MAX_DATA_LENGTH (16 bytes) with the older UCSI versions, so without
removing them, the code would fail on older systems after the read
truncation is removed in the second patch. Thanks for reporting that
Siva.

So please test these if you have time.

The first version of these patches:
https://lore.kernel.org/linux-usb/20240815085726.2865482-1-heikki.krogerus@linux.intel.com/

thanks,


Heikki Krogerus (6):
  usb: typec: ucsi: Remove unused fields from struct
    ucsi_connector_status
  usb: typec: ucsi: Don't truncate the reads
  usb: typec: ucsi: Only assign the identity structure if the PPM
    supports it
  usb: typec: ucsi: Common function for the GET_PD_MESSAGE command
  usb: typec: ucsi: Call CANCEL from single location
  usb: typec: ucsi: Remove useless error check from ucsi_read_error()

 drivers/usb/typec/ucsi/ucsi.c | 126 ++++++++++------------------------
 drivers/usb/typec/ucsi/ucsi.h |  41 ++---------
 2 files changed, 41 insertions(+), 126 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-08-27 15:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16 13:58 [PATCH v2 0/6] usb: typec: ucsi: Minor improvements Heikki Krogerus
2024-08-16 13:58 ` [PATCH v2 1/6] usb: typec: ucsi: Remove unused fields from struct ucsi_connector_status Heikki Krogerus
2024-08-19  0:02   ` Abhishek Pandit-Subedi
2024-08-19 11:11     ` Heikki Krogerus
2024-08-19 23:23       ` Abhishek Pandit-Subedi
2024-08-20 13:12         ` Heikki Krogerus
2024-08-20 16:48           ` Abhishek Pandit-Subedi
2024-08-22 11:24             ` Heikki Krogerus
2024-08-27 15:23               ` Heikki Krogerus
2024-08-16 13:58 ` [PATCH v2 2/6] usb: typec: ucsi: Don't truncate the reads Heikki Krogerus
2024-08-18 23:59   ` Abhishek Pandit-Subedi
2024-08-16 13:58 ` [PATCH v2 3/6] usb: typec: ucsi: Only assign the identity structure if the PPM supports it Heikki Krogerus
2024-08-19  0:04   ` Abhishek Pandit-Subedi
2024-08-16 13:58 ` [PATCH v2 4/6] usb: typec: ucsi: Common function for the GET_PD_MESSAGE command Heikki Krogerus
2024-08-16 13:58 ` [PATCH v2 5/6] usb: typec: ucsi: Call CANCEL from single location Heikki Krogerus
2024-08-16 13:58 ` [PATCH v2 6/6] usb: typec: ucsi: Remove useless error check from ucsi_read_error() Heikki Krogerus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.