Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122574
b: refs/heads/master
c: 5e8427e
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Dec 10, 2008
1 parent c13fbbe commit a286783
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4557be23dc959f38eed21d359ec7164e42bcbd6
refs/heads/master: 5e8427e5e25e3f844113cf67d07e7806bbe8c0e2
18 changes: 6 additions & 12 deletions trunk/drivers/net/igb/e1000_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ s32 igb_get_bus_info_pcie(struct e1000_hw *hw)
{
struct e1000_bus_info *bus = &hw->bus;
s32 ret_val;
u32 status;
u16 pcie_link_status, pci_header_type;
u32 reg;
u16 pcie_link_status;

bus->type = e1000_bus_type_pci_express;
bus->speed = e1000_bus_speed_2500;
Expand All @@ -99,14 +99,8 @@ s32 igb_get_bus_info_pcie(struct e1000_hw *hw)
PCIE_LINK_WIDTH_MASK) >>
PCIE_LINK_WIDTH_SHIFT);

igb_read_pci_cfg(hw, PCI_HEADER_TYPE_REGISTER, &pci_header_type);
if (pci_header_type & PCI_HEADER_TYPE_MULTIFUNC) {
status = rd32(E1000_STATUS);
bus->func = (status & E1000_STATUS_FUNC_MASK)
>> E1000_STATUS_FUNC_SHIFT;
} else {
bus->func = 0;
}
reg = rd32(E1000_STATUS);
bus->func = (reg & E1000_STATUS_FUNC_MASK) >> E1000_STATUS_FUNC_SHIFT;

return 0;
}
Expand Down Expand Up @@ -229,8 +223,8 @@ void igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
if (!hw->mac.disable_av)
rar_high |= E1000_RAH_AV;

array_wr32(E1000_RA, (index << 1), rar_low);
array_wr32(E1000_RA, ((index << 1) + 1), rar_high);
wr32(E1000_RAL(index), rar_low);
wr32(E1000_RAH(index), rar_high);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/igb/e1000_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@
#define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */
#define E1000_RA 0x05400 /* Receive Address - RW Array */
#define E1000_RA2 0x054E0 /* 2nd half of receive address array - RW Array */
#define E1000_RAL(_i) (((_i) <= 15) ? (0x05400 + ((_i) * 8)) : \
(0x054E0 + ((_i - 16) * 8)))
#define E1000_RAH(_i) (((_i) <= 15) ? (0x05404 + ((_i) * 8)) : \
(0x054E4 + ((_i - 16) * 8)))
#define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */
#define E1000_VMD_CTL 0x0581C /* VMDq Control - RW */
#define E1000_WUC 0x05800 /* Wakeup Control - RW */
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,6 @@ static void igb_get_regs(struct net_device *netdev,

/* These should probably be added to e1000_regs.h instead */
#define E1000_PSRTYPE_REG(_i) (0x05480 + ((_i) * 4))
#define E1000_RAL(_i) (0x05400 + ((_i) * 8))
#define E1000_RAH(_i) (0x05404 + ((_i) * 8))
#define E1000_IP4AT_REG(_i) (0x05840 + ((_i) * 8))
#define E1000_IP6AT_REG(_i) (0x05880 + ((_i) * 4))
#define E1000_WUPM_REG(_i) (0x05A00 + ((_i) * 4))
Expand Down

0 comments on commit a286783

Please sign in to comment.