Date: Thu, 15 Jan 2009 20:30:38 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r187311 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/sym Message-ID: <200901152030.n0FKUcYZ086656@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Thu Jan 15 20:30:38 2009 New Revision: 187311 URL: http://svn.freebsd.org/changeset/base/187311 Log: MFC: r183895 Use xpt_register_async() in order to remove code duplication. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/sym/sym_hipd.c Modified: stable/7/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/7/sys/dev/sym/sym_hipd.c Thu Jan 15 20:23:44 2009 (r187310) +++ stable/7/sys/dev/sym/sym_hipd.c Thu Jan 15 20:30:38 2009 (r187311) @@ -8974,7 +8974,6 @@ static int sym_cam_attach(hcb_p np) struct cam_devq *devq = NULL; struct cam_sim *sim = NULL; struct cam_path *path = NULL; - struct ccb_setasync csa; int err; /* @@ -9021,12 +9020,9 @@ static int sym_cam_attach(hcb_p np) /* * Establish our async notification handler. */ - xpt_setup_ccb(&csa.ccb_h, np->path, 5); - csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_LOST_DEVICE; - csa.callback = sym_async; - csa.callback_arg = np->sim; - xpt_action((union ccb *)&csa); + if (xpt_register_async(AC_LOST_DEVICE, sym_async, sim, path) != + CAM_REQ_CMP) + goto fail; /* * Start the chip now, without resetting the BUS, since
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901152030.n0FKUcYZ086656>