Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2014 01:05:33 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r263126 - in stable: 8/sys/dev/tws 9/sys/dev/tws
Message-ID:  <201403140105.s2E15XNw089094@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Fri Mar 14 01:05:32 2014
New Revision: 263126
URL: http://svnweb.freebsd.org/changeset/base/263126

Log:
  MFC r262572:
  
  Get rid of the 'chan' from softc structure and use the latter
  directly as sleep channel.
  
  PR:		kern/174684
  Submitted by:	jmg

Modified:
  stable/8/sys/dev/tws/tws.h
  stable/8/sys/dev/tws/tws_cam.c
  stable/8/sys/dev/tws/tws_user.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/tws/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/sys/dev/tws/tws.h
  stable/9/sys/dev/tws/tws_cam.c
  stable/9/sys/dev/tws/tws_user.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/8/sys/dev/tws/tws.h
==============================================================================
--- stable/8/sys/dev/tws/tws.h	Fri Mar 14 00:57:32 2014	(r263125)
+++ stable/8/sys/dev/tws/tws.h	Fri Mar 14 01:05:32 2014	(r263126)
@@ -247,7 +247,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: stable/8/sys/dev/tws/tws_cam.c
==============================================================================
--- stable/8/sys/dev/tws/tws_cam.c	Fri Mar 14 00:57:32 2014	(r263125)
+++ stable/8/sys/dev/tws/tws_cam.c	Fri Mar 14 01:05:32 2014	(r263126)
@@ -1323,7 +1323,7 @@ tws_reinit(void *arg)
 
     tws_turn_on_interrupts(sc);
 
-    wakeup_one(sc->chan);
+    wakeup_one(sc);
 }
 
 

Modified: stable/8/sys/dev/tws/tws_user.c
==============================================================================
--- stable/8/sys/dev/tws/tws_user.c	Fri Mar 14 00:57:32 2014	(r263125)
+++ stable/8/sys/dev/tws/tws_user.c	Fri Mar 14 01:05:32 2014	(r263126)
@@ -105,8 +105,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);
             }
@@ -205,7 +204,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?201403140105.s2E15XNw089094>