Messages in this thread | | | From | Pawel Laszczak <> | Subject | RE: [PATCH 01/31] usb: usbssp: Defined register maps and other useful structures. | Date | Thu, 12 Jul 2018 19:20:54 +0000 |
| |
> > +/** > > + * struct usbssp_cap_regs - USBSSP Registers. > > + * @hc_capbase: length of the capabilities register and DC > version number > > + * @hcs_params1: HCSPARAMS1 - Structural Parameters 1 > > + * @hcs_params2: HCSPARAMS2 - Structural Parameters 2 > > + * @hcs_params3: HCSPARAMS3 - Structural Parameters 3 > > + * @hcc_params: HCCPARAMS - Capability Parameters > > + * @db_off: DBOFF - Doorbell array offset > > + * @run_regs_off: RTSOFF - Runtime register space offset > > + * @hcc_params2: HCCPARAMS2 Capability Parameters 2, > > + */ > > +struct usbssp_cap_regs { > > + __le32 hc_capbase; > > + __le32 hcs_params1; > > + __le32 hcs_params2; > > + __le32 hcs_params3; > > + __le32 hcc_params; > > + __le32 db_off; > > + __le32 run_regs_off; > > + __le32 hcc_params2; > > + /* Reserved up to (CAPLENGTH - 0x1C) */ }; > > Does this, and your other structures that map to hardware, need to be > __packed?
These structures don't need to be __packed. All fields in structures that map to hardware are 32 and 64 bits. It has been working this way in XHCI driver for years.
thanks,
Pawel Laszczak
| |