diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ef10.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 174a92f5fe51..651626e133f9 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c | |||
@@ -162,8 +162,8 @@ static int efx_ef10_get_mac_address(struct efx_nic *efx, u8 *mac_address) | |||
162 | if (outlen < MC_CMD_GET_MAC_ADDRESSES_OUT_LEN) | 162 | if (outlen < MC_CMD_GET_MAC_ADDRESSES_OUT_LEN) |
163 | return -EIO; | 163 | return -EIO; |
164 | 164 | ||
165 | memcpy(mac_address, | 165 | ether_addr_copy(mac_address, |
166 | MCDI_PTR(outbuf, GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE), ETH_ALEN); | 166 | MCDI_PTR(outbuf, GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE)); |
167 | return 0; | 167 | return 0; |
168 | } | 168 | } |
169 | 169 | ||
@@ -172,8 +172,8 @@ static int efx_ef10_probe(struct efx_nic *efx) | |||
172 | struct efx_ef10_nic_data *nic_data; | 172 | struct efx_ef10_nic_data *nic_data; |
173 | int i, rc; | 173 | int i, rc; |
174 | 174 | ||
175 | /* We can have one VI for each 8K region. However we need | 175 | /* We can have one VI for each 8K region. However, until we |
176 | * multiple TX queues per channel. | 176 | * use TX option descriptors we need two TX queues per channel. |
177 | */ | 177 | */ |
178 | efx->max_channels = | 178 | efx->max_channels = |
179 | min_t(unsigned int, | 179 | min_t(unsigned int, |
@@ -1955,6 +1955,9 @@ static int efx_ef10_ev_process(struct efx_channel *channel, int quota) | |||
1955 | int tx_descs = 0; | 1955 | int tx_descs = 0; |
1956 | int spent = 0; | 1956 | int spent = 0; |
1957 | 1957 | ||
1958 | if (quota <= 0) | ||
1959 | return spent; | ||
1960 | |||
1958 | read_ptr = channel->eventq_read_ptr; | 1961 | read_ptr = channel->eventq_read_ptr; |
1959 | 1962 | ||
1960 | for (;;) { | 1963 | for (;;) { |
@@ -3145,12 +3148,10 @@ static void efx_ef10_filter_sync_rx_mode(struct efx_nic *efx) | |||
3145 | table->dev_uc_count = -1; | 3148 | table->dev_uc_count = -1; |
3146 | } else { | 3149 | } else { |
3147 | table->dev_uc_count = 1 + netdev_uc_count(net_dev); | 3150 | table->dev_uc_count = 1 + netdev_uc_count(net_dev); |
3148 | memcpy(table->dev_uc_list[0].addr, net_dev->dev_addr, | 3151 | ether_addr_copy(table->dev_uc_list[0].addr, net_dev->dev_addr); |
3149 | ETH_ALEN); | ||
3150 | i = 1; | 3152 | i = 1; |
3151 | netdev_for_each_uc_addr(uc, net_dev) { | 3153 | netdev_for_each_uc_addr(uc, net_dev) { |
3152 | memcpy(table->dev_uc_list[i].addr, | 3154 | ether_addr_copy(table->dev_uc_list[i].addr, uc->addr); |
3153 | uc->addr, ETH_ALEN); | ||
3154 | i++; | 3155 | i++; |
3155 | } | 3156 | } |
3156 | } | 3157 | } |
@@ -3162,8 +3163,7 @@ static void efx_ef10_filter_sync_rx_mode(struct efx_nic *efx) | |||
3162 | eth_broadcast_addr(table->dev_mc_list[0].addr); | 3163 | eth_broadcast_addr(table->dev_mc_list[0].addr); |
3163 | i = 1; | 3164 | i = 1; |
3164 | netdev_for_each_mc_addr(mc, net_dev) { | 3165 | netdev_for_each_mc_addr(mc, net_dev) { |
3165 | memcpy(table->dev_mc_list[i].addr, | 3166 | ether_addr_copy(table->dev_mc_list[i].addr, mc->addr); |
3166 | mc->addr, ETH_ALEN); | ||
3167 | i++; | 3167 | i++; |
3168 | } | 3168 | } |
3169 | } | 3169 | } |