.. | .. |
---|
66 | 66 | ah->last_send = 0; |
---|
67 | 67 | kref_init(&ah->ref); |
---|
68 | 68 | |
---|
69 | | - vah = rdma_create_ah(pd, attr); |
---|
| 69 | + vah = rdma_create_ah(pd, attr, RDMA_CREATE_AH_SLEEPABLE); |
---|
70 | 70 | if (IS_ERR(vah)) { |
---|
71 | 71 | kfree(ah); |
---|
72 | 72 | ah = (struct ipoib_ah *)vah; |
---|
.. | .. |
---|
293 | 293 | const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
---|
294 | 294 | mapping[i + off] = ib_dma_map_page(ca, |
---|
295 | 295 | skb_frag_page(frag), |
---|
296 | | - frag->page_offset, skb_frag_size(frag), |
---|
| 296 | + skb_frag_off(frag), |
---|
| 297 | + skb_frag_size(frag), |
---|
297 | 298 | DMA_TO_DEVICE); |
---|
298 | 299 | if (unlikely(ib_dma_mapping_error(ca, mapping[i + off]))) |
---|
299 | 300 | goto partial_error; |
---|
.. | .. |
---|
672 | 673 | static void ipoib_reap_dead_ahs(struct ipoib_dev_priv *priv) |
---|
673 | 674 | { |
---|
674 | 675 | struct ipoib_ah *ah, *tah; |
---|
675 | | - LIST_HEAD(remove_list); |
---|
676 | 676 | unsigned long flags; |
---|
677 | 677 | |
---|
678 | 678 | netif_tx_lock_bh(priv->dev); |
---|
.. | .. |
---|
681 | 681 | list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list) |
---|
682 | 682 | if ((int) priv->tx_tail - (int) ah->last_send >= 0) { |
---|
683 | 683 | list_del(&ah->list); |
---|
684 | | - rdma_destroy_ah(ah->ah); |
---|
| 684 | + rdma_destroy_ah(ah->ah, 0); |
---|
685 | 685 | kfree(ah); |
---|
686 | 686 | } |
---|
687 | 687 | |
---|