hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/drivers/dma/dmaengine.c
....@@ -578,7 +578,8 @@
578578
579579 /* check if the channel supports slave transactions */
580580 if (!(test_bit(DMA_SLAVE, device->cap_mask.bits) ||
581
- test_bit(DMA_CYCLIC, device->cap_mask.bits)))
581
+ test_bit(DMA_CYCLIC, device->cap_mask.bits) ||
582
+ test_bit(DMA_OOB, device->cap_mask.bits)))
582583 return -ENXIO;
583584
584585 /*
....@@ -1209,6 +1210,13 @@
12091210 return -EIO;
12101211 }
12111212
1213
+ if (dma_has_cap(DMA_OOB, device->cap_mask) && !device->device_pulse_oob) {
1214
+ dev_err(device->dev,
1215
+ "Device claims capability %s, but pulse handler is not defined\n",
1216
+ "DMA_OOB");
1217
+ return -EIO;
1218
+ }
1219
+
12121220 if (dma_has_cap(DMA_INTERLEAVE, device->cap_mask) && !device->device_prep_interleaved_dma) {
12131221 dev_err(device->dev,
12141222 "Device claims capability %s, but op is not defined\n",