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

« back to all changes in this revision

Viewing changes to debian/patches/88_dma.patch

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-22 10:13:17 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090322101317-iigjtnu5qil35dtb
Tags: 0.10.1-1
[ Aurelien Jarno ]
* New upstream stable release:
  - patches/80_stable-branch.patch: remove.
* debian/control: 
  - Remove depends on proll.
  - Move depends on device-tree-compiler to build-depends.
  - Bump Standards-Version to 3.8.1 (no changes).
* patches/82_qemu-img_decimal.patch: new patch from upstream to make
  qemu-img accept sizes with decimal values (closes: bug#501400).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
commit 43b0a943462c2620569776cc43e5b3fa04a73a3a
2
 
Author: aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
3
 
Date:   Sat Mar 29 12:15:35 2008 +0000
4
 
 
5
 
    IDE: Improve DMA transfers by increasing the buffer size
6
 
    
7
 
    (Ian Jackson)
8
 
    
9
 
    
10
 
    git-svn-id: svn+ssh://svn.savannah.nongnu.org/qemu/trunk@4132 c046a42c-6fe2-441c-8c8c-71466251a162
11
 
 
12
 
Index: qemu-0.9.1/hw/ide.c
13
 
===================================================================
14
 
--- qemu-0.9.1.orig/hw/ide.c    2008-01-06 20:38:42.000000000 +0100
15
 
+++ qemu-0.9.1/hw/ide.c 2008-04-14 11:26:14.000000000 +0200
16
 
@@ -202,6 +202,12 @@
17
 
 /* set to 1 set disable mult support */
18
 
 #define MAX_MULT_SECTORS 16
19
 
 
20
 
+#define IDE_DMA_BUF_SECTORS 256
21
 
+
22
 
+#if (IDE_DMA_BUF_SECTORS < MAX_MULT_SECTORS)
23
 
+#error "IDE_DMA_BUF_SECTORS must be bigger or equal to MAX_MULT_SECTORS"
24
 
+#endif
25
 
+
26
 
 /* ATAPI defines */
27
 
 
28
 
 #define ATAPI_PACKET_SIZE 12
29
 
@@ -847,8 +853,8 @@
30
 
 
31
 
     /* launch next transfer */
32
 
     n = s->nsector;
33
 
-    if (n > MAX_MULT_SECTORS)
34
 
-        n = MAX_MULT_SECTORS;
35
 
+    if (n > IDE_DMA_BUF_SECTORS)
36
 
+        n = IDE_DMA_BUF_SECTORS;
37
 
     s->io_buffer_index = 0;
38
 
     s->io_buffer_size = n * 512;
39
 
 #ifdef DEBUG_AIO
40
 
@@ -946,8 +952,8 @@
41
 
 
42
 
     /* launch next transfer */
43
 
     n = s->nsector;
44
 
-    if (n > MAX_MULT_SECTORS)
45
 
-        n = MAX_MULT_SECTORS;
46
 
+    if (n > IDE_DMA_BUF_SECTORS)
47
 
+        n = IDE_DMA_BUF_SECTORS;
48
 
     s->io_buffer_index = 0;
49
 
     s->io_buffer_size = n * 512;
50
 
 
51
 
@@ -1241,8 +1247,8 @@
52
 
         data_offset = 16;
53
 
     } else {
54
 
         n = s->packet_transfer_size >> 11;
55
 
-        if (n > (MAX_MULT_SECTORS / 4))
56
 
-            n = (MAX_MULT_SECTORS / 4);
57
 
+        if (n > (IDE_DMA_BUF_SECTORS / 4))
58
 
+            n = (IDE_DMA_BUF_SECTORS / 4);
59
 
         s->io_buffer_size = n * 2048;
60
 
         data_offset = 0;
61
 
     }
62
 
@@ -2434,7 +2440,7 @@
63
 
 
64
 
     for(i = 0; i < 2; i++) {
65
 
         s = ide_state + i;
66
 
-        s->io_buffer = qemu_memalign(512, MAX_MULT_SECTORS*512 + 4);
67
 
+        s->io_buffer = qemu_memalign(512, IDE_DMA_BUF_SECTORS*512 + 4);
68
 
         if (i == 0)
69
 
             s->bs = hd0;
70
 
         else