ecmd->port = PORT_FIBRE;
ecmd->transceiver = XCVR_EXTERNAL;
- }
+ }
if (hw->mac.autoneg != 1)
ecmd->advertising &= ~(ADVERTISED_Pause |
}
} else {
/* enable MII loopback */
- if (hw->phy.type == e1000_phy_82580)
+ if (hw->phy.type == e1000_phy_82580)
e1000_write_phy_reg(hw, I82577_PHY_LBK_CTRL, 0x8041);
}
*/
if (hw->phy.type == e1000_phy_m88)
igb_phy_disable_receiver(adapter);
-
+
mdelay(500);
return 0;
}
E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTL, reg);
reg = E1000_READ_REG(hw, E1000_MPHY_DATA);
- reg |= E1000_MPHY_PCS_CLK_REG_DIGINELBEN;
+ reg |= E1000_MPHY_PCS_CLK_REG_DIGINELBEN;
E1000_WRITE_REG(hw, E1000_MPHY_DATA, reg);
}
u16 phy_reg;
if ((hw->device_id == E1000_DEV_ID_DH89XXCC_SGMII) ||
- (hw->device_id == E1000_DEV_ID_DH89XXCC_SERDES) ||
+ (hw->device_id == E1000_DEV_ID_DH89XXCC_SERDES) ||
(hw->device_id == E1000_DEV_ID_DH89XXCC_BACKPLANE) ||
(hw->device_id == E1000_DEV_ID_DH89XXCC_SFP)) {
u32 reg;
reg = E1000_READ_REG(hw, E1000_MPHY_ADDR_CTL);
reg = (reg & E1000_MPHY_ADDR_CTL_OFFSET_MASK ) |
E1000_MPHY_PCS_CLK_REG_OFFSET;
- E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTL, reg);
+ E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTL, reg);
reg = E1000_READ_REG(hw, E1000_MPHY_DATA);
- reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN;
- E1000_WRITE_REG(hw, E1000_MPHY_DATA, reg);
+ reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN;
+ E1000_WRITE_REG(hw, E1000_MPHY_DATA, reg);
}
-
+
rctl = E1000_READ_REG(hw, E1000_RCTL);
rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC);
E1000_WRITE_REG(hw, E1000_RCTL, rctl);
/* power up link for link test */
igb_power_up_link(adapter);
-
+
/* Link test performed before hardware reset so autoneg doesn't
* interfere with test result */
if (igb_link_test(adapter, &data[4]))
if (ec->rx_coalesce_usecs == 0) {
adapter->dmac = IGB_DMAC_DISABLE;
}
-
+
/* convert to rate of irq's per second */
if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3)
adapter->rx_itr_setting = ec->rx_coalesce_usecs;
{
struct igb_adapter *adapter = netdev_priv(netdev);
edata->data = adapter->dmac;
-
+
return;
}
#endif
}
#endif /* HAVE_RHEL6_ETHTOOL_OPS_EXT_STRUCT */
#endif /* SIOCETHTOOL */
-
-
status = hw->mac.ops.init_thermal_sensor_thresh(hw);
if (status != E1000_SUCCESS)
return false;
-
+
return true;
}
-static int igb_macburn(char *page, char **start, off_t off, int count,
+static int igb_macburn(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
struct e1000_hw *hw;
(unsigned int)hw->mac.perm_addr[5]);
}
-static int igb_macadmn(char *page, char **start, off_t off,
+static int igb_macadmn(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
struct e1000_hw *hw;
test_bit(__IGB_DOWN, &adapter->state));
}
-static int igb_therm_location(char *page, char **start, off_t off,
+static int igb_therm_location(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
struct igb_therm_proc_data *therm_data =
return snprintf(page, count, "%d\n", therm_data->sensor_data->location);
}
-static int igb_therm_maxopthresh(char *page, char **start, off_t off,
+static int igb_therm_maxopthresh(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
struct igb_therm_proc_data *therm_data =
therm_data->sensor_data->max_op_thresh);
}
-static int igb_therm_cautionthresh(char *page, char **start, off_t off,
+static int igb_therm_cautionthresh(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
struct igb_therm_proc_data *therm_data =
therm_data->sensor_data->caution_thresh);
}
-static int igb_therm_temp(char *page, char **start, off_t off,
+static int igb_therm_temp(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
s32 status;
return snprintf(page, count, "error: no therm_data\n");
status = e1000_get_thermal_sensor_data(therm_data->hw);
- if (status != E1000_SUCCESS)
+ if (status != E1000_SUCCESS)
snprintf(page, count, "error: status %d returned\n", status);
return snprintf(page, count, "%d\n", therm_data->sensor_data->temp);
{"location", &igb_therm_location},
{"temp", &igb_therm_temp},
{"cautionthresh", &igb_therm_cautionthresh},
- {"maxopthresh", &igb_therm_maxopthresh},
+ {"maxopthresh", &igb_therm_maxopthresh},
{"", NULL}
};
if (igb_proc_entries[index].read == NULL)
break;
remove_proc_entry(igb_proc_entries[index].name,
- adapter->info_dir);
+ adapter->info_dir);
}
remove_proc_entry("info", adapter->eth_dir);
}
}
/* called from igb_main.c */
-void igb_procfs_exit(struct igb_adapter *adapter)
+void igb_procfs_exit(struct igb_adapter *adapter)
{
igb_del_proc_entries(adapter);
}
-int igb_procfs_topdir_init(void)
+int igb_procfs_topdir_init(void)
{
igb_top_dir = proc_mkdir("driver/igb", NULL);
if (igb_top_dir == NULL)
return 0;
}
-void igb_procfs_topdir_exit(void)
+void igb_procfs_topdir_exit(void)
{
remove_proc_entry("driver/igb", NULL);
}
/* called from igb_main.c */
-int igb_procfs_init(struct igb_adapter *adapter)
+int igb_procfs_init(struct igb_adapter *adapter)
{
int rc = 0;
int i;
if (igb_proc_entries[index].read == NULL) {
break;
}
- if (!(create_proc_read_entry(igb_proc_entries[index].name,
- 0444,
- adapter->info_dir,
- igb_proc_entries[index].read,
+ if (!(create_proc_read_entry(igb_proc_entries[index].name,
+ 0444,
+ adapter->info_dir,
+ igb_proc_entries[index].read,
adapter))) {
rc = -ENOMEM;
* will be needing
*/
adapter->therm_data[i].hw = &adapter->hw;
- adapter->therm_data[i].sensor_data =
+ adapter->therm_data[i].sensor_data =
&adapter->hw.mac.thermal_sensor_data.sensor[i];
if (!(create_proc_read_entry(
- igb_internal_entries[index].name,
- 0444,
- adapter->therm_dir[i],
- igb_internal_entries[index].read,
+ igb_internal_entries[index].name,
+ 0444,
+ adapter->therm_dir[i],
+ igb_internal_entries[index].read,
&adapter->therm_data[i]))) {
rc = -ENOMEM;
goto fail;
return (struct device *) pdev;
}
-#define pdev_printk(lvl, pdev, fmt, args...) \
+#define pdev_printk(lvl, pdev, fmt, args...) \
printk("%s %s: " fmt, lvl, pci_name(pdev), ## args)
#define dev_err(dev, fmt, args...) \
pdev_printk(KERN_ERR, to_pci_dev(dev), fmt, ## args)
pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
#undef hlist_for_each_entry_safe
-#define hlist_for_each_entry_safe(pos, n, head, member) \
+#define hlist_for_each_entry_safe(pos, n, head, member) \
for (pos = hlist_entry_safe((head)->first, typeof(*pos), member); \
pos && ({ n = pos->member.next; 1; }); \
pos = hlist_entry_safe(n, typeof(*pos), member))