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

Commit 23193668 authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to igb only.

Carolyn provides a number of cleanups to fix checkpatch warnings/errors
and two minor issues found by coccicheck.

v2: update patch indentation for patch 07 of the series based on feedback
    from David Miller.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 851bdd11 a1f63473
Loading
Loading
Loading
Loading
+33 −36
Original line number Original line Diff line number Diff line
/*******************************************************************************
/* Intel(R) Gigabit Ethernet Linux driver

 * Copyright(c) 2007-2014 Intel Corporation.
  Intel(R) Gigabit Ethernet Linux driver
 *
  Copyright(c) 2007-2014 Intel Corporation.
 * This program is free software; you can redistribute it and/or modify it

 * under the terms and conditions of the GNU General Public License,
  This program is free software; you can redistribute it and/or modify it
 * version 2, as published by the Free Software Foundation.
  under the terms and conditions of the GNU General Public License,
 *
  version 2, as published by the Free Software Foundation.
 * This program is distributed in the hope it will be useful, but WITHOUT

 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  This program is distributed in the hope it will be useful, but WITHOUT
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * more details.
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 *
  more details.
 * You should have received a copy of the GNU General Public License along with

 * this program; if not, see <http://www.gnu.org/licenses/>.
  You should have received a copy of the GNU General Public License along with
 *
  this program; if not, see <http://www.gnu.org/licenses/>.
 * The full GNU General Public License is included in this distribution in

 * the file called "COPYING".
  The full GNU General Public License is included in this distribution in
 *
  the file called "COPYING".
 * Contact Information:

 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  Contact Information:
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
 */
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

*******************************************************************************/


/* e1000_82575
/* e1000_82575
 * e1000_82576
 * e1000_82576
@@ -1179,8 +1176,8 @@ static void igb_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
{
{
	u32 swfw_sync;
	u32 swfw_sync;


	while (igb_get_hw_semaphore(hw) != 0);
	while (igb_get_hw_semaphore(hw) != 0)
	/* Empty */
		; /* Empty */


	swfw_sync = rd32(E1000_SW_FW_SYNC);
	swfw_sync = rd32(E1000_SW_FW_SYNC);
	swfw_sync &= ~mask;
	swfw_sync &= ~mask;
@@ -1215,7 +1212,7 @@ static s32 igb_get_cfg_done_82575(struct e1000_hw *hw)
	while (timeout) {
	while (timeout) {
		if (rd32(E1000_EEMNGCTL) & mask)
		if (rd32(E1000_EEMNGCTL) & mask)
			break;
			break;
		msleep(1);
		usleep_range(1000, 2000);
		timeout--;
		timeout--;
	}
	}
	if (!timeout)
	if (!timeout)
@@ -1315,7 +1312,7 @@ void igb_power_up_serdes_link_82575(struct e1000_hw *hw)


	/* flush the write to verify completion */
	/* flush the write to verify completion */
	wrfl();
	wrfl();
	msleep(1);
	usleep_range(1000, 2000);
}
}


/**
/**
@@ -1410,7 +1407,7 @@ void igb_shutdown_serdes_link_82575(struct e1000_hw *hw)


		/* flush the write to verify completion */
		/* flush the write to verify completion */
		wrfl();
		wrfl();
		msleep(1);
		usleep_range(1000, 2000);
	}
	}
}
}


@@ -1445,7 +1442,7 @@ static s32 igb_reset_hw_82575(struct e1000_hw *hw)
	wr32(E1000_TCTL, E1000_TCTL_PSP);
	wr32(E1000_TCTL, E1000_TCTL_PSP);
	wrfl();
	wrfl();


	msleep(10);
	usleep_range(10000, 20000);


	ctrl = rd32(E1000_CTRL);
	ctrl = rd32(E1000_CTRL);


@@ -1923,7 +1920,7 @@ void igb_rx_fifo_flush_82575(struct e1000_hw *hw)
	}
	}
	/* Poll all queues to verify they have shut down */
	/* Poll all queues to verify they have shut down */
	for (ms_wait = 0; ms_wait < 10; ms_wait++) {
	for (ms_wait = 0; ms_wait < 10; ms_wait++) {
		msleep(1);
		usleep_range(1000, 2000);
		rx_enabled = 0;
		rx_enabled = 0;
		for (i = 0; i < 4; i++)
		for (i = 0; i < 4; i++)
			rx_enabled |= rd32(E1000_RXDCTL(i));
			rx_enabled |= rd32(E1000_RXDCTL(i));
@@ -1951,7 +1948,7 @@ void igb_rx_fifo_flush_82575(struct e1000_hw *hw)
	wr32(E1000_RCTL, temp_rctl);
	wr32(E1000_RCTL, temp_rctl);
	wr32(E1000_RCTL, temp_rctl | E1000_RCTL_EN);
	wr32(E1000_RCTL, temp_rctl | E1000_RCTL_EN);
	wrfl();
	wrfl();
	msleep(2);
	usleep_range(2000, 3000);


	/* Enable RX queues that were previously enabled and restore our
	/* Enable RX queues that were previously enabled and restore our
	 * previous state
	 * previous state
@@ -2239,7 +2236,7 @@ static s32 igb_reset_hw_82580(struct e1000_hw *hw)
	wr32(E1000_TCTL, E1000_TCTL_PSP);
	wr32(E1000_TCTL, E1000_TCTL_PSP);
	wrfl();
	wrfl();


	msleep(10);
	usleep_range(10000, 11000);


	/* Determine whether or not a global dev reset is requested */
	/* Determine whether or not a global dev reset is requested */
	if (global_device_reset &&
	if (global_device_reset &&
@@ -2257,7 +2254,7 @@ static s32 igb_reset_hw_82580(struct e1000_hw *hw)


	/* Add delay to insure DEV_RST has time to complete */
	/* Add delay to insure DEV_RST has time to complete */
	if (global_device_reset)
	if (global_device_reset)
		msleep(5);
		usleep_range(5000, 6000);


	ret_val = igb_get_auto_rd_done(hw);
	ret_val = igb_get_auto_rd_done(hw);
	if (ret_val) {
	if (ret_val) {
+23 −27
Original line number Original line Diff line number Diff line
/*******************************************************************************
/* Intel(R) Gigabit Ethernet Linux driver

 * Copyright(c) 2007-2014 Intel Corporation.
  Intel(R) Gigabit Ethernet Linux driver
 *
  Copyright(c) 2007-2014 Intel Corporation.
 * This program is free software; you can redistribute it and/or modify it

 * under the terms and conditions of the GNU General Public License,
  This program is free software; you can redistribute it and/or modify it
 * version 2, as published by the Free Software Foundation.
  under the terms and conditions of the GNU General Public License,
 *
  version 2, as published by the Free Software Foundation.
 * This program is distributed in the hope it will be useful, but WITHOUT

 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  This program is distributed in the hope it will be useful, but WITHOUT
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * more details.
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 *
  more details.
 * You should have received a copy of the GNU General Public License along with

 * this program; if not, see <http://www.gnu.org/licenses/>.
  You should have received a copy of the GNU General Public License along with
 *
  this program; if not, see <http://www.gnu.org/licenses/>.
 * The full GNU General Public License is included in this distribution in

 * the file called "COPYING".
  The full GNU General Public License is included in this distribution in
 *
  the file called "COPYING".
 * Contact Information:

 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  Contact Information:
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
 */
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

*******************************************************************************/


#ifndef _E1000_82575_H_
#ifndef _E1000_82575_H_
#define _E1000_82575_H_
#define _E1000_82575_H_
@@ -92,8 +89,7 @@ union e1000_adv_rx_desc {
		struct {
		struct {
			struct {
			struct {
				__le16 pkt_info;   /* RSS type, Packet type */
				__le16 pkt_info;   /* RSS type, Packet type */
				__le16 hdr_info;   /* Split Header,
				__le16 hdr_info;   /* Split Head, buf len */
						    * header buffer length */
			} lo_dword;
			} lo_dword;
			union {
			union {
				__le32 rss;          /* RSS Hash */
				__le32 rss;          /* RSS Hash */
+30 −41
Original line number Original line Diff line number Diff line
/*******************************************************************************
/* Intel(R) Gigabit Ethernet Linux driver

 * Copyright(c) 2007-2014 Intel Corporation.
  Intel(R) Gigabit Ethernet Linux driver
 *
  Copyright(c) 2007-2014 Intel Corporation.
 * This program is free software; you can redistribute it and/or modify it

 * under the terms and conditions of the GNU General Public License,
  This program is free software; you can redistribute it and/or modify it
 * version 2, as published by the Free Software Foundation.
  under the terms and conditions of the GNU General Public License,
 *
  version 2, as published by the Free Software Foundation.
 * This program is distributed in the hope it will be useful, but WITHOUT

 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  This program is distributed in the hope it will be useful, but WITHOUT
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * more details.
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 *
  more details.
 * You should have received a copy of the GNU General Public License along with

 * this program; if not, see <http://www.gnu.org/licenses/>.
  You should have received a copy of the GNU General Public License along with
 *
  this program; if not, see <http://www.gnu.org/licenses/>.
 * The full GNU General Public License is included in this distribution in

 * the file called "COPYING".
  The full GNU General Public License is included in this distribution in
 *
  the file called "COPYING".
 * Contact Information:

 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  Contact Information:
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
 */
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

*******************************************************************************/


#ifndef _E1000_DEFINES_H_
#ifndef _E1000_DEFINES_H_
#define _E1000_DEFINES_H_
#define _E1000_DEFINES_H_
@@ -307,33 +304,25 @@
#define E1000_TCTL_RTLC   0x01000000    /* Re-transmit on late collision */
#define E1000_TCTL_RTLC   0x01000000    /* Re-transmit on late collision */


/* DMA Coalescing register fields */
/* DMA Coalescing register fields */
#define E1000_DMACR_DMACWT_MASK         0x00003FFF /* DMA Coalescing
#define E1000_DMACR_DMACWT_MASK         0x00003FFF /* DMA Coal Watchdog Timer */
							* Watchdog Timer */
#define E1000_DMACR_DMACTHR_MASK        0x00FF0000 /* DMA Coal Rx Threshold */
#define E1000_DMACR_DMACTHR_MASK        0x00FF0000 /* DMA Coalescing Receive
							* Threshold */
#define E1000_DMACR_DMACTHR_SHIFT       16
#define E1000_DMACR_DMACTHR_SHIFT       16
#define E1000_DMACR_DMAC_LX_MASK        0x30000000 /* Lx when no PCIe
#define E1000_DMACR_DMAC_LX_MASK        0x30000000 /* Lx when no PCIe trans */
							* transactions */
#define E1000_DMACR_DMAC_LX_SHIFT       28
#define E1000_DMACR_DMAC_LX_SHIFT       28
#define E1000_DMACR_DMAC_EN             0x80000000 /* Enable DMA Coalescing */
#define E1000_DMACR_DMAC_EN             0x80000000 /* Enable DMA Coalescing */
/* DMA Coalescing BMC-to-OS Watchdog Enable */
/* DMA Coalescing BMC-to-OS Watchdog Enable */
#define E1000_DMACR_DC_BMC2OSW_EN	0x00008000
#define E1000_DMACR_DC_BMC2OSW_EN	0x00008000


#define E1000_DMCTXTH_DMCTTHR_MASK      0x00000FFF /* DMA Coalescing Transmit
#define E1000_DMCTXTH_DMCTTHR_MASK      0x00000FFF /* DMA Coal Tx Threshold */
							* Threshold */


#define E1000_DMCTLX_TTLX_MASK          0x00000FFF /* Time to LX request */
#define E1000_DMCTLX_TTLX_MASK          0x00000FFF /* Time to LX request */


#define E1000_DMCRTRH_UTRESH_MASK       0x0007FFFF /* Receive Traffic Rate
#define E1000_DMCRTRH_UTRESH_MASK       0x0007FFFF /* Rx Traffic Rate Thresh */
							* Threshold */
#define E1000_DMCRTRH_LRPRCW            0x80000000 /* Rx pkt rate curr window */
#define E1000_DMCRTRH_LRPRCW            0x80000000 /* Rcv packet rate in
							* current window */


#define E1000_DMCCNT_CCOUNT_MASK        0x01FFFFFF /* DMA Coal Rcv Traffic
#define E1000_DMCCNT_CCOUNT_MASK        0x01FFFFFF /* DMA Coal Rx Current Cnt */
							* Current Cnt */


#define E1000_FCRTC_RTH_COAL_MASK       0x0003FFF0 /* Flow ctrl Rcv Threshold
#define E1000_FCRTC_RTH_COAL_MASK       0x0003FFF0 /* FC Rx Thresh High val */
							* High val */
#define E1000_FCRTC_RTH_COAL_SHIFT      4
#define E1000_FCRTC_RTH_COAL_SHIFT      4
#define E1000_PCIEMISC_LX_DECISION      0x00000080 /* Lx power decision */
#define E1000_PCIEMISC_LX_DECISION      0x00000080 /* Lx power decision */


+21 −25
Original line number Original line Diff line number Diff line
/*******************************************************************************
/* Intel(R) Gigabit Ethernet Linux driver

 * Copyright(c) 2007-2014 Intel Corporation.
  Intel(R) Gigabit Ethernet Linux driver
 *
  Copyright(c) 2007-2014 Intel Corporation.
 * This program is free software; you can redistribute it and/or modify it

 * under the terms and conditions of the GNU General Public License,
  This program is free software; you can redistribute it and/or modify it
 *
  under the terms and conditions of the GNU General Public License,
 * This program is distributed in the hope it will be useful, but WITHOUT
  version 2, as published by the Free Software Foundation.
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  This program is distributed in the hope it will be useful, but WITHOUT
 * more details.
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * You should have received a copy of the GNU General Public License along with
  more details.
 * this program; if not, see <http://www.gnu.org/licenses/>.

 *
  You should have received a copy of the GNU General Public License along with
 * The full GNU General Public License is included in this distribution in
  this program; if not, see <http://www.gnu.org/licenses/>.
 * the file called "COPYING".

 *
  The full GNU General Public License is included in this distribution in
 * Contact Information:
  the file called "COPYING".
 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>

 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  Contact Information:
 */
  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

*******************************************************************************/


#ifndef _E1000_HW_H_
#ifndef _E1000_HW_H_
#define _E1000_HW_H_
#define _E1000_HW_H_
+23 −25
Original line number Original line Diff line number Diff line
/*******************************************************************************
/* Intel(R) Gigabit Ethernet Linux driver

 * Copyright(c) 2007-2014 Intel Corporation.
  Intel(R) Gigabit Ethernet Linux driver
 *
  Copyright(c) 2007-2014 Intel Corporation.
 * This program is free software; you can redistribute it and/or modify it

 * under the terms and conditions of the GNU General Public License,
  This program is free software; you can redistribute it and/or modify it
 * version 2, as published by the Free Software Foundation.
  under the terms and conditions of the GNU General Public License,
 *
  version 2, as published by the Free Software Foundation.
 * This program is distributed in the hope it will be useful, but WITHOUT

 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  This program is distributed in the hope it will be useful, but WITHOUT
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * more details.
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 *
  more details.
 * You should have received a copy of the GNU General Public License along with

 * this program; if not, see <http://www.gnu.org/licenses/>.
  You should have received a copy of the GNU General Public License along with
 *
  this program; if not, see <http://www.gnu.org/licenses/>.
 * The full GNU General Public License is included in this distribution in

 * the file called "COPYING".
  The full GNU General Public License is included in this distribution in
 *
  the file called "COPYING".
 * Contact Information:

 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  Contact Information:
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
 */
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

******************************************************************************/


/* e1000_i210
/* e1000_i210
 * e1000_i211
 * e1000_i211
@@ -435,6 +432,7 @@ static s32 igb_read_invm_i210(struct e1000_hw *hw, u16 offset,
			*data = ID_LED_RESERVED_FFFF;
			*data = ID_LED_RESERVED_FFFF;
			ret_val = E1000_SUCCESS;
			ret_val = E1000_SUCCESS;
		}
		}
		break;
	case NVM_SUB_DEV_ID:
	case NVM_SUB_DEV_ID:
		*data = hw->subsystem_device_id;
		*data = hw->subsystem_device_id;
		break;
		break;
Loading