[PATCH v2 0/6] usb: typec: ucsi: Minor improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx/

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





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux