Date: Mon, 27 Oct 2014 22:22:46 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273750 - head/sys/dev/cxgbe/iw_cxgbe Message-ID: <201410272222.s9RMMkaT026089@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Mon Oct 27 22:22:46 2014 New Revision: 273750 URL: https://svnweb.freebsd.org/changeset/base/273750 Log: Some cxgbe/iw_cxgbe fixes: - Free rt in c4iw_connect only if it is allocated. - Call soclose instead of so_shutdown if there is an abort from the peer. - Close socket and return failure if TOE is not enabled. Submitted by: Hariprasad at Chelsio dot com Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Mon Oct 27 22:20:51 2014 (r273749) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Mon Oct 27 22:22:46 2014 (r273750) @@ -474,7 +474,7 @@ process_conn_error(struct c4iw_ep *ep) if (state != ABORTING) { CTR2(KTR_IW_CXGBE, "%s:pce1 %p", __func__, ep); - close_socket(&ep->com, 0); + close_socket(&ep->com, 1); state_set(&ep->com, DEAD); c4iw_put_ep(&ep->com); } @@ -2084,14 +2084,15 @@ int c4iw_connect(struct iw_cm_id *cm_id, CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); printk(KERN_ERR MOD "%s - cannot find route.\n", __func__); err = -EHOSTUNREACH; - goto fail3; + goto fail2; } - - if (!(rt->rt_ifp->if_flags & IFCAP_TOE)) { + if (!(rt->rt_ifp->if_capenable & IFCAP_TOE)) { CTR2(KTR_IW_CXGBE, "%s:cc8 %p", __func__, ep); printf("%s - interface not TOE capable.\n", __func__); + close_socket(&ep->com, 0); + err = -ENOPROTOOPT; goto fail3; } tdev = TOEDEV(rt->rt_ifp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410272222.s9RMMkaT026089>