Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Oct 2011 13:30:19 GMT
From:      Sergey Kandaurov <pluknet@gmail.com>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/162028: [ixgbe] [patch] misplaced #endif in ixgbe.c
Message-ID:  <201110291330.p9TDUJXP040832@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/162028; it has been noted by GNATS.

From: Sergey Kandaurov <pluknet@gmail.com>
To: bug-followup@FreeBSD.org, hoomanfazaeli@gmail.com
Cc:  
Subject: Re: kern/162028: [ixgbe] [patch] misplaced #endif in ixgbe.c
Date: Sat, 29 Oct 2011 16:58:09 +0400

 I have a more complete patch. Can you test it please?
 
 Index: sys/dev/ixgbe/ixgbe.c
 ===================================================================
 --- sys/dev/ixgbe/ixgbe.c       (revision 226068)
 +++ sys/dev/ixgbe/ixgbe.c       (working copy)
 @@ -867,16 +867,15 @@ static int
  ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data)
  {
         struct adapter  *adapter = ifp->if_softc;
 -       struct ifreq    *ifr = (struct ifreq *) data;
 +       struct ifreq    *ifr = (struct ifreq *)data;
  #if defined(INET) || defined(INET6)
 -       struct ifaddr *ifa = (struct ifaddr *)data;
 -       bool            avoid_reset = FALSE;
 +       struct ifaddr   *ifa = (struct ifaddr *)data;
  #endif
 -       int             error = 0;
 +       bool            avoid_reset = FALSE;
 +       int             error = 0;
 
         switch (command) {
 -
 -        case SIOCSIFADDR:
 +       case SIOCSIFADDR:
  #ifdef INET
                 if (ifa->ifa_addr->sa_family == AF_INET)
                         avoid_reset = TRUE;
 @@ -885,7 +884,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, ca
                 if (ifa->ifa_addr->sa_family == AF_INET6)
                         avoid_reset = TRUE;
  #endif
 -#if defined(INET) || defined(INET6)
                 /*
                 ** Calling init results in link renegotiation,
                 ** so we avoid doing it when possible.
 @@ -894,12 +892,13 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, ca
                         ifp->if_flags |= IFF_UP;
                         if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
                                 ixgbe_init(adapter);
 +#ifdef INET
                         if (!(ifp->if_flags & IFF_NOARP))
                                 arp_ifinit(ifp, ifa);
 +#endif
                 } else
                         error = ether_ioctl(ifp, command, data);
                 break;
 -#endif
         case SIOCSIFMTU:
                 IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)");
                 if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) {
 
 
 -- 
 wbr,
 pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110291330.p9TDUJXP040832>