static void scsi_read_data(SCSIDevice *d, uint32_t tag)

{

    SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d);

    SCSIDiskReq *r;



    r = scsi_find_request(s, tag);

    if (!r) {

        BADF("Bad read tag 0x%x\n", tag);

        /* ??? This is the wrong error.  */

        scsi_command_complete(r, CHECK_CONDITION, HARDWARE_ERROR);

        return;

    }



    /* No data transfer may already be in progress */

    assert(r->req.aiocb == NULL);



    scsi_read_request(r);

}

static void scsi_read_data(SCSIDevice *d, uint32_t tag)

{

    SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d);

    SCSIDiskReq *r;



    r = scsi_find_request(s, tag);

    if (!r) {

        BADF("Bad read tag 0x%x\n", tag);

        

        scsi_command_complete(r, CHECK_CONDITION, HARDWARE_ERROR);

        return;

    }



    

    assert(r->req.aiocb == NULL);



    scsi_read_request(r);

}

static void FUNC_0(SCSIDevice *VAR_0, uint32_t VAR_1)

{

    SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0);

    SCSIDiskReq *r;



    r = scsi_find_request(s, VAR_1);

    if (!r) {

        BADF("Bad read VAR_1 0x%x\n", VAR_1);

        

        scsi_command_complete(r, CHECK_CONDITION, HARDWARE_ERROR);

        return;

    }



    

    assert(r->req.aiocb == NULL);



    scsi_read_request(r);

}

static void FUNC_0(SCSIDevice *VAR_0, uint32_t VAR_1)
{ SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0); SCSIDiskReq *r; r = scsi_find_request(s, VAR_1); if (!r) { BADF("Bad read VAR_1 0x%x\n", VAR_1); scsi_command_complete(r, CHECK_CONDITION, HARDWARE_ERROR); return; } assert(r->req.aiocb == NULL); scsi_read_request(r); }