summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r--drivers/net/benet/be.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 1a0d2d037c4e..f17428caecf1 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -291,9 +291,10 @@ struct be_adapter {
u32 vf_if_handle[BE_MAX_VF];
u32 vf_pmac_id[BE_MAX_VF];
u8 base_eq_id;
+ u8 is_virtfn;
};
-#define be_physfn(adapter) (!adapter->pdev->is_virtfn)
+#define be_physfn(adapter) (!adapter->is_virtfn)
/* BladeEngine Generation numbers */
#define BE_GEN2 2
@@ -393,6 +394,15 @@ static inline u8 is_udp_pkt(struct sk_buff *skb)
return val;
}
+static inline void be_check_sriov_fn_type(struct be_adapter *adapter)
+{
+ u8 data;
+
+ pci_write_config_byte(adapter->pdev, 0xFE, 0xAA);
+ pci_read_config_byte(adapter->pdev, 0xFE, &data);
+ adapter->is_virtfn = (data != 0xAA);
+}
+
extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
u16 num_popped);
extern void be_link_status_update(struct be_adapter *adapter, bool link_up);