You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge 5.10.91 into android12-5.10-lts
Changes in 5.10.91
f2fs: quota: fix potential deadlock
selftests: x86: fix [-Wstringop-overread] warn in test_process_vm_readv()
tracing: Fix check for trace_percpu_buffer validity in get_trace_buf()
tracing: Tag trace_percpu_buffer as a percpu pointer
ieee802154: atusb: fix uninit value in atusb_set_extended_addr
i40e: Fix to not show opcode msg on unsuccessful VF MAC change
iavf: Fix limit of total number of queues to active queues of VF
RDMA/core: Don't infoleak GRH fields
netrom: fix copying in user data in nr_setsockopt
RDMA/uverbs: Check for null return of kmalloc_array
mac80211: initialize variable have_higher_than_11mbit
sfc: The RX page_ring is optional
i40e: fix use-after-free in i40e_sync_filters_subtask()
i40e: Fix for displaying message regarding NVM version
i40e: Fix incorrect netdev's real number of RX/TX queues
ftrace/samples: Add missing prototypes direct functions
ipv4: Check attribute length for RTA_GATEWAY in multipath route
ipv4: Check attribute length for RTA_FLOW in multipath route
ipv6: Check attribute length for RTA_GATEWAY in multipath route
ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route
lwtunnel: Validate RTA_ENCAP_TYPE attribute length
batman-adv: mcast: don't send link-local multicast to mcast routers
sch_qfq: prevent shift-out-of-bounds in qfq_init_qdisc
net: ena: Fix undefined state when tx request id is out of bounds
net: ena: Fix error handling when calculating max IO queues number
xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
power: supply: core: Break capacity loop
power: reset: ltc2952: Fix use of floating point literals
rndis_host: support Hytera digital radios
phonet: refcount leak in pep_sock_accep
power: bq25890: Enable continuous conversion for ADC at charging
ipv6: Continue processing multipath route even if gateway attribute is invalid
ipv6: Do cleanup if attribute validation fails in multipath route
usb: mtu3: fix interval value for intr and isoc
scsi: libiscsi: Fix UAF in iscsi_conn_get_param()/iscsi_conn_teardown()
ip6_vti: initialize __ip6_tnl_parm struct in vti6_siocdevprivate
net: udp: fix alignment problem in udp4_seq_show()
atlantic: Fix buff_ring OOB in aq_ring_rx_clean
mISDN: change function names to avoid conflicts
drm/amd/display: Added power down for DCN10
ipv6: raw: check passed optlen before reading
ARM: dts: gpio-ranges property is now required
Input: zinitix - make sure the IRQ is allocated before it gets enabled
Linux 5.10.91
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iea6f28f738081085f9c5df020ebdee6583b38dfb
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 90
|
||||
SUBLEVEL = 91
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -555,6 +555,8 @@
|
||||
<GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
gpio-ranges = <&gpio 0 0 58>;
|
||||
|
||||
gpclk0_gpio49: gpclk0_gpio49 {
|
||||
pin-gpclk {
|
||||
pins = "gpio49";
|
||||
|
||||
@@ -126,6 +126,8 @@
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
gpio-ranges = <&gpio 0 0 54>;
|
||||
|
||||
/* Defines common pin muxing groups
|
||||
*
|
||||
* While each pin can have its mux selected
|
||||
|
||||
@@ -77,6 +77,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
|
||||
.get_clock = dcn10_get_clock,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dce110_set_backlight_level,
|
||||
.set_abm_immediate_disable = dce110_set_abm_immediate_disable,
|
||||
.set_pipe = dce110_set_pipe,
|
||||
|
||||
@@ -66,7 +66,7 @@ void ib_copy_ah_attr_to_user(struct ib_device *device,
|
||||
struct rdma_ah_attr *src = ah_attr;
|
||||
struct rdma_ah_attr conv_ah;
|
||||
|
||||
memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved));
|
||||
memset(&dst->grh, 0, sizeof(dst->grh));
|
||||
|
||||
if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) &&
|
||||
(rdma_ah_get_dlid(ah_attr) > be16_to_cpu(IB_LID_PERMISSIVE)) &&
|
||||
|
||||
@@ -450,6 +450,9 @@ static int uapi_finalize(struct uverbs_api *uapi)
|
||||
uapi->num_write_ex = max_write_ex + 1;
|
||||
data = kmalloc_array(uapi->num_write + uapi->num_write_ex,
|
||||
sizeof(*uapi->write_methods), GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i != uapi->num_write + uapi->num_write_ex; i++)
|
||||
data[i] = &uapi->notsupp_method;
|
||||
uapi->write_methods = data;
|
||||
|
||||
@@ -488,6 +488,15 @@ static int zinitix_ts_probe(struct i2c_client *client)
|
||||
return error;
|
||||
}
|
||||
|
||||
error = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
NULL, zinitix_ts_irq_handler,
|
||||
IRQF_ONESHOT,
|
||||
client->name, bt541);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Failed to request IRQ: %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
error = zinitix_init_input_dev(bt541);
|
||||
if (error) {
|
||||
dev_err(&client->dev,
|
||||
@@ -514,13 +523,6 @@ static int zinitix_ts_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
|
||||
error = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
NULL, zinitix_ts_irq_handler,
|
||||
IRQF_ONESHOT, client->name, bt541);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Failed to request IRQ: %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ mISDNInit(void)
|
||||
err = mISDN_inittimer(&debug);
|
||||
if (err)
|
||||
goto error2;
|
||||
err = l1_init(&debug);
|
||||
err = Isdnl1_Init(&debug);
|
||||
if (err)
|
||||
goto error3;
|
||||
err = Isdnl2_Init(&debug);
|
||||
@@ -395,7 +395,7 @@ mISDNInit(void)
|
||||
error5:
|
||||
Isdnl2_cleanup();
|
||||
error4:
|
||||
l1_cleanup();
|
||||
Isdnl1_cleanup();
|
||||
error3:
|
||||
mISDN_timer_cleanup();
|
||||
error2:
|
||||
@@ -408,7 +408,7 @@ static void mISDN_cleanup(void)
|
||||
{
|
||||
misdn_sock_cleanup();
|
||||
Isdnl2_cleanup();
|
||||
l1_cleanup();
|
||||
Isdnl1_cleanup();
|
||||
mISDN_timer_cleanup();
|
||||
class_unregister(&mISDN_class);
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ struct Bprotocol *get_Bprotocol4id(u_int);
|
||||
extern int mISDN_inittimer(u_int *);
|
||||
extern void mISDN_timer_cleanup(void);
|
||||
|
||||
extern int l1_init(u_int *);
|
||||
extern void l1_cleanup(void);
|
||||
extern int Isdnl1_Init(u_int *);
|
||||
extern void Isdnl1_cleanup(void);
|
||||
extern int Isdnl2_Init(u_int *);
|
||||
extern void Isdnl2_cleanup(void);
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ create_l1(struct dchannel *dch, dchannel_l1callback *dcb) {
|
||||
EXPORT_SYMBOL(create_l1);
|
||||
|
||||
int
|
||||
l1_init(u_int *deb)
|
||||
Isdnl1_Init(u_int *deb)
|
||||
{
|
||||
debug = deb;
|
||||
l1fsm_s.state_count = L1S_STATE_COUNT;
|
||||
@@ -409,7 +409,7 @@ l1_init(u_int *deb)
|
||||
}
|
||||
|
||||
void
|
||||
l1_cleanup(void)
|
||||
Isdnl1_cleanup(void)
|
||||
{
|
||||
mISDN_FsmFree(&l1fsm_s);
|
||||
}
|
||||
|
||||
@@ -1199,26 +1199,22 @@ static int handle_invalid_req_id(struct ena_ring *ring, u16 req_id,
|
||||
|
||||
static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
|
||||
{
|
||||
struct ena_tx_buffer *tx_info = NULL;
|
||||
struct ena_tx_buffer *tx_info;
|
||||
|
||||
if (likely(req_id < tx_ring->ring_size)) {
|
||||
tx_info = &tx_ring->tx_buffer_info[req_id];
|
||||
if (likely(tx_info->skb))
|
||||
return 0;
|
||||
}
|
||||
tx_info = &tx_ring->tx_buffer_info[req_id];
|
||||
if (likely(tx_info->skb))
|
||||
return 0;
|
||||
|
||||
return handle_invalid_req_id(tx_ring, req_id, tx_info, false);
|
||||
}
|
||||
|
||||
static int validate_xdp_req_id(struct ena_ring *xdp_ring, u16 req_id)
|
||||
{
|
||||
struct ena_tx_buffer *tx_info = NULL;
|
||||
struct ena_tx_buffer *tx_info;
|
||||
|
||||
if (likely(req_id < xdp_ring->ring_size)) {
|
||||
tx_info = &xdp_ring->tx_buffer_info[req_id];
|
||||
if (likely(tx_info->xdpf))
|
||||
return 0;
|
||||
}
|
||||
tx_info = &xdp_ring->tx_buffer_info[req_id];
|
||||
if (likely(tx_info->xdpf))
|
||||
return 0;
|
||||
|
||||
return handle_invalid_req_id(xdp_ring, req_id, tx_info, true);
|
||||
}
|
||||
@@ -1243,9 +1239,14 @@ static int ena_clean_tx_irq(struct ena_ring *tx_ring, u32 budget)
|
||||
|
||||
rc = ena_com_tx_comp_req_id_get(tx_ring->ena_com_io_cq,
|
||||
&req_id);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
if (unlikely(rc == -EINVAL))
|
||||
handle_invalid_req_id(tx_ring, req_id, NULL,
|
||||
false);
|
||||
break;
|
||||
}
|
||||
|
||||
/* validate that the request id points to a valid skb */
|
||||
rc = validate_tx_req_id(tx_ring, req_id);
|
||||
if (rc)
|
||||
break;
|
||||
@@ -1801,9 +1802,14 @@ static int ena_clean_xdp_irq(struct ena_ring *xdp_ring, u32 budget)
|
||||
|
||||
rc = ena_com_tx_comp_req_id_get(xdp_ring->ena_com_io_cq,
|
||||
&req_id);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
if (unlikely(rc == -EINVAL))
|
||||
handle_invalid_req_id(xdp_ring, req_id, NULL,
|
||||
true);
|
||||
break;
|
||||
}
|
||||
|
||||
/* validate that the request id points to a valid xdp_frame */
|
||||
rc = validate_xdp_req_id(xdp_ring, req_id);
|
||||
if (rc)
|
||||
break;
|
||||
@@ -3921,10 +3927,6 @@ static u32 ena_calc_max_io_queue_num(struct pci_dev *pdev,
|
||||
max_num_io_queues = min_t(u32, max_num_io_queues, io_tx_cq_num);
|
||||
/* 1 IRQ for for mgmnt and 1 IRQs for each IO direction */
|
||||
max_num_io_queues = min_t(u32, max_num_io_queues, pci_msix_vec_count(pdev) - 1);
|
||||
if (unlikely(!max_num_io_queues)) {
|
||||
dev_err(&pdev->dev, "The device doesn't have io queues\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return max_num_io_queues;
|
||||
}
|
||||
|
||||
@@ -365,6 +365,10 @@ int aq_ring_rx_clean(struct aq_ring_s *self,
|
||||
if (!buff->is_eop) {
|
||||
buff_ = buff;
|
||||
do {
|
||||
if (buff_->next >= self->size) {
|
||||
err = -EIO;
|
||||
goto err_exit;
|
||||
}
|
||||
next_ = buff_->next,
|
||||
buff_ = &self->buff_ring[next_];
|
||||
is_rsc_completed =
|
||||
@@ -388,6 +392,10 @@ int aq_ring_rx_clean(struct aq_ring_s *self,
|
||||
(buff->is_lro && buff->is_cso_err)) {
|
||||
buff_ = buff;
|
||||
do {
|
||||
if (buff_->next >= self->size) {
|
||||
err = -EIO;
|
||||
goto err_exit;
|
||||
}
|
||||
next_ = buff_->next,
|
||||
buff_ = &self->buff_ring[next_];
|
||||
|
||||
|
||||
@@ -98,6 +98,24 @@ MODULE_LICENSE("GPL v2");
|
||||
|
||||
static struct workqueue_struct *i40e_wq;
|
||||
|
||||
static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f,
|
||||
struct net_device *netdev, int delta)
|
||||
{
|
||||
struct netdev_hw_addr *ha;
|
||||
|
||||
if (!f || !netdev)
|
||||
return;
|
||||
|
||||
netdev_for_each_mc_addr(ha, netdev) {
|
||||
if (ether_addr_equal(ha->addr, f->macaddr)) {
|
||||
ha->refcount += delta;
|
||||
if (ha->refcount <= 0)
|
||||
ha->refcount = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_allocate_dma_mem_d - OS specific memory alloc for shared code
|
||||
* @hw: pointer to the HW structure
|
||||
@@ -2035,6 +2053,7 @@ static void i40e_undo_add_filter_entries(struct i40e_vsi *vsi,
|
||||
hlist_for_each_entry_safe(new, h, from, hlist) {
|
||||
/* We can simply free the wrapper structure */
|
||||
hlist_del(&new->hlist);
|
||||
netdev_hw_addr_refcnt(new->f, vsi->netdev, -1);
|
||||
kfree(new);
|
||||
}
|
||||
}
|
||||
@@ -2382,6 +2401,10 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
|
||||
&tmp_add_list,
|
||||
&tmp_del_list,
|
||||
vlan_filters);
|
||||
|
||||
hlist_for_each_entry(new, &tmp_add_list, hlist)
|
||||
netdev_hw_addr_refcnt(new->f, vsi->netdev, 1);
|
||||
|
||||
if (retval)
|
||||
goto err_no_memory_locked;
|
||||
|
||||
@@ -2514,6 +2537,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
|
||||
if (new->f->state == I40E_FILTER_NEW)
|
||||
new->f->state = new->state;
|
||||
hlist_del(&new->hlist);
|
||||
netdev_hw_addr_refcnt(new->f, vsi->netdev, -1);
|
||||
kfree(new);
|
||||
}
|
||||
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
||||
@@ -8357,6 +8381,27 @@ int i40e_open(struct net_device *netdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_netif_set_realnum_tx_rx_queues - Update number of tx/rx queues
|
||||
* @vsi: vsi structure
|
||||
*
|
||||
* This updates netdev's number of tx/rx queues
|
||||
*
|
||||
* Returns status of setting tx/rx queues
|
||||
**/
|
||||
static int i40e_netif_set_realnum_tx_rx_queues(struct i40e_vsi *vsi)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = netif_set_real_num_rx_queues(vsi->netdev,
|
||||
vsi->num_queue_pairs);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return netif_set_real_num_tx_queues(vsi->netdev,
|
||||
vsi->num_queue_pairs);
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vsi_open -
|
||||
* @vsi: the VSI to open
|
||||
@@ -8393,13 +8438,7 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
|
||||
goto err_setup_rx;
|
||||
|
||||
/* Notify the stack of the actual queue counts. */
|
||||
err = netif_set_real_num_tx_queues(vsi->netdev,
|
||||
vsi->num_queue_pairs);
|
||||
if (err)
|
||||
goto err_set_queues;
|
||||
|
||||
err = netif_set_real_num_rx_queues(vsi->netdev,
|
||||
vsi->num_queue_pairs);
|
||||
err = i40e_netif_set_realnum_tx_rx_queues(vsi);
|
||||
if (err)
|
||||
goto err_set_queues;
|
||||
|
||||
@@ -13686,6 +13725,9 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
|
||||
case I40E_VSI_MAIN:
|
||||
case I40E_VSI_VMDQ2:
|
||||
ret = i40e_config_netdev(vsi);
|
||||
if (ret)
|
||||
goto err_netdev;
|
||||
ret = i40e_netif_set_realnum_tx_rx_queues(vsi);
|
||||
if (ret)
|
||||
goto err_netdev;
|
||||
ret = register_netdev(vsi->netdev);
|
||||
@@ -14963,8 +15005,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
if (hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR &&
|
||||
hw->aq.api_min_ver > I40E_FW_MINOR_VERSION(hw))
|
||||
dev_info(&pdev->dev,
|
||||
"The driver for the device detected a newer version of the NVM image v%u.%u than expected v%u.%u. Please install the most recent version of the network driver.\n",
|
||||
dev_dbg(&pdev->dev,
|
||||
"The driver for the device detected a newer version of the NVM image v%u.%u than v%u.%u.\n",
|
||||
hw->aq.api_maj_ver,
|
||||
hw->aq.api_min_ver,
|
||||
I40E_FW_API_VERSION_MAJOR,
|
||||
|
||||
@@ -1824,17 +1824,19 @@ sriov_configure_out:
|
||||
/***********************virtual channel routines******************/
|
||||
|
||||
/**
|
||||
* i40e_vc_send_msg_to_vf
|
||||
* i40e_vc_send_msg_to_vf_ex
|
||||
* @vf: pointer to the VF info
|
||||
* @v_opcode: virtual channel opcode
|
||||
* @v_retval: virtual channel return value
|
||||
* @msg: pointer to the msg buffer
|
||||
* @msglen: msg length
|
||||
* @is_quiet: true for not printing unsuccessful return values, false otherwise
|
||||
*
|
||||
* send msg to VF
|
||||
**/
|
||||
static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode,
|
||||
u32 v_retval, u8 *msg, u16 msglen)
|
||||
static int i40e_vc_send_msg_to_vf_ex(struct i40e_vf *vf, u32 v_opcode,
|
||||
u32 v_retval, u8 *msg, u16 msglen,
|
||||
bool is_quiet)
|
||||
{
|
||||
struct i40e_pf *pf;
|
||||
struct i40e_hw *hw;
|
||||
@@ -1850,7 +1852,7 @@ static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode,
|
||||
abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id;
|
||||
|
||||
/* single place to detect unsuccessful return values */
|
||||
if (v_retval) {
|
||||
if (v_retval && !is_quiet) {
|
||||
vf->num_invalid_msgs++;
|
||||
dev_info(&pf->pdev->dev, "VF %d failed opcode %d, retval: %d\n",
|
||||
vf->vf_id, v_opcode, v_retval);
|
||||
@@ -1880,6 +1882,23 @@ static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vc_send_msg_to_vf
|
||||
* @vf: pointer to the VF info
|
||||
* @v_opcode: virtual channel opcode
|
||||
* @v_retval: virtual channel return value
|
||||
* @msg: pointer to the msg buffer
|
||||
* @msglen: msg length
|
||||
*
|
||||
* send msg to VF
|
||||
**/
|
||||
static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode,
|
||||
u32 v_retval, u8 *msg, u16 msglen)
|
||||
{
|
||||
return i40e_vc_send_msg_to_vf_ex(vf, v_opcode, v_retval,
|
||||
msg, msglen, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vc_send_resp_to_vf
|
||||
* @vf: pointer to the VF info
|
||||
@@ -2641,6 +2660,7 @@ error_param:
|
||||
* i40e_check_vf_permission
|
||||
* @vf: pointer to the VF info
|
||||
* @al: MAC address list from virtchnl
|
||||
* @is_quiet: set true for printing msg without opcode info, false otherwise
|
||||
*
|
||||
* Check that the given list of MAC addresses is allowed. Will return -EPERM
|
||||
* if any address in the list is not valid. Checks the following conditions:
|
||||
@@ -2655,13 +2675,15 @@ error_param:
|
||||
* addresses might not be accurate.
|
||||
**/
|
||||
static inline int i40e_check_vf_permission(struct i40e_vf *vf,
|
||||
struct virtchnl_ether_addr_list *al)
|
||||
struct virtchnl_ether_addr_list *al,
|
||||
bool *is_quiet)
|
||||
{
|
||||
struct i40e_pf *pf = vf->pf;
|
||||
struct i40e_vsi *vsi = pf->vsi[vf->lan_vsi_idx];
|
||||
int mac2add_cnt = 0;
|
||||
int i;
|
||||
|
||||
*is_quiet = false;
|
||||
for (i = 0; i < al->num_elements; i++) {
|
||||
struct i40e_mac_filter *f;
|
||||
u8 *addr = al->list[i].addr;
|
||||
@@ -2685,6 +2707,7 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf,
|
||||
!ether_addr_equal(addr, vf->default_lan_addr.addr)) {
|
||||
dev_err(&pf->pdev->dev,
|
||||
"VF attempting to override administratively set MAC address, bring down and up the VF interface to resume normal operation\n");
|
||||
*is_quiet = true;
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
@@ -2721,6 +2744,7 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
|
||||
(struct virtchnl_ether_addr_list *)msg;
|
||||
struct i40e_pf *pf = vf->pf;
|
||||
struct i40e_vsi *vsi = NULL;
|
||||
bool is_quiet = false;
|
||||
i40e_status ret = 0;
|
||||
int i;
|
||||
|
||||
@@ -2737,7 +2761,7 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
|
||||
*/
|
||||
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
||||
|
||||
ret = i40e_check_vf_permission(vf, al);
|
||||
ret = i40e_check_vf_permission(vf, al, &is_quiet);
|
||||
if (ret) {
|
||||
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
||||
goto error_param;
|
||||
@@ -2775,8 +2799,8 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
|
||||
|
||||
error_param:
|
||||
/* send the response to the VF */
|
||||
return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ADD_ETH_ADDR,
|
||||
ret);
|
||||
return i40e_vc_send_msg_to_vf_ex(vf, VIRTCHNL_OP_ADD_ETH_ADDR,
|
||||
ret, NULL, 0, is_quiet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2598,8 +2598,11 @@ static int iavf_validate_ch_config(struct iavf_adapter *adapter,
|
||||
total_max_rate += tx_rate;
|
||||
num_qps += mqprio_qopt->qopt.count[i];
|
||||
}
|
||||
if (num_qps > IAVF_MAX_REQ_QUEUES)
|
||||
if (num_qps > adapter->num_active_queues) {
|
||||
dev_err(&adapter->pdev->dev,
|
||||
"Cannot support requested number of queues\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = iavf_validate_tx_bandwidth(adapter, total_max_rate);
|
||||
return ret;
|
||||
|
||||
@@ -110,6 +110,8 @@ static struct page *ef4_reuse_page(struct ef4_rx_queue *rx_queue)
|
||||
struct ef4_rx_page_state *state;
|
||||
unsigned index;
|
||||
|
||||
if (unlikely(!rx_queue->page_ring))
|
||||
return NULL;
|
||||
index = rx_queue->page_remove & rx_queue->page_ptr_mask;
|
||||
page = rx_queue->page_ring[index];
|
||||
if (page == NULL)
|
||||
@@ -293,6 +295,9 @@ static void ef4_recycle_rx_pages(struct ef4_channel *channel,
|
||||
{
|
||||
struct ef4_rx_queue *rx_queue = ef4_channel_get_rx_queue(channel);
|
||||
|
||||
if (unlikely(!rx_queue->page_ring))
|
||||
return;
|
||||
|
||||
do {
|
||||
ef4_recycle_rx_page(channel, rx_buf);
|
||||
rx_buf = ef4_rx_buf_next(rx_queue, rx_buf);
|
||||
|
||||
@@ -45,6 +45,8 @@ static struct page *efx_reuse_page(struct efx_rx_queue *rx_queue)
|
||||
unsigned int index;
|
||||
struct page *page;
|
||||
|
||||
if (unlikely(!rx_queue->page_ring))
|
||||
return NULL;
|
||||
index = rx_queue->page_remove & rx_queue->page_ptr_mask;
|
||||
page = rx_queue->page_ring[index];
|
||||
if (page == NULL)
|
||||
@@ -114,6 +116,9 @@ void efx_recycle_rx_pages(struct efx_channel *channel,
|
||||
{
|
||||
struct efx_rx_queue *rx_queue = efx_channel_get_rx_queue(channel);
|
||||
|
||||
if (unlikely(!rx_queue->page_ring))
|
||||
return;
|
||||
|
||||
do {
|
||||
efx_recycle_rx_page(channel, rx_buf);
|
||||
rx_buf = efx_rx_buf_next(rx_queue, rx_buf);
|
||||
|
||||
@@ -93,7 +93,9 @@ static int atusb_control_msg(struct atusb *atusb, unsigned int pipe,
|
||||
|
||||
ret = usb_control_msg(usb_dev, pipe, request, requesttype,
|
||||
value, index, data, size, timeout);
|
||||
if (ret < 0) {
|
||||
if (ret < size) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
atusb->err = ret;
|
||||
dev_err(&usb_dev->dev,
|
||||
"%s: req 0x%02x val 0x%x idx 0x%x, error %d\n",
|
||||
@@ -861,9 +863,9 @@ static int atusb_get_and_show_build(struct atusb *atusb)
|
||||
if (!build)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0),
|
||||
ATUSB_BUILD, ATUSB_REQ_FROM_DEV, 0, 0,
|
||||
build, ATUSB_BUILD_SIZE, 1000);
|
||||
/* We cannot call atusb_control_msg() here, since this request may read various length data */
|
||||
ret = usb_control_msg(atusb->usb_dev, usb_rcvctrlpipe(usb_dev, 0), ATUSB_BUILD,
|
||||
ATUSB_REQ_FROM_DEV, 0, 0, build, ATUSB_BUILD_SIZE, 1000);
|
||||
if (ret >= 0) {
|
||||
build[ret] = 0;
|
||||
dev_info(&usb_dev->dev, "Firmware: build %s\n", build);
|
||||
|
||||
@@ -608,6 +608,11 @@ static const struct usb_device_id products [] = {
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x1630, 0x0042,
|
||||
USB_CLASS_COMM, 2 /* ACM */, 0x0ff),
|
||||
.driver_info = (unsigned long) &rndis_poll_status_info,
|
||||
}, {
|
||||
/* Hytera Communications DMR radios' "Radio to PC Network" */
|
||||
USB_VENDOR_AND_INTERFACE_INFO(0x238b,
|
||||
USB_CLASS_COMM, 2 /* ACM */, 0x0ff),
|
||||
.driver_info = (unsigned long)&rndis_info,
|
||||
}, {
|
||||
/* RNDIS is MSFT's un-official variant of CDC ACM */
|
||||
USB_INTERFACE_INFO(USB_CLASS_COMM, 2 /* ACM */, 0x0ff),
|
||||
|
||||
@@ -159,8 +159,8 @@ static void ltc2952_poweroff_kill(void)
|
||||
|
||||
static void ltc2952_poweroff_default(struct ltc2952_poweroff *data)
|
||||
{
|
||||
data->wde_interval = 300L * 1E6L;
|
||||
data->trigger_delay = ktime_set(2, 500L*1E6L);
|
||||
data->wde_interval = 300L * NSEC_PER_MSEC;
|
||||
data->trigger_delay = ktime_set(2, 500L * NSEC_PER_MSEC);
|
||||
|
||||
hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
data->timer_trigger.function = ltc2952_poweroff_timer_trigger;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user