The patch titled IB/ipath: report correct device identification information in /sys has been added to the -mm tree. Its filename is ib-ipath-report-correct-device-identification.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: IB/ipath: report correct device identification information in /sys From: "Bryan O'Sullivan" <bos@xxxxxxxxxxxxx> Signed-off-by: Robert Walsh <robert.walsh@xxxxxxxxxx> Signed-off-by: Bryan O'Sullivan <bryan.osullivan@xxxxxxxxxx> Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxx> Cc: Roland Dreier <rolandd@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/infiniband/hw/ipath/ipath_layer.c | 31 ++++++++++++++------ drivers/infiniband/hw/ipath/ipath_layer.h | 6 ++- drivers/infiniband/hw/ipath/ipath_mad.c | 6 ++- drivers/infiniband/hw/ipath/ipath_verbs.c | 14 ++------- 4 files changed, 35 insertions(+), 22 deletions(-) diff -puN drivers/infiniband/hw/ipath/ipath_layer.c~ib-ipath-report-correct-device-identification drivers/infiniband/hw/ipath/ipath_layer.c --- a/drivers/infiniband/hw/ipath/ipath_layer.c~ib-ipath-report-correct-device-identification +++ a/drivers/infiniband/hw/ipath/ipath_layer.c @@ -341,18 +341,26 @@ u32 ipath_layer_get_nguid(struct ipath_d EXPORT_SYMBOL_GPL(ipath_layer_get_nguid); -int ipath_layer_query_device(struct ipath_devdata *dd, u32 * vendor, - u32 * boardrev, u32 * majrev, u32 * minrev) +u32 ipath_layer_get_majrev(struct ipath_devdata *dd) { - *vendor = dd->ipath_vendorid; - *boardrev = dd->ipath_boardrev; - *majrev = dd->ipath_majrev; - *minrev = dd->ipath_minrev; + return dd->ipath_majrev; +} + +EXPORT_SYMBOL_GPL(ipath_layer_get_majrev); - return 0; +u32 ipath_layer_get_minrev(struct ipath_devdata *dd) +{ + return dd->ipath_minrev; } -EXPORT_SYMBOL_GPL(ipath_layer_query_device); +EXPORT_SYMBOL_GPL(ipath_layer_get_minrev); + +u32 ipath_layer_get_pcirev(struct ipath_devdata *dd) +{ + return dd->ipath_pcirev; +} + +EXPORT_SYMBOL_GPL(ipath_layer_get_pcirev); u32 ipath_layer_get_flags(struct ipath_devdata *dd) { @@ -375,6 +383,13 @@ u16 ipath_layer_get_deviceid(struct ipat EXPORT_SYMBOL_GPL(ipath_layer_get_deviceid); +u32 ipath_layer_get_vendorid(struct ipath_devdata *dd) +{ + return dd->ipath_vendorid; +} + +EXPORT_SYMBOL_GPL(ipath_layer_get_vendorid); + u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd) { return dd->ipath_lastibcstat; diff -puN drivers/infiniband/hw/ipath/ipath_layer.h~ib-ipath-report-correct-device-identification drivers/infiniband/hw/ipath/ipath_layer.h --- a/drivers/infiniband/hw/ipath/ipath_layer.h~ib-ipath-report-correct-device-identification +++ a/drivers/infiniband/hw/ipath/ipath_layer.h @@ -144,11 +144,13 @@ int ipath_layer_want_buffer(struct ipath int ipath_layer_set_guid(struct ipath_devdata *, __be64 guid); __be64 ipath_layer_get_guid(struct ipath_devdata *); u32 ipath_layer_get_nguid(struct ipath_devdata *); -int ipath_layer_query_device(struct ipath_devdata *, u32 * vendor, - u32 * boardrev, u32 * majrev, u32 * minrev); +u32 ipath_layer_get_majrev(struct ipath_devdata *); +u32 ipath_layer_get_minrev(struct ipath_devdata *); +u32 ipath_layer_get_pcirev(struct ipath_devdata *); u32 ipath_layer_get_flags(struct ipath_devdata *dd); struct device *ipath_layer_get_device(struct ipath_devdata *dd); u16 ipath_layer_get_deviceid(struct ipath_devdata *dd); +u32 ipath_layer_get_vendorid(struct ipath_devdata *); u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd); u32 ipath_layer_get_ibmtu(struct ipath_devdata *dd); int ipath_layer_enable_timer(struct ipath_devdata *dd); diff -puN drivers/infiniband/hw/ipath/ipath_mad.c~ib-ipath-report-correct-device-identification drivers/infiniband/hw/ipath/ipath_mad.c --- a/drivers/infiniband/hw/ipath/ipath_mad.c~ib-ipath-report-correct-device-identification +++ a/drivers/infiniband/hw/ipath/ipath_mad.c @@ -85,7 +85,7 @@ static int recv_subn_get_nodeinfo(struct { struct nodeinfo *nip = (struct nodeinfo *)&smp->data; struct ipath_devdata *dd = to_idev(ibdev)->dd; - u32 vendor, boardid, majrev, minrev; + u32 vendor, majrev, minrev; if (smp->attr_mod) smp->status |= IB_SMP_INVALID_FIELD; @@ -105,9 +105,11 @@ static int recv_subn_get_nodeinfo(struct nip->port_guid = nip->sys_guid; nip->partition_cap = cpu_to_be16(ipath_layer_get_npkeys(dd)); nip->device_id = cpu_to_be16(ipath_layer_get_deviceid(dd)); - ipath_layer_query_device(dd, &vendor, &boardid, &majrev, &minrev); + majrev = ipath_layer_get_majrev(dd); + minrev = ipath_layer_get_minrev(dd); nip->revision = cpu_to_be32((majrev << 16) | minrev); nip->local_port_num = port; + vendor = ipath_layer_get_vendorid(dd); nip->vendor_id[0] = 0; nip->vendor_id[1] = vendor >> 8; nip->vendor_id[2] = vendor; diff -puN drivers/infiniband/hw/ipath/ipath_verbs.c~ib-ipath-report-correct-device-identification drivers/infiniband/hw/ipath/ipath_verbs.c --- a/drivers/infiniband/hw/ipath/ipath_verbs.c~ib-ipath-report-correct-device-identification +++ a/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -568,18 +568,15 @@ static int ipath_query_device(struct ib_ struct ib_device_attr *props) { struct ipath_ibdev *dev = to_idev(ibdev); - u32 vendor, boardrev, majrev, minrev; memset(props, 0, sizeof(*props)); props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | IB_DEVICE_SYS_IMAGE_GUID; - ipath_layer_query_device(dev->dd, &vendor, &boardrev, - &majrev, &minrev); - props->vendor_id = vendor; - props->vendor_part_id = boardrev; - props->hw_ver = boardrev << 16 | majrev << 8 | minrev; + props->vendor_id = ipath_layer_get_vendorid(dev->dd); + props->vendor_part_id = ipath_layer_get_deviceid(dev->dd); + props->hw_ver = ipath_layer_get_pcirev(dev->dd); props->sys_image_guid = dev->sys_image_guid; @@ -1121,11 +1118,8 @@ static ssize_t show_rev(struct class_dev { struct ipath_ibdev *dev = container_of(cdev, struct ipath_ibdev, ibdev.class_dev); - int vendor, boardrev, majrev, minrev; - ipath_layer_query_device(dev->dd, &vendor, &boardrev, - &majrev, &minrev); - return sprintf(buf, "%d.%d\n", majrev, minrev); + return sprintf(buf, "%x\n", ipath_layer_get_pcirev(dev->dd)); } static ssize_t show_hca(struct class_device *cdev, char *buf) _ Patches currently in -mm which might be from bos@xxxxxxxxxxxxx are ib-ipath-name-zero-counter-offsets-so-its-clear.patch ib-ipath-update-copyrights-and-other-strings-to.patch ib-ipath-share-more-common-code-between-rc-and-uc.patch ib-ipath-fix-an-indenting-problem.patch ib-ipath-fix-shared-receive-queues-for-rc.patch ib-ipath-allow-diags-on-any-unit.patch ib-ipath-update-some-comments-and-fix-typos.patch ib-ipath-remove-some-duplicate-code.patch ib-ipath-dont-allow-resources-to-be-created-with.patch ib-ipath-fix-some-memory-leaks-on-failure-paths.patch ib-ipath-return-an-error-for-unknown-multicast-gid.patch ib-ipath-report-correct-device-identification.patch ib-ipath-enforce-device-resource-limits.patch ib-ipath-removed-unused-field-ipath_kregvirt-from.patch ib-ipath-print-better-debug-info-when-handling.patch ib-ipath-enable-freeze-mode-when-shutting-down.patch ib-ipath-use-more-appropriate-gfp-flags.patch ib-ipath-use-vmalloc-to-allocate-struct.patch ib-ipath-memory-management-cleanups.patch ib-ipath-reduce-overhead-on-receive-interrupts.patch ib-ipath-fixed-bug-9776.patch ib-ipath-fix-lost-interrupts-on-ht-400.patch ib-ipath-disallow-send-of-invalid-packet-sizes.patch ib-ipath-dont-confuse-the-max-message-size-with.patch ib-ipath-removed-redundant-statements.patch ib-ipath-check-for-valid-lid-and-multicast-lids.patch ib-ipath-fixes-to-performance-get-counters-for-ib.patch ib-ipath-fixes-a-bug-where-our-delay-for-eeprom-no.patch ib-ipath-rc-receive-interrupt-performance-changes.patch ib-ipath-purge-sps_lid-and-sps_mlid-arrays.patch ib-ipath-drop-the-stats-sysfs-attribute-group.patch ib-ipath-support-more-models-of-infinipath-hardware.patch ib-ipath-read-write-correct-sizes-through-diag.patch ib-ipath-fix-a-bug-that-results-in-addresses-near.patch ib-ipath-remove-some-if-0-code-related-to.patch ib-ipath-ignore-receive-queue-size-if-srq-is.patch ib-ipath-namespace-cleanup-replace-ips-with-ipath.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html