]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NVMe: reverse IO direction for VUC command code F7
authorAshok Vairavan <ashok.vairavan@oracle.com>
Fri, 9 Dec 2016 21:39:59 +0000 (13:39 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 20 Jan 2017 08:20:44 +0000 (00:20 -0800)
Orabug: 25258071

Samsung uses D2H command with Vendor Uniq Command (VUC) code F7
(the 0th bit of which is 1) for retrieving memory dump. In UEK4,
Bit 0 of the D2H command code has to be 0. Because of this voilation,
the nvmecli is unable to do crash and memory dumps in UEK4.

As the Samsung firmware can only understand VUC command code F7,
the IO direction is reversed for this vendor command code to
retrieve memory and crash dump.

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
drivers/nvme/host/pci.c

index 96a48c735b2e8ecaaa8b572ba9d8bc4acb88e9bb..c1e568b2de190d3d839f857bfae8c3c6eec5b56f 100644 (file)
@@ -1015,6 +1015,9 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
        struct request *req;
        int ret;
 
+       if(cmd->common.opcode == 0xF7)
+               write = 0;
+
        req = blk_mq_alloc_request(q, write, GFP_KERNEL, false);
        if (IS_ERR(req))
                return PTR_ERR(req);