lkml.org 
[lkml]   [2018]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 01/31] usb: usbssp: Defined register maps and other useful structures.
Date
> > +/**
> > + * 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

\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.357 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site