1+ /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
12/*
2- * Copyright (c) 2011-2014 Mellanox Technologies, Inc. All rights reserved.
3- *
4- * This software is available to you under a choice of one of two
5- * licenses. You may choose to be licensed under the terms of the GNU
6- * General Public License (GPL) Version 2, available from the file
7- * COPYING in the main directory of this source tree, or the
8- * OpenIB.org BSD license below:
9- *
10- * Redistribution and use in source and binary forms, with or
11- * without modification, are permitted provided that the following
12- * conditions are met:
13- *
14- * - Redistributions of source code must retain the above
15- * copyright notice, this list of conditions and the following
16- * disclaimer.
17- *
18- * - Redistributions in binary form must reproduce the above
19- * copyright notice, this list of conditions and the following
20- * disclaimer in the documentation and/or other materials
21- * provided with the distribution.
22- *
23- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30- * SOFTWARE.
3+ * Copyright (c) 2018 Mellanox Technologies. All rights reserved.
314 */
325
33-
346#ifndef _MST_KERNEL_H_
357#define _MST_KERNEL_H_
368
7244#define MST_VPD_DEFAULT_TOUT 2000 /* milli seconds */
7345
7446#define mst_err (format , arg ...) \
75- printk(KERN_ERR "%s: %s %d: " format, MST_PREFIX, __func__, __LINE__, ## arg)
47+ pr_err( "%s: %s %d: " format, MST_PREFIX, __func__, __LINE__, ## arg)
7648#define mst_info (format , arg ...) \
77- printk(KERN_INFO "%s: %s %d: " format, MST_PREFIX, __func__, __LINE__, ## arg)
49+ pr_info( "%s: %s %d: " format, MST_PREFIX, __func__, __LINE__, ## arg)
7850
7951
8052/****************************************************/
@@ -87,36 +59,36 @@ enum dev_type {
8759struct mst_dev_data {
8860 int addr_reg ; /* PCICONF address register */
8961 int data_reg ; /* PCICONF data register */
90- int wo_addr ;
62+ int wo_addr ;
9163 unsigned int bar ; /* PCIMEM bar */
9264 void * hw_addr ; /* PCIMEM memory start */
9365 char name [MST_NAME_SIZE ]; /* name of character device */
9466 enum dev_type type ; /* type of device */
95- struct pci_dev * pci_dev ; /* device pci struct in kernel */
67+ struct pci_dev * pci_dev ; /* device pci struct in kernel */
9668 struct list_head list ; /* list of mst_devices */
9769 struct mutex lock ; /* device lock */
9870 int vpd_cap_addr ; /* addr VPD capability */
9971 int major ; /* device major number */
10072 int initialized ; /* indicate if init done */
10173
102- dev_t my_dev ;
103- struct cdev mcdev ;
104- struct class * cl ;
74+ dev_t my_dev ;
75+ struct cdev mcdev ;
76+ struct class * cl ;
10577
10678 unsigned char connectx_wa_slots ; /* wa for pci bug */
10779 /* Vendor specific capability address */
108- int vendor_specific_cap ;
80+ int vendor_specific_cap ;
10981 /* status on VSEC supported spaces*/
110- int spaces_support_status ;
82+ int spaces_support_status ;
11183};
11284
11385
11486/****************************************************/
11587int pci_read4_vpd (struct mst_dev_data * dev , unsigned int timeout ,
116- unsigned offset , u32 * buf );
88+ unsigned int offset , u32 * buf );
11789
11890int pci_write4_vpd (struct mst_dev_data * dev , unsigned int timeout ,
119- unsigned offset , u32 buf );
91+ unsigned int offset , u32 buf );
12092
12193
12294#endif /* _MST_KERNEL_H_ */
0 commit comments