[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/2] ide: Fix incorrect handling of some PRDTs in ide_dma_
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v3 1/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb() |
Date: |
Tue, 7 Jan 2020 08:34:42 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
Am 23.12.2019 um 18:51 hat Alexander Popov geschrieben:
> The commit a718978ed58a from July 2015 introduced the assertion which
> implies that the size of successful DMA transfers handled in ide_dma_cb()
> should be multiple of 512 (the size of a sector). But guest systems can
> initiate DMA transfers that don't fit this requirement.
>
> For fixing that let's check the number of bytes prepared for the transfer
> by the prepare_buf() handler. The code in ide_dma_cb() must behave
> according to the Programming Interface for Bus Master IDE Controller
> (Revision 1.0 5/16/94):
> 1. If PRDs specified a smaller size than the IDE transfer
> size, then the Interrupt and Active bits in the Controller
> status register are not set (Error Condition).
> 2. If the size of the physical memory regions was equal to
> the IDE device transfer size, the Interrupt bit in the
> Controller status register is set to 1, Active bit is set to 0.
> 3. If PRDs specified a larger size than the IDE transfer size,
> the Interrupt and Active bits in the Controller status register
> are both set to 1.
>
> Signed-off-by: Alexander Popov <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 1/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb(),
Kevin Wolf <=