Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-27 Thread David Miller
From: Mika Westerberg Date: Wed, 27 Sep 2017 14:32:41 +0300 > Just for my education, is there some rule which tells when __packed is > to be used? For example the above structures are all 32-bit aligned but > how about something like: > > struct foo { >

Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-27 Thread David Miller
From: Mika Westerberg Date: Wed, 27 Sep 2017 14:32:41 +0300 > Just for my education, is there some rule which tells when __packed is > to be used? For example the above structures are all 32-bit aligned but > how about something like: > > struct foo { > u32 value1; > u8 value2; > };

RE: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-27 Thread David Laight
From: Mika Westerberg > Sent: 27 September 2017 12:33 ... > Just for my education, is there some rule which tells when __packed is > to be used? For example the above structures are all 32-bit aligned but > how about something like: > > struct foo { > u32 value1; > u8 value2; > }; >

RE: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-27 Thread David Laight
From: Mika Westerberg > Sent: 27 September 2017 12:33 ... > Just for my education, is there some rule which tells when __packed is > to be used? For example the above structures are all 32-bit aligned but > how about something like: > > struct foo { > u32 value1; > u8 value2; > }; >

Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-27 Thread Mika Westerberg
On Tue, Sep 26, 2017 at 09:33:54PM -0700, David Miller wrote: > From: Mika Westerberg > Date: Mon, 25 Sep 2017 14:07:24 +0300 > > > +struct tb_property_entry { > > + u32 key_hi; > > + u32 key_lo; > > + u16 length; > > + u8 reserved; > > + u8 type; > > +

Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-27 Thread Mika Westerberg
On Tue, Sep 26, 2017 at 09:33:54PM -0700, David Miller wrote: > From: Mika Westerberg > Date: Mon, 25 Sep 2017 14:07:24 +0300 > > > +struct tb_property_entry { > > + u32 key_hi; > > + u32 key_lo; > > + u16 length; > > + u8 reserved; > > + u8 type; > > + u32 value; > > +} __packed; >

Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-26 Thread David Miller
From: Mika Westerberg Date: Mon, 25 Sep 2017 14:07:24 +0300 > +struct tb_property_entry { > + u32 key_hi; > + u32 key_lo; > + u16 length; > + u8 reserved; > + u8 type; > + u32 value; > +} __packed; > + > +struct tb_property_rootdir_entry {

Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-26 Thread David Miller
From: Mika Westerberg Date: Mon, 25 Sep 2017 14:07:24 +0300 > +struct tb_property_entry { > + u32 key_hi; > + u32 key_lo; > + u16 length; > + u8 reserved; > + u8 type; > + u32 value; > +} __packed; > + > +struct tb_property_rootdir_entry { > + u32 magic; > + u32

[PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-25 Thread Mika Westerberg
Thunderbolt XDomain discovery protocol uses directories which contain properties and other directories to exchange information about what capabilities the remote host supports. This also includes identification information like device ID and name. This adds support for parsing and formatting

[PATCH v2 02/16] thunderbolt: Add support for XDomain properties

2017-09-25 Thread Mika Westerberg
Thunderbolt XDomain discovery protocol uses directories which contain properties and other directories to exchange information about what capabilities the remote host supports. This also includes identification information like device ID and name. This adds support for parsing and formatting