diff options
author | Steve Wise <swise@opengridcomputing.com> | 2009-03-24 23:44:18 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-03-24 23:44:18 -0400 |
commit | d1fbe04eee32ed2642cff139b8592866f1d43f41 (patch) | |
tree | b3a934fd0415f794fe7acca9bfbf9905e5967f38 /drivers/infiniband/hw/cxgb3/cxio_hal.c | |
parent | 426328963078f644c7194403a308588cf684d4c6 (diff) |
RDMA/cxgb3: Enforce required firmware
The cxgb3 NIC driver can handle more firmware versions than iw_cxgb3,
and since commit 8207befa ("cxgb3: untie strict FW matching") cxgb3
will load with firmware versions that iw_cxgb3 can't handle. The FW
major number indicates a specific interface between the FW and
iw_cxgb3. Thus if the major number of the running firmware does not
match the required version compiled into iw_cxgb3, then iw_cxgb3 must
not register that device.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/cxio_hal.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/cxio_hal.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c index c2740e790f73..d4d7204c11ed 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c | |||
@@ -938,6 +938,23 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p) | |||
938 | if (!rdev_p->t3cdev_p) | 938 | if (!rdev_p->t3cdev_p) |
939 | rdev_p->t3cdev_p = dev2t3cdev(netdev_p); | 939 | rdev_p->t3cdev_p = dev2t3cdev(netdev_p); |
940 | rdev_p->t3cdev_p->ulp = (void *) rdev_p; | 940 | rdev_p->t3cdev_p->ulp = (void *) rdev_p; |
941 | |||
942 | err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_EMBEDDED_INFO, | ||
943 | &(rdev_p->fw_info)); | ||
944 | if (err) { | ||
945 | printk(KERN_ERR "%s t3cdev_p(%p)->ctl returned error %d.\n", | ||
946 | __func__, rdev_p->t3cdev_p, err); | ||
947 | goto err1; | ||
948 | } | ||
949 | if (G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers) != CXIO_FW_MAJ) { | ||
950 | printk(KERN_ERR MOD "fatal firmware version mismatch: " | ||
951 | "need version %u but adapter has version %u\n", | ||
952 | CXIO_FW_MAJ, | ||
953 | G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers)); | ||
954 | err = -EINVAL; | ||
955 | goto err1; | ||
956 | } | ||
957 | |||
941 | err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS, | 958 | err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS, |
942 | &(rdev_p->rnic_info)); | 959 | &(rdev_p->rnic_info)); |
943 | if (err) { | 960 | if (err) { |