Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/dev/ic Pull up following revision(s) (requested by ch...



details:   https://anonhg.NetBSD.org/src/rev/3e1837cf0416
branches:  netbsd-6
changeset: 774208:3e1837cf0416
user:      riz <riz%NetBSD.org@localhost>
date:      Tue Jun 12 19:44:46 2012 +0000

description:
Pull up following revision(s) (requested by christos in ticket #325):
        sys/dev/ic/seeq8005.c: revision 1.48
PR/46576: Robert Sprowson: Shutdown doesn't disable TX/RX interrupts in
SEEQ8005 driver, plus misc white-space and 0->NULL fixes.

diffstat:

 sys/dev/ic/seeq8005.c |  36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diffs (138 lines):

diff -r e61c4092cd50 -r 3e1837cf0416 sys/dev/ic/seeq8005.c
--- a/sys/dev/ic/seeq8005.c     Tue Jun 12 19:42:53 2012 +0000
+++ b/sys/dev/ic/seeq8005.c     Tue Jun 12 19:44:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: seeq8005.c,v 1.46 2012/02/02 19:43:03 tls Exp $ */
+/* $NetBSD: seeq8005.c,v 1.46.2.1 2012/06/12 19:44:46 riz Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Ben Harris
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: seeq8005.c,v 1.46 2012/02/02 19:43:03 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: seeq8005.c,v 1.46.2.1 2012/06/12 19:44:46 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -476,7 +476,7 @@
        ea_stoprx(sc);
 
        /* Disable rx and tx interrupts */
-       sc->sc_command &= (SEEQ_CMD_RX_INTEN | SEEQ_CMD_TX_INTEN);
+       sc->sc_command &= ~(SEEQ_CMD_RX_INTEN | SEEQ_CMD_TX_INTEN);
 
        /* Clear any pending interrupts */
        SEEQ_WRITE16(sc, iot, ioh, SEEQ_COMMAND,
@@ -492,7 +492,7 @@
        }
 
        /* Cancel any watchdog timer */
-               sc->sc_ethercom.ec_if.if_timer = 0;
+       sc->sc_ethercom.ec_if.if_timer = 0;
 }
 
 
@@ -832,7 +832,7 @@
        SEEQ_WRITE16(sc, iot, ioh, SEEQ_COMMAND,
                          sc->sc_command | SEEQ_CMD_RX_ON);
 
-       /* TX_ON gets set by ea_txpacket when there's something to transmit. */
+       /* TX_ON gets set by eatxpacket when there's something to transmit. */
 
 
        /* Set flags appropriately. */
@@ -887,7 +887,7 @@
  * Called at splnet()
  */
 
-void
+static void
 eatxpacket(struct seeq8005_softc *sc)
 {
        bus_space_tag_t iot = sc->sc_iot;
@@ -980,7 +980,7 @@
        hdr[1] = nextpacket & 0xff;
        hdr[2] = SEEQ_PKTCMD_TX | SEEQ_PKTCMD_DATA_FOLLOWS |
                SEEQ_TXCMD_XMIT_SUCCESS_INT | SEEQ_TXCMD_COLLISION_INT;
-       hdr[3] = 0; /* Status byte -- will be update by hardware. */
+       hdr[3] = 0; /* Status byte -- will be updated by hardware. */
        ea_writebuf(sc, hdr, 0x0000, 4);
 
        return len;
@@ -1111,7 +1111,7 @@
        }
 }
 
-void
+static void
 ea_rxint(struct seeq8005_softc *sc)
 {
        bus_space_tag_t iot = sc->sc_iot;
@@ -1160,7 +1160,7 @@
                }
 
                /* Get packet length */
-                       len = (ptr - addr) - 4;
+               len = (ptr - addr) - 4;
 
                if (len < 0)
                        len += sc->sc_rx_bufsize;
@@ -1238,7 +1238,7 @@
 
        /* Pull packet off interface. */
        m = ea_get(sc, addr, len, ifp);
-       if (m == 0)
+       if (m == NULL)
                return;
 
        /*
@@ -1267,20 +1267,20 @@
         epkt = cp + totlen;
 
         MGETHDR(m, M_DONTWAIT, MT_DATA);
-        if (m == 0)
-                return 0;
+        if (m == NULL)
+                return NULL;
         m->m_pkthdr.rcvif = ifp;
         m->m_pkthdr.len = totlen;
         m->m_len = MHLEN;
-        top = 0;
+        top = NULL;
         mp = &top;
 
         while (totlen > 0) {
                 if (top) {
                         MGET(m, M_DONTWAIT, MT_DATA);
-                        if (m == 0) {
+                        if (m == NULL) {
                                 m_freem(top);
-                                return 0;
+                                return NULL;
                         }
                         m->m_len = MLEN;
                 }
@@ -1296,13 +1296,13 @@
                          * Place initial small packet/header at end of mbuf.
                          */
                         if (len < m->m_len) {
-                                if (top == 0 && len + max_linkhdr <= m->m_len)
+                                if (top == NULL && len + max_linkhdr <= m->m_len)
                                         m->m_data += max_linkhdr;
                                 m->m_len = len;
                         } else
                                 len = m->m_len;
                 }
-               if (top == 0) {
+               if (top == NULL) {
                        /* Make sure the payload is aligned */
                        char *newdata = (char *)
                            ALIGN((char*)m->m_data + 
@@ -1485,4 +1485,4 @@
        ifp->if_timer = 0;
 }
 
-/* End of if_ea.c */
+/* End of seeq8005.c */



Home | Main Index | Thread Index | Old Index