Commit dd8240bd authored by Linus Torvalds's avatar Linus Torvalds

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:
  IB/qib: Prevent double completions after a timeout or RNR error
  IB/qib: Fix double add_timer()
  RDMA/nes: Don't generate async events for unregistered devices
parents a0aeccdc 814b0a61
...@@ -2610,9 +2610,11 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) ...@@ -2610,9 +2610,11 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
netif_carrier_on(nesvnic->netdev); netif_carrier_on(nesvnic->netdev);
spin_lock(&nesvnic->port_ibevent_lock); spin_lock(&nesvnic->port_ibevent_lock);
if (nesdev->iw_status == 0) { if (nesvnic->of_device_registered) {
nesdev->iw_status = 1; if (nesdev->iw_status == 0) {
nes_port_ibevent(nesvnic); nesdev->iw_status = 1;
nes_port_ibevent(nesvnic);
}
} }
spin_unlock(&nesvnic->port_ibevent_lock); spin_unlock(&nesvnic->port_ibevent_lock);
} }
...@@ -2642,9 +2644,11 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) ...@@ -2642,9 +2644,11 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
netif_carrier_off(nesvnic->netdev); netif_carrier_off(nesvnic->netdev);
spin_lock(&nesvnic->port_ibevent_lock); spin_lock(&nesvnic->port_ibevent_lock);
if (nesdev->iw_status == 1) { if (nesvnic->of_device_registered) {
nesdev->iw_status = 0; if (nesdev->iw_status == 1) {
nes_port_ibevent(nesvnic); nesdev->iw_status = 0;
nes_port_ibevent(nesvnic);
}
} }
spin_unlock(&nesvnic->port_ibevent_lock); spin_unlock(&nesvnic->port_ibevent_lock);
} }
...@@ -2703,9 +2707,11 @@ void nes_recheck_link_status(struct work_struct *work) ...@@ -2703,9 +2707,11 @@ void nes_recheck_link_status(struct work_struct *work)
netif_carrier_on(nesvnic->netdev); netif_carrier_on(nesvnic->netdev);
spin_lock(&nesvnic->port_ibevent_lock); spin_lock(&nesvnic->port_ibevent_lock);
if (nesdev->iw_status == 0) { if (nesvnic->of_device_registered) {
nesdev->iw_status = 1; if (nesdev->iw_status == 0) {
nes_port_ibevent(nesvnic); nesdev->iw_status = 1;
nes_port_ibevent(nesvnic);
}
} }
spin_unlock(&nesvnic->port_ibevent_lock); spin_unlock(&nesvnic->port_ibevent_lock);
} }
...@@ -2723,9 +2729,11 @@ void nes_recheck_link_status(struct work_struct *work) ...@@ -2723,9 +2729,11 @@ void nes_recheck_link_status(struct work_struct *work)
netif_carrier_off(nesvnic->netdev); netif_carrier_off(nesvnic->netdev);
spin_lock(&nesvnic->port_ibevent_lock); spin_lock(&nesvnic->port_ibevent_lock);
if (nesdev->iw_status == 1) { if (nesvnic->of_device_registered) {
nesdev->iw_status = 0; if (nesdev->iw_status == 1) {
nes_port_ibevent(nesvnic); nesdev->iw_status = 0;
nes_port_ibevent(nesvnic);
}
} }
spin_unlock(&nesvnic->port_ibevent_lock); spin_unlock(&nesvnic->port_ibevent_lock);
} }
......
...@@ -1005,7 +1005,8 @@ void qib_rc_send_complete(struct qib_qp *qp, struct qib_ib_header *hdr) ...@@ -1005,7 +1005,8 @@ void qib_rc_send_complete(struct qib_qp *qp, struct qib_ib_header *hdr)
* there are still requests that haven't been acked. * there are still requests that haven't been acked.
*/ */
if ((psn & IB_BTH_REQ_ACK) && qp->s_acked != qp->s_tail && if ((psn & IB_BTH_REQ_ACK) && qp->s_acked != qp->s_tail &&
!(qp->s_flags & (QIB_S_TIMER | QIB_S_WAIT_RNR | QIB_S_WAIT_PSN))) !(qp->s_flags & (QIB_S_TIMER | QIB_S_WAIT_RNR | QIB_S_WAIT_PSN)) &&
(ib_qib_state_ops[qp->state] & QIB_PROCESS_RECV_OK))
start_timer(qp); start_timer(qp);
while (qp->s_last != qp->s_acked) { while (qp->s_last != qp->s_acked) {
...@@ -1439,6 +1440,8 @@ static void qib_rc_rcv_resp(struct qib_ibport *ibp, ...@@ -1439,6 +1440,8 @@ static void qib_rc_rcv_resp(struct qib_ibport *ibp,
} }
spin_lock_irqsave(&qp->s_lock, flags); spin_lock_irqsave(&qp->s_lock, flags);
if (!(ib_qib_state_ops[qp->state] & QIB_PROCESS_RECV_OK))
goto ack_done;
/* Ignore invalid responses. */ /* Ignore invalid responses. */
if (qib_cmp24(psn, qp->s_next_psn) >= 0) if (qib_cmp24(psn, qp->s_next_psn) >= 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment