diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-07-01 07:35:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:55:59 -0400 |
commit | e8a88f09f21c55a7e7f570290ecde570e2c37771 (patch) | |
tree | 26a41167c95a5cccfcc7af0d8008ceaec539b37d /drivers/infiniband/hw/ipath/ipath_verbs.c | |
parent | 9edbd990bb60dd7678f7f4f8ca3d92e03a1f0e67 (diff) |
[PATCH] IB/ipath: report correct device identification information in /sys
Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 18375e831744..e04c7619f9fe 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -568,18 +568,15 @@ static int ipath_query_device(struct ib_device *ibdev, | |||
568 | struct ib_device_attr *props) | 568 | struct ib_device_attr *props) |
569 | { | 569 | { |
570 | struct ipath_ibdev *dev = to_idev(ibdev); | 570 | struct ipath_ibdev *dev = to_idev(ibdev); |
571 | u32 vendor, boardrev, majrev, minrev; | ||
572 | 571 | ||
573 | memset(props, 0, sizeof(*props)); | 572 | memset(props, 0, sizeof(*props)); |
574 | 573 | ||
575 | props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | | 574 | props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | |
576 | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | | 575 | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | |
577 | IB_DEVICE_SYS_IMAGE_GUID; | 576 | IB_DEVICE_SYS_IMAGE_GUID; |
578 | ipath_layer_query_device(dev->dd, &vendor, &boardrev, | 577 | props->vendor_id = ipath_layer_get_vendorid(dev->dd); |
579 | &majrev, &minrev); | 578 | props->vendor_part_id = ipath_layer_get_deviceid(dev->dd); |
580 | props->vendor_id = vendor; | 579 | props->hw_ver = ipath_layer_get_pcirev(dev->dd); |
581 | props->vendor_part_id = boardrev; | ||
582 | props->hw_ver = boardrev << 16 | majrev << 8 | minrev; | ||
583 | 580 | ||
584 | props->sys_image_guid = dev->sys_image_guid; | 581 | props->sys_image_guid = dev->sys_image_guid; |
585 | 582 | ||
@@ -1121,11 +1118,8 @@ static ssize_t show_rev(struct class_device *cdev, char *buf) | |||
1121 | { | 1118 | { |
1122 | struct ipath_ibdev *dev = | 1119 | struct ipath_ibdev *dev = |
1123 | container_of(cdev, struct ipath_ibdev, ibdev.class_dev); | 1120 | container_of(cdev, struct ipath_ibdev, ibdev.class_dev); |
1124 | int vendor, boardrev, majrev, minrev; | ||
1125 | 1121 | ||
1126 | ipath_layer_query_device(dev->dd, &vendor, &boardrev, | 1122 | return sprintf(buf, "%x\n", ipath_layer_get_pcirev(dev->dd)); |
1127 | &majrev, &minrev); | ||
1128 | return sprintf(buf, "%d.%d\n", majrev, minrev); | ||
1129 | } | 1123 | } |
1130 | 1124 | ||
1131 | static ssize_t show_hca(struct class_device *cdev, char *buf) | 1125 | static ssize_t show_hca(struct class_device *cdev, char *buf) |