34 #include <linux/pci.h>
37 #include <linux/netdevice.h>
43 static unsigned qib_hol_timeout_ms = 3000;
46 "duration of user app suspension after link failure");
69 for (i = first; i < last; i++) {
104 for (i = rcd->
pio_base; i < last; i++) {
119 for (pidx = 0; pidx < dd->
num_pports; pidx++) {
120 ppd = dd->
pport + pidx;
132 static int find_ctxt(
struct qib_devdata *dd,
unsigned bufn)
181 for (i = 0; i <
cnt; i++) {
189 ppd = is_sdma_buf(dd, i);
191 pppd[ppd->
port] = ppd;
223 static void update_send_bufs(
struct qib_devdata *dd)
250 for (i = 0; i < piobregs; i++) {
251 u64 pchbusy, pchg, piov, pnew;
259 pnew |= piov & pchbusy;
287 unsigned i,
j, updated = 0;
296 nbufs = last - first + 1;
304 update_send_bufs(dd);
319 for (j = 0; j < nbufs; j++, i++) {
328 if (!first && first != last)
344 if (i < dd->piobcnt2k)
389 unsigned ostart =
start;
393 end = start + len * 2;
397 while (start < end) {
416 __clear_bit(QLOGIC_IB_SENDPIOAVAIL_BUSY_SHIFT + start,
418 dma = (
unsigned long)
431 __set_bit(start + QLOGIC_IB_SENDPIOAVAIL_BUSY_SHIFT,
476 if (rcd && rcd->
ppd == ppd) {
491 spin_unlock_irqrestore(&dd->
uctxt_lock, flags);
493 for (; i < last; i++)
497 spin_unlock_irqrestore(&dd->
uctxt_lock, flags);