diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 5 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_sdma.c | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 59a8b254b97f..0bd8bcb184a1 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -232,6 +232,11 @@ struct ipath_sdma_desc { | |||
232 | #define IPATH_SDMA_TXREQ_S_ABORTED 2 | 232 | #define IPATH_SDMA_TXREQ_S_ABORTED 2 |
233 | #define IPATH_SDMA_TXREQ_S_SHUTDOWN 3 | 233 | #define IPATH_SDMA_TXREQ_S_SHUTDOWN 3 |
234 | 234 | ||
235 | #define IPATH_SDMA_STATUS_SCORE_BOARD_DRAIN_IN_PROG (1ull << 63) | ||
236 | #define IPATH_SDMA_STATUS_ABORT_IN_PROG (1ull << 62) | ||
237 | #define IPATH_SDMA_STATUS_INTERNAL_SDMA_ENABLE (1ull << 61) | ||
238 | #define IPATH_SDMA_STATUS_SCB_EMPTY (1ull << 30) | ||
239 | |||
235 | /* max dwords in small buffer packet */ | 240 | /* max dwords in small buffer packet */ |
236 | #define IPATH_SMALLBUF_DWORDS (dd->ipath_piosize2k >> 2) | 241 | #define IPATH_SMALLBUF_DWORDS (dd->ipath_piosize2k >> 2) |
237 | 242 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c index 0a8c1b8091a2..eaba03273e4f 100644 --- a/drivers/infiniband/hw/ipath/ipath_sdma.c +++ b/drivers/infiniband/hw/ipath/ipath_sdma.c | |||
@@ -263,14 +263,10 @@ static void sdma_abort_task(unsigned long opaque) | |||
263 | hwstatus = ipath_read_kreg64(dd, | 263 | hwstatus = ipath_read_kreg64(dd, |
264 | dd->ipath_kregs->kr_senddmastatus); | 264 | dd->ipath_kregs->kr_senddmastatus); |
265 | 265 | ||
266 | if (/* ScoreBoardDrainInProg */ | 266 | if ((hwstatus & (IPATH_SDMA_STATUS_SCORE_BOARD_DRAIN_IN_PROG | |
267 | test_bit(63, &hwstatus) || | 267 | IPATH_SDMA_STATUS_ABORT_IN_PROG | |
268 | /* AbortInProg */ | 268 | IPATH_SDMA_STATUS_INTERNAL_SDMA_ENABLE)) || |
269 | test_bit(62, &hwstatus) || | 269 | !(hwstatus & IPATH_SDMA_STATUS_SCB_EMPTY)) { |
270 | /* InternalSDmaEnable */ | ||
271 | test_bit(61, &hwstatus) || | ||
272 | /* ScbEmpty */ | ||
273 | !test_bit(30, &hwstatus)) { | ||
274 | if (dd->ipath_sdma_reset_wait > 0) { | 270 | if (dd->ipath_sdma_reset_wait > 0) { |
275 | /* not done shutting down sdma */ | 271 | /* not done shutting down sdma */ |
276 | --dd->ipath_sdma_reset_wait; | 272 | --dd->ipath_sdma_reset_wait; |