static void ide_atapi_cmd_read_dma(IDEState *s, int lba, int nb_sectors,

                                   int sector_size)

{

    s->lba = lba;

    s->packet_transfer_size = nb_sectors * sector_size;

    s->io_buffer_index = 0;

    s->io_buffer_size = 0;

    s->cd_sector_size = sector_size;



    block_acct_start(bdrv_get_stats(s->bs), &s->acct, s->packet_transfer_size,

                     BLOCK_ACCT_READ);



    /* XXX: check if BUSY_STAT should be set */

    s->status = READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT;

    ide_start_dma(s, ide_atapi_cmd_read_dma_cb);

}

static void ide_atapi_cmd_read_dma(IDEState *s, int lba, int nb_sectors,

                                   int sector_size)

{

    s->lba = lba;

    s->packet_transfer_size = nb_sectors * sector_size;

    s->io_buffer_index = 0;

    s->io_buffer_size = 0;

    s->cd_sector_size = sector_size;



    block_acct_start(bdrv_get_stats(s->bs), &s->acct, s->packet_transfer_size,

                     BLOCK_ACCT_READ);



    

    s->status = READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT;

    ide_start_dma(s, ide_atapi_cmd_read_dma_cb);

}

static void FUNC_0(IDEState *VAR_0, int VAR_1, int VAR_2,

                                   int VAR_3)

{

    VAR_0->VAR_1 = VAR_1;

    VAR_0->packet_transfer_size = VAR_2 * VAR_3;

    VAR_0->io_buffer_index = 0;

    VAR_0->io_buffer_size = 0;

    VAR_0->cd_sector_size = VAR_3;



    block_acct_start(bdrv_get_stats(VAR_0->bs), &VAR_0->acct, VAR_0->packet_transfer_size,

                     BLOCK_ACCT_READ);



    

    VAR_0->status = READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT;

    ide_start_dma(VAR_0, ide_atapi_cmd_read_dma_cb);

}

static void FUNC_0(IDEState *VAR_0, int VAR_1, int VAR_2,
int VAR_3)
{ VAR_0->VAR_1 = VAR_1; VAR_0->packet_transfer_size = VAR_2 * VAR_3; VAR_0->io_buffer_index = 0; VAR_0->io_buffer_size = 0; VAR_0->cd_sector_size = VAR_3; block_acct_start(bdrv_get_stats(VAR_0->bs), &VAR_0->acct, VAR_0->packet_transfer_size,
BLOCK_ACCT_READ); VAR_0->status = READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT; ide_start_dma(VAR_0, ide_atapi_cmd_read_dma_cb); }