Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IPoIB/cm: Fix DMA direction typo
IB/iser: Don't defer connection failure notification to workqueue

+17 -26
+1 -1
drivers/infiniband/ulp/ipoib/ipoib_cm.c
··· 131 skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE); 132 133 mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page, 134 - 0, PAGE_SIZE, DMA_TO_DEVICE); 135 if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1]))) 136 goto partial_error; 137 }
··· 131 skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE); 132 133 mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page, 134 + 0, PAGE_SIZE, DMA_FROM_DEVICE); 135 if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1]))) 136 goto partial_error; 137 }
-1
drivers/infiniband/ulp/iser/iscsi_iser.h
··· 245 wait_queue_head_t wait; /* waitq for conn/disconn */ 246 atomic_t post_recv_buf_count; /* posted rx count */ 247 atomic_t post_send_buf_count; /* posted tx count */ 248 - struct work_struct comperror_work; /* conn term sleepable ctx*/ 249 char name[ISER_OBJECT_NAME_SIZE]; 250 struct iser_page_vec *page_vec; /* represents SG to fmr maps* 251 * maps serialized as tx is*/
··· 245 wait_queue_head_t wait; /* waitq for conn/disconn */ 246 atomic_t post_recv_buf_count; /* posted rx count */ 247 atomic_t post_send_buf_count; /* posted tx count */ 248 char name[ISER_OBJECT_NAME_SIZE]; 249 struct iser_page_vec *page_vec; /* represents SG to fmr maps* 250 * maps serialized as tx is*/
+16 -24
drivers/infiniband/ulp/iser/iser_verbs.c
··· 48 49 static void iser_cq_tasklet_fn(unsigned long data); 50 static void iser_cq_callback(struct ib_cq *cq, void *cq_context); 51 - static void iser_comp_error_worker(struct work_struct *work); 52 53 static void iser_cq_event_callback(struct ib_event *cause, void *context) 54 { ··· 479 init_waitqueue_head(&ib_conn->wait); 480 atomic_set(&ib_conn->post_recv_buf_count, 0); 481 atomic_set(&ib_conn->post_send_buf_count, 0); 482 - INIT_WORK(&ib_conn->comperror_work, iser_comp_error_worker); 483 INIT_LIST_HEAD(&ib_conn->conn_list); 484 spin_lock_init(&ib_conn->lock); 485 ··· 751 return ret_val; 752 } 753 754 - static void iser_comp_error_worker(struct work_struct *work) 755 - { 756 - struct iser_conn *ib_conn = 757 - container_of(work, struct iser_conn, comperror_work); 758 - 759 - /* getting here when the state is UP means that the conn is being * 760 - * terminated asynchronously from the iSCSI layer's perspective. */ 761 - if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP, 762 - ISER_CONN_TERMINATING)) 763 - iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn, 764 - ISCSI_ERR_CONN_FAILED); 765 - 766 - /* complete the termination process if disconnect event was delivered * 767 - * note there are no more non completed posts to the QP */ 768 - if (ib_conn->disc_evt_flag) { 769 - ib_conn->state = ISER_CONN_DOWN; 770 - wake_up_interruptible(&ib_conn->wait); 771 - } 772 - } 773 - 774 static void iser_handle_comp_error(struct iser_desc *desc) 775 { 776 struct iser_dto *dto = &desc->dto; ··· 769 } 770 771 if (atomic_read(&ib_conn->post_recv_buf_count) == 0 && 772 - atomic_read(&ib_conn->post_send_buf_count) == 0) 773 - schedule_work(&ib_conn->comperror_work); 774 } 775 776 static void iser_cq_tasklet_fn(unsigned long data)
··· 48 49 static void iser_cq_tasklet_fn(unsigned long data); 50 static void iser_cq_callback(struct ib_cq *cq, void *cq_context); 51 52 static void iser_cq_event_callback(struct ib_event *cause, void *context) 53 { ··· 480 init_waitqueue_head(&ib_conn->wait); 481 atomic_set(&ib_conn->post_recv_buf_count, 0); 482 atomic_set(&ib_conn->post_send_buf_count, 0); 483 INIT_LIST_HEAD(&ib_conn->conn_list); 484 spin_lock_init(&ib_conn->lock); 485 ··· 753 return ret_val; 754 } 755 756 static void iser_handle_comp_error(struct iser_desc *desc) 757 { 758 struct iser_dto *dto = &desc->dto; ··· 791 } 792 793 if (atomic_read(&ib_conn->post_recv_buf_count) == 0 && 794 + atomic_read(&ib_conn->post_send_buf_count) == 0) { 795 + /* getting here when the state is UP means that the conn is * 796 + * being terminated asynchronously from the iSCSI layer's * 797 + * perspective. */ 798 + if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP, 799 + ISER_CONN_TERMINATING)) 800 + iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn, 801 + ISCSI_ERR_CONN_FAILED); 802 + 803 + /* complete the termination process if disconnect event was delivered * 804 + * note there are no more non completed posts to the QP */ 805 + if (ib_conn->disc_evt_flag) { 806 + ib_conn->state = ISER_CONN_DOWN; 807 + wake_up_interruptible(&ib_conn->wait); 808 + } 809 + } 810 } 811 812 static void iser_cq_tasklet_fn(unsigned long data)