Commit df475d18d890572b8456ebff327bb9debee6289a
1 parent
2f0c934e
fixed invalid command test
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@721 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
7 deletions
hw/dma.c
@@ -168,9 +168,9 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data) | @@ -168,9 +168,9 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data) | ||
168 | iport = (nport >> d->dshift) & 0x0f; | 168 | iport = (nport >> d->dshift) & 0x0f; |
169 | switch (iport) { | 169 | switch (iport) { |
170 | case 8: /* command */ | 170 | case 8: /* command */ |
171 | - if (data && (data | CMD_NOT_SUPPORTED)) { | 171 | + if ((data != 0) && (data & CMD_NOT_SUPPORTED)) { |
172 | log ("command %#x not supported\n", data); | 172 | log ("command %#x not supported\n", data); |
173 | - goto error; | 173 | + return; |
174 | } | 174 | } |
175 | d->command = data; | 175 | d->command = data; |
176 | break; | 176 | break; |
@@ -236,7 +236,7 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data) | @@ -236,7 +236,7 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data) | ||
236 | 236 | ||
237 | default: | 237 | default: |
238 | log ("dma: unknown iport %#x\n", iport); | 238 | log ("dma: unknown iport %#x\n", iport); |
239 | - goto error; | 239 | + break; |
240 | } | 240 | } |
241 | 241 | ||
242 | #ifdef DEBUG_DMA | 242 | #ifdef DEBUG_DMA |
@@ -245,10 +245,6 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data) | @@ -245,10 +245,6 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data) | ||
245 | nport, ichan, data); | 245 | nport, ichan, data); |
246 | } | 246 | } |
247 | #endif | 247 | #endif |
248 | - return; | ||
249 | - | ||
250 | - error: | ||
251 | - abort (); | ||
252 | } | 248 | } |
253 | 249 | ||
254 | static uint32_t read_cont (void *opaque, uint32_t nport) | 250 | static uint32_t read_cont (void *opaque, uint32_t nport) |