~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to hw/scsi-disk.c

Tags: upstream-0.9.0+20070816
ImportĀ upstreamĀ versionĀ 0.9.0+20070816

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
        DPRINTF("Request Sense (len %d)\n", len);
346
346
        if (len < 4)
347
347
            goto fail;
348
 
        memset(buf, 0, 4);
 
348
        memset(outbuf, 0, 4);
349
349
        outbuf[0] = 0xf0;
350
350
        outbuf[1] = 0;
351
351
        outbuf[2] = s->sense;
371
371
           Some later commands are also implemented. */
372
372
        outbuf[2] = 3;
373
373
        outbuf[3] = 2; /* Format 2 */
374
 
        outbuf[4] = 32;
 
374
        outbuf[4] = 31;
375
375
        /* Sync data transfer and TCQ.  */
376
376
        outbuf[7] = 0x10 | (s->tcq ? 0x02 : 0);
377
377
        r->buf_len = 36;
404
404
            p += 4;
405
405
            if ((page == 8 || page == 0x3f)) {
406
406
                /* Caching page.  */
 
407
                memset(p,0,20);
407
408
                p[0] = 8;
408
409
                p[1] = 0x12;
409
410
                p[2] = 4; /* WCE */
410
 
                p += 19;
 
411
                p += 20;
411
412
            }
412
413
            if ((page == 0x3f || page == 0x2a)
413
414
                    && (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM)) {
437
438
                p[19] = (16 * 176) & 0xff;
438
439
                p[20] = (16 * 176) >> 8; // 16x write speed current
439
440
                p[21] = (16 * 176) & 0xff;
440
 
                p += 21;
 
441
                p += 22;
441
442
            }
442
443
            r->buf_len = p - outbuf;
443
444
            outbuf[0] = r->buf_len - 4;
488
489
        is_write = 1;
489
490
        break;
490
491
    case 0x35:
491
 
        DPRINTF("Syncronise cache (sector %d, count %d)\n", lba, len);
 
492
        DPRINTF("Synchronise cache (sector %d, count %d)\n", lba, len);
492
493
        bdrv_flush(s->bdrv);
493
494
        break;
494
495
    case 0x43: