Author: adrian
Date: Sun Mar 15 20:40:59 2015
New Revision: 280072
URL: https://svnweb.freebsd.org/changeset/base/280072

Log:
  Eliminate the WPI_FLAG_BUSY flag.
  
  PR:           kern/197143
  Submitted by: Andriy Voskoboinyk <s3er...@gmail.com>

Modified:
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wpi/if_wpivar.h

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c   Sun Mar 15 20:40:11 2015        (r280071)
+++ head/sys/dev/wpi/if_wpi.c   Sun Mar 15 20:40:59 2015        (r280072)
@@ -1976,7 +1976,6 @@ wpi_cmd_done(struct wpi_softc *sc, struc
                data->m = NULL;
        }
 
-       sc->flags &= ~WPI_FLAG_BUSY;
        wakeup(&ring->cmd[desc->idx]);
 }
 
@@ -2272,7 +2271,6 @@ wpi_intr(void *arg)
                    "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" :
                    "(Hardware Error)");
                ieee80211_runtask(ic, &sc->sc_reinittask);
-               sc->flags &= ~WPI_FLAG_BUSY;
                goto end;
        }
 
@@ -2905,13 +2903,6 @@ wpi_cmd(struct wpi_softc *sc, int code, 
        DPRINTF(sc, WPI_DEBUG_CMD, "wpi_cmd %s size %zu async %d\n",
            wpi_cmd_str(code), size, async);
 
-       if (sc->flags & WPI_FLAG_BUSY) {
-               device_printf(sc->sc_dev, "%s: cmd %d not sent, busy\n",
-                   __func__, code);
-               return EAGAIN;
-       }
-       sc->flags |= WPI_FLAG_BUSY;
-
        desc = &ring->desc[ring->cur];
        data = &ring->data[ring->cur];
        totlen = 4 + size;
@@ -2968,10 +2959,8 @@ wpi_cmd(struct wpi_softc *sc, int code, 
 
        WPI_TXQ_UNLOCK(sc);
 
-       if (async) {
-               sc->flags &= ~WPI_FLAG_BUSY;
+       if (async)
                return 0;
-       }
 
        return mtx_sleep(cmd, &sc->sc_mtx, PCATCH, "wpicmd", hz);
 

Modified: head/sys/dev/wpi/if_wpivar.h
==============================================================================
--- head/sys/dev/wpi/if_wpivar.h        Sun Mar 15 20:40:11 2015        
(r280071)
+++ head/sys/dev/wpi/if_wpivar.h        Sun Mar 15 20:40:59 2015        
(r280072)
@@ -152,12 +152,6 @@ struct wpi_softc {
 
        struct mtx              sc_mtx;
 
-       /* Flags indicating the current state the driver
-        * expects the hardware to be in
-        */
-       uint32_t                flags;
-#define WPI_FLAG_BUSY          (1 << 0)
-
        /* Shared area. */
        struct wpi_dma_info     shared_dma;
        struct wpi_shared       *shared;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to