Re: [RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked

2023-04-30 Thread Alvaro Karsz
> > +void virtio_block_feature(struct virtio_device *dev, unsigned int f) > > +{ > > + BUG_ON(f >= 64); > > + dev->blocked_features |= (1ULL << f); > > +} > > +EXPORT_SYMBOL_GPL(virtio_block_feature); > > + > > Let's add documentation please. Also pls call it __virtio_block_feature > since

Re: [RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked

2023-04-30 Thread Michael S. Tsirkin
On Sun, Apr 30, 2023 at 04:15:16PM +0300, Alvaro Karsz wrote: > This patch exports a new virtio core function: virtio_block_feature. > The function should be called during a virtio driver probe. > > If a virtio driver blocks features during probe and fails probe, virtio > core will reset the devic

[RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked

2023-04-30 Thread Alvaro Karsz
This patch exports a new virtio core function: virtio_block_feature. The function should be called during a virtio driver probe. If a virtio driver blocks features during probe and fails probe, virtio core will reset the device, try to re-negotiate the new features and probe again. Signed-off-by: