Skip to content

Commit ddb4b76

Browse files
authored
Merge pull request #18 from Microsemi/dma_mrpc_bug_fix
Dma mrpc bug fix
2 parents 755d5c5 + 7e64b65 commit ddb4b76

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

switchtec.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev)
141141
stuser = list_entry(stdev->mrpc_queue.next, struct switchtec_user,
142142
list);
143143

144+
if (stdev->dma_mrpc) {
145+
stdev->dma_mrpc->status = SWITCHTEC_MRPC_STATUS_INPROGRESS;
146+
memset(stdev->dma_mrpc->data, 0xFF, SWITCHTEC_MRPC_PAYLOAD_SIZE);
147+
}
148+
144149
stuser_set_state(stuser, MRPC_RUNNING);
145150
stdev->mrpc_busy = 1;
146151
memcpy_toio(&stdev->mmio_mrpc->input_data,
@@ -1257,7 +1262,7 @@ static int switchtec_init_isr(struct switchtec_dev *stdev)
12571262
return -EFAULT;
12581263

12591264
dma_mrpc_irq = pci_irq_vector(stdev->pdev, dma_mrpc_irq);
1260-
if (event_irq < 0)
1265+
if (dma_mrpc_irq < 0)
12611266
return dma_mrpc_irq;
12621267

12631268
rc = devm_request_irq(&stdev->pdev->dev, dma_mrpc_irq,

0 commit comments

Comments
 (0)