mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
[PATCH] it821x: fix ide dma setup bug
Only enable dma for a valid speed setting. Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
0a8348d086
commit
71ef51cc17
@ -498,9 +498,14 @@ static int config_chipset_for_dma (ide_drive_t *drive)
|
|||||||
{
|
{
|
||||||
u8 speed = ide_dma_speed(drive, it821x_ratemask(drive));
|
u8 speed = ide_dma_speed(drive, it821x_ratemask(drive));
|
||||||
|
|
||||||
config_it821x_chipset_for_pio(drive, !speed);
|
if (speed) {
|
||||||
it821x_tune_chipset(drive, speed);
|
config_it821x_chipset_for_pio(drive, 0);
|
||||||
return ide_dma_enable(drive);
|
it821x_tune_chipset(drive, speed);
|
||||||
|
|
||||||
|
return ide_dma_enable(drive);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user