Deleted Added
full compact
main.c (272407) main.c (277139)
1/*
2 * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 * Copyright (c) 2005, 2006, 2007, 2008, 2014 Mellanox Technologies. All rights reserved.
5 * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

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

499{
500 u64 dbdf;
501 int i = 1;
502
503 *val = tbl[0].val[idx];
504 if (!pdev)
505 return -EINVAL;
506
1/*
2 * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 * Copyright (c) 2005, 2006, 2007, 2008, 2014 Mellanox Technologies. All rights reserved.
5 * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

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

499{
500 u64 dbdf;
501 int i = 1;
502
503 *val = tbl[0].val[idx];
504 if (!pdev)
505 return -EINVAL;
506
507 if (!pdev->bus) {
508 return -EINVAL;
509 }
510
511 dbdf = dbdf_to_u64(pci_get_domain(pdev->dev.bsddev), pci_get_bus(pdev->dev.bsddev),
512 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
513
514 while ((i < MLX4_DEVS_TBL_SIZE) && (tbl[i].dbdf != MLX4_ENDOF_TBL)) {
515 if (tbl[i].dbdf == dbdf) {
516 *val = tbl[i].val[idx];
517 return 0;
518 }

--- 3284 unchanged lines hidden ---
507 dbdf = dbdf_to_u64(pci_get_domain(pdev->dev.bsddev), pci_get_bus(pdev->dev.bsddev),
508 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
509
510 while ((i < MLX4_DEVS_TBL_SIZE) && (tbl[i].dbdf != MLX4_ENDOF_TBL)) {
511 if (tbl[i].dbdf == dbdf) {
512 *val = tbl[i].val[idx];
513 return 0;
514 }

--- 3284 unchanged lines hidden ---