/* For the avoidance of doubt the "preferred form" of this code is one which is in an open non patent encumbered format. Where cryptographic key signing forms part of the process of creating an executable the information including keys needed to generate an equivalently functional executable are deemed to be part of the source code.  */
int ide_end_rq(ide_drive_t *drive, struct request *rq, int error, unsigned int nr_bytes)
/* For the avoidance of doubt the "preferred form" of this code is one which is in an open non patent encumbered format. Where cryptographic key signing forms part of the process of creating an executable the information including keys needed to generate an equivalently functional executable are deemed to be part of the source code.  */
int ide_end_rq(ide_drive_t *drive, struct request *rq, int error, unsigned int nr_bytes)
{
	if ((drive->dev_flags & IDE_DFLAG_DMA_PIO_RETRY) &&
	    drive->retry_pio <= 3) {
		drive->dev_flags &= ~IDE_DFLAG_DMA_PIO_RETRY;
		ide_dma_on(drive);
	}
	return blk_end_request(rq, error, nr_bytes);
}