Date: Mon, 25 Nov 2002 11:38:05 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 21496 for review Message-ID: <200211251938.gAPJc5TQ005731@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21496 Change 21496 by jhb@jhb_laptop on 2002/11/25 11:37:24 IFC @21494. Affected files ... .. //depot/projects/smpng/sys/cam/scsi/scsi_target.c#6 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#24 integrate Differences ... ==== //depot/projects/smpng/sys/cam/scsi/scsi_target.c#6 (text+ko) ==== @@ -26,28 +26,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.45 2002/11/22 22:55:51 njl Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.46 2002/11/25 19:28:05 njl Exp $ */ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/conf.h> -#include <sys/event.h> #include <sys/malloc.h> #include <sys/poll.h> -#include <sys/selinfo.h> -#include <sys/uio.h> #include <sys/vnode.h> -#include <sys/queue.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/devicestat.h> #include <cam/cam.h> #include <cam/cam_ccb.h> #include <cam/cam_periph.h> -#include <cam/cam_queue.h> #include <cam/cam_xpt_periph.h> -#include <cam/cam_debug.h> #include <cam/scsi/scsi_targetio.h> /* Transaction information attached to each CCB sent by the user */ ==== //depot/projects/smpng/sys/pci/if_dc.c#24 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/pci/if_dc.c,v 1.83 2002/11/14 23:49:08 sam Exp $ + * $FreeBSD: src/sys/pci/if_dc.c,v 1.84 2002/11/25 19:28:01 luigi Exp $ */ /* @@ -137,7 +137,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sys/pci/if_dc.c,v 1.83 2002/11/14 23:49:08 sam Exp $"; + "$FreeBSD: src/sys/pci/if_dc.c,v 1.84 2002/11/25 19:28:01 luigi Exp $"; #endif /* @@ -3539,15 +3539,13 @@ switch(command) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && - ifp->if_flags & IFF_PROMISC && - !(sc->dc_if_flags & IFF_PROMISC)) { - dc_setfilt(sc); - } else if (ifp->if_flags & IFF_RUNNING && - !(ifp->if_flags & IFF_PROMISC) && - sc->dc_if_flags & IFF_PROMISC) { - dc_setfilt(sc); - } else if (!(ifp->if_flags & IFF_RUNNING)) { + int need_setfilt = (ifp->if_flags ^ sc->dc_if_flags) & + (IFF_PROMISC | IFF_ALLMULTI); + + if (ifp->if_flags & IFF_RUNNING) { + if (need_setfilt) + dc_setfilt(sc); + } else { sc->dc_txthresh = 0; dc_init(sc); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211251938.gAPJc5TQ005731>