diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2008-01-27 11:13:25 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-02-04 23:20:43 -0500 |
commit | 893da75956ab48545e8732b46e1cf4350bd25f9c (patch) | |
tree | fe5125ffd8ec7d84f3b4937f6ade9ee65f7a4913 /drivers | |
parent | 6ccef1de2c1718729dd1c7ee8bd98473519eb3b3 (diff) |
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
The firmware QUERY_ADAPTER command does not return vendor_id,
device_id, and revision_id; eliminate these fields from the query.
Initialize the rev_id field of the mlx4 device via init_node_data (MAD
IFC query), as is done in the query_device verb implementation.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 1 | ||||
-rw-r--r-- | drivers/net/mlx4/fw.c | 6 | ||||
-rw-r--r-- | drivers/net/mlx4/fw.h | 3 | ||||
-rw-r--r-- | drivers/net/mlx4/main.c | 1 |
4 files changed, 1 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index d8287d9db41e..d2f50b62fcb6 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -468,6 +468,7 @@ static int init_node_data(struct mlx4_ib_dev *dev) | |||
468 | if (err) | 468 | if (err) |
469 | goto out; | 469 | goto out; |
470 | 470 | ||
471 | dev->dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32)); | ||
471 | memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); | 472 | memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); |
472 | 473 | ||
473 | out: | 474 | out: |
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c index 535a4461d88c..61dc4951d6b0 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c | |||
@@ -617,9 +617,6 @@ int mlx4_QUERY_ADAPTER(struct mlx4_dev *dev, struct mlx4_adapter *adapter) | |||
617 | int err; | 617 | int err; |
618 | 618 | ||
619 | #define QUERY_ADAPTER_OUT_SIZE 0x100 | 619 | #define QUERY_ADAPTER_OUT_SIZE 0x100 |
620 | #define QUERY_ADAPTER_VENDOR_ID_OFFSET 0x00 | ||
621 | #define QUERY_ADAPTER_DEVICE_ID_OFFSET 0x04 | ||
622 | #define QUERY_ADAPTER_REVISION_ID_OFFSET 0x08 | ||
623 | #define QUERY_ADAPTER_INTA_PIN_OFFSET 0x10 | 620 | #define QUERY_ADAPTER_INTA_PIN_OFFSET 0x10 |
624 | #define QUERY_ADAPTER_VSD_OFFSET 0x20 | 621 | #define QUERY_ADAPTER_VSD_OFFSET 0x20 |
625 | 622 | ||
@@ -633,9 +630,6 @@ int mlx4_QUERY_ADAPTER(struct mlx4_dev *dev, struct mlx4_adapter *adapter) | |||
633 | if (err) | 630 | if (err) |
634 | goto out; | 631 | goto out; |
635 | 632 | ||
636 | MLX4_GET(adapter->vendor_id, outbox, QUERY_ADAPTER_VENDOR_ID_OFFSET); | ||
637 | MLX4_GET(adapter->device_id, outbox, QUERY_ADAPTER_DEVICE_ID_OFFSET); | ||
638 | MLX4_GET(adapter->revision_id, outbox, QUERY_ADAPTER_REVISION_ID_OFFSET); | ||
639 | MLX4_GET(adapter->inta_pin, outbox, QUERY_ADAPTER_INTA_PIN_OFFSET); | 633 | MLX4_GET(adapter->inta_pin, outbox, QUERY_ADAPTER_INTA_PIN_OFFSET); |
640 | 634 | ||
641 | get_board_id(outbox + QUERY_ADAPTER_VSD_OFFSET / 4, | 635 | get_board_id(outbox + QUERY_ADAPTER_VSD_OFFSET / 4, |
diff --git a/drivers/net/mlx4/fw.h b/drivers/net/mlx4/fw.h index 7e1dd9e25cfb..e16dec890413 100644 --- a/drivers/net/mlx4/fw.h +++ b/drivers/net/mlx4/fw.h | |||
@@ -99,9 +99,6 @@ struct mlx4_dev_cap { | |||
99 | }; | 99 | }; |
100 | 100 | ||
101 | struct mlx4_adapter { | 101 | struct mlx4_adapter { |
102 | u32 vendor_id; | ||
103 | u32 device_id; | ||
104 | u32 revision_id; | ||
105 | char board_id[MLX4_BOARD_ID_LEN]; | 102 | char board_id[MLX4_BOARD_ID_LEN]; |
106 | u8 inta_pin; | 103 | u8 inta_pin; |
107 | }; | 104 | }; |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index a028d8a012ff..859617d622b9 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -534,7 +534,6 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
534 | } | 534 | } |
535 | 535 | ||
536 | priv->eq_table.inta_pin = adapter.inta_pin; | 536 | priv->eq_table.inta_pin = adapter.inta_pin; |
537 | dev->rev_id = adapter.revision_id; | ||
538 | memcpy(dev->board_id, adapter.board_id, sizeof dev->board_id); | 537 | memcpy(dev->board_id, adapter.board_id, sizeof dev->board_id); |
539 | 538 | ||
540 | return 0; | 539 | return 0; |