-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Qlogic Everest Driver for Ethernet is the Ethernet specific module for QL4xxx ethernet products by Qlogic. This patch adds a very minimal PCI driver, one that doesn't yet register a network device, but one that does interact with qed and does a basic initialization of the HW. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Yuval Mintz
authored and
David S. Miller
committed
Oct 28, 2015
1 parent
25c089d
commit e712d52
Showing
5 changed files
with
436 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
obj-$(CONFIG_QEDE) := qede.o | ||
|
||
qede-y := qede_main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* QLogic qede NIC Driver | ||
* Copyright (c) 2015 QLogic Corporation | ||
* | ||
* This software is available 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. | ||
*/ | ||
|
||
#ifndef _QEDE_H_ | ||
#define _QEDE_H_ | ||
#include <linux/compiler.h> | ||
#include <linux/version.h> | ||
#include <linux/workqueue.h> | ||
#include <linux/netdevice.h> | ||
#include <linux/interrupt.h> | ||
#include <linux/bitmap.h> | ||
#include <linux/kernel.h> | ||
#include <linux/mutex.h> | ||
#include <linux/io.h> | ||
#include <linux/qed/common_hsi.h> | ||
#include <linux/qed/eth_common.h> | ||
#include <linux/qed/qed_if.h> | ||
#include <linux/qed/qed_chain.h> | ||
#include <linux/qed/qed_eth_if.h> | ||
|
||
#define QEDE_MAJOR_VERSION 8 | ||
#define QEDE_MINOR_VERSION 4 | ||
#define QEDE_REVISION_VERSION 0 | ||
#define QEDE_ENGINEERING_VERSION 0 | ||
#define DRV_MODULE_VERSION __stringify(QEDE_MAJOR_VERSION) "." \ | ||
__stringify(QEDE_MINOR_VERSION) "." \ | ||
__stringify(QEDE_REVISION_VERSION) "." \ | ||
__stringify(QEDE_ENGINEERING_VERSION) | ||
|
||
#define QEDE_ETH_INTERFACE_VERSION 300 | ||
|
||
#define DRV_MODULE_SYM qede | ||
|
||
struct qede_dev { | ||
struct qed_dev *cdev; | ||
struct net_device *ndev; | ||
struct pci_dev *pdev; | ||
|
||
u32 dp_module; | ||
u8 dp_level; | ||
|
||
const struct qed_eth_ops *ops; | ||
|
||
struct qed_dev_eth_info dev_info; | ||
#define QEDE_MAX_RSS_CNT(edev) ((edev)->dev_info.num_queues) | ||
#define QEDE_MAX_TSS_CNT(edev) ((edev)->dev_info.num_queues * \ | ||
(edev)->dev_info.num_tc) | ||
|
||
u16 num_rss; | ||
u8 num_tc; | ||
#define QEDE_RSS_CNT(edev) ((edev)->num_rss) | ||
#define QEDE_TSS_CNT(edev) ((edev)->num_rss * \ | ||
(edev)->num_tc) | ||
#define QEDE_TSS_IDX(edev, txqidx) ((txqidx) % (edev)->num_rss) | ||
#define QEDE_TC_IDX(edev, txqidx) ((txqidx) / (edev)->num_rss) | ||
|
||
struct qed_int_info int_info; | ||
unsigned char primary_mac[ETH_ALEN]; | ||
|
||
/* Smaller private varaiant of the RTNL lock */ | ||
struct mutex qede_lock; | ||
u32 state; /* Protected by qede_lock */ | ||
}; | ||
|
||
/* Debug print definitions */ | ||
#define DP_NAME(edev) ((edev)->ndev->name) | ||
|
||
#endif /* _QEDE_H_ */ |
Oops, something went wrong.