if_ce.c (183397) | if_ce.c (184205) |
---|---|
1/* 2 * Cronyx-Tau32-PCI adapter driver for FreeBSD. 3 * 4 * Copyright (C) 2003-2005 Cronyx Engineering. 5 * Copyright (C) 2003-2005 Kurakin Roman, <rik@FreeBSD.org> 6 * 7 * This software is distributed with NO WARRANTIES, not even the implied 8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 * 10 * Authors grant any other persons or organisations a permission to use, 11 * modify and redistribute this software in source and binary forms, 12 * as long as this message is kept with the software, all derivative 13 * works or modified versions. 14 * 15 * $Cronyx: if_ce.c,v 1.9.2.8 2005/11/21 14:17:44 rik Exp $ 16 */ 17 18#include <sys/cdefs.h> | 1/* 2 * Cronyx-Tau32-PCI adapter driver for FreeBSD. 3 * 4 * Copyright (C) 2003-2005 Cronyx Engineering. 5 * Copyright (C) 2003-2005 Kurakin Roman, <rik@FreeBSD.org> 6 * 7 * This software is distributed with NO WARRANTIES, not even the implied 8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 * 10 * Authors grant any other persons or organisations a permission to use, 11 * modify and redistribute this software in source and binary forms, 12 * as long as this message is kept with the software, all derivative 13 * works or modified versions. 14 * 15 * $Cronyx: if_ce.c,v 1.9.2.8 2005/11/21 14:17:44 rik Exp $ 16 */ 17 18#include <sys/cdefs.h> |
19__FBSDID("$FreeBSD: head/sys/dev/ce/if_ce.c 183397 2008-09-27 08:51:18Z ed $"); | 19__FBSDID("$FreeBSD: head/sys/dev/ce/if_ce.c 184205 2008-10-23 15:53:51Z des $"); |
20 21#include <sys/param.h> 22 23#if __FreeBSD_version >= 500000 24# define NPCI 1 25#else 26# include "pci.h" 27#endif --- 2333 unchanged lines hidden (view full) --- 2361 2362#if __FreeBSD_version >= 500000 2363 NG_MKRESPONSE (resp, msg, dl, M_NOWAIT); 2364 if (! resp) { 2365 error = ENOMEM; 2366 break; 2367 } 2368#else | 20 21#include <sys/param.h> 22 23#if __FreeBSD_version >= 500000 24# define NPCI 1 25#else 26# include "pci.h" 27#endif --- 2333 unchanged lines hidden (view full) --- 2361 2362#if __FreeBSD_version >= 500000 2363 NG_MKRESPONSE (resp, msg, dl, M_NOWAIT); 2364 if (! resp) { 2365 error = ENOMEM; 2366 break; 2367 } 2368#else |
2369 MALLOC (resp, struct ng_mesg *, dl, 2370 M_NETGRAPH, M_NOWAIT); | 2369 resp = malloc (M_NETGRAPH, M_NOWAIT); |
2371 if (! resp) { 2372 error = ENOMEM; 2373 break; 2374 } 2375 bzero (resp, dl); 2376#endif 2377 s = (resp)->data; 2378 if (d) { --- 16 unchanged lines hidden (view full) --- 2395 } 2396 break; 2397 } 2398#if __FreeBSD_version >= 500000 2399 NG_RESPOND_MSG (error, node, item, resp); 2400 NG_FREE_MSG (msg); 2401#else 2402 *rptr = resp; | 2370 if (! resp) { 2371 error = ENOMEM; 2372 break; 2373 } 2374 bzero (resp, dl); 2375#endif 2376 s = (resp)->data; 2377 if (d) { --- 16 unchanged lines hidden (view full) --- 2394 } 2395 break; 2396 } 2397#if __FreeBSD_version >= 500000 2398 NG_RESPOND_MSG (error, node, item, resp); 2399 NG_FREE_MSG (msg); 2400#else 2401 *rptr = resp; |
2403 FREE (msg, M_NETGRAPH); | 2402 free (msg, M_NETGRAPH); |
2404#endif 2405 return error; 2406} 2407 2408#if __FreeBSD_version >= 500000 2409static int ng_ce_rcvdata (hook_p hook, item_p item) 2410{ 2411 drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE(hook)); --- 312 unchanged lines hidden --- | 2403#endif 2404 return error; 2405} 2406 2407#if __FreeBSD_version >= 500000 2408static int ng_ce_rcvdata (hook_p hook, item_p item) 2409{ 2410 drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE(hook)); --- 312 unchanged lines hidden --- |