NVMe: Fix DMA mapping for admin commands
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 6 Jan 2012 20:42:45 +0000 (13:42 -0700)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Tue, 10 Jan 2012 19:54:05 +0000 (14:54 -0500)
commit497421880acecd0281d3182d534f3d28c927caec
tree06efff97926506f1797e551b5a35506b28636188
parentff976d724a74e4522e9ca2de1fb37ac4520f454f
NVMe: Fix DMA mapping for admin commands

We were always mapping as DMA_FROM_DEVICE then unmapping with
DMA_TO_DEVICE which was clearly not correct.  Follow the same pattern as
nvme_submit_io() and key off the bottom bit of the opcode to determine
whether this is a read or a write.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c