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
This commit is contained in:
ths 2007-03-17 14:54:15 +00:00
parent 36bc0bc9d7
commit 39dfc926df

View File

@ -1631,9 +1631,9 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
ide_set_irq(s); ide_set_irq(s);
break; break;
case WIN_SETMULT: case WIN_SETMULT:
if ((s->nsector & 0xff) > MAX_MULT_SECTORS || if ((s->nsector & 0xff) != 0 &&
s->nsector == 0 || ((s->nsector & 0xff) > MAX_MULT_SECTORS ||
(s->nsector & (s->nsector - 1)) != 0) { (s->nsector & (s->nsector - 1)) != 0)) {
ide_abort_command(s); ide_abort_command(s);
} else { } else {
s->mult_sectors = s->nsector & 0xff; s->mult_sectors = s->nsector & 0xff;