Re: [PATCH v2 2/2] i2c: virtio: fix completion handling

2021-12-02 Thread Vincent Whitchurch
On Thu, Nov 11, 2021 at 05:57:30PM +0100, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2021 at 05:04:12PM +0100, Vincent Whitchurch wrote: > > - wait_for_completion(&vi->completion); > > + /* > > +* We only need to wait for the last one since the device is required > > +* to complete req

Re: [PATCH v2 2/2] i2c: virtio: fix completion handling

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 05:04:12PM +0100, Vincent Whitchurch wrote: > The driver currently assumes that the notify callback is only received > when the device is done with all the queued buffers. > > However, this is not true, since the notify callback could be called > without any of the queued b

[PATCH v2 2/2] i2c: virtio: fix completion handling

2021-11-11 Thread Vincent Whitchurch
The driver currently assumes that the notify callback is only received when the device is done with all the queued buffers. However, this is not true, since the notify callback could be called without any of the queued buffers being completed (for example, with virtio-pci and shared interrupts) or