diff options
author | David S. Miller <davem@davemloft.net> | 2014-08-13 23:08:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-13 23:08:55 -0400 |
commit | db8d457acccdb605b82ae22e48d28a47861b0c86 (patch) | |
tree | 90b224b7831a7771951661f64b9aed36e5b15884 /drivers/net | |
parent | a4688132a1629779e4eb8f95660cbebf650819b4 (diff) | |
parent | 5e815d84180edcc6bf8e3d9c7d3b2ee0cf79b6ba (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2014-08-12
This series contains updates to i40e and e1000e.
Lucas provides a fix for i40e to resolve a compile issue where a header
was missing in the #includes.
Wei Yongjun provides a fix for i40e to resolve a sparse warning, where
a non-static function should be static.
Julia Lawall provides a fix for i40e which was found using Coccinelle,
where there was a typo in the name of the type given to sizeof().
Rickard Strandqvist provides a fix for i40e to replace the use of
strncpy() with strlcpy() to avoid strings that lack null termination.
Jean Sacren provides two e1000e fixes, first is a comment fix and second
removes an excessive space character in a debug message.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/manage.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 18 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_nvm.c | 6 |
4 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c index 58856032298d..06edfca1a35e 100644 --- a/drivers/net/ethernet/intel/e1000e/manage.c +++ b/drivers/net/ethernet/intel/e1000e/manage.c | |||
@@ -47,7 +47,7 @@ static u8 e1000_calculate_checksum(u8 *buffer, u32 length) | |||
47 | * e1000_mng_enable_host_if - Checks host interface is enabled | 47 | * e1000_mng_enable_host_if - Checks host interface is enabled |
48 | * @hw: pointer to the HW structure | 48 | * @hw: pointer to the HW structure |
49 | * | 49 | * |
50 | * Returns E1000_success upon success, else E1000_ERR_HOST_INTERFACE_COMMAND | 50 | * Returns 0 upon success, else -E1000_ERR_HOST_INTERFACE_COMMAND |
51 | * | 51 | * |
52 | * This function checks whether the HOST IF is enabled for command operation | 52 | * This function checks whether the HOST IF is enabled for command operation |
53 | * and also checks whether the previous command is completed. It busy waits | 53 | * and also checks whether the previous command is completed. It busy waits |
@@ -78,7 +78,7 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw) | |||
78 | } | 78 | } |
79 | 79 | ||
80 | if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) { | 80 | if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) { |
81 | e_dbg("Previous command timeout failed .\n"); | 81 | e_dbg("Previous command timeout failed.\n"); |
82 | return -E1000_ERR_HOST_INTERFACE_COMMAND; | 82 | return -E1000_ERR_HOST_INTERFACE_COMMAND; |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c index 6938fc1ad877..5d01db1d789b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c +++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <scsi/fc/fc_fcoe.h> | 33 | #include <scsi/fc/fc_fcoe.h> |
34 | #include <scsi/libfc.h> | 34 | #include <scsi/libfc.h> |
35 | #include <scsi/libfcoe.h> | 35 | #include <scsi/libfcoe.h> |
36 | #include <uapi/linux/dcbnl.h> | ||
36 | 37 | ||
37 | #include "i40e.h" | 38 | #include "i40e.h" |
38 | #include "i40e_fcoe.h" | 39 | #include "i40e_fcoe.h" |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 51bc03072ed3..871474f6fe62 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -4415,13 +4415,13 @@ static void i40e_print_link_message(struct i40e_vsi *vsi, bool isup) | |||
4415 | 4415 | ||
4416 | switch (vsi->back->hw.phy.link_info.link_speed) { | 4416 | switch (vsi->back->hw.phy.link_info.link_speed) { |
4417 | case I40E_LINK_SPEED_40GB: | 4417 | case I40E_LINK_SPEED_40GB: |
4418 | strncpy(speed, "40 Gbps", SPEED_SIZE); | 4418 | strlcpy(speed, "40 Gbps", SPEED_SIZE); |
4419 | break; | 4419 | break; |
4420 | case I40E_LINK_SPEED_10GB: | 4420 | case I40E_LINK_SPEED_10GB: |
4421 | strncpy(speed, "10 Gbps", SPEED_SIZE); | 4421 | strlcpy(speed, "10 Gbps", SPEED_SIZE); |
4422 | break; | 4422 | break; |
4423 | case I40E_LINK_SPEED_1GB: | 4423 | case I40E_LINK_SPEED_1GB: |
4424 | strncpy(speed, "1000 Mbps", SPEED_SIZE); | 4424 | strlcpy(speed, "1000 Mbps", SPEED_SIZE); |
4425 | break; | 4425 | break; |
4426 | default: | 4426 | default: |
4427 | break; | 4427 | break; |
@@ -4429,16 +4429,16 @@ static void i40e_print_link_message(struct i40e_vsi *vsi, bool isup) | |||
4429 | 4429 | ||
4430 | switch (vsi->back->hw.fc.current_mode) { | 4430 | switch (vsi->back->hw.fc.current_mode) { |
4431 | case I40E_FC_FULL: | 4431 | case I40E_FC_FULL: |
4432 | strncpy(fc, "RX/TX", FC_SIZE); | 4432 | strlcpy(fc, "RX/TX", FC_SIZE); |
4433 | break; | 4433 | break; |
4434 | case I40E_FC_TX_PAUSE: | 4434 | case I40E_FC_TX_PAUSE: |
4435 | strncpy(fc, "TX", FC_SIZE); | 4435 | strlcpy(fc, "TX", FC_SIZE); |
4436 | break; | 4436 | break; |
4437 | case I40E_FC_RX_PAUSE: | 4437 | case I40E_FC_RX_PAUSE: |
4438 | strncpy(fc, "RX", FC_SIZE); | 4438 | strlcpy(fc, "RX", FC_SIZE); |
4439 | break; | 4439 | break; |
4440 | default: | 4440 | default: |
4441 | strncpy(fc, "None", FC_SIZE); | 4441 | strlcpy(fc, "None", FC_SIZE); |
4442 | break; | 4442 | break; |
4443 | } | 4443 | } |
4444 | 4444 | ||
@@ -5839,7 +5839,7 @@ static void i40e_send_version(struct i40e_pf *pf) | |||
5839 | dv.minor_version = DRV_VERSION_MINOR; | 5839 | dv.minor_version = DRV_VERSION_MINOR; |
5840 | dv.build_version = DRV_VERSION_BUILD; | 5840 | dv.build_version = DRV_VERSION_BUILD; |
5841 | dv.subbuild_version = 0; | 5841 | dv.subbuild_version = 0; |
5842 | strncpy(dv.driver_string, DRV_VERSION, sizeof(dv.driver_string)); | 5842 | strlcpy(dv.driver_string, DRV_VERSION, sizeof(dv.driver_string)); |
5843 | i40e_aq_send_driver_version(&pf->hw, &dv, NULL); | 5843 | i40e_aq_send_driver_version(&pf->hw, &dv, NULL); |
5844 | } | 5844 | } |
5845 | 5845 | ||
@@ -6293,7 +6293,7 @@ static int i40e_vsi_alloc_arrays(struct i40e_vsi *vsi, bool alloc_qvectors) | |||
6293 | 6293 | ||
6294 | if (alloc_qvectors) { | 6294 | if (alloc_qvectors) { |
6295 | /* allocate memory for q_vector pointers */ | 6295 | /* allocate memory for q_vector pointers */ |
6296 | size = sizeof(struct i40e_q_vectors *) * vsi->num_q_vectors; | 6296 | size = sizeof(struct i40e_q_vector *) * vsi->num_q_vectors; |
6297 | vsi->q_vectors = kzalloc(size, GFP_KERNEL); | 6297 | vsi->q_vectors = kzalloc(size, GFP_KERNEL); |
6298 | if (!vsi->q_vectors) { | 6298 | if (!vsi->q_vectors) { |
6299 | ret = -ENOMEM; | 6299 | ret = -ENOMEM; |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c index 97bda3dffd49..25c4f9a3011f 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c +++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c | |||
@@ -251,9 +251,9 @@ i40e_status i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset, | |||
251 | * | 251 | * |
252 | * Writes a 16 bit words buffer to the Shadow RAM using the admin command. | 252 | * Writes a 16 bit words buffer to the Shadow RAM using the admin command. |
253 | **/ | 253 | **/ |
254 | i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer, | 254 | static i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer, |
255 | u32 offset, u16 words, void *data, | 255 | u32 offset, u16 words, void *data, |
256 | bool last_command) | 256 | bool last_command) |
257 | { | 257 | { |
258 | i40e_status ret_code = I40E_ERR_NVM; | 258 | i40e_status ret_code = I40E_ERR_NVM; |
259 | 259 | ||