Skip to content

Commit 1e08dcb

Browse files
adam radfordJames Bottomley
authored andcommitted
[SCSI] 3ware 9000 disable local irqs during kmap_atomic
Equivalent of the same patch for the 3w-xxxx driver. Signed-off-by: Adam Radford <linuxraid@amcc.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent e36e0c8 commit 1e08dcb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/scsi/3w-9xxx.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
2.26.02.005 - Fix use_sg == 0 mapping on systems with 4GB or higher.
6666
2.26.02.006 - Fix 9550SX pchip reset timeout.
6767
Add big endian support.
68+
2.26.02.007 - Disable local interrupts during kmap/unmap_atomic().
6869
*/
6970

7071
#include <linux/module.h>
@@ -88,7 +89,7 @@
8889
#include "3w-9xxx.h"
8990

9091
/* Globals */
91-
#define TW_DRIVER_VERSION "2.26.02.006"
92+
#define TW_DRIVER_VERSION "2.26.02.007"
9293
static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
9394
static unsigned int twa_device_extension_count;
9495
static int twa_major = -1;
@@ -1942,9 +1943,13 @@ static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int re
19421943
}
19431944
if (tw_dev->srb[request_id]->use_sg == 1) {
19441945
struct scatterlist *sg = (struct scatterlist *)tw_dev->srb[request_id]->request_buffer;
1945-
char *buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
1946+
char *buf;
1947+
unsigned long flags = 0;
1948+
local_irq_save(flags);
1949+
buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
19461950
memcpy(buf, tw_dev->generic_buffer_virt[request_id], sg->length);
19471951
kunmap_atomic(buf - sg->offset, KM_IRQ0);
1952+
local_irq_restore(flags);
19481953
}
19491954
}
19501955
} /* End twa_scsiop_execute_scsi_complete() */

0 commit comments

Comments
 (0)