]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: aacraid: Remove __GFP_DMA for raw srb memory
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Wed, 10 May 2017 16:39:35 +0000 (09:39 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 28 Jun 2017 14:24:14 +0000 (11:24 -0300)
BugLink: http://bugs.launchpad.net/bugs/1689980
The raw srb commands do not requires memory that in the ZONE_DMA memory
space. For 32bit srb commands use GFP_DMA32 to limit the memory to 32bit
memory range (4GB).

Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 5d3a0880787bf64b2749e1073b810b02f4deb03b linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/aacraid/commctrl.c

index d2f8d5954840e739d38b86a023a9651dc89b7fcb..106b9332f7184e8512f19ac271e3b80fe158d3f7 100644 (file)
@@ -668,7 +668,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
                                goto cleanup;
                        }
 
-                       p = kmalloc(sg_count[i], GFP_KERNEL|__GFP_DMA);
+                       p = kmalloc(sg_count[i], GFP_KERNEL);
                        if (!p) {
                                rcode = -ENOMEM;
                                goto cleanup;
@@ -732,8 +732,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
                                        rcode = -EINVAL;
                                        goto cleanup;
                                }
-                               /* Does this really need to be GFP_DMA? */
-                               p = kmalloc(sg_count[i], GFP_KERNEL|__GFP_DMA);
+
+                               p = kmalloc(sg_count[i], GFP_KERNEL);
                                if(!p) {
                                        dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n",
                                          sg_count[i], i, upsg->count));
@@ -788,8 +788,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
                                        rcode = -EINVAL;
                                        goto cleanup;
                                }
-                               /* Does this really need to be GFP_DMA? */
-                               p = kmalloc(sg_count[i], GFP_KERNEL|__GFP_DMA);
+
+                               p = kmalloc(sg_count[i], GFP_KERNEL);
                                if(!p) {
                                        dprintk((KERN_DEBUG "aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n",
                                                sg_count[i], i, usg->count));
@@ -845,8 +845,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
                                        rcode = -EINVAL;
                                        goto cleanup;
                                }
-                               /* Does this really need to be GFP_DMA? */
-                               p = kmalloc(sg_count[i], GFP_KERNEL|__GFP_DMA);
+                               p = kmalloc(sg_count[i], GFP_KERNEL|GFP_DMA32);
                                if (!p) {
                                        dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n",
                                                sg_count[i], i, usg->count));
@@ -887,7 +886,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
                                        rcode = -EINVAL;
                                        goto cleanup;
                                }
-                               p = kmalloc(sg_count[i], GFP_KERNEL);
+                               p = kmalloc(sg_count[i], GFP_KERNEL|GFP_DMA32);
                                if (!p) {
                                        dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n",
                                          sg_count[i], i, upsg->count));