diff options
author | Chien Tung <chien.tin.tung@intel.com> | 2009-03-07 02:12:10 +0300 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-03-07 02:12:10 +0300 |
commit | b9c367e7e694502085f21d9d2686645798080aa3 (patch) | |
tree | b64f83ffda2f70f9450f0a80fffcc5234b6aa792 /drivers/infiniband/hw/nes/nes_hw.c | |
parent | cd6853d3eb453aee2574521b7ce2cd5a45492a59 (diff) | |
download | linux-b9c367e7e694502085f21d9d2686645798080aa3.tar.xz |
RDMA/nes: Report correct vendor_id and vendor_part_id
ibv_devinfo displays 0 for vendor_id and vendor_part_id. Fill in OUI
and device_id for those two fields.
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_hw.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index cb4a5f32f2f7..3a72a06f1df8 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -254,6 +254,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) { u32 adapter_size; u32 arp_table_size; u16 vendor_id; + u16 device_id; u8 OneG_Mode; u8 func_index; @@ -356,6 +357,13 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) { return NULL; } + nesadapter->vendor_id = (((u32) nesadapter->mac_addr_high) << 8) | + (nesadapter->mac_addr_low >> 24); + + pci_bus_read_config_word(nesdev->pcidev->bus, nesdev->pcidev->devfn, + PCI_DEVICE_ID, &device_id); + nesadapter->vendor_part_id = device_id; + if (nes_init_serdes(nesdev, hw_rev, port_count, nesadapter, OneG_Mode)) { kfree(nesadapter); |