Commit 39dfc926df54cd3c85485edc89abba67b39ccb7f

Authored by ths
1 parent 36bc0bc9

Allow disabling IDE block mode, by Carlo Marcelo Arenas Belon.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2484 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
hw/ide.c
@@ -1631,9 +1631,9 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) @@ -1631,9 +1631,9 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
1631 ide_set_irq(s); 1631 ide_set_irq(s);
1632 break; 1632 break;
1633 case WIN_SETMULT: 1633 case WIN_SETMULT:
1634 - if ((s->nsector & 0xff) > MAX_MULT_SECTORS ||  
1635 - s->nsector == 0 ||  
1636 - (s->nsector & (s->nsector - 1)) != 0) { 1634 + if ((s->nsector & 0xff) != 0 &&
  1635 + ((s->nsector & 0xff) > MAX_MULT_SECTORS ||
  1636 + (s->nsector & (s->nsector - 1)) != 0)) {
1637 ide_abort_command(s); 1637 ide_abort_command(s);
1638 } else { 1638 } else {
1639 s->mult_sectors = s->nsector & 0xff; 1639 s->mult_sectors = s->nsector & 0xff;