Re: kern/162028: [ixgbe] [patch] misplaced #endif in ixgbe.c

2011-10-30 Thread Hooman Fazaeli
The following reply was made to PR kern/162028; it has been noted by GNATS.

From: Hooman Fazaeli 
To: Sergey Kandaurov 
Cc: bug-follo...@freebsd.org
Subject: Re: kern/162028: [ixgbe] [patch] misplaced #endif in ixgbe.c
Date: Sun, 30 Oct 2011 11:03:44 +0330

 On 10/29/2011 4:28 PM, Sergey Kandaurov wrote:
 > 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;
 > -   boolavoid_reset = FALSE;
 > +   struct ifaddr   *ifa = (struct ifaddr *)data;
 >   #endif
 > -   int error = 0;
 > +   boolavoid_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) {
 >
 >
 sure.
 I am very busy right now.
 Will test as soon as I can.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kern/162028: [ixgbe] [patch] misplaced #endif in ixgbe.c

2011-10-29 Thread Sergey Kandaurov
The following reply was made to PR kern/162028; it has been noted by GNATS.

From: Sergey Kandaurov 
To: bug-follo...@freebsd.org, hoomanfaza...@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;
 -   boolavoid_reset = FALSE;
 +   struct ifaddr   *ifa = (struct ifaddr *)data;
  #endif
 -   int error = 0;
 +   boolavoid_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
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kern/162028: [ixgbe] [patch] misplaced #endif in ixgbe.c

2011-10-29 Thread linimon
Old Synopsis: misplaced #endif in ixgbe.c
New Synopsis: [ixgbe] [patch] misplaced #endif in ixgbe.c

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: linimon
Responsible-Changed-When: Sat Oct 29 12:13:14 UTC 2011
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=162028
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"