Deleted Added
full compact
cxgb_main.c (183062) cxgb_main.c (183063)
1/**************************************************************************
2
3Copyright (c) 2007-2008, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 14 unchanged lines hidden (view full) ---

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
1/**************************************************************************
2
3Copyright (c) 2007-2008, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 14 unchanged lines hidden (view full) ---

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_main.c 183062 2008-09-16 02:03:28Z kmacy $");
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_main.c 183063 2008-09-16 02:28:08Z kmacy $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/bus.h>
37#include <sys/module.h>
38#include <sys/pciio.h>
39#include <sys/conf.h>

--- 289 unchanged lines hidden (view full) ---

329 return (NULL);
330}
331
332static const struct adapter_info *
333cxgb_get_adapter_info(device_t dev)
334{
335 struct cxgb_ident *id;
336 const struct adapter_info *ai;
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/bus.h>
37#include <sys/module.h>
38#include <sys/pciio.h>
39#include <sys/conf.h>

--- 289 unchanged lines hidden (view full) ---

329 return (NULL);
330}
331
332static const struct adapter_info *
333cxgb_get_adapter_info(device_t dev)
334{
335 struct cxgb_ident *id;
336 const struct adapter_info *ai;
337
337
338 id = cxgb_get_ident(dev);
339 if (id == NULL)
340 return (NULL);
341
342 ai = t3_get_adapter_info(id->index);
343
344 return (ai);
345}
346
347static int
348cxgb_controller_probe(device_t dev)
349{
350 const struct adapter_info *ai;
351 char *ports, buf[80];
352 int nports;
353 struct adapter *sc = device_get_softc(dev);
338 id = cxgb_get_ident(dev);
339 if (id == NULL)
340 return (NULL);
341
342 ai = t3_get_adapter_info(id->index);
343
344 return (ai);
345}
346
347static int
348cxgb_controller_probe(device_t dev)
349{
350 const struct adapter_info *ai;
351 char *ports, buf[80];
352 int nports;
353 struct adapter *sc = device_get_softc(dev);
354
354
355 ai = cxgb_get_adapter_info(dev);
356 if (ai == NULL)
357 return (ENXIO);
358
359 nports = ai->nports0 + ai->nports1;
360 if (nports == 1)
361 ports = "port";
362 else

--- 2453 unchanged lines hidden ---
355 ai = cxgb_get_adapter_info(dev);
356 if (ai == NULL)
357 return (ENXIO);
358
359 nports = ai->nports0 + ai->nports1;
360 if (nports == 1)
361 ports = "port";
362 else

--- 2453 unchanged lines hidden ---