if_patm_intr.c (148887) | if_patm_intr.c (160964) |
---|---|
1/*- 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * Driver for IDT77252 based cards like ProSum's. 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * Driver for IDT77252 based cards like ProSum's. 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/dev/patm/if_patm_intr.c 148887 2005-08-09 10:20:02Z rwatson $"); | 33__FBSDID("$FreeBSD: head/sys/dev/patm/if_patm_intr.c 160964 2006-08-04 07:56:35Z yar $"); |
34 35#include "opt_inet.h" 36#include "opt_natm.h" 37 38#include <sys/types.h> 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/malloc.h> --- 179 unchanged lines hidden (view full) --- 221} 222 223/* 224 * Compute the amount of buffers to feed into a given free buffer queue 225 * 226 * Feeding buffers is actually not so easy as it seems. We cannot use the 227 * fraction fields in the status registers, because they round down, i.e. 228 * if we have 34 buffers in the queue, it will show 1. If we now feed | 34 35#include "opt_inet.h" 36#include "opt_natm.h" 37 38#include <sys/types.h> 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/malloc.h> --- 179 unchanged lines hidden (view full) --- 221} 222 223/* 224 * Compute the amount of buffers to feed into a given free buffer queue 225 * 226 * Feeding buffers is actually not so easy as it seems. We cannot use the 227 * fraction fields in the status registers, because they round down, i.e. 228 * if we have 34 buffers in the queue, it will show 1. If we now feed |
229 * 512 - 1 * 32 buffers, we loose two buffers. The only reliable way to know | 229 * 512 - 1 * 32 buffers, we lose two buffers. The only reliable way to know |
230 * how many buffers are in the queue are the FBQP registers. 231 */ 232static u_int 233patm_feed_cnt(struct patm_softc *sc, u_int q) 234{ 235 u_int w, r, reg; 236 u_int feed; 237 int free; --- 316 unchanged lines hidden --- | 230 * how many buffers are in the queue are the FBQP registers. 231 */ 232static u_int 233patm_feed_cnt(struct patm_softc *sc, u_int q) 234{ 235 u_int w, r, reg; 236 u_int feed; 237 int free; --- 316 unchanged lines hidden --- |