Date: Thu, 27 Feb 2014 21:41:53 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262572 - head/sys/dev/tws Message-ID: <201402272141.s1RLfrN6093286@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Thu Feb 27 21:41:52 2014 New Revision: 262572 URL: http://svnweb.freebsd.org/changeset/base/262572 Log: Get rid of the 'chan' from softc structure and use the latter directly as sleep channel. PR: kern/174684 Submitted by: jmg MFC after: 2 weeks Modified: head/sys/dev/tws/tws.h head/sys/dev/tws/tws_cam.c head/sys/dev/tws/tws_user.c Modified: head/sys/dev/tws/tws.h ============================================================================== --- head/sys/dev/tws/tws.h Thu Feb 27 21:01:10 2014 (r262571) +++ head/sys/dev/tws/tws.h Thu Feb 27 21:41:52 2014 (r262572) @@ -248,7 +248,6 @@ struct tws_softc { struct mtx io_lock; /* IO lock */ struct tws_ioctl_lock ioctl_lock; /* ioctl lock */ u_int32_t seq_id; /* Sequence id */ - void *chan; /* IOCTL req wait channel */ struct tws_circular_q aen_q; /* aen q */ struct tws_circular_q trace_q; /* trace q */ struct tws_stats stats; /* I/O stats */ Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Thu Feb 27 21:01:10 2014 (r262571) +++ head/sys/dev/tws/tws_cam.c Thu Feb 27 21:41:52 2014 (r262572) @@ -1297,7 +1297,7 @@ tws_reinit(void *arg) tws_turn_on_interrupts(sc); - wakeup_one(sc->chan); + wakeup_one(sc); } Modified: head/sys/dev/tws/tws_user.c ============================================================================== --- head/sys/dev/tws/tws_user.c Thu Feb 27 21:01:10 2014 (r262571) +++ head/sys/dev/tws/tws_user.c Thu Feb 27 21:41:52 2014 (r262572) @@ -103,8 +103,7 @@ tws_passthru(struct tws_softc *sc, void do { req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU); if ( !req ) { - sc->chan = (void *)sc; - error = tsleep(sc->chan, 0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz); + error = tsleep(sc, 0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz); if ( error == EWOULDBLOCK ) { return(ETIMEDOUT); } @@ -203,7 +202,7 @@ out_data: // req->state = TWS_REQ_STATE_FREE; - wakeup_one(sc->chan); + wakeup_one(sc); return(error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402272141.s1RLfrN6093286>