Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b67b3c0 authored by David S. Miller's avatar David S. Miller
Browse files
parents eea49cc9 c1a7e1eb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2810,6 +2810,10 @@ static int __devinit e100_probe(struct pci_dev *pdev,

	e100_get_defaults(nic);

	/* D100 MAC doesn't allow rx of vlan packets with normal MTU */
	if (nic->mac < mac_82558_D101_A4)
		netdev->features |= NETIF_F_VLAN_CHALLENGED;

	/* locks must be initialized before calling hw_reset */
	spin_lock_init(&nic->cb_lock);
	spin_lock_init(&nic->cmd_lock);
+1 −2
Original line number Diff line number Diff line
@@ -866,8 +866,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)

	if (test_and_set_bit(__E1000_ACCESS_SHARED_RESOURCE,
			     &hw->adapter->state)) {
		WARN(1, "e1000e: %s: contention for Phy access\n",
		     hw->adapter->netdev->name);
		e_dbg("contention for Phy access\n");
		return -E1000_ERR_PHY;
	}

+1 −1
Original line number Diff line number Diff line
@@ -1687,7 +1687,7 @@ s32 igb_get_cable_length_m88_gen2(struct e1000_hw *hw)
		if (ret_val)
			goto out;

		is_cm = !(phy_data & I347AT4_PCDC_CABLE_LENGTH_UNIT);
		is_cm = !(phy_data2 & I347AT4_PCDC_CABLE_LENGTH_UNIT);

		/* Populate the phy structure with cable length in meters */
		phy->min_cable_length = phy_data / (is_cm ? 100 : 1);
+11 −9
Original line number Diff line number Diff line
@@ -3344,7 +3344,7 @@ static u8 ixgbe_calculate_checksum(u8 *buffer, u32 length)
static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
					u32 length)
{
	u32 hicr, i;
	u32 hicr, i, bi;
	u32 hdr_size = sizeof(struct ixgbe_hic_hdr);
	u8 buf_len, dword_len;

@@ -3398,9 +3398,9 @@ static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
	dword_len = hdr_size >> 2;

	/* first pull in the header so we know the buffer length */
	for (i = 0; i < dword_len; i++) {
		buffer[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, i);
		le32_to_cpus(&buffer[i]);
	for (bi = 0; bi < dword_len; bi++) {
		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
		le32_to_cpus(&buffer[bi]);
	}

	/* If there is any thing in data position pull it in */
@@ -3414,12 +3414,14 @@ static s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
		goto out;
	}

	/* Calculate length in DWORDs, add one for odd lengths */
	dword_len = (buf_len + 1) >> 2;
	/* Calculate length in DWORDs, add 3 for odd lengths */
	dword_len = (buf_len + 3) >> 2;

	/* Pull in the rest of the buffer (i is where we left off)*/
	for (; i < buf_len; i++)
		buffer[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, i);
	/* Pull in the rest of the buffer (bi is where we left off)*/
	for (; bi <= dword_len; bi++) {
		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
		le32_to_cpus(&buffer[bi]);
	}

out:
	return ret_val;
+6 −4
Original line number Diff line number Diff line
@@ -561,11 +561,12 @@ static int ixgbe_dcbnl_ieee_getets(struct net_device *dev,
	struct ixgbe_adapter *adapter = netdev_priv(dev);
	struct ieee_ets *my_ets = adapter->ixgbe_ieee_ets;

	ets->ets_cap = adapter->dcb_cfg.num_tcs.pg_tcs;

	/* No IEEE PFC settings available */
	if (!my_ets)
		return -EINVAL;
		return 0;

	ets->ets_cap = adapter->dcb_cfg.num_tcs.pg_tcs;
	ets->cbs = my_ets->cbs;
	memcpy(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw));
	memcpy(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw));
@@ -621,11 +622,12 @@ static int ixgbe_dcbnl_ieee_getpfc(struct net_device *dev,
	struct ieee_pfc *my_pfc = adapter->ixgbe_ieee_pfc;
	int i;

	pfc->pfc_cap = adapter->dcb_cfg.num_tcs.pfc_tcs;

	/* No IEEE PFC settings available */
	if (!my_pfc)
		return -EINVAL;
		return 0;

	pfc->pfc_cap = adapter->dcb_cfg.num_tcs.pfc_tcs;
	pfc->pfc_en = my_pfc->pfc_en;
	pfc->mbc = my_pfc->mbc;
	pfc->delay = my_pfc->delay;
Loading