On 1/8/21 10:53 PM, David Laight wrote:
>> On 1/7/21 8:06 PM, Jakub Kicinski wrote:
>>> On Thu, 7 Jan 2021 11:00:35 -0800 Jakub Kicinski wrote:
On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote:
> +struct __packed tcan4x5x_map_buf {
> + struct tcan4x5x_buf_cmd cmd;
> + u8
On 1/7/21 11:38 PM, Jakub Kicinski wrote:
> On Thu, 7 Jan 2021 22:17:15 +0100 Marc Kleine-Budde wrote:
>>> +struct __packed tcan4x5x_buf_cmd {
>>> + u8 cmd;
>>> + __be16 addr;
>>> + u8 len;
>>> +};
>>
>> This has to be packed, as I assume the compiler would add some space after
>> the
On Mon, 11 Jan 2021 16:35:30 +0100 Ahmad Fatoum wrote:
> Hello Jakub,
>
> On 08.01.21 17:32, Jakub Kicinski wrote:
> > On Fri, 8 Jan 2021 11:07:26 +0100 Ahmad Fatoum wrote:
> > +struct __packed tcan4x5x_map_buf {
> > + struct tcan4x5x_buf_cmd cmd;
> > + u8 data[256 * si
Hello Jakub,
On 08.01.21 17:32, Jakub Kicinski wrote:
> On Fri, 8 Jan 2021 11:07:26 +0100 Ahmad Fatoum wrote:
> +struct __packed tcan4x5x_map_buf {
> + struct tcan4x5x_buf_cmd cmd;
> + u8 data[256 * sizeof(u32)];
> +} cacheline_aligned;
Due to the packing of t
From: Marc Kleine-Budde
> Sent: 07 January 2021 21:17
>
> On 1/7/21 8:06 PM, Jakub Kicinski wrote:
> > On Thu, 7 Jan 2021 11:00:35 -0800 Jakub Kicinski wrote:
> >> On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote:
> >>> +struct __packed tcan4x5x_map_buf {
> >>> + struct tcan4x5x_buf_cmd
On Fri, 8 Jan 2021 11:07:26 +0100 Ahmad Fatoum wrote:
> >>> +struct __packed tcan4x5x_map_buf {
> >>> + struct tcan4x5x_buf_cmd cmd;
> >>> + u8 data[256 * sizeof(u32)];
> >>> +} cacheline_aligned;
> >>
> >> Due to the packing of the struct tcan4x5x_buf_cmd it should have a length
> >>
On 07.01.21 23:38, Jakub Kicinski wrote:
> On Thu, 7 Jan 2021 22:17:15 +0100 Marc Kleine-Budde wrote:
>>> +struct __packed tcan4x5x_buf_cmd {
>>> + u8 cmd;
>>> + __be16 addr;
>>> + u8 len;
>>> +};
>>
>> This has to be packed, as I assume the compiler would add some space after
>> the
On Thu, 7 Jan 2021 22:17:15 +0100 Marc Kleine-Budde wrote:
> > +struct __packed tcan4x5x_buf_cmd {
> > + u8 cmd;
> > + __be16 addr;
> > + u8 len;
> > +};
>
> This has to be packed, as I assume the compiler would add some space after the
> "u8 cmd" to align the __be16 naturally.
Ack,
On 1/7/21 8:00 PM, Jakub Kicinski wrote:
> On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote:
>> +struct __packed tcan4x5x_map_buf {
>> +struct tcan4x5x_buf_cmd cmd;
>> +u8 data[256 * sizeof(u32)];
>> +} cacheline_aligned;
>
> Interesting attribute combo, I must say.
__packed
On 1/7/21 8:06 PM, Jakub Kicinski wrote:
> On Thu, 7 Jan 2021 11:00:35 -0800 Jakub Kicinski wrote:
>> On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote:
>>> +struct __packed tcan4x5x_map_buf {
>>> + struct tcan4x5x_buf_cmd cmd;
>>> + u8 data[256 * sizeof(u32)];
>>> +} cacheline_ali
On Thu, 7 Jan 2021 11:00:35 -0800 Jakub Kicinski wrote:
> On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote:
> > +struct __packed tcan4x5x_map_buf {
> > + struct tcan4x5x_buf_cmd cmd;
> > + u8 data[256 * sizeof(u32)];
> > +} cacheline_aligned;
>
> Interesting attribute combo, I
On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote:
> +struct __packed tcan4x5x_map_buf {
> + struct tcan4x5x_buf_cmd cmd;
> + u8 data[256 * sizeof(u32)];
> +} cacheline_aligned;
Interesting attribute combo, I must say.
This patch reworks the SPI access and fixes several probems:
- tcan4x5x_regmap_gather_write(), tcan4x5x_regmap_read():
Do not place variable "addr" on stack and use it as buffer for SPI
transfer. Buffers for SPI transfers must be allocated from DMA save
memory.
- tcan4x5x_regmap_gather_write(
13 matches
Mail list logo