Hello Hal,

we don't have a fw_ver which is available for our adapter.
The be compatible with the OpenIB stack we copy the hw_ver
into the fw_her. The hw_ver alredy has a device file.

If it is necessary, I can add a file for the fw_ver too, but
this will include the same data as is in the hw_ver file.

Regards,
        Heiko

Hal Rosenstock wrote:
On Thu, 2006-03-02 at 03:37, Heiko J Schick wrote:


--- linux-2.6.16-rc4-orig/drivers/infiniband/hw/ehca/ehca_hca.c 1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.16-rc4/drivers/infiniband/hw/ehca/ehca_hca.c      2006-02-28 
08:41:04.000000000 +0100
@@ -0,0 +1,317 @@
+/*
+ *  IBM eServer eHCA Infiniband device driver for Linux on POWER
+ *
+ *  HCA query functions
+ *
+ *  Authors: Heiko J Schick <[EMAIL PROTECTED]>
+ *           Christoph Raisch <[EMAIL PROTECTED]>
+ *
+ *  Copyright (c) 2005 IBM Corporation
+ *
+ *  All rights reserved.
+ *
+ *  This source code is distributed under a dual license of GPL v2.0 and OpenIB
+ *  BSD.
+ *
+ * OpenIB BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  $Id: ehca_hca.c,v 1.4 2006/02/28 07:41:04 schickhj Exp $
+ */
+
+#undef DEB_PREFIX
+#define DEB_PREFIX "shca"
+
+#include "ehca_kernel.h"
+#include "ehca_tools.h"
+
+#include "hcp_if.h"          /* TODO: later via hipz_* header file */
+
+#define TO_MAX_INT(dest, src)                  \
+       if (src >= INT_MAX)                  \
+               dest = INT_MAX;                 \
+       else                                    \
+               dest = src
+
+int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
+{
+       int ret = 0;
+       struct ehca_shca *shca;
+       struct hipz_query_hca *rblock;
+
+       EDEB_EN(7, "");
+
+       memset(props, 0, sizeof(struct ib_device_attr));
+       shca = container_of(ibdev, struct ehca_shca, ib_device);
+
+       rblock = kmalloc(PAGE_SIZE, GFP_KERNEL);
+       if (rblock == NULL) {
+               EDEB_ERR(4, "Can't allocate rblock memory.");
+               ret = -ENOMEM;
+               goto query_device0;
+       }
+
+       memset(rblock, 0, PAGE_SIZE);
+
+       if (hipz_h_query_hca(shca->ipz_hca_handle, rblock) != H_Success) {
+               EDEB_ERR(4, "Can't query device properties");
+               ret = -EINVAL;
+               goto query_device1;
+       }
+       props->fw_ver              = rblock->hw_ver;


Should there also be a /sys/class/infiniband/ehca<n>/fw_ver file created
as well ?

-- Hal



_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to