summaryrefslogtreecommitdiff
path: root/hw/scsi-disk.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 14:33:24 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 14:33:24 +0000
commit33f002714be2ed58ed05ae3870d5ea6915df4b47 (patch)
tree6b5f907e0c0b42bc6ca4222f1e14462be5e30c1a /hw/scsi-disk.c
parent3e98dc8ec6af89c7f4f1e006b979eb405b431629 (diff)
downloadqemu-33f002714be2ed58ed05ae3870d5ea6915df4b47.zip
Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r--hw/scsi-disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 220b1997cc..b3e1ed71b0 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -46,7 +46,7 @@ typedef struct SCSIRequest {
int sector_count;
/* The amounnt of data in the buffer. */
int buf_len;
- uint8_t dma_buf[SCSI_DMA_BUF_SIZE];
+ uint8_t *dma_buf;
BlockDriverAIOCB *aiocb;
struct SCSIRequest *next;
} SCSIRequest;
@@ -78,6 +78,7 @@ static SCSIRequest *scsi_new_request(SCSIDeviceState *s, uint32_t tag)
free_requests = r->next;
} else {
r = qemu_malloc(sizeof(SCSIRequest));
+ r->dma_buf = qemu_memalign(512, SCSI_DMA_BUF_SIZE);
}
r->dev = s;
r->tag = tag;