]> err.no Git - linux-2.6/blobdiff - drivers/net/cxgb3/firmware_exports.h
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6] / drivers / net / cxgb3 / firmware_exports.h
index 3565f481801b67cded13b28356f537e1b75d8835..b75ddd8777fe8dbd0c900e775351e9ebe753fe13 100644 (file)
@@ -1,27 +1,33 @@
-/* 
- * ----------------------------------------------------------------------------
- * >>>>>>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- * ----------------------------------------------------------------------------
- * Copyright 2004 (C) Chelsio Communications, Inc. (Chelsio)
+/*
+ * Copyright (c) 2004-2007 Chelsio, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
  *
- * Chelsio Communications, Inc. owns the sole copyright to this software.
- * You may not make a copy, you may not derive works herefrom, and you may
- * not distribute this work to others. Other restrictions of rights may apply
- * as well. This is unpublished, confidential information. All rights reserved.
- * This software contains confidential information and trade secrets of Chelsio
- * Communications, Inc. Use, disclosure, or reproduction is prohibited without
- * the prior express written permission of Chelsio Communications, Inc.
- * ----------------------------------------------------------------------------
- * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Warranty <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- * ----------------------------------------------------------------------------
- * CHELSIO MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE USE OF THIS
- * SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * ----------------------------------------------------------------------------
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
  *
- * This is the firmware_exports.h header file, firmware interface defines.
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
  *
- * Written January 2005 by felix marti (felix@chelsio.com)
+ *      - 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.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
  */
 #ifndef _FIRMWARE_EXPORTS_H_
 #define _FIRMWARE_EXPORTS_H_
 #define FW_WROPCODE_MNGT                       0x1D
 #define FW_MNGTOPCODE_PKTSCHED_SET             0x00
 
-/* Maximum size of a WR sent from the host, limited by the SGE. 
+/* Maximum size of a WR sent from the host, limited by the SGE.
  *
- * Note: WR coming from ULP or TP are only limited by CIM. 
+ * Note: WR coming from ULP or TP are only limited by CIM.
  */
 #define FW_WR_SIZE                     128
 
 /* Maximum number of outstanding WRs sent from the host. Value must be
- * programmed in the CTRL/TUNNEL/QP SGE Egress Context and used by 
+ * programmed in the CTRL/TUNNEL/QP SGE Egress Context and used by
  * offload modules to limit the number of WRs per connection.
  */
 #define FW_T3_WR_NUM                   16
@@ -93,7 +99,7 @@
  * queues must start at SGE Egress Context FW_TUNNEL_SGEEC_START and must
  * start at 'TID' (or 'uP Token') FW_TUNNEL_TID_START.
  *
- * Ingress Traffic (e.g. DMA completion credit)  for TUNNEL Queue[i] is sent 
+ * Ingress Traffic (e.g. DMA completion credit)  for TUNNEL Queue[i] is sent
  * to RESP Queue[i].
  */
 #define FW_TUNNEL_NUM                  8
 #define FW_CTRL_SGEEC_START            65528
 #define FW_CTRL_TID_START              65536
 
-/* FW_OFLD_NUM corresponds to the number of supported OFFLOAD Queues. These 
- * queues must start at SGE Egress Context FW_OFLD_SGEEC_START. 
- * 
- * Note: the 'uP Token' in the SGE Egress Context fields is irrelevant for 
+/* FW_OFLD_NUM corresponds to the number of supported OFFLOAD Queues. These
+ * queues must start at SGE Egress Context FW_OFLD_SGEEC_START.
+ *
+ * Note: the 'uP Token' in the SGE Egress Context fields is irrelevant for
  * OFFLOAD Queues, as the host is responsible for providing the correct TID in
  * every WR.
  *
 #define FW_OFLD_SGEEC_START            0
 
 /*
- * 
+ *
  */
 #define FW_RI_NUM                      1
 #define FW_RI_SGEEC_START              65527
 #define FW_RI_TID_START                        65552
 
 /*
- * The RX_PKT_TID 
+ * The RX_PKT_TID
  */
 #define FW_RX_PKT_NUM                  1
 #define FW_RX_PKT_TID_START            65553
 #define FW_WRC_NUM                     \
     (65536 + FW_TUNNEL_NUM + FW_CTRL_NUM + FW_RI_NUM + FW_RX_PKT_NUM)
 
+/*
+ * FW type and version.
+ */
+#define S_FW_VERSION_TYPE              28
+#define M_FW_VERSION_TYPE              0xF
+#define V_FW_VERSION_TYPE(x)           ((x) << S_FW_VERSION_TYPE)
+#define G_FW_VERSION_TYPE(x)           \
+    (((x) >> S_FW_VERSION_TYPE) & M_FW_VERSION_TYPE)
+
+#define S_FW_VERSION_MAJOR             16
+#define M_FW_VERSION_MAJOR             0xFFF
+#define V_FW_VERSION_MAJOR(x)          ((x) << S_FW_VERSION_MAJOR)
+#define G_FW_VERSION_MAJOR(x)          \
+    (((x) >> S_FW_VERSION_MAJOR) & M_FW_VERSION_MAJOR)
+
+#define S_FW_VERSION_MINOR             8
+#define M_FW_VERSION_MINOR             0xFF
+#define V_FW_VERSION_MINOR(x)          ((x) << S_FW_VERSION_MINOR)
+#define G_FW_VERSION_MINOR(x)          \
+    (((x) >> S_FW_VERSION_MINOR) & M_FW_VERSION_MINOR)
+
+#define S_FW_VERSION_MICRO             0
+#define M_FW_VERSION_MICRO             0xFF
+#define V_FW_VERSION_MICRO(x)          ((x) << S_FW_VERSION_MICRO)
+#define G_FW_VERSION_MICRO(x)          \
+    (((x) >> S_FW_VERSION_MICRO) & M_FW_VERSION_MICRO)
+
 #endif                         /* _FIRMWARE_EXPORTS_H_ */