2 * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
3 * Copyright (c) 2004-2005 Mellanox Technologies, Inc. All rights reserved.
5 * This software is available to you under the OpenIB.org BSD license
8 * Redistribution and use in source and binary forms, with or
9 * without modification, are permitted provided that the following
12 * - Redistributions of source code must retain the above
13 * copyright notice, this list of conditions and the following
16 * - Redistributions in binary form must reproduce the above
17 * copyright notice, this list of conditions and the following
18 * disclaimer in the documentation and/or other materials
19 * provided with the distribution.
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
25 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
26 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * $Id: mthca_vc.c 148 2005-07-12 07:48:46Z sleybo $
38 unsigned __int64 va; /* address of CRSPACE, mapped to user space */
39 unsigned long size; /* size of CRSPACE, mapped to user space */
40 unsigned long reserved; /* to align on quadword boundary */
43 /* Definitions for hca_driver commands*/
46 #define FW_READ_CMD 0x08
47 #define FW_WRITE_CMD 0x09
48 #define FW_MAP_CRSPACE 0x0A
49 #define FW_UNMAP_CRSPACE 0x0B
50 #define FW_REREGISTER_HCA 0x0c
51 #define FW_OPEN_IF 0xe7
52 #define FW_CLOSE_IF 0x7e
55 /* Defines for get data for vendor specific */
56 #define MTHCA_BOARD_ID_LEN 64
58 inline char* mthca_get_board_id(ib_ca_attr_t *ca_attr)
60 return (char*)(ca_attr)+(ca_attr->size - MTHCA_BOARD_ID_LEN);