Messages in this thread | | | Date | Wed, 19 Nov 2014 16:12:40 +0200 | From | Laurentiu Palcu <> | Subject | Re: [PATCH v5 1/2] spi: add support for DLN-2 USB-SPI adapter |
| |
On Wed, Nov 19, 2014 at 02:51:21PM +0100, Johan Hovold wrote: > On Wed, Nov 19, 2014 at 03:07:47PM +0200, Laurentiu Palcu wrote: > > > +/* > > + * Perform one read operation. > > + */ > > +static int dln2_spi_read_one(struct dln2_spi *dln2, u8 *data, > > + u16 data_len, u8 attr) > > +{ > > + int ret; > > + struct { > > + u8 port; > > + __le16 size; > > + u8 attr; > > + } __packed tx; > > + struct { > > + __le16 size; > > + u8 buf[DLN2_SPI_MAX_XFER_SIZE]; > > + } __packed *rx = dln2->buf; > > You said you verified that the dln2 protocol headers did not mess up the > alignment, yet they do. Here you have a two byte header. I did, only that I mistakenly counted the entire header, including dln2_response struct size, which is 10 bytes... :/
thanks, laurentiu
| |