RE: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-12 Thread Sjur BRENDELAND
> Amit Shah [mailto:amit.s...@redhat.com] writes:
> On (Wed) 12 Dec 2012 [10:31:04], Rusty Russell wrote:
> > Amit Shah  writes:
> > > On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
> > >> Amit Shah  writes:
> > >> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> > >> >> Amit Shah  writes:
> > >> >> > From: Sjur Brændeland 
> > >> >> >
> > >> >> > Remove buffers from the out-queue when a port is removed.
> Rproc_serial
> > >> >> > communicates with remote processors that may crash and leave
> buffers in
> > >> >> > the out-queue. The virtio serial ports may have buffers in the out-
> queue
> > >> >> > as well, e.g. for non-blocking ports and the host didn't consume
> them
> > >> >> > yet.
> > >> >> >
> > >> >> > [Amit: Remove WARN_ON for generic ports case.]
> > >> >> >
> > >> >> > Signed-off-by: Sjur Brændeland
> 
> > >> >> > Signed-off-by: Amit Shah 
> > >> >>
> > >> >> I already have this in my pending queue; I've promoted it to my
> > >> >> virtio-next branch now.
> > >> >
> > >> > Rusty, I still see this series in your pending queue, not in
> > >> > virtio-next.  Did anything change in the meantime?
> > >>
> > >> Hmm:
> > >>
> > >> 40e625ac50f40d87ddba93280d0a503425aa68e9?
> > >
> > > I'm sorry, I meant the remoteproc code, not this patch.
> >
> > Still waiting for v9, AFIACT?
> 
> Instead of sending all patches marked v9, just this patch was
> re-spun.  I think you can just pick up patches 1 and 2 from v8 (they
> have my acked-by), and patch 3 was an earlier version of this one,

Yes, that's right. V8 contained three patches, Amit did a respin of 3/3 that 
was applied.
(And I mistakenly thought 1/3 and 2/3 was applied as well). 

Anyway I'm resending a new patch-set with the two missing patches.
The patches are identical to the V8, but are rebased to the virtio-next branch.

Sorry for the confusion here.

Regards,
Sjur

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-12 Thread Amit Shah
On (Wed) 12 Dec 2012 [10:31:04], Rusty Russell wrote:
> Amit Shah  writes:
> 
> > On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
> >> Amit Shah  writes:
> >> 
> >> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> >> >> Amit Shah  writes:
> >> >> > From: Sjur Brændeland 
> >> >> >
> >> >> > Remove buffers from the out-queue when a port is removed. Rproc_serial
> >> >> > communicates with remote processors that may crash and leave buffers 
> >> >> > in
> >> >> > the out-queue. The virtio serial ports may have buffers in the 
> >> >> > out-queue
> >> >> > as well, e.g. for non-blocking ports and the host didn't consume them
> >> >> > yet.
> >> >> >
> >> >> > [Amit: Remove WARN_ON for generic ports case.]
> >> >> >
> >> >> > Signed-off-by: Sjur Brændeland 
> >> >> > Signed-off-by: Amit Shah 
> >> >> 
> >> >> I already have this in my pending queue; I've promoted it to my
> >> >> virtio-next branch now.
> >> >
> >> > Rusty, I still see this series in your pending queue, not in
> >> > virtio-next.  Did anything change in the meantime?
> >> 
> >> Hmm:
> >> 
> >> 40e625ac50f40d87ddba93280d0a503425aa68e9?
> >
> > I'm sorry, I meant the remoteproc code, not this patch.
> 
> Still waiting for v9, AFIACT?

Instead of sending all patches marked v9, just this patch was
re-spun.  I think you can just pick up patches 1 and 2 from v8 (they
have my acked-by), and patch 3 was an earlier version of this one,
which should just be dropped.

Amit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-12 Thread Amit Shah
On (Wed) 12 Dec 2012 [10:31:04], Rusty Russell wrote:
 Amit Shah amit.s...@redhat.com writes:
 
  On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
  Amit Shah amit.s...@redhat.com writes:
  
   On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
   Amit Shah amit.s...@redhat.com writes:
From: Sjur Brændeland sjur.brandel...@stericsson.com
   
Remove buffers from the out-queue when a port is removed. Rproc_serial
communicates with remote processors that may crash and leave buffers 
in
the out-queue. The virtio serial ports may have buffers in the 
out-queue
as well, e.g. for non-blocking ports and the host didn't consume them
yet.
   
[Amit: Remove WARN_ON for generic ports case.]
   
Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
Signed-off-by: Amit Shah amit.s...@redhat.com
   
   I already have this in my pending queue; I've promoted it to my
   virtio-next branch now.
  
   Rusty, I still see this series in your pending queue, not in
   virtio-next.  Did anything change in the meantime?
  
  Hmm:
  
  40e625ac50f40d87ddba93280d0a503425aa68e9?
 
  I'm sorry, I meant the remoteproc code, not this patch.
 
 Still waiting for v9, AFIACT?

Instead of sending all patches marked v9, just this patch was
re-spun.  I think you can just pick up patches 1 and 2 from v8 (they
have my acked-by), and patch 3 was an earlier version of this one,
which should just be dropped.

Amit
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-12 Thread Sjur BRENDELAND
 Amit Shah [mailto:amit.s...@redhat.com] writes:
 On (Wed) 12 Dec 2012 [10:31:04], Rusty Russell wrote:
  Amit Shah amit.s...@redhat.com writes:
   On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
   Amit Shah amit.s...@redhat.com writes:
On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
Amit Shah amit.s...@redhat.com writes:
 From: Sjur Brændeland sjur.brandel...@stericsson.com

 Remove buffers from the out-queue when a port is removed.
 Rproc_serial
 communicates with remote processors that may crash and leave
 buffers in
 the out-queue. The virtio serial ports may have buffers in the out-
 queue
 as well, e.g. for non-blocking ports and the host didn't consume
 them
 yet.

 [Amit: Remove WARN_ON for generic ports case.]

 Signed-off-by: Sjur Brændeland
 sjur.brandel...@stericsson.com
 Signed-off-by: Amit Shah amit.s...@redhat.com
   
I already have this in my pending queue; I've promoted it to my
virtio-next branch now.
   
Rusty, I still see this series in your pending queue, not in
virtio-next.  Did anything change in the meantime?
  
   Hmm:
  
   40e625ac50f40d87ddba93280d0a503425aa68e9?
  
   I'm sorry, I meant the remoteproc code, not this patch.
 
  Still waiting for v9, AFIACT?
 
 Instead of sending all patches marked v9, just this patch was
 re-spun.  I think you can just pick up patches 1 and 2 from v8 (they
 have my acked-by), and patch 3 was an earlier version of this one,

Yes, that's right. V8 contained three patches, Amit did a respin of 3/3 that 
was applied.
(And I mistakenly thought 1/3 and 2/3 was applied as well). 

Anyway I'm resending a new patch-set with the two missing patches.
The patches are identical to the V8, but are rebased to the virtio-next branch.

Sorry for the confusion here.

Regards,
Sjur

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-11 Thread Rusty Russell
Amit Shah  writes:

> On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
>> Amit Shah  writes:
>> 
>> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
>> >> Amit Shah  writes:
>> >> > From: Sjur Brændeland 
>> >> >
>> >> > Remove buffers from the out-queue when a port is removed. Rproc_serial
>> >> > communicates with remote processors that may crash and leave buffers in
>> >> > the out-queue. The virtio serial ports may have buffers in the out-queue
>> >> > as well, e.g. for non-blocking ports and the host didn't consume them
>> >> > yet.
>> >> >
>> >> > [Amit: Remove WARN_ON for generic ports case.]
>> >> >
>> >> > Signed-off-by: Sjur Brændeland 
>> >> > Signed-off-by: Amit Shah 
>> >> 
>> >> I already have this in my pending queue; I've promoted it to my
>> >> virtio-next branch now.
>> >
>> > Rusty, I still see this series in your pending queue, not in
>> > virtio-next.  Did anything change in the meantime?
>> 
>> Hmm:
>> 
>> 40e625ac50f40d87ddba93280d0a503425aa68e9?
>
> I'm sorry, I meant the remoteproc code, not this patch.

Still waiting for v9, AFIACT?

Sjur, we're in the merge window now, so it'd be nice to get your latest
version on top of linux-next (or simply my virtio-next git tree) today.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-11 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes:

 On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
 Amit Shah amit.s...@redhat.com writes:
 
  On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
  Amit Shah amit.s...@redhat.com writes:
   From: Sjur Brændeland sjur.brandel...@stericsson.com
  
   Remove buffers from the out-queue when a port is removed. Rproc_serial
   communicates with remote processors that may crash and leave buffers in
   the out-queue. The virtio serial ports may have buffers in the out-queue
   as well, e.g. for non-blocking ports and the host didn't consume them
   yet.
  
   [Amit: Remove WARN_ON for generic ports case.]
  
   Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
   Signed-off-by: Amit Shah amit.s...@redhat.com
  
  I already have this in my pending queue; I've promoted it to my
  virtio-next branch now.
 
  Rusty, I still see this series in your pending queue, not in
  virtio-next.  Did anything change in the meantime?
 
 Hmm:
 
 40e625ac50f40d87ddba93280d0a503425aa68e9?

 I'm sorry, I meant the remoteproc code, not this patch.

Still waiting for v9, AFIACT?

Sjur, we're in the merge window now, so it'd be nice to get your latest
version on top of linux-next (or simply my virtio-next git tree) today.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-10 Thread Amit Shah
On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
> Amit Shah  writes:
> 
> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> >> Amit Shah  writes:
> >> > From: Sjur Brændeland 
> >> >
> >> > Remove buffers from the out-queue when a port is removed. Rproc_serial
> >> > communicates with remote processors that may crash and leave buffers in
> >> > the out-queue. The virtio serial ports may have buffers in the out-queue
> >> > as well, e.g. for non-blocking ports and the host didn't consume them
> >> > yet.
> >> >
> >> > [Amit: Remove WARN_ON for generic ports case.]
> >> >
> >> > Signed-off-by: Sjur Brændeland 
> >> > Signed-off-by: Amit Shah 
> >> 
> >> I already have this in my pending queue; I've promoted it to my
> >> virtio-next branch now.
> >
> > Rusty, I still see this series in your pending queue, not in
> > virtio-next.  Did anything change in the meantime?
> 
> Hmm:
> 
> 40e625ac50f40d87ddba93280d0a503425aa68e9?

I'm sorry, I meant the remoteproc code, not this patch.

Amit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-10 Thread Rusty Russell
Amit Shah  writes:

> On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
>> Amit Shah  writes:
>> > From: Sjur Brændeland 
>> >
>> > Remove buffers from the out-queue when a port is removed. Rproc_serial
>> > communicates with remote processors that may crash and leave buffers in
>> > the out-queue. The virtio serial ports may have buffers in the out-queue
>> > as well, e.g. for non-blocking ports and the host didn't consume them
>> > yet.
>> >
>> > [Amit: Remove WARN_ON for generic ports case.]
>> >
>> > Signed-off-by: Sjur Brændeland 
>> > Signed-off-by: Amit Shah 
>> 
>> I already have this in my pending queue; I've promoted it to my
>> virtio-next branch now.
>
> Rusty, I still see this series in your pending queue, not in
> virtio-next.  Did anything change in the meantime?
>
>   Amit

Hmm:

40e625ac50f40d87ddba93280d0a503425aa68e9?

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-10 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes:

 On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
 Amit Shah amit.s...@redhat.com writes:
  From: Sjur Brændeland sjur.brandel...@stericsson.com
 
  Remove buffers from the out-queue when a port is removed. Rproc_serial
  communicates with remote processors that may crash and leave buffers in
  the out-queue. The virtio serial ports may have buffers in the out-queue
  as well, e.g. for non-blocking ports and the host didn't consume them
  yet.
 
  [Amit: Remove WARN_ON for generic ports case.]
 
  Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
  Signed-off-by: Amit Shah amit.s...@redhat.com
 
 I already have this in my pending queue; I've promoted it to my
 virtio-next branch now.

 Rusty, I still see this series in your pending queue, not in
 virtio-next.  Did anything change in the meantime?

   Amit

Hmm:

40e625ac50f40d87ddba93280d0a503425aa68e9?

Cheers,
Rusty.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-10 Thread Amit Shah
On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
 Amit Shah amit.s...@redhat.com writes:
 
  On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
  Amit Shah amit.s...@redhat.com writes:
   From: Sjur Brændeland sjur.brandel...@stericsson.com
  
   Remove buffers from the out-queue when a port is removed. Rproc_serial
   communicates with remote processors that may crash and leave buffers in
   the out-queue. The virtio serial ports may have buffers in the out-queue
   as well, e.g. for non-blocking ports and the host didn't consume them
   yet.
  
   [Amit: Remove WARN_ON for generic ports case.]
  
   Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
   Signed-off-by: Amit Shah amit.s...@redhat.com
  
  I already have this in my pending queue; I've promoted it to my
  virtio-next branch now.
 
  Rusty, I still see this series in your pending queue, not in
  virtio-next.  Did anything change in the meantime?
 
 Hmm:
 
 40e625ac50f40d87ddba93280d0a503425aa68e9?

I'm sorry, I meant the remoteproc code, not this patch.

Amit
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-09 Thread Amit Shah
On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> Amit Shah  writes:
> > From: Sjur Brændeland 
> >
> > Remove buffers from the out-queue when a port is removed. Rproc_serial
> > communicates with remote processors that may crash and leave buffers in
> > the out-queue. The virtio serial ports may have buffers in the out-queue
> > as well, e.g. for non-blocking ports and the host didn't consume them
> > yet.
> >
> > [Amit: Remove WARN_ON for generic ports case.]
> >
> > Signed-off-by: Sjur Brændeland 
> > Signed-off-by: Amit Shah 
> 
> I already have this in my pending queue; I've promoted it to my
> virtio-next branch now.

Rusty, I still see this series in your pending queue, not in
virtio-next.  Did anything change in the meantime?

Amit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-09 Thread Amit Shah
On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
 Amit Shah amit.s...@redhat.com writes:
  From: Sjur Brændeland sjur.brandel...@stericsson.com
 
  Remove buffers from the out-queue when a port is removed. Rproc_serial
  communicates with remote processors that may crash and leave buffers in
  the out-queue. The virtio serial ports may have buffers in the out-queue
  as well, e.g. for non-blocking ports and the host didn't consume them
  yet.
 
  [Amit: Remove WARN_ON for generic ports case.]
 
  Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
  Signed-off-by: Amit Shah amit.s...@redhat.com
 
 I already have this in my pending queue; I've promoted it to my
 virtio-next branch now.

Rusty, I still see this series in your pending queue, not in
virtio-next.  Did anything change in the meantime?

Amit
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-11-15 Thread Rusty Russell
Amit Shah  writes:
> From: Sjur Brændeland 
>
> Remove buffers from the out-queue when a port is removed. Rproc_serial
> communicates with remote processors that may crash and leave buffers in
> the out-queue. The virtio serial ports may have buffers in the out-queue
> as well, e.g. for non-blocking ports and the host didn't consume them
> yet.
>
> [Amit: Remove WARN_ON for generic ports case.]
>
> Signed-off-by: Sjur Brændeland 
> Signed-off-by: Amit Shah 

I already have this in my pending queue; I've promoted it to my
virtio-next branch now.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-11-15 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes:
 From: Sjur Brændeland sjur.brandel...@stericsson.com

 Remove buffers from the out-queue when a port is removed. Rproc_serial
 communicates with remote processors that may crash and leave buffers in
 the out-queue. The virtio serial ports may have buffers in the out-queue
 as well, e.g. for non-blocking ports and the host didn't consume them
 yet.

 [Amit: Remove WARN_ON for generic ports case.]

 Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
 Signed-off-by: Amit Shah amit.s...@redhat.com

I already have this in my pending queue; I've promoted it to my
virtio-next branch now.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-11-08 Thread Amit Shah
From: Sjur Brændeland 

Remove buffers from the out-queue when a port is removed. Rproc_serial
communicates with remote processors that may crash and leave buffers in
the out-queue. The virtio serial ports may have buffers in the out-queue
as well, e.g. for non-blocking ports and the host didn't consume them
yet.

[Amit: Remove WARN_ON for generic ports case.]

Signed-off-by: Sjur Brændeland 
Signed-off-by: Amit Shah 
---
 drivers/char/virtio_console.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 9ebadcb..5ff3b3e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1521,6 +1521,10 @@ static void remove_port_data(struct port *port)
/* Remove buffers we queued up for the Host to send us data in. */
while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
free_buf(buf, true);
+
+   /* Remove buffers we queued up for the Host to consume */
+   while ((buf = virtqueue_detach_unused_buf(port->out_vq)))
+   free_buf(buf, true);
 }
 
 /*
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-11-08 Thread Amit Shah
From: Sjur Brændeland sjur.brandel...@stericsson.com

Remove buffers from the out-queue when a port is removed. Rproc_serial
communicates with remote processors that may crash and leave buffers in
the out-queue. The virtio serial ports may have buffers in the out-queue
as well, e.g. for non-blocking ports and the host didn't consume them
yet.

[Amit: Remove WARN_ON for generic ports case.]

Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com
Signed-off-by: Amit Shah amit.s...@redhat.com
---
 drivers/char/virtio_console.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 9ebadcb..5ff3b3e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1521,6 +1521,10 @@ static void remove_port_data(struct port *port)
/* Remove buffers we queued up for the Host to send us data in. */
while ((buf = virtqueue_detach_unused_buf(port-in_vq)))
free_buf(buf, true);
+
+   /* Remove buffers we queued up for the Host to consume */
+   while ((buf = virtqueue_detach_unused_buf(port-out_vq)))
+   free_buf(buf, true);
 }
 
 /*
-- 
1.7.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/