mirror of https://gitee.com/openkylin/linux.git
IB/ipoib: Use new device FW version string
Using this allows for devices to specify the format of their firmware version rather than forcing a format. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
15453e857a
commit
1a8632121a
|
@ -62,10 +62,8 @@ static void ipoib_get_drvinfo(struct net_device *netdev,
|
||||||
{
|
{
|
||||||
struct ipoib_dev_priv *priv = netdev_priv(netdev);
|
struct ipoib_dev_priv *priv = netdev_priv(netdev);
|
||||||
|
|
||||||
snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version),
|
ib_get_device_fw_str(priv->ca, drvinfo->fw_version,
|
||||||
"%d.%d.%d", (int)(priv->ca->attrs.fw_ver >> 32),
|
sizeof(drvinfo->fw_version));
|
||||||
(int)(priv->ca->attrs.fw_ver >> 16) & 0xffff,
|
|
||||||
(int)priv->ca->attrs.fw_ver & 0xffff);
|
|
||||||
|
|
||||||
strlcpy(drvinfo->bus_info, dev_name(priv->ca->dma_device),
|
strlcpy(drvinfo->bus_info, dev_name(priv->ca->dma_device),
|
||||||
sizeof(drvinfo->bus_info));
|
sizeof(drvinfo->bus_info));
|
||||||
|
|
Loading…
Reference in New Issue