Skip to content

Commit 2319366

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
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: David S. Miller <[email protected]>
2 parents 851bdd1 + a1f6347 commit 2319366

19 files changed

+486
-541
lines changed

drivers/net/ethernet/intel/igb/e1000_82575.c

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
/*******************************************************************************
2-
3-
Intel(R) Gigabit Ethernet Linux driver
4-
Copyright(c) 2007-2014 Intel Corporation.
5-
6-
This program is free software; you can redistribute it and/or modify it
7-
under the terms and conditions of the GNU General Public License,
8-
version 2, as published by the Free Software Foundation.
9-
10-
This program is distributed in the hope it will be useful, but WITHOUT
11-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13-
more details.
14-
15-
You should have received a copy of the GNU General Public License along with
16-
this program; if not, see <http://www.gnu.org/licenses/>.
17-
18-
The full GNU General Public License is included in this distribution in
19-
the file called "COPYING".
20-
21-
Contact Information:
22-
e1000-devel Mailing List <[email protected]>
23-
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24-
25-
*******************************************************************************/
1+
/* Intel(R) Gigabit Ethernet Linux driver
2+
* Copyright(c) 2007-2014 Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms and conditions of the GNU General Public License,
6+
* version 2, as published by the Free Software Foundation.
7+
*
8+
* This program is distributed in the hope it will be useful, but WITHOUT
9+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11+
* more details.
12+
*
13+
* You should have received a copy of the GNU General Public License along with
14+
* this program; if not, see <http://www.gnu.org/licenses/>.
15+
*
16+
* The full GNU General Public License is included in this distribution in
17+
* the file called "COPYING".
18+
*
19+
* Contact Information:
20+
* e1000-devel Mailing List <[email protected]>
21+
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
22+
*/
2623

2724
/* e1000_82575
2825
* e1000_82576
@@ -525,7 +522,7 @@ static s32 igb_set_sfp_media_type_82575(struct e1000_hw *hw)
525522
static s32 igb_get_invariants_82575(struct e1000_hw *hw)
526523
{
527524
struct e1000_mac_info *mac = &hw->mac;
528-
struct e1000_dev_spec_82575 * dev_spec = &hw->dev_spec._82575;
525+
struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575;
529526
s32 ret_val;
530527
u32 ctrl_ext = 0;
531528
u32 link_mode = 0;
@@ -1179,8 +1176,8 @@ static void igb_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
11791176
{
11801177
u32 swfw_sync;
11811178

1182-
while (igb_get_hw_semaphore(hw) != 0);
1183-
/* Empty */
1179+
while (igb_get_hw_semaphore(hw) != 0)
1180+
; /* Empty */
11841181

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

13161313
/* flush the write to verify completion */
13171314
wrfl();
1318-
msleep(1);
1315+
usleep_range(1000, 2000);
13191316
}
13201317

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

14111408
/* flush the write to verify completion */
14121409
wrfl();
1413-
msleep(1);
1410+
usleep_range(1000, 2000);
14141411
}
14151412
}
14161413

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

1448-
msleep(10);
1445+
usleep_range(10000, 20000);
14491446

14501447
ctrl = rd32(E1000_CTRL);
14511448

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

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

2242-
msleep(10);
2239+
usleep_range(10000, 11000);
22432240

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

22582255
/* Add delay to insure DEV_RST has time to complete */
22592256
if (global_device_reset)
2260-
msleep(5);
2257+
usleep_range(5000, 6000);
22612258

22622259
ret_val = igb_get_auto_rd_done(hw);
22632260
if (ret_val) {

drivers/net/ethernet/intel/igb/e1000_82575.h

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
/*******************************************************************************
2-
3-
Intel(R) Gigabit Ethernet Linux driver
4-
Copyright(c) 2007-2014 Intel Corporation.
5-
6-
This program is free software; you can redistribute it and/or modify it
7-
under the terms and conditions of the GNU General Public License,
8-
version 2, as published by the Free Software Foundation.
9-
10-
This program is distributed in the hope it will be useful, but WITHOUT
11-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13-
more details.
14-
15-
You should have received a copy of the GNU General Public License along with
16-
this program; if not, see <http://www.gnu.org/licenses/>.
17-
18-
The full GNU General Public License is included in this distribution in
19-
the file called "COPYING".
20-
21-
Contact Information:
22-
e1000-devel Mailing List <[email protected]>
23-
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24-
25-
*******************************************************************************/
1+
/* Intel(R) Gigabit Ethernet Linux driver
2+
* Copyright(c) 2007-2014 Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms and conditions of the GNU General Public License,
6+
* version 2, as published by the Free Software Foundation.
7+
*
8+
* This program is distributed in the hope it will be useful, but WITHOUT
9+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11+
* more details.
12+
*
13+
* You should have received a copy of the GNU General Public License along with
14+
* this program; if not, see <http://www.gnu.org/licenses/>.
15+
*
16+
* The full GNU General Public License is included in this distribution in
17+
* the file called "COPYING".
18+
*
19+
* Contact Information:
20+
* e1000-devel Mailing List <[email protected]>
21+
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
22+
*/
2623

2724
#ifndef _E1000_82575_H_
2825
#define _E1000_82575_H_
@@ -92,8 +89,7 @@ union e1000_adv_rx_desc {
9289
struct {
9390
struct {
9491
__le16 pkt_info; /* RSS type, Packet type */
95-
__le16 hdr_info; /* Split Header,
96-
* header buffer length */
92+
__le16 hdr_info; /* Split Head, buf len */
9793
} lo_dword;
9894
union {
9995
__le32 rss; /* RSS Hash */

drivers/net/ethernet/intel/igb/e1000_defines.h

Lines changed: 30 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
/*******************************************************************************
2-
3-
Intel(R) Gigabit Ethernet Linux driver
4-
Copyright(c) 2007-2014 Intel Corporation.
5-
6-
This program is free software; you can redistribute it and/or modify it
7-
under the terms and conditions of the GNU General Public License,
8-
version 2, as published by the Free Software Foundation.
9-
10-
This program is distributed in the hope it will be useful, but WITHOUT
11-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13-
more details.
14-
15-
You should have received a copy of the GNU General Public License along with
16-
this program; if not, see <http://www.gnu.org/licenses/>.
17-
18-
The full GNU General Public License is included in this distribution in
19-
the file called "COPYING".
20-
21-
Contact Information:
22-
e1000-devel Mailing List <[email protected]>
23-
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24-
25-
*******************************************************************************/
1+
/* Intel(R) Gigabit Ethernet Linux driver
2+
* Copyright(c) 2007-2014 Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms and conditions of the GNU General Public License,
6+
* version 2, as published by the Free Software Foundation.
7+
*
8+
* This program is distributed in the hope it will be useful, but WITHOUT
9+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11+
* more details.
12+
*
13+
* You should have received a copy of the GNU General Public License along with
14+
* this program; if not, see <http://www.gnu.org/licenses/>.
15+
*
16+
* The full GNU General Public License is included in this distribution in
17+
* the file called "COPYING".
18+
*
19+
* Contact Information:
20+
* e1000-devel Mailing List <[email protected]>
21+
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
22+
*/
2623

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

309306
/* DMA Coalescing register fields */
310-
#define E1000_DMACR_DMACWT_MASK 0x00003FFF /* DMA Coalescing
311-
* Watchdog Timer */
312-
#define E1000_DMACR_DMACTHR_MASK 0x00FF0000 /* DMA Coalescing Receive
313-
* Threshold */
307+
#define E1000_DMACR_DMACWT_MASK 0x00003FFF /* DMA Coal Watchdog Timer */
308+
#define E1000_DMACR_DMACTHR_MASK 0x00FF0000 /* DMA Coal Rx Threshold */
314309
#define E1000_DMACR_DMACTHR_SHIFT 16
315-
#define E1000_DMACR_DMAC_LX_MASK 0x30000000 /* Lx when no PCIe
316-
* transactions */
310+
#define E1000_DMACR_DMAC_LX_MASK 0x30000000 /* Lx when no PCIe trans */
317311
#define E1000_DMACR_DMAC_LX_SHIFT 28
318312
#define E1000_DMACR_DMAC_EN 0x80000000 /* Enable DMA Coalescing */
319313
/* DMA Coalescing BMC-to-OS Watchdog Enable */
320314
#define E1000_DMACR_DC_BMC2OSW_EN 0x00008000
321315

322-
#define E1000_DMCTXTH_DMCTTHR_MASK 0x00000FFF /* DMA Coalescing Transmit
323-
* Threshold */
316+
#define E1000_DMCTXTH_DMCTTHR_MASK 0x00000FFF /* DMA Coal Tx Threshold */
324317

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

327-
#define E1000_DMCRTRH_UTRESH_MASK 0x0007FFFF /* Receive Traffic Rate
328-
* Threshold */
329-
#define E1000_DMCRTRH_LRPRCW 0x80000000 /* Rcv packet rate in
330-
* current window */
320+
#define E1000_DMCRTRH_UTRESH_MASK 0x0007FFFF /* Rx Traffic Rate Thresh */
321+
#define E1000_DMCRTRH_LRPRCW 0x80000000 /* Rx pkt rate curr window */
331322

332-
#define E1000_DMCCNT_CCOUNT_MASK 0x01FFFFFF /* DMA Coal Rcv Traffic
333-
* Current Cnt */
323+
#define E1000_DMCCNT_CCOUNT_MASK 0x01FFFFFF /* DMA Coal Rx Current Cnt */
334324

335-
#define E1000_FCRTC_RTH_COAL_MASK 0x0003FFF0 /* Flow ctrl Rcv Threshold
336-
* High val */
325+
#define E1000_FCRTC_RTH_COAL_MASK 0x0003FFF0 /* FC Rx Thresh High val */
337326
#define E1000_FCRTC_RTH_COAL_SHIFT 4
338327
#define E1000_PCIEMISC_LX_DECISION 0x00000080 /* Lx power decision */
339328

drivers/net/ethernet/intel/igb/e1000_hw.h

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
/*******************************************************************************
2-
3-
Intel(R) Gigabit Ethernet Linux driver
4-
Copyright(c) 2007-2014 Intel Corporation.
5-
6-
This program is free software; you can redistribute it and/or modify it
7-
under the terms and conditions of the GNU General Public License,
8-
version 2, as published by the Free Software Foundation.
9-
10-
This program is distributed in the hope it will be useful, but WITHOUT
11-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13-
more details.
14-
15-
You should have received a copy of the GNU General Public License along with
16-
this program; if not, see <http://www.gnu.org/licenses/>.
17-
18-
The full GNU General Public License is included in this distribution in
19-
the file called "COPYING".
20-
21-
Contact Information:
22-
e1000-devel Mailing List <[email protected]>
23-
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24-
25-
*******************************************************************************/
1+
/* Intel(R) Gigabit Ethernet Linux driver
2+
* Copyright(c) 2007-2014 Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms and conditions of the GNU General Public License,
6+
*
7+
* This program is distributed in the hope it will be useful, but WITHOUT
8+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10+
* more details.
11+
*
12+
* You should have received a copy of the GNU General Public License along with
13+
* this program; if not, see <http://www.gnu.org/licenses/>.
14+
*
15+
* The full GNU General Public License is included in this distribution in
16+
* the file called "COPYING".
17+
*
18+
* Contact Information:
19+
* e1000-devel Mailing List <[email protected]>
20+
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
21+
*/
2622

2723
#ifndef _E1000_HW_H_
2824
#define _E1000_HW_H_

0 commit comments

Comments
 (0)