You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/qlcnic/qlcnic_init.c net/ipv4/ip_output.c
This commit is contained in:
+1
-1
@@ -1142,7 +1142,7 @@ ATLX ETHERNET DRIVERS
|
|||||||
M: Jay Cliburn <jcliburn@gmail.com>
|
M: Jay Cliburn <jcliburn@gmail.com>
|
||||||
M: Chris Snook <chris.snook@gmail.com>
|
M: Chris Snook <chris.snook@gmail.com>
|
||||||
M: Jie Yang <jie.yang@atheros.com>
|
M: Jie Yang <jie.yang@atheros.com>
|
||||||
L: atl1-devel@lists.sourceforge.net
|
L: netdev@vger.kernel.org
|
||||||
W: http://sourceforge.net/projects/atl1
|
W: http://sourceforge.net/projects/atl1
|
||||||
W: http://atl1.sourceforge.net
|
W: http://atl1.sourceforge.net
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|||||||
+75
-2
@@ -39,6 +39,10 @@ static DEFINE_SPINLOCK(dca_lock);
|
|||||||
|
|
||||||
static LIST_HEAD(dca_domains);
|
static LIST_HEAD(dca_domains);
|
||||||
|
|
||||||
|
static BLOCKING_NOTIFIER_HEAD(dca_provider_chain);
|
||||||
|
|
||||||
|
static int dca_providers_blocked;
|
||||||
|
|
||||||
static struct pci_bus *dca_pci_rc_from_dev(struct device *dev)
|
static struct pci_bus *dca_pci_rc_from_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(dev);
|
struct pci_dev *pdev = to_pci_dev(dev);
|
||||||
@@ -70,6 +74,60 @@ static void dca_free_domain(struct dca_domain *domain)
|
|||||||
kfree(domain);
|
kfree(domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dca_provider_ioat_ver_3_0(struct device *dev)
|
||||||
|
{
|
||||||
|
struct pci_dev *pdev = to_pci_dev(dev);
|
||||||
|
|
||||||
|
return ((pdev->vendor == PCI_VENDOR_ID_INTEL) &&
|
||||||
|
((pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG0) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG1) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG2) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG3) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG4) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG5) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG6) ||
|
||||||
|
(pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG7)));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unregister_dca_providers(void)
|
||||||
|
{
|
||||||
|
struct dca_provider *dca, *_dca;
|
||||||
|
struct list_head unregistered_providers;
|
||||||
|
struct dca_domain *domain;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
blocking_notifier_call_chain(&dca_provider_chain,
|
||||||
|
DCA_PROVIDER_REMOVE, NULL);
|
||||||
|
|
||||||
|
INIT_LIST_HEAD(&unregistered_providers);
|
||||||
|
|
||||||
|
spin_lock_irqsave(&dca_lock, flags);
|
||||||
|
|
||||||
|
if (list_empty(&dca_domains)) {
|
||||||
|
spin_unlock_irqrestore(&dca_lock, flags);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* at this point only one domain in the list is expected */
|
||||||
|
domain = list_first_entry(&dca_domains, struct dca_domain, node);
|
||||||
|
if (!domain)
|
||||||
|
return;
|
||||||
|
|
||||||
|
list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
|
||||||
|
list_del(&dca->node);
|
||||||
|
list_add(&dca->node, &unregistered_providers);
|
||||||
|
}
|
||||||
|
|
||||||
|
dca_free_domain(domain);
|
||||||
|
|
||||||
|
spin_unlock_irqrestore(&dca_lock, flags);
|
||||||
|
|
||||||
|
list_for_each_entry_safe(dca, _dca, &unregistered_providers, node) {
|
||||||
|
dca_sysfs_remove_provider(dca);
|
||||||
|
list_del(&dca->node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static struct dca_domain *dca_find_domain(struct pci_bus *rc)
|
static struct dca_domain *dca_find_domain(struct pci_bus *rc)
|
||||||
{
|
{
|
||||||
struct dca_domain *domain;
|
struct dca_domain *domain;
|
||||||
@@ -90,10 +148,14 @@ static struct dca_domain *dca_get_domain(struct device *dev)
|
|||||||
domain = dca_find_domain(rc);
|
domain = dca_find_domain(rc);
|
||||||
|
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
|
if (dca_provider_ioat_ver_3_0(dev) && !list_empty(&dca_domains)) {
|
||||||
|
dca_providers_blocked = 1;
|
||||||
|
} else {
|
||||||
domain = dca_allocate_domain(rc);
|
domain = dca_allocate_domain(rc);
|
||||||
if (domain)
|
if (domain)
|
||||||
list_add(&domain->node, &dca_domains);
|
list_add(&domain->node, &dca_domains);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
@@ -293,8 +355,6 @@ void free_dca_provider(struct dca_provider *dca)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(free_dca_provider);
|
EXPORT_SYMBOL_GPL(free_dca_provider);
|
||||||
|
|
||||||
static BLOCKING_NOTIFIER_HEAD(dca_provider_chain);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register_dca_provider - register a dca provider
|
* register_dca_provider - register a dca provider
|
||||||
* @dca - struct created by alloc_dca_provider()
|
* @dca - struct created by alloc_dca_provider()
|
||||||
@@ -306,6 +366,13 @@ int register_dca_provider(struct dca_provider *dca, struct device *dev)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct dca_domain *domain;
|
struct dca_domain *domain;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&dca_lock, flags);
|
||||||
|
if (dca_providers_blocked) {
|
||||||
|
spin_unlock_irqrestore(&dca_lock, flags);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
spin_unlock_irqrestore(&dca_lock, flags);
|
||||||
|
|
||||||
err = dca_sysfs_add_provider(dca, dev);
|
err = dca_sysfs_add_provider(dca, dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
@@ -313,7 +380,13 @@ int register_dca_provider(struct dca_provider *dca, struct device *dev)
|
|||||||
spin_lock_irqsave(&dca_lock, flags);
|
spin_lock_irqsave(&dca_lock, flags);
|
||||||
domain = dca_get_domain(dev);
|
domain = dca_get_domain(dev);
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
|
if (dca_providers_blocked) {
|
||||||
spin_unlock_irqrestore(&dca_lock, flags);
|
spin_unlock_irqrestore(&dca_lock, flags);
|
||||||
|
dca_sysfs_remove_provider(dca);
|
||||||
|
unregister_dca_providers();
|
||||||
|
} else {
|
||||||
|
spin_unlock_irqrestore(&dca_lock, flags);
|
||||||
|
}
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
list_add(&dca->node, &domain->dca_providers);
|
list_add(&dca->node, &domain->dca_providers);
|
||||||
|
|||||||
+3
-4
@@ -635,6 +635,9 @@ struct vortex_private {
|
|||||||
must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */
|
must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */
|
||||||
large_frames:1, /* accept large frames */
|
large_frames:1, /* accept large frames */
|
||||||
handling_irq:1; /* private in_irq indicator */
|
handling_irq:1; /* private in_irq indicator */
|
||||||
|
/* {get|set}_wol operations are already serialized by rtnl.
|
||||||
|
* no additional locking is required for the enable_wol and acpi_set_WOL()
|
||||||
|
*/
|
||||||
int drv_flags;
|
int drv_flags;
|
||||||
u16 status_enable;
|
u16 status_enable;
|
||||||
u16 intr_enable;
|
u16 intr_enable;
|
||||||
@@ -2939,13 +2942,11 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
|||||||
{
|
{
|
||||||
struct vortex_private *vp = netdev_priv(dev);
|
struct vortex_private *vp = netdev_priv(dev);
|
||||||
|
|
||||||
spin_lock_irq(&vp->lock);
|
|
||||||
wol->supported = WAKE_MAGIC;
|
wol->supported = WAKE_MAGIC;
|
||||||
|
|
||||||
wol->wolopts = 0;
|
wol->wolopts = 0;
|
||||||
if (vp->enable_wol)
|
if (vp->enable_wol)
|
||||||
wol->wolopts |= WAKE_MAGIC;
|
wol->wolopts |= WAKE_MAGIC;
|
||||||
spin_unlock_irq(&vp->lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
||||||
@@ -2954,13 +2955,11 @@ static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
|||||||
if (wol->wolopts & ~WAKE_MAGIC)
|
if (wol->wolopts & ~WAKE_MAGIC)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irq(&vp->lock);
|
|
||||||
if (wol->wolopts & WAKE_MAGIC)
|
if (wol->wolopts & WAKE_MAGIC)
|
||||||
vp->enable_wol = 1;
|
vp->enable_wol = 1;
|
||||||
else
|
else
|
||||||
vp->enable_wol = 0;
|
vp->enable_wol = 0;
|
||||||
acpi_set_WOL(dev);
|
acpi_set_WOL(dev);
|
||||||
spin_unlock_irq(&vp->lock);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1251,6 +1251,12 @@ static void atl1_free_ring_resources(struct atl1_adapter *adapter)
|
|||||||
|
|
||||||
rrd_ring->desc = NULL;
|
rrd_ring->desc = NULL;
|
||||||
rrd_ring->dma = 0;
|
rrd_ring->dma = 0;
|
||||||
|
|
||||||
|
adapter->cmb.dma = 0;
|
||||||
|
adapter->cmb.cmb = NULL;
|
||||||
|
|
||||||
|
adapter->smb.dma = 0;
|
||||||
|
adapter->smb.smb = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atl1_setup_mac_ctrl(struct atl1_adapter *adapter)
|
static void atl1_setup_mac_ctrl(struct atl1_adapter *adapter)
|
||||||
@@ -2847,10 +2853,11 @@ static int atl1_resume(struct pci_dev *pdev)
|
|||||||
pci_enable_wake(pdev, PCI_D3cold, 0);
|
pci_enable_wake(pdev, PCI_D3cold, 0);
|
||||||
|
|
||||||
atl1_reset_hw(&adapter->hw);
|
atl1_reset_hw(&adapter->hw);
|
||||||
adapter->cmb.cmb->int_stats = 0;
|
|
||||||
|
|
||||||
if (netif_running(netdev))
|
if (netif_running(netdev)) {
|
||||||
|
adapter->cmb.cmb->int_stats = 0;
|
||||||
atl1_up(adapter);
|
atl1_up(adapter);
|
||||||
|
}
|
||||||
netif_device_attach(netdev);
|
netif_device_attach(netdev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -2466,6 +2466,9 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
|
|||||||
if (!(dev->flags & IFF_MASTER))
|
if (!(dev->flags & IFF_MASTER))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if (!pskb_may_pull(skb, sizeof(struct lacpdu)))
|
||||||
|
goto out;
|
||||||
|
|
||||||
read_lock(&bond->lock);
|
read_lock(&bond->lock);
|
||||||
slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
|
slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
|
||||||
orig_dev);
|
orig_dev);
|
||||||
|
|||||||
@@ -362,6 +362,9 @@ static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pskb_may_pull(skb, arp_hdr_len(bond_dev)))
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (skb->len < sizeof(struct arp_pkt)) {
|
if (skb->len < sizeof(struct arp_pkt)) {
|
||||||
pr_debug("Packet is too small to be an ARP\n");
|
pr_debug("Packet is too small to be an ARP\n");
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
@@ -2302,6 +2302,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||||||
case CHELSIO_GET_QSET_NUM:{
|
case CHELSIO_GET_QSET_NUM:{
|
||||||
struct ch_reg edata;
|
struct ch_reg edata;
|
||||||
|
|
||||||
|
memset(&edata, 0, sizeof(struct ch_reg));
|
||||||
|
|
||||||
edata.cmd = CHELSIO_GET_QSET_NUM;
|
edata.cmd = CHELSIO_GET_QSET_NUM;
|
||||||
edata.val = pi->nqsets;
|
edata.val = pi->nqsets;
|
||||||
if (copy_to_user(useraddr, &edata, sizeof(edata)))
|
if (copy_to_user(useraddr, &edata, sizeof(edata)))
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ enum e1e_registers {
|
|||||||
E1000_SCTL = 0x00024, /* SerDes Control - RW */
|
E1000_SCTL = 0x00024, /* SerDes Control - RW */
|
||||||
E1000_FCAL = 0x00028, /* Flow Control Address Low - RW */
|
E1000_FCAL = 0x00028, /* Flow Control Address Low - RW */
|
||||||
E1000_FCAH = 0x0002C, /* Flow Control Address High -RW */
|
E1000_FCAH = 0x0002C, /* Flow Control Address High -RW */
|
||||||
|
E1000_FEXTNVM4 = 0x00024, /* Future Extended NVM 4 - RW */
|
||||||
E1000_FEXTNVM = 0x00028, /* Future Extended NVM - RW */
|
E1000_FEXTNVM = 0x00028, /* Future Extended NVM - RW */
|
||||||
E1000_FCT = 0x00030, /* Flow Control Type - RW */
|
E1000_FCT = 0x00030, /* Flow Control Type - RW */
|
||||||
E1000_VET = 0x00038, /* VLAN Ether Type - RW */
|
E1000_VET = 0x00038, /* VLAN Ether Type - RW */
|
||||||
|
|||||||
+164
-33
@@ -105,6 +105,10 @@
|
|||||||
#define E1000_FEXTNVM_SW_CONFIG 1
|
#define E1000_FEXTNVM_SW_CONFIG 1
|
||||||
#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* Bit redefined for ICH8M :/ */
|
#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* Bit redefined for ICH8M :/ */
|
||||||
|
|
||||||
|
#define E1000_FEXTNVM4_BEACON_DURATION_MASK 0x7
|
||||||
|
#define E1000_FEXTNVM4_BEACON_DURATION_8USEC 0x7
|
||||||
|
#define E1000_FEXTNVM4_BEACON_DURATION_16USEC 0x3
|
||||||
|
|
||||||
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
|
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
|
||||||
|
|
||||||
#define E1000_ICH_RAR_ENTRIES 7
|
#define E1000_ICH_RAR_ENTRIES 7
|
||||||
@@ -125,6 +129,7 @@
|
|||||||
|
|
||||||
/* SMBus Address Phy Register */
|
/* SMBus Address Phy Register */
|
||||||
#define HV_SMB_ADDR PHY_REG(768, 26)
|
#define HV_SMB_ADDR PHY_REG(768, 26)
|
||||||
|
#define HV_SMB_ADDR_MASK 0x007F
|
||||||
#define HV_SMB_ADDR_PEC_EN 0x0200
|
#define HV_SMB_ADDR_PEC_EN 0x0200
|
||||||
#define HV_SMB_ADDR_VALID 0x0080
|
#define HV_SMB_ADDR_VALID 0x0080
|
||||||
|
|
||||||
@@ -237,6 +242,8 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link);
|
|||||||
static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw);
|
static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw);
|
||||||
static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
|
static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
|
||||||
static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
|
static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
|
||||||
|
static s32 e1000_k1_workaround_lv(struct e1000_hw *hw);
|
||||||
|
static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate);
|
||||||
|
|
||||||
static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
|
static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
|
||||||
{
|
{
|
||||||
@@ -272,7 +279,7 @@ static inline void __ew32flash(struct e1000_hw *hw, unsigned long reg, u32 val)
|
|||||||
static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
|
static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
|
||||||
{
|
{
|
||||||
struct e1000_phy_info *phy = &hw->phy;
|
struct e1000_phy_info *phy = &hw->phy;
|
||||||
u32 ctrl;
|
u32 ctrl, fwsm;
|
||||||
s32 ret_val = 0;
|
s32 ret_val = 0;
|
||||||
|
|
||||||
phy->addr = 1;
|
phy->addr = 1;
|
||||||
@@ -294,7 +301,8 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
|
|||||||
* disabled, then toggle the LANPHYPC Value bit to force
|
* disabled, then toggle the LANPHYPC Value bit to force
|
||||||
* the interconnect to PCIe mode.
|
* the interconnect to PCIe mode.
|
||||||
*/
|
*/
|
||||||
if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {
|
fwsm = er32(FWSM);
|
||||||
|
if (!(fwsm & E1000_ICH_FWSM_FW_VALID)) {
|
||||||
ctrl = er32(CTRL);
|
ctrl = er32(CTRL);
|
||||||
ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE;
|
ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE;
|
||||||
ctrl &= ~E1000_CTRL_LANPHYPC_VALUE;
|
ctrl &= ~E1000_CTRL_LANPHYPC_VALUE;
|
||||||
@@ -303,6 +311,13 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
|
|||||||
ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE;
|
ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE;
|
||||||
ew32(CTRL, ctrl);
|
ew32(CTRL, ctrl);
|
||||||
msleep(50);
|
msleep(50);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gate automatic PHY configuration by hardware on
|
||||||
|
* non-managed 82579
|
||||||
|
*/
|
||||||
|
if (hw->mac.type == e1000_pch2lan)
|
||||||
|
e1000_gate_hw_phy_config_ich8lan(hw, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -315,6 +330,13 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
|
|||||||
if (ret_val)
|
if (ret_val)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/* Ungate automatic PHY configuration on non-managed 82579 */
|
||||||
|
if ((hw->mac.type == e1000_pch2lan) &&
|
||||||
|
!(fwsm & E1000_ICH_FWSM_FW_VALID)) {
|
||||||
|
msleep(10);
|
||||||
|
e1000_gate_hw_phy_config_ich8lan(hw, false);
|
||||||
|
}
|
||||||
|
|
||||||
phy->id = e1000_phy_unknown;
|
phy->id = e1000_phy_unknown;
|
||||||
ret_val = e1000e_get_phy_id(hw);
|
ret_val = e1000e_get_phy_id(hw);
|
||||||
if (ret_val)
|
if (ret_val)
|
||||||
@@ -561,13 +583,10 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter)
|
|||||||
if (mac->type == e1000_ich8lan)
|
if (mac->type == e1000_ich8lan)
|
||||||
e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, true);
|
e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, true);
|
||||||
|
|
||||||
/* Disable PHY configuration by hardware, config by software */
|
/* Gate automatic PHY configuration by hardware on managed 82579 */
|
||||||
if (mac->type == e1000_pch2lan) {
|
if ((mac->type == e1000_pch2lan) &&
|
||||||
u32 extcnf_ctrl = er32(EXTCNF_CTRL);
|
(er32(FWSM) & E1000_ICH_FWSM_FW_VALID))
|
||||||
|
e1000_gate_hw_phy_config_ich8lan(hw, true);
|
||||||
extcnf_ctrl |= E1000_EXTCNF_CTRL_GATE_PHY_CFG;
|
|
||||||
ew32(EXTCNF_CTRL, extcnf_ctrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -652,6 +671,12 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hw->mac.type == e1000_pch2lan) {
|
||||||
|
ret_val = e1000_k1_workaround_lv(hw);
|
||||||
|
if (ret_val)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if there was DownShift, must be checked
|
* Check if there was DownShift, must be checked
|
||||||
* immediately after link-up
|
* immediately after link-up
|
||||||
@@ -894,6 +919,34 @@ static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
|
|||||||
return (fwsm & E1000_ICH_FWSM_RSPCIPHY) ? 0 : E1000_BLK_PHY_RESET;
|
return (fwsm & E1000_ICH_FWSM_RSPCIPHY) ? 0 : E1000_BLK_PHY_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e1000_write_smbus_addr - Write SMBus address to PHY needed during Sx states
|
||||||
|
* @hw: pointer to the HW structure
|
||||||
|
*
|
||||||
|
* Assumes semaphore already acquired.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
static s32 e1000_write_smbus_addr(struct e1000_hw *hw)
|
||||||
|
{
|
||||||
|
u16 phy_data;
|
||||||
|
u32 strap = er32(STRAP);
|
||||||
|
s32 ret_val = 0;
|
||||||
|
|
||||||
|
strap &= E1000_STRAP_SMBUS_ADDRESS_MASK;
|
||||||
|
|
||||||
|
ret_val = e1000_read_phy_reg_hv_locked(hw, HV_SMB_ADDR, &phy_data);
|
||||||
|
if (ret_val)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
phy_data &= ~HV_SMB_ADDR_MASK;
|
||||||
|
phy_data |= (strap >> E1000_STRAP_SMBUS_ADDRESS_SHIFT);
|
||||||
|
phy_data |= HV_SMB_ADDR_PEC_EN | HV_SMB_ADDR_VALID;
|
||||||
|
ret_val = e1000_write_phy_reg_hv_locked(hw, HV_SMB_ADDR, phy_data);
|
||||||
|
|
||||||
|
out:
|
||||||
|
return ret_val;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* e1000_sw_lcd_config_ich8lan - SW-based LCD Configuration
|
* e1000_sw_lcd_config_ich8lan - SW-based LCD Configuration
|
||||||
* @hw: pointer to the HW structure
|
* @hw: pointer to the HW structure
|
||||||
@@ -903,7 +956,6 @@ static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
|
|||||||
**/
|
**/
|
||||||
static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
|
static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
|
||||||
{
|
{
|
||||||
struct e1000_adapter *adapter = hw->adapter;
|
|
||||||
struct e1000_phy_info *phy = &hw->phy;
|
struct e1000_phy_info *phy = &hw->phy;
|
||||||
u32 i, data, cnf_size, cnf_base_addr, sw_cfg_mask;
|
u32 i, data, cnf_size, cnf_base_addr, sw_cfg_mask;
|
||||||
s32 ret_val = 0;
|
s32 ret_val = 0;
|
||||||
@@ -921,7 +973,8 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
|
|||||||
if (phy->type != e1000_phy_igp_3)
|
if (phy->type != e1000_phy_igp_3)
|
||||||
return ret_val;
|
return ret_val;
|
||||||
|
|
||||||
if (adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_AMT) {
|
if ((hw->adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_AMT) ||
|
||||||
|
(hw->adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_C)) {
|
||||||
sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
|
sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -961,21 +1014,16 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
|
|||||||
cnf_base_addr = data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK;
|
cnf_base_addr = data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK;
|
||||||
cnf_base_addr >>= E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT;
|
cnf_base_addr >>= E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT;
|
||||||
|
|
||||||
if (!(data & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE) &&
|
if ((!(data & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE) &&
|
||||||
((hw->mac.type == e1000_pchlan) ||
|
(hw->mac.type == e1000_pchlan)) ||
|
||||||
(hw->mac.type == e1000_pch2lan))) {
|
(hw->mac.type == e1000_pch2lan)) {
|
||||||
/*
|
/*
|
||||||
* HW configures the SMBus address and LEDs when the
|
* HW configures the SMBus address and LEDs when the
|
||||||
* OEM and LCD Write Enable bits are set in the NVM.
|
* OEM and LCD Write Enable bits are set in the NVM.
|
||||||
* When both NVM bits are cleared, SW will configure
|
* When both NVM bits are cleared, SW will configure
|
||||||
* them instead.
|
* them instead.
|
||||||
*/
|
*/
|
||||||
data = er32(STRAP);
|
ret_val = e1000_write_smbus_addr(hw);
|
||||||
data &= E1000_STRAP_SMBUS_ADDRESS_MASK;
|
|
||||||
reg_data = data >> E1000_STRAP_SMBUS_ADDRESS_SHIFT;
|
|
||||||
reg_data |= HV_SMB_ADDR_PEC_EN | HV_SMB_ADDR_VALID;
|
|
||||||
ret_val = e1000_write_phy_reg_hv_locked(hw, HV_SMB_ADDR,
|
|
||||||
reg_data);
|
|
||||||
if (ret_val)
|
if (ret_val)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -1440,10 +1488,6 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Enable jumbo frame workaround in the PHY */
|
/* Enable jumbo frame workaround in the PHY */
|
||||||
e1e_rphy(hw, PHY_REG(769, 20), &data);
|
|
||||||
ret_val = e1e_wphy(hw, PHY_REG(769, 20), data & ~(1 << 14));
|
|
||||||
if (ret_val)
|
|
||||||
goto out;
|
|
||||||
e1e_rphy(hw, PHY_REG(769, 23), &data);
|
e1e_rphy(hw, PHY_REG(769, 23), &data);
|
||||||
data &= ~(0x7F << 5);
|
data &= ~(0x7F << 5);
|
||||||
data |= (0x37 << 5);
|
data |= (0x37 << 5);
|
||||||
@@ -1452,7 +1496,6 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
|
|||||||
goto out;
|
goto out;
|
||||||
e1e_rphy(hw, PHY_REG(769, 16), &data);
|
e1e_rphy(hw, PHY_REG(769, 16), &data);
|
||||||
data &= ~(1 << 13);
|
data &= ~(1 << 13);
|
||||||
data |= (1 << 12);
|
|
||||||
ret_val = e1e_wphy(hw, PHY_REG(769, 16), data);
|
ret_val = e1e_wphy(hw, PHY_REG(769, 16), data);
|
||||||
if (ret_val)
|
if (ret_val)
|
||||||
goto out;
|
goto out;
|
||||||
@@ -1477,7 +1520,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
|
|||||||
|
|
||||||
mac_reg = er32(RCTL);
|
mac_reg = er32(RCTL);
|
||||||
mac_reg &= ~E1000_RCTL_SECRC;
|
mac_reg &= ~E1000_RCTL_SECRC;
|
||||||
ew32(FFLT_DBG, mac_reg);
|
ew32(RCTL, mac_reg);
|
||||||
|
|
||||||
ret_val = e1000e_read_kmrn_reg(hw,
|
ret_val = e1000e_read_kmrn_reg(hw,
|
||||||
E1000_KMRNCTRLSTA_CTRL_OFFSET,
|
E1000_KMRNCTRLSTA_CTRL_OFFSET,
|
||||||
@@ -1503,17 +1546,12 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Write PHY register values back to h/w defaults */
|
/* Write PHY register values back to h/w defaults */
|
||||||
e1e_rphy(hw, PHY_REG(769, 20), &data);
|
|
||||||
ret_val = e1e_wphy(hw, PHY_REG(769, 20), data & ~(1 << 14));
|
|
||||||
if (ret_val)
|
|
||||||
goto out;
|
|
||||||
e1e_rphy(hw, PHY_REG(769, 23), &data);
|
e1e_rphy(hw, PHY_REG(769, 23), &data);
|
||||||
data &= ~(0x7F << 5);
|
data &= ~(0x7F << 5);
|
||||||
ret_val = e1e_wphy(hw, PHY_REG(769, 23), data);
|
ret_val = e1e_wphy(hw, PHY_REG(769, 23), data);
|
||||||
if (ret_val)
|
if (ret_val)
|
||||||
goto out;
|
goto out;
|
||||||
e1e_rphy(hw, PHY_REG(769, 16), &data);
|
e1e_rphy(hw, PHY_REG(769, 16), &data);
|
||||||
data &= ~(1 << 12);
|
|
||||||
data |= (1 << 13);
|
data |= (1 << 13);
|
||||||
ret_val = e1e_wphy(hw, PHY_REG(769, 16), data);
|
ret_val = e1e_wphy(hw, PHY_REG(769, 16), data);
|
||||||
if (ret_val)
|
if (ret_val)
|
||||||
@@ -1558,6 +1596,69 @@ out:
|
|||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e1000_k1_gig_workaround_lv - K1 Si workaround
|
||||||
|
* @hw: pointer to the HW structure
|
||||||
|
*
|
||||||
|
* Workaround to set the K1 beacon duration for 82579 parts
|
||||||
|
**/
|
||||||
|
static s32 e1000_k1_workaround_lv(struct e1000_hw *hw)
|
||||||
|
{
|
||||||
|
s32 ret_val = 0;
|
||||||
|
u16 status_reg = 0;
|
||||||
|
u32 mac_reg;
|
||||||
|
|
||||||
|
if (hw->mac.type != e1000_pch2lan)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
/* Set K1 beacon duration based on 1Gbps speed or otherwise */
|
||||||
|
ret_val = e1e_rphy(hw, HV_M_STATUS, &status_reg);
|
||||||
|
if (ret_val)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
if ((status_reg & (HV_M_STATUS_LINK_UP | HV_M_STATUS_AUTONEG_COMPLETE))
|
||||||
|
== (HV_M_STATUS_LINK_UP | HV_M_STATUS_AUTONEG_COMPLETE)) {
|
||||||
|
mac_reg = er32(FEXTNVM4);
|
||||||
|
mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
|
||||||
|
|
||||||
|
if (status_reg & HV_M_STATUS_SPEED_1000)
|
||||||
|
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
|
||||||
|
else
|
||||||
|
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_16USEC;
|
||||||
|
|
||||||
|
ew32(FEXTNVM4, mac_reg);
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
return ret_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e1000_gate_hw_phy_config_ich8lan - disable PHY config via hardware
|
||||||
|
* @hw: pointer to the HW structure
|
||||||
|
* @gate: boolean set to true to gate, false to ungate
|
||||||
|
*
|
||||||
|
* Gate/ungate the automatic PHY configuration via hardware; perform
|
||||||
|
* the configuration via software instead.
|
||||||
|
**/
|
||||||
|
static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate)
|
||||||
|
{
|
||||||
|
u32 extcnf_ctrl;
|
||||||
|
|
||||||
|
if (hw->mac.type != e1000_pch2lan)
|
||||||
|
return;
|
||||||
|
|
||||||
|
extcnf_ctrl = er32(EXTCNF_CTRL);
|
||||||
|
|
||||||
|
if (gate)
|
||||||
|
extcnf_ctrl |= E1000_EXTCNF_CTRL_GATE_PHY_CFG;
|
||||||
|
else
|
||||||
|
extcnf_ctrl &= ~E1000_EXTCNF_CTRL_GATE_PHY_CFG;
|
||||||
|
|
||||||
|
ew32(EXTCNF_CTRL, extcnf_ctrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* e1000_lan_init_done_ich8lan - Check for PHY config completion
|
* e1000_lan_init_done_ich8lan - Check for PHY config completion
|
||||||
* @hw: pointer to the HW structure
|
* @hw: pointer to the HW structure
|
||||||
@@ -1602,6 +1703,9 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)
|
|||||||
if (e1000_check_reset_block(hw))
|
if (e1000_check_reset_block(hw))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/* Allow time for h/w to get to quiescent state after reset */
|
||||||
|
msleep(10);
|
||||||
|
|
||||||
/* Perform any necessary post-reset workarounds */
|
/* Perform any necessary post-reset workarounds */
|
||||||
switch (hw->mac.type) {
|
switch (hw->mac.type) {
|
||||||
case e1000_pchlan:
|
case e1000_pchlan:
|
||||||
@@ -1630,6 +1734,13 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)
|
|||||||
/* Configure the LCD with the OEM bits in NVM */
|
/* Configure the LCD with the OEM bits in NVM */
|
||||||
ret_val = e1000_oem_bits_config_ich8lan(hw, true);
|
ret_val = e1000_oem_bits_config_ich8lan(hw, true);
|
||||||
|
|
||||||
|
/* Ungate automatic PHY configuration on non-managed 82579 */
|
||||||
|
if ((hw->mac.type == e1000_pch2lan) &&
|
||||||
|
!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {
|
||||||
|
msleep(10);
|
||||||
|
e1000_gate_hw_phy_config_ich8lan(hw, false);
|
||||||
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
@@ -1646,6 +1757,11 @@ static s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw)
|
|||||||
{
|
{
|
||||||
s32 ret_val = 0;
|
s32 ret_val = 0;
|
||||||
|
|
||||||
|
/* Gate automatic PHY configuration by hardware on non-managed 82579 */
|
||||||
|
if ((hw->mac.type == e1000_pch2lan) &&
|
||||||
|
!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID))
|
||||||
|
e1000_gate_hw_phy_config_ich8lan(hw, true);
|
||||||
|
|
||||||
ret_val = e1000e_phy_hw_reset_generic(hw);
|
ret_val = e1000e_phy_hw_reset_generic(hw);
|
||||||
if (ret_val)
|
if (ret_val)
|
||||||
goto out;
|
goto out;
|
||||||
@@ -2910,6 +3026,14 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
|
|||||||
* external PHY is reset.
|
* external PHY is reset.
|
||||||
*/
|
*/
|
||||||
ctrl |= E1000_CTRL_PHY_RST;
|
ctrl |= E1000_CTRL_PHY_RST;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gate automatic PHY configuration by hardware on
|
||||||
|
* non-managed 82579
|
||||||
|
*/
|
||||||
|
if ((hw->mac.type == e1000_pch2lan) &&
|
||||||
|
!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID))
|
||||||
|
e1000_gate_hw_phy_config_ich8lan(hw, true);
|
||||||
}
|
}
|
||||||
ret_val = e1000_acquire_swflag_ich8lan(hw);
|
ret_val = e1000_acquire_swflag_ich8lan(hw);
|
||||||
e_dbg("Issuing a global reset to ich8lan\n");
|
e_dbg("Issuing a global reset to ich8lan\n");
|
||||||
@@ -3460,13 +3584,20 @@ void e1000e_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
|
|||||||
void e1000e_disable_gig_wol_ich8lan(struct e1000_hw *hw)
|
void e1000e_disable_gig_wol_ich8lan(struct e1000_hw *hw)
|
||||||
{
|
{
|
||||||
u32 phy_ctrl;
|
u32 phy_ctrl;
|
||||||
|
s32 ret_val;
|
||||||
|
|
||||||
phy_ctrl = er32(PHY_CTRL);
|
phy_ctrl = er32(PHY_CTRL);
|
||||||
phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU | E1000_PHY_CTRL_GBE_DISABLE;
|
phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU | E1000_PHY_CTRL_GBE_DISABLE;
|
||||||
ew32(PHY_CTRL, phy_ctrl);
|
ew32(PHY_CTRL, phy_ctrl);
|
||||||
|
|
||||||
if (hw->mac.type >= e1000_pchlan)
|
if (hw->mac.type >= e1000_pchlan) {
|
||||||
e1000_phy_hw_reset_ich8lan(hw);
|
e1000_oem_bits_config_ich8lan(hw, true);
|
||||||
|
ret_val = hw->phy.ops.acquire(hw);
|
||||||
|
if (ret_val)
|
||||||
|
return;
|
||||||
|
e1000_write_smbus_addr(hw);
|
||||||
|
hw->phy.ops.release(hw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+19
-10
@@ -2705,6 +2705,16 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
|
|||||||
u32 psrctl = 0;
|
u32 psrctl = 0;
|
||||||
u32 pages = 0;
|
u32 pages = 0;
|
||||||
|
|
||||||
|
/* Workaround Si errata on 82579 - configure jumbo frame flow */
|
||||||
|
if (hw->mac.type == e1000_pch2lan) {
|
||||||
|
s32 ret_val;
|
||||||
|
|
||||||
|
if (adapter->netdev->mtu > ETH_DATA_LEN)
|
||||||
|
ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true);
|
||||||
|
else
|
||||||
|
ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false);
|
||||||
|
}
|
||||||
|
|
||||||
/* Program MC offset vector base */
|
/* Program MC offset vector base */
|
||||||
rctl = er32(RCTL);
|
rctl = er32(RCTL);
|
||||||
rctl &= ~(3 << E1000_RCTL_MO_SHIFT);
|
rctl &= ~(3 << E1000_RCTL_MO_SHIFT);
|
||||||
@@ -2745,16 +2755,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
|
|||||||
e1e_wphy(hw, 22, phy_data);
|
e1e_wphy(hw, 22, phy_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Workaround Si errata on 82579 - configure jumbo frame flow */
|
|
||||||
if (hw->mac.type == e1000_pch2lan) {
|
|
||||||
s32 ret_val;
|
|
||||||
|
|
||||||
if (rctl & E1000_RCTL_LPE)
|
|
||||||
ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true);
|
|
||||||
else
|
|
||||||
ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Setup buffer sizes */
|
/* Setup buffer sizes */
|
||||||
rctl &= ~E1000_RCTL_SZ_4096;
|
rctl &= ~E1000_RCTL_SZ_4096;
|
||||||
rctl |= E1000_RCTL_BSEX;
|
rctl |= E1000_RCTL_BSEX;
|
||||||
@@ -4813,6 +4813,15 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Jumbo frame workaround on 82579 requires CRC be stripped */
|
||||||
|
if ((adapter->hw.mac.type == e1000_pch2lan) &&
|
||||||
|
!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
|
||||||
|
(new_mtu > ETH_DATA_LEN)) {
|
||||||
|
e_err("Jumbo Frames not supported on 82579 when CRC "
|
||||||
|
"stripping is disabled.\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* 82573 Errata 17 */
|
/* 82573 Errata 17 */
|
||||||
if (((adapter->hw.mac.type == e1000_82573) ||
|
if (((adapter->hw.mac.type == e1000_82573) ||
|
||||||
(adapter->hw.mac.type == e1000_82574)) &&
|
(adapter->hw.mac.type == e1000_82574)) &&
|
||||||
|
|||||||
@@ -555,6 +555,8 @@ static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp)
|
|||||||
equalizer_t *eql;
|
equalizer_t *eql;
|
||||||
master_config_t mc;
|
master_config_t mc;
|
||||||
|
|
||||||
|
memset(&mc, 0, sizeof(master_config_t));
|
||||||
|
|
||||||
if (eql_is_master(dev)) {
|
if (eql_is_master(dev)) {
|
||||||
eql = netdev_priv(dev);
|
eql = netdev_priv(dev);
|
||||||
mc.max_slaves = eql->max_slaves;
|
mc.max_slaves = eql->max_slaves;
|
||||||
|
|||||||
@@ -2928,7 +2928,7 @@ static int __devinit emac_probe(struct platform_device *ofdev,
|
|||||||
if (dev->emac_irq != NO_IRQ)
|
if (dev->emac_irq != NO_IRQ)
|
||||||
irq_dispose_mapping(dev->emac_irq);
|
irq_dispose_mapping(dev->emac_irq);
|
||||||
err_free:
|
err_free:
|
||||||
kfree(ndev);
|
free_netdev(ndev);
|
||||||
err_gone:
|
err_gone:
|
||||||
/* if we were on the bootlist, remove us as we won't show up and
|
/* if we were on the bootlist, remove us as we won't show up and
|
||||||
* wake up all waiters to notify them in case they were waiting
|
* wake up all waiters to notify them in case they were waiting
|
||||||
@@ -2971,7 +2971,7 @@ static int __devexit emac_remove(struct platform_device *ofdev)
|
|||||||
if (dev->emac_irq != NO_IRQ)
|
if (dev->emac_irq != NO_IRQ)
|
||||||
irq_dispose_mapping(dev->emac_irq);
|
irq_dispose_mapping(dev->emac_irq);
|
||||||
|
|
||||||
kfree(dev->ndev);
|
free_netdev(dev->ndev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1540,7 +1540,6 @@ netxen_process_rcv(struct netxen_adapter *adapter,
|
|||||||
if (pkt_offset)
|
if (pkt_offset)
|
||||||
skb_pull(skb, pkt_offset);
|
skb_pull(skb, pkt_offset);
|
||||||
|
|
||||||
skb->truesize = skb->len + sizeof(struct sk_buff);
|
|
||||||
skb->protocol = eth_type_trans(skb, netdev);
|
skb->protocol = eth_type_trans(skb, netdev);
|
||||||
|
|
||||||
napi_gro_receive(&sds_ring->napi, skb);
|
napi_gro_receive(&sds_ring->napi, skb);
|
||||||
@@ -1602,8 +1601,6 @@ netxen_process_lro(struct netxen_adapter *adapter,
|
|||||||
|
|
||||||
skb_put(skb, lro_length + data_offset);
|
skb_put(skb, lro_length + data_offset);
|
||||||
|
|
||||||
skb->truesize = skb->len + sizeof(struct sk_buff) + skb_headroom(skb);
|
|
||||||
|
|
||||||
skb_pull(skb, l2_hdr_offset);
|
skb_pull(skb, l2_hdr_offset);
|
||||||
skb->protocol = eth_type_trans(skb, netdev);
|
skb->protocol = eth_type_trans(skb, netdev);
|
||||||
|
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ static int mdio_bus_suspend(struct device *dev)
|
|||||||
* may call phy routines that try to grab the same lock, and that may
|
* may call phy routines that try to grab the same lock, and that may
|
||||||
* lead to a deadlock.
|
* lead to a deadlock.
|
||||||
*/
|
*/
|
||||||
if (phydev->attached_dev)
|
if (phydev->attached_dev && phydev->adjust_link)
|
||||||
phy_stop_machine(phydev);
|
phy_stop_machine(phydev);
|
||||||
|
|
||||||
if (!mdio_bus_phy_may_suspend(phydev))
|
if (!mdio_bus_phy_may_suspend(phydev))
|
||||||
@@ -331,7 +331,7 @@ static int mdio_bus_resume(struct device *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
no_resume:
|
no_resume:
|
||||||
if (phydev->attached_dev)
|
if (phydev->attached_dev && phydev->adjust_link)
|
||||||
phy_start_machine(phydev, NULL);
|
phy_start_machine(phydev, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1314,8 +1314,13 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
|
|||||||
hdrlen = (ppp->flags & SC_MP_XSHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
|
hdrlen = (ppp->flags & SC_MP_XSHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
|
||||||
i = 0;
|
i = 0;
|
||||||
list_for_each_entry(pch, &ppp->channels, clist) {
|
list_for_each_entry(pch, &ppp->channels, clist) {
|
||||||
navail += pch->avail = (pch->chan != NULL);
|
if (pch->chan) {
|
||||||
|
pch->avail = 1;
|
||||||
|
navail++;
|
||||||
pch->speed = pch->chan->speed;
|
pch->speed = pch->chan->speed;
|
||||||
|
} else {
|
||||||
|
pch->avail = 0;
|
||||||
|
}
|
||||||
if (pch->avail) {
|
if (pch->avail) {
|
||||||
if (skb_queue_empty(&pch->file.xq) ||
|
if (skb_queue_empty(&pch->file.xq) ||
|
||||||
!pch->had_frag) {
|
!pch->had_frag) {
|
||||||
|
|||||||
@@ -1303,7 +1303,7 @@ qlcnic_alloc_rx_skb(struct qlcnic_adapter *adapter,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_reserve(skb, 2);
|
skb_reserve(skb, NET_IP_ALIGN);
|
||||||
|
|
||||||
dma = pci_map_single(pdev, skb->data,
|
dma = pci_map_single(pdev, skb->data,
|
||||||
rds_ring->dma_size, PCI_DMA_FROMDEVICE);
|
rds_ring->dma_size, PCI_DMA_FROMDEVICE);
|
||||||
|
|||||||
+2
-3
@@ -2939,7 +2939,7 @@ static const struct rtl_cfg_info {
|
|||||||
.hw_start = rtl_hw_start_8168,
|
.hw_start = rtl_hw_start_8168,
|
||||||
.region = 2,
|
.region = 2,
|
||||||
.align = 8,
|
.align = 8,
|
||||||
.intr_event = SYSErr | LinkChg | RxOverflow |
|
.intr_event = SYSErr | RxFIFOOver | LinkChg | RxOverflow |
|
||||||
TxErr | TxOK | RxOK | RxErr,
|
TxErr | TxOK | RxOK | RxErr,
|
||||||
.napi_event = TxErr | TxOK | RxOK | RxOverflow,
|
.napi_event = TxErr | TxOK | RxOK | RxOverflow,
|
||||||
.features = RTL_FEATURE_GMII | RTL_FEATURE_MSI,
|
.features = RTL_FEATURE_GMII | RTL_FEATURE_MSI,
|
||||||
@@ -4629,8 +4629,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Work around for rx fifo overflow */
|
/* Work around for rx fifo overflow */
|
||||||
if (unlikely(status & RxFIFOOver) &&
|
if (unlikely(status & RxFIFOOver)) {
|
||||||
(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
|
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
rtl8169_tx_timeout(dev);
|
rtl8169_tx_timeout(dev);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ static void rionet_remove(struct rio_dev *rdev)
|
|||||||
free_pages((unsigned long)rionet_active, rdev->net->hport->sys_size ?
|
free_pages((unsigned long)rionet_active, rdev->net->hport->sys_size ?
|
||||||
__ilog2(sizeof(void *)) + 4 : 0);
|
__ilog2(sizeof(void *)) + 4 : 0);
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
kfree(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
list_for_each_entry_safe(peer, tmp, &rionet_peers, node) {
|
list_for_each_entry_safe(peer, tmp, &rionet_peers, node) {
|
||||||
list_del(&peer->node);
|
list_del(&peer->node);
|
||||||
|
|||||||
@@ -804,7 +804,7 @@ static int __devinit sgiseeq_probe(struct platform_device *pdev)
|
|||||||
err_out_free_page:
|
err_out_free_page:
|
||||||
free_page((unsigned long) sp->srings);
|
free_page((unsigned long) sp->srings);
|
||||||
err_out_free_dev:
|
err_out_free_dev:
|
||||||
kfree(dev);
|
free_netdev(dev);
|
||||||
|
|
||||||
err_out:
|
err_out:
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_VERSION(SMSC_DRV_VERSION);
|
MODULE_VERSION(SMSC_DRV_VERSION);
|
||||||
|
MODULE_ALIAS("platform:smsc911x");
|
||||||
|
|
||||||
#if USE_DEBUG > 0
|
#if USE_DEBUG > 0
|
||||||
static int debug = 16;
|
static int debug = 16;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user