Revision 43a2b339

b/hw/esp.c
244 244

  
245 245
    DPRINTF("do_busid_cmd: busid 0x%x\n", busid);
246 246
    lun = busid & 7;
247
    s->current_req = s->current_dev->info->alloc_req(s->current_dev, 0, lun);
247
    s->current_req = scsi_req_new(s->current_dev, 0, lun);
248 248
    datalen = scsi_req_enqueue(s->current_req, buf);
249 249
    s->ti_size = datalen;
250 250
    if (datalen != 0) {
b/hw/lsi53c895a.c
788 788
    assert(s->current == NULL);
789 789
    s->current = qemu_mallocz(sizeof(lsi_request));
790 790
    s->current->tag = s->select_tag;
791
    s->current->req = dev->info->alloc_req(dev, s->current->tag,
792
                                           s->current_lun);
791
    s->current->req = scsi_req_new(dev, s->current->tag, s->current_lun);
793 792

  
794 793
    n = scsi_req_enqueue(s->current->req, buf);
795 794
    if (n > 0) {
b/hw/scsi-bus.c
146 146
    return req;
147 147
}
148 148

  
149
SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun)
150
{
151
    return d->info->alloc_req(d, tag, lun);
152
}
153

  
149 154
int32_t scsi_req_enqueue(SCSIRequest *req, uint8_t *buf)
150 155
{
151 156
    int32_t rc;
b/hw/scsi.h
143 143
int scsi_sense_valid(SCSISense sense);
144 144

  
145 145
SCSIRequest *scsi_req_alloc(size_t size, SCSIDevice *d, uint32_t tag, uint32_t lun);
146
SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun);
146 147
int32_t scsi_req_enqueue(SCSIRequest *req, uint8_t *buf);
147 148
void scsi_req_free(SCSIRequest *req);
148 149
SCSIRequest *scsi_req_ref(SCSIRequest *req);
b/hw/spapr_vscsi.c
653 653

  
654 654
    req->sdev = sdev;
655 655
    req->lun = lun;
656
    req->sreq = sdev->info->alloc_req(sdev, req->qtag, lun);
656
    req->sreq = scsi_req_new(sdev, req->qtag, lun);
657 657
    n = scsi_req_enqueue(req->sreq, srp->cmd.cdb);
658 658

  
659 659
    dprintf("VSCSI: Queued command tag 0x%x CMD 0x%x ID %d LUN %d ret: %d\n",
b/hw/usb-msd.c
377 377
                    s->tag, cbw.flags, cbw.cmd_len, s->data_len);
378 378
            s->residue = 0;
379 379
            s->scsi_len = 0;
380
            s->req = s->scsi_dev->info->alloc_req(s->scsi_dev, s->tag, 0);
380
            s->req = scsi_req_new(s->scsi_dev, s->tag, 0);
381 381
            scsi_req_enqueue(s->req, cbw.cmd);
382 382
            /* ??? Should check that USB and SCSI data transfer
383 383
               directions match.  */

Also available in: Unified diff