diff mbox

[1/8] musicpal: Catch null TX qeueues

Message ID 20090918185122.2879.37050.stgit@mchn012c.ww002.siemens.net
State Superseded
Headers show

Commit Message

Jan Kiszka Sept. 18, 2009, 6:51 p.m. UTC
They likely represent invalid queues that should be skipped. We already
do this for RX queues. Wish I had a spec...

Credits go to malc for analyzing the issue and suggesting this fix.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---

 hw/musicpal.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

malc Oct. 4, 2009, 6:57 a.m. UTC | #1
On Fri, 18 Sep 2009, Jan Kiszka wrote:

> They likely represent invalid queues that should be skipped. We already
> do this for RX queues. Wish I had a spec...
> 
> Credits go to malc for analyzing the issue and suggesting this fix.
> 

What bothers me is:

a. Why 930c86820e8e0b6dfcf211bda5e835463d72ff42 (disregarding dodgy 
   reading into structures directly) and why only on a PPC
b. Why the "fix" was not needed before
malc Oct. 4, 2009, 7:04 a.m. UTC | #2
On Sun, 4 Oct 2009, malc wrote:

> On Fri, 18 Sep 2009, Jan Kiszka wrote:
> 
> > They likely represent invalid queues that should be skipped. We already
> > do this for RX queues. Wish I had a spec...
> > 
> > Credits go to malc for analyzing the issue and suggesting this fix.
> > 
> 
> What bothers me is:
> 
> a. Why 930c86820e8e0b6dfcf211bda5e835463d72ff42 (disregarding dodgy 
                                                 ^ breaks it

>    reading into structures directly) and why only on a PPC
> b. Why the "fix" was not needed before
> 
>
malc Oct. 4, 2009, 11:09 a.m. UTC | #3
On Sun, 4 Oct 2009, malc wrote:

> On Sun, 4 Oct 2009, malc wrote:
> 
> > On Fri, 18 Sep 2009, Jan Kiszka wrote:
> > 
> > > They likely represent invalid queues that should be skipped. We already
> > > do this for RX queues. Wish I had a spec...
> > > 
> > > Credits go to malc for analyzing the issue and suggesting this fix.
> > > 
> > 
> > What bothers me is:
> > 
> > a. Why 930c86820e8e0b6dfcf211bda5e835463d72ff42 (disregarding dodgy 
>                                                  ^ breaks it
> 
> >    reading into structures directly) and why only on a PPC
> > b. Why the "fix" was not needed before

And FWIW i'm again getting the bounces from web.de (a copy of which i've
sent you the other week)
diff mbox

Patch

diff --git a/hw/musicpal.c b/hw/musicpal.c
index 1c4f17c..c8f0235 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -238,7 +238,9 @@  static void eth_send(mv88w8618_eth_state *s, int queue_index)
     uint8_t buf[2048];
     int len;
 
-
+    if (!desc_addr) {
+        return;
+    }
     do {
         eth_tx_desc_get(desc_addr, &desc);
         if (desc.cmdstat & MP_ETH_TX_OWN) {