linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb-storage: how to extend quirks flags to 64bit?
@ 2023-08-27  9:32 Milan Broz
  2023-08-27 15:50 ` Alan Stern
  0 siblings, 1 reply; 6+ messages in thread
From: Milan Broz @ 2023-08-27  9:32 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman
  Cc: linux-usb, usb-storage, Linux Kernel Mailing List

Hello,

I tried to extend USB storage for the passthrough of Opal
security commands, and some adapters are clearly "not perfect".
I would need to introduce a new quirks flag to turn it off.

Seems that we are already out of quirks flags on 32bit
for usb storage - in usb_usual.h the last entry in mainline is
   US_FLAG(SENSE_AFTER_SYNC, 0x80000000)

Adding a new flag will work for 64-bit systems but not
for platforms with 32-bit unsigned long like i686.

How do we allow new flag definitions?

Struct us_data fflags can be made 64bit (defined in
drivers/usb/storage/usb.h), but the major problem is that these
are transferred through the generic driver_info field
defined in linux/mod_devicetable.h as unsigned long).
Making this 64bit is IMO an extensive API change (if even possible).
I guess this is not the way to go.

Could USB maintainers please help to advise what is the correct
solution? I am not familiar with the USB driver model here
and I see no easy way how it can be solved by a trivial static
allocation inside the USB storage driver.

Someone will need a new quirks flag in the future anyway... :)

Thanks,
Milan


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

end of thread, other threads:[~2023-08-31 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-27  9:32 usb-storage: how to extend quirks flags to 64bit? Milan Broz
2023-08-27 15:50 ` Alan Stern
2023-08-27 16:45   ` Milan Broz
2023-08-27 18:55     ` Alan Stern
2023-08-30 20:39       ` Milan Broz
2023-08-31 15:54         ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).