diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index e2db5e001869..f5e135f1dc59 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -958,14 +958,22 @@ static ssize_t show_hca(struct class_device *cdev, char *buf) | |||
958 | } | 958 | } |
959 | } | 959 | } |
960 | 960 | ||
961 | static ssize_t show_board(struct class_device *cdev, char *buf) | ||
962 | { | ||
963 | struct mthca_dev *dev = container_of(cdev, struct mthca_dev, ib_dev.class_dev); | ||
964 | return sprintf(buf, "%.*s\n", MTHCA_BOARD_ID_LEN, dev->board_id); | ||
965 | } | ||
966 | |||
961 | static CLASS_DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL); | 967 | static CLASS_DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL); |
962 | static CLASS_DEVICE_ATTR(fw_ver, S_IRUGO, show_fw_ver, NULL); | 968 | static CLASS_DEVICE_ATTR(fw_ver, S_IRUGO, show_fw_ver, NULL); |
963 | static CLASS_DEVICE_ATTR(hca_type, S_IRUGO, show_hca, NULL); | 969 | static CLASS_DEVICE_ATTR(hca_type, S_IRUGO, show_hca, NULL); |
970 | static CLASS_DEVICE_ATTR(board_id, S_IRUGO, show_board, NULL); | ||
964 | 971 | ||
965 | static struct class_device_attribute *mthca_class_attributes[] = { | 972 | static struct class_device_attribute *mthca_class_attributes[] = { |
966 | &class_device_attr_hw_rev, | 973 | &class_device_attr_hw_rev, |
967 | &class_device_attr_fw_ver, | 974 | &class_device_attr_fw_ver, |
968 | &class_device_attr_hca_type | 975 | &class_device_attr_hca_type, |
976 | &class_device_attr_board_id | ||
969 | }; | 977 | }; |
970 | 978 | ||
971 | int mthca_register_device(struct mthca_dev *dev) | 979 | int mthca_register_device(struct mthca_dev *dev) |