[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BYAPR07MB470937899F3E630677B21B2EDD590@BYAPR07MB4709.namprd07.prod.outlook.com>
Date: Thu, 12 Jul 2018 19:20:54 +0000
From: Pawel Laszczak <pawell@...ence.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
Felipe Balbi <balbi@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Lukasz Tyrala <ltyrala@...ence.com>,
Alan Douglas <adouglas@...ence.com>
Subject: RE: [PATCH 01/31] usb: usbssp: Defined register maps and other useful
structures.
> > +/**
> > + * 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
Powered by blists - more mailing lists