Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull to get the thermal netlink multicast group name fix, otherwise the assertion added in net-next to netlink to detect that kind of bug makes systems unbootable for some folks. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
ea3d1cc285
|
@ -73,9 +73,11 @@ static struct usb_device_id ath3k_table[] = {
|
||||||
{ USB_DEVICE(0x03F0, 0x311D) },
|
{ USB_DEVICE(0x03F0, 0x311D) },
|
||||||
|
|
||||||
/* Atheros AR3012 with sflash firmware*/
|
/* Atheros AR3012 with sflash firmware*/
|
||||||
|
{ USB_DEVICE(0x0CF3, 0x0036) },
|
||||||
{ USB_DEVICE(0x0CF3, 0x3004) },
|
{ USB_DEVICE(0x0CF3, 0x3004) },
|
||||||
{ USB_DEVICE(0x0CF3, 0x3008) },
|
{ USB_DEVICE(0x0CF3, 0x3008) },
|
||||||
{ USB_DEVICE(0x0CF3, 0x311D) },
|
{ USB_DEVICE(0x0CF3, 0x311D) },
|
||||||
|
{ USB_DEVICE(0x0CF3, 0x817a) },
|
||||||
{ USB_DEVICE(0x13d3, 0x3375) },
|
{ USB_DEVICE(0x13d3, 0x3375) },
|
||||||
{ USB_DEVICE(0x04CA, 0x3004) },
|
{ USB_DEVICE(0x04CA, 0x3004) },
|
||||||
{ USB_DEVICE(0x04CA, 0x3005) },
|
{ USB_DEVICE(0x04CA, 0x3005) },
|
||||||
|
@ -107,9 +109,11 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
|
||||||
static struct usb_device_id ath3k_blist_tbl[] = {
|
static struct usb_device_id ath3k_blist_tbl[] = {
|
||||||
|
|
||||||
/* Atheros AR3012 with sflash firmware*/
|
/* Atheros AR3012 with sflash firmware*/
|
||||||
|
{ USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
|
||||||
|
{ USB_DEVICE(0x0CF3, 0x817a), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
|
||||||
|
|
|
@ -131,9 +131,11 @@ static struct usb_device_id blacklist_table[] = {
|
||||||
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
|
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
|
||||||
|
|
||||||
/* Atheros 3012 with sflash firmware */
|
/* Atheros 3012 with sflash firmware */
|
||||||
|
{ USB_DEVICE(0x0cf3, 0x0036), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
|
||||||
|
{ USB_DEVICE(0x0cf3, 0x817a), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
|
||||||
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
|
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
|
||||||
|
|
|
@ -128,6 +128,7 @@ void fec_ptp_start_cyclecounter(struct net_device *ndev)
|
||||||
|
|
||||||
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
|
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(fec_ptp_start_cyclecounter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fec_ptp_adjfreq - adjust ptp cycle frequency
|
* fec_ptp_adjfreq - adjust ptp cycle frequency
|
||||||
|
@ -318,6 +319,7 @@ int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
|
||||||
return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
|
return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
|
||||||
-EFAULT : 0;
|
-EFAULT : 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(fec_ptp_ioctl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fec_time_keep - call timecounter_read every second to avoid timer overrun
|
* fec_time_keep - call timecounter_read every second to avoid timer overrun
|
||||||
|
@ -383,3 +385,4 @@ void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev)
|
||||||
pr_info("registered PHC device on %s\n", ndev->name);
|
pr_info("registered PHC device on %s\n", ndev->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(fec_ptp_init);
|
||||||
|
|
|
@ -769,7 +769,7 @@ ltq_etop_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_free:
|
err_free:
|
||||||
kfree(dev);
|
free_netdev(dev);
|
||||||
err_out:
|
err_out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1637,6 +1637,17 @@ void mlx4_en_stop_port(struct net_device *dev, int detach)
|
||||||
/* Flush multicast filter */
|
/* Flush multicast filter */
|
||||||
mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, 1, MLX4_MCAST_CONFIG);
|
mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, 1, MLX4_MCAST_CONFIG);
|
||||||
|
|
||||||
|
/* Remove flow steering rules for the port*/
|
||||||
|
if (mdev->dev->caps.steering_mode ==
|
||||||
|
MLX4_STEERING_MODE_DEVICE_MANAGED) {
|
||||||
|
ASSERT_RTNL();
|
||||||
|
list_for_each_entry_safe(flow, tmp_flow,
|
||||||
|
&priv->ethtool_list, list) {
|
||||||
|
mlx4_flow_detach(mdev->dev, flow->id);
|
||||||
|
list_del(&flow->list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mlx4_en_destroy_drop_qp(priv);
|
mlx4_en_destroy_drop_qp(priv);
|
||||||
|
|
||||||
/* Free TX Rings */
|
/* Free TX Rings */
|
||||||
|
@ -1657,17 +1668,6 @@ void mlx4_en_stop_port(struct net_device *dev, int detach)
|
||||||
if (!(mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN))
|
if (!(mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN))
|
||||||
mdev->mac_removed[priv->port] = 1;
|
mdev->mac_removed[priv->port] = 1;
|
||||||
|
|
||||||
/* Remove flow steering rules for the port*/
|
|
||||||
if (mdev->dev->caps.steering_mode ==
|
|
||||||
MLX4_STEERING_MODE_DEVICE_MANAGED) {
|
|
||||||
ASSERT_RTNL();
|
|
||||||
list_for_each_entry_safe(flow, tmp_flow,
|
|
||||||
&priv->ethtool_list, list) {
|
|
||||||
mlx4_flow_detach(mdev->dev, flow->id);
|
|
||||||
list_del(&flow->list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free RX Rings */
|
/* Free RX Rings */
|
||||||
for (i = 0; i < priv->rx_ring_num; i++) {
|
for (i = 0; i < priv->rx_ring_num; i++) {
|
||||||
mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[i]);
|
mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[i]);
|
||||||
|
|
|
@ -771,7 +771,7 @@ int mlx4_MAP_EQ_wrapper(struct mlx4_dev *dev, int slave,
|
||||||
struct mlx4_slave_event_eq_info *event_eq =
|
struct mlx4_slave_event_eq_info *event_eq =
|
||||||
priv->mfunc.master.slave_state[slave].event_eq;
|
priv->mfunc.master.slave_state[slave].event_eq;
|
||||||
u32 in_modifier = vhcr->in_modifier;
|
u32 in_modifier = vhcr->in_modifier;
|
||||||
u32 eqn = in_modifier & 0x1FF;
|
u32 eqn = in_modifier & 0x3FF;
|
||||||
u64 in_param = vhcr->in_param;
|
u64 in_param = vhcr->in_param;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -99,6 +99,7 @@ struct res_qp {
|
||||||
struct list_head mcg_list;
|
struct list_head mcg_list;
|
||||||
spinlock_t mcg_spl;
|
spinlock_t mcg_spl;
|
||||||
int local_qpn;
|
int local_qpn;
|
||||||
|
atomic_t ref_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum res_mtt_states {
|
enum res_mtt_states {
|
||||||
|
@ -197,6 +198,7 @@ enum res_fs_rule_states {
|
||||||
|
|
||||||
struct res_fs_rule {
|
struct res_fs_rule {
|
||||||
struct res_common com;
|
struct res_common com;
|
||||||
|
int qpn;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *res_tracker_lookup(struct rb_root *root, u64 res_id)
|
static void *res_tracker_lookup(struct rb_root *root, u64 res_id)
|
||||||
|
@ -355,7 +357,7 @@ static int mpt_mask(struct mlx4_dev *dev)
|
||||||
return dev->caps.num_mpts - 1;
|
return dev->caps.num_mpts - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *find_res(struct mlx4_dev *dev, int res_id,
|
static void *find_res(struct mlx4_dev *dev, u64 res_id,
|
||||||
enum mlx4_resource type)
|
enum mlx4_resource type)
|
||||||
{
|
{
|
||||||
struct mlx4_priv *priv = mlx4_priv(dev);
|
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||||
|
@ -447,6 +449,7 @@ static struct res_common *alloc_qp_tr(int id)
|
||||||
ret->local_qpn = id;
|
ret->local_qpn = id;
|
||||||
INIT_LIST_HEAD(&ret->mcg_list);
|
INIT_LIST_HEAD(&ret->mcg_list);
|
||||||
spin_lock_init(&ret->mcg_spl);
|
spin_lock_init(&ret->mcg_spl);
|
||||||
|
atomic_set(&ret->ref_count, 0);
|
||||||
|
|
||||||
return &ret->com;
|
return &ret->com;
|
||||||
}
|
}
|
||||||
|
@ -554,7 +557,7 @@ static struct res_common *alloc_xrcdn_tr(int id)
|
||||||
return &ret->com;
|
return &ret->com;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct res_common *alloc_fs_rule_tr(u64 id)
|
static struct res_common *alloc_fs_rule_tr(u64 id, int qpn)
|
||||||
{
|
{
|
||||||
struct res_fs_rule *ret;
|
struct res_fs_rule *ret;
|
||||||
|
|
||||||
|
@ -564,7 +567,7 @@ static struct res_common *alloc_fs_rule_tr(u64 id)
|
||||||
|
|
||||||
ret->com.res_id = id;
|
ret->com.res_id = id;
|
||||||
ret->com.state = RES_FS_RULE_ALLOCATED;
|
ret->com.state = RES_FS_RULE_ALLOCATED;
|
||||||
|
ret->qpn = qpn;
|
||||||
return &ret->com;
|
return &ret->com;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,7 +605,7 @@ static struct res_common *alloc_tr(u64 id, enum mlx4_resource type, int slave,
|
||||||
ret = alloc_xrcdn_tr(id);
|
ret = alloc_xrcdn_tr(id);
|
||||||
break;
|
break;
|
||||||
case RES_FS_RULE:
|
case RES_FS_RULE:
|
||||||
ret = alloc_fs_rule_tr(id);
|
ret = alloc_fs_rule_tr(id, extra);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -671,10 +674,14 @@ undo:
|
||||||
|
|
||||||
static int remove_qp_ok(struct res_qp *res)
|
static int remove_qp_ok(struct res_qp *res)
|
||||||
{
|
{
|
||||||
if (res->com.state == RES_QP_BUSY)
|
if (res->com.state == RES_QP_BUSY || atomic_read(&res->ref_count) ||
|
||||||
|
!list_empty(&res->mcg_list)) {
|
||||||
|
pr_err("resource tracker: fail to remove qp, state %d, ref_count %d\n",
|
||||||
|
res->com.state, atomic_read(&res->ref_count));
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
else if (res->com.state != RES_QP_RESERVED)
|
} else if (res->com.state != RES_QP_RESERVED) {
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3124,6 +3131,7 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
|
||||||
struct list_head *rlist = &tracker->slave_list[slave].res_list[RES_MAC];
|
struct list_head *rlist = &tracker->slave_list[slave].res_list[RES_MAC];
|
||||||
int err;
|
int err;
|
||||||
int qpn;
|
int qpn;
|
||||||
|
struct res_qp *rqp;
|
||||||
struct mlx4_net_trans_rule_hw_ctrl *ctrl;
|
struct mlx4_net_trans_rule_hw_ctrl *ctrl;
|
||||||
struct _rule_hw *rule_header;
|
struct _rule_hw *rule_header;
|
||||||
int header_id;
|
int header_id;
|
||||||
|
@ -3134,7 +3142,7 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
|
||||||
|
|
||||||
ctrl = (struct mlx4_net_trans_rule_hw_ctrl *)inbox->buf;
|
ctrl = (struct mlx4_net_trans_rule_hw_ctrl *)inbox->buf;
|
||||||
qpn = be32_to_cpu(ctrl->qpn) & 0xffffff;
|
qpn = be32_to_cpu(ctrl->qpn) & 0xffffff;
|
||||||
err = get_res(dev, slave, qpn, RES_QP, NULL);
|
err = get_res(dev, slave, qpn, RES_QP, &rqp);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Steering rule with qpn 0x%x rejected.\n", qpn);
|
pr_err("Steering rule with qpn 0x%x rejected.\n", qpn);
|
||||||
return err;
|
return err;
|
||||||
|
@ -3175,14 +3183,16 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
|
||||||
if (err)
|
if (err)
|
||||||
goto err_put;
|
goto err_put;
|
||||||
|
|
||||||
err = add_res_range(dev, slave, vhcr->out_param, 1, RES_FS_RULE, 0);
|
err = add_res_range(dev, slave, vhcr->out_param, 1, RES_FS_RULE, qpn);
|
||||||
if (err) {
|
if (err) {
|
||||||
mlx4_err(dev, "Fail to add flow steering resources.\n ");
|
mlx4_err(dev, "Fail to add flow steering resources.\n ");
|
||||||
/* detach rule*/
|
/* detach rule*/
|
||||||
mlx4_cmd(dev, vhcr->out_param, 0, 0,
|
mlx4_cmd(dev, vhcr->out_param, 0, 0,
|
||||||
MLX4_QP_FLOW_STEERING_DETACH, MLX4_CMD_TIME_CLASS_A,
|
MLX4_QP_FLOW_STEERING_DETACH, MLX4_CMD_TIME_CLASS_A,
|
||||||
MLX4_CMD_NATIVE);
|
MLX4_CMD_NATIVE);
|
||||||
|
goto err_put;
|
||||||
}
|
}
|
||||||
|
atomic_inc(&rqp->ref_count);
|
||||||
err_put:
|
err_put:
|
||||||
put_res(dev, slave, qpn, RES_QP);
|
put_res(dev, slave, qpn, RES_QP);
|
||||||
return err;
|
return err;
|
||||||
|
@ -3195,20 +3205,35 @@ int mlx4_QP_FLOW_STEERING_DETACH_wrapper(struct mlx4_dev *dev, int slave,
|
||||||
struct mlx4_cmd_info *cmd)
|
struct mlx4_cmd_info *cmd)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
struct res_qp *rqp;
|
||||||
|
struct res_fs_rule *rrule;
|
||||||
|
|
||||||
if (dev->caps.steering_mode !=
|
if (dev->caps.steering_mode !=
|
||||||
MLX4_STEERING_MODE_DEVICE_MANAGED)
|
MLX4_STEERING_MODE_DEVICE_MANAGED)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
err = get_res(dev, slave, vhcr->in_param, RES_FS_RULE, &rrule);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
/* Release the rule form busy state before removal */
|
||||||
|
put_res(dev, slave, vhcr->in_param, RES_FS_RULE);
|
||||||
|
err = get_res(dev, slave, rrule->qpn, RES_QP, &rqp);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
err = rem_res_range(dev, slave, vhcr->in_param, 1, RES_FS_RULE, 0);
|
err = rem_res_range(dev, slave, vhcr->in_param, 1, RES_FS_RULE, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
mlx4_err(dev, "Fail to remove flow steering resources.\n ");
|
mlx4_err(dev, "Fail to remove flow steering resources.\n ");
|
||||||
return err;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = mlx4_cmd(dev, vhcr->in_param, 0, 0,
|
err = mlx4_cmd(dev, vhcr->in_param, 0, 0,
|
||||||
MLX4_QP_FLOW_STEERING_DETACH, MLX4_CMD_TIME_CLASS_A,
|
MLX4_QP_FLOW_STEERING_DETACH, MLX4_CMD_TIME_CLASS_A,
|
||||||
MLX4_CMD_NATIVE);
|
MLX4_CMD_NATIVE);
|
||||||
|
if (!err)
|
||||||
|
atomic_dec(&rqp->ref_count);
|
||||||
|
out:
|
||||||
|
put_res(dev, slave, rrule->qpn, RES_QP);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3806,6 +3831,7 @@ void mlx4_delete_all_resources_for_slave(struct mlx4_dev *dev, int slave)
|
||||||
mutex_lock(&priv->mfunc.master.res_tracker.slave_list[slave].mutex);
|
mutex_lock(&priv->mfunc.master.res_tracker.slave_list[slave].mutex);
|
||||||
/*VLAN*/
|
/*VLAN*/
|
||||||
rem_slave_macs(dev, slave);
|
rem_slave_macs(dev, slave);
|
||||||
|
rem_slave_fs_rule(dev, slave);
|
||||||
rem_slave_qps(dev, slave);
|
rem_slave_qps(dev, slave);
|
||||||
rem_slave_srqs(dev, slave);
|
rem_slave_srqs(dev, slave);
|
||||||
rem_slave_cqs(dev, slave);
|
rem_slave_cqs(dev, slave);
|
||||||
|
@ -3814,6 +3840,5 @@ void mlx4_delete_all_resources_for_slave(struct mlx4_dev *dev, int slave)
|
||||||
rem_slave_mtts(dev, slave);
|
rem_slave_mtts(dev, slave);
|
||||||
rem_slave_counters(dev, slave);
|
rem_slave_counters(dev, slave);
|
||||||
rem_slave_xrcdns(dev, slave);
|
rem_slave_xrcdns(dev, slave);
|
||||||
rem_slave_fs_rule(dev, slave);
|
|
||||||
mutex_unlock(&priv->mfunc.master.res_tracker.slave_list[slave].mutex);
|
mutex_unlock(&priv->mfunc.master.res_tracker.slave_list[slave].mutex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1504,7 +1504,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
|
||||||
struct platform_device *mdio;
|
struct platform_device *mdio;
|
||||||
|
|
||||||
parp = of_get_property(slave_node, "phy_id", &lenp);
|
parp = of_get_property(slave_node, "phy_id", &lenp);
|
||||||
if ((parp == NULL) && (lenp != (sizeof(void *) * 2))) {
|
if ((parp == NULL) || (lenp != (sizeof(void *) * 2))) {
|
||||||
pr_err("Missing slave[%d] phy_id property\n", i);
|
pr_err("Missing slave[%d] phy_id property\n", i);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto error_ret;
|
goto error_ret;
|
||||||
|
|
|
@ -1023,6 +1023,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
|
||||||
AR_PHY_AGC_CONTROL_FLTR_CAL |
|
AR_PHY_AGC_CONTROL_FLTR_CAL |
|
||||||
AR_PHY_AGC_CONTROL_PKDET_CAL;
|
AR_PHY_AGC_CONTROL_PKDET_CAL;
|
||||||
|
|
||||||
|
/* Use chip chainmask only for calibration */
|
||||||
ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask);
|
ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask);
|
||||||
|
|
||||||
if (rtt) {
|
if (rtt) {
|
||||||
|
@ -1150,6 +1151,9 @@ skip_tx_iqcal:
|
||||||
ar9003_hw_rtt_disable(ah);
|
ar9003_hw_rtt_disable(ah);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Revert chainmask to runtime parameters */
|
||||||
|
ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
|
||||||
|
|
||||||
/* Initialize list pointers */
|
/* Initialize list pointers */
|
||||||
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
|
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
|
||||||
|
|
||||||
|
|
|
@ -28,21 +28,21 @@ void ath_tx_complete_poll_work(struct work_struct *work)
|
||||||
int i;
|
int i;
|
||||||
bool needreset = false;
|
bool needreset = false;
|
||||||
|
|
||||||
for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
|
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
|
||||||
if (ATH_TXQ_SETUP(sc, i)) {
|
txq = sc->tx.txq_map[i];
|
||||||
txq = &sc->tx.txq[i];
|
|
||||||
ath_txq_lock(sc, txq);
|
ath_txq_lock(sc, txq);
|
||||||
if (txq->axq_depth) {
|
if (txq->axq_depth) {
|
||||||
if (txq->axq_tx_inprogress) {
|
if (txq->axq_tx_inprogress) {
|
||||||
needreset = true;
|
needreset = true;
|
||||||
ath_txq_unlock(sc, txq);
|
ath_txq_unlock(sc, txq);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
txq->axq_tx_inprogress = true;
|
txq->axq_tx_inprogress = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ath_txq_unlock_complete(sc, txq);
|
|
||||||
}
|
}
|
||||||
|
ath_txq_unlock_complete(sc, txq);
|
||||||
|
}
|
||||||
|
|
||||||
if (needreset) {
|
if (needreset) {
|
||||||
ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
|
ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
|
||||||
|
|
|
@ -475,6 +475,7 @@ il3945_tx_skb(struct il_priv *il,
|
||||||
dma_addr_t txcmd_phys;
|
dma_addr_t txcmd_phys;
|
||||||
int txq_id = skb_get_queue_mapping(skb);
|
int txq_id = skb_get_queue_mapping(skb);
|
||||||
u16 len, idx, hdr_len;
|
u16 len, idx, hdr_len;
|
||||||
|
u16 firstlen, secondlen;
|
||||||
u8 id;
|
u8 id;
|
||||||
u8 unicast;
|
u8 unicast;
|
||||||
u8 sta_id;
|
u8 sta_id;
|
||||||
|
@ -589,21 +590,22 @@ il3945_tx_skb(struct il_priv *il,
|
||||||
len =
|
len =
|
||||||
sizeof(struct il3945_tx_cmd) + sizeof(struct il_cmd_header) +
|
sizeof(struct il3945_tx_cmd) + sizeof(struct il_cmd_header) +
|
||||||
hdr_len;
|
hdr_len;
|
||||||
len = (len + 3) & ~3;
|
firstlen = (len + 3) & ~3;
|
||||||
|
|
||||||
/* Physical address of this Tx command's header (not MAC header!),
|
/* Physical address of this Tx command's header (not MAC header!),
|
||||||
* within command buffer array. */
|
* within command buffer array. */
|
||||||
txcmd_phys =
|
txcmd_phys =
|
||||||
pci_map_single(il->pci_dev, &out_cmd->hdr, len, PCI_DMA_TODEVICE);
|
pci_map_single(il->pci_dev, &out_cmd->hdr, firstlen,
|
||||||
|
PCI_DMA_TODEVICE);
|
||||||
if (unlikely(pci_dma_mapping_error(il->pci_dev, txcmd_phys)))
|
if (unlikely(pci_dma_mapping_error(il->pci_dev, txcmd_phys)))
|
||||||
goto drop_unlock;
|
goto drop_unlock;
|
||||||
|
|
||||||
/* Set up TFD's 2nd entry to point directly to remainder of skb,
|
/* Set up TFD's 2nd entry to point directly to remainder of skb,
|
||||||
* if any (802.11 null frames have no payload). */
|
* if any (802.11 null frames have no payload). */
|
||||||
len = skb->len - hdr_len;
|
secondlen = skb->len - hdr_len;
|
||||||
if (len) {
|
if (secondlen > 0) {
|
||||||
phys_addr =
|
phys_addr =
|
||||||
pci_map_single(il->pci_dev, skb->data + hdr_len, len,
|
pci_map_single(il->pci_dev, skb->data + hdr_len, secondlen,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr)))
|
if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr)))
|
||||||
goto drop_unlock;
|
goto drop_unlock;
|
||||||
|
@ -611,12 +613,12 @@ il3945_tx_skb(struct il_priv *il,
|
||||||
|
|
||||||
/* Add buffer containing Tx command and MAC(!) header to TFD's
|
/* Add buffer containing Tx command and MAC(!) header to TFD's
|
||||||
* first entry */
|
* first entry */
|
||||||
il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, len, 1, 0);
|
il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, firstlen, 1, 0);
|
||||||
dma_unmap_addr_set(out_meta, mapping, txcmd_phys);
|
dma_unmap_addr_set(out_meta, mapping, txcmd_phys);
|
||||||
dma_unmap_len_set(out_meta, len, len);
|
dma_unmap_len_set(out_meta, len, firstlen);
|
||||||
if (len)
|
if (secondlen > 0)
|
||||||
il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, len, 0,
|
il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, secondlen, 0,
|
||||||
U32_PAD(len));
|
U32_PAD(secondlen));
|
||||||
|
|
||||||
if (!ieee80211_has_morefrags(hdr->frame_control)) {
|
if (!ieee80211_has_morefrags(hdr->frame_control)) {
|
||||||
txq->need_update = 1;
|
txq->need_update = 1;
|
||||||
|
|
|
@ -157,6 +157,20 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd_code = le16_to_cpu(host_cmd->command);
|
||||||
|
cmd_size = le16_to_cpu(host_cmd->size);
|
||||||
|
|
||||||
|
if (adapter->hw_status == MWIFIEX_HW_STATUS_RESET &&
|
||||||
|
cmd_code != HostCmd_CMD_FUNC_SHUTDOWN &&
|
||||||
|
cmd_code != HostCmd_CMD_FUNC_INIT) {
|
||||||
|
dev_err(adapter->dev,
|
||||||
|
"DNLD_CMD: FW in reset state, ignore cmd %#x\n",
|
||||||
|
cmd_code);
|
||||||
|
mwifiex_complete_cmd(adapter, cmd_node);
|
||||||
|
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set command sequence number */
|
/* Set command sequence number */
|
||||||
adapter->seq_num++;
|
adapter->seq_num++;
|
||||||
host_cmd->seq_num = cpu_to_le16(HostCmd_SET_SEQ_NO_BSS_INFO
|
host_cmd->seq_num = cpu_to_le16(HostCmd_SET_SEQ_NO_BSS_INFO
|
||||||
|
@ -168,9 +182,6 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||||
adapter->curr_cmd = cmd_node;
|
adapter->curr_cmd = cmd_node;
|
||||||
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
|
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
|
||||||
|
|
||||||
cmd_code = le16_to_cpu(host_cmd->command);
|
|
||||||
cmd_size = le16_to_cpu(host_cmd->size);
|
|
||||||
|
|
||||||
/* Adjust skb length */
|
/* Adjust skb length */
|
||||||
if (cmd_node->cmd_skb->len > cmd_size)
|
if (cmd_node->cmd_skb->len > cmd_size)
|
||||||
/*
|
/*
|
||||||
|
@ -484,8 +495,6 @@ int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no,
|
||||||
|
|
||||||
ret = mwifiex_send_cmd_async(priv, cmd_no, cmd_action, cmd_oid,
|
ret = mwifiex_send_cmd_async(priv, cmd_no, cmd_action, cmd_oid,
|
||||||
data_buf);
|
data_buf);
|
||||||
if (!ret)
|
|
||||||
ret = mwifiex_wait_queue_complete(adapter);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -588,9 +597,10 @@ int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
|
||||||
if (cmd_no == HostCmd_CMD_802_11_SCAN) {
|
if (cmd_no == HostCmd_CMD_802_11_SCAN) {
|
||||||
mwifiex_queue_scan_cmd(priv, cmd_node);
|
mwifiex_queue_scan_cmd(priv, cmd_node);
|
||||||
} else {
|
} else {
|
||||||
adapter->cmd_queued = cmd_node;
|
|
||||||
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, true);
|
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, true);
|
||||||
queue_work(adapter->workqueue, &adapter->main_work);
|
queue_work(adapter->workqueue, &adapter->main_work);
|
||||||
|
if (cmd_node->wait_q_enabled)
|
||||||
|
ret = mwifiex_wait_queue_complete(adapter, cmd_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -709,6 +709,14 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* cancel current command */
|
||||||
|
if (adapter->curr_cmd) {
|
||||||
|
dev_warn(adapter->dev, "curr_cmd is still in processing\n");
|
||||||
|
del_timer(&adapter->cmd_timer);
|
||||||
|
mwifiex_insert_cmd_to_free_q(adapter, adapter->curr_cmd);
|
||||||
|
adapter->curr_cmd = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* shut down mwifiex */
|
/* shut down mwifiex */
|
||||||
dev_dbg(adapter->dev, "info: shutdown mwifiex...\n");
|
dev_dbg(adapter->dev, "info: shutdown mwifiex...\n");
|
||||||
|
|
||||||
|
|
|
@ -728,7 +728,6 @@ struct mwifiex_adapter {
|
||||||
u16 cmd_wait_q_required;
|
u16 cmd_wait_q_required;
|
||||||
struct mwifiex_wait_queue cmd_wait_q;
|
struct mwifiex_wait_queue cmd_wait_q;
|
||||||
u8 scan_wait_q_woken;
|
u8 scan_wait_q_woken;
|
||||||
struct cmd_ctrl_node *cmd_queued;
|
|
||||||
spinlock_t queue_lock; /* lock for tx queues */
|
spinlock_t queue_lock; /* lock for tx queues */
|
||||||
struct completion fw_load;
|
struct completion fw_load;
|
||||||
u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
|
u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
|
||||||
|
@ -1023,7 +1022,8 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
|
||||||
struct mwifiex_multicast_list *mcast_list);
|
struct mwifiex_multicast_list *mcast_list);
|
||||||
int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
|
int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
|
||||||
struct net_device *dev);
|
struct net_device *dev);
|
||||||
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter);
|
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter,
|
||||||
|
struct cmd_ctrl_node *cmd_queued);
|
||||||
int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
|
int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
|
||||||
struct cfg80211_ssid *req_ssid);
|
struct cfg80211_ssid *req_ssid);
|
||||||
int mwifiex_cancel_hs(struct mwifiex_private *priv, int cmd_type);
|
int mwifiex_cancel_hs(struct mwifiex_private *priv, int cmd_type);
|
||||||
|
|
|
@ -1388,10 +1388,13 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
|
||||||
list_del(&cmd_node->list);
|
list_del(&cmd_node->list);
|
||||||
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
|
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
|
||||||
flags);
|
flags);
|
||||||
adapter->cmd_queued = cmd_node;
|
|
||||||
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node,
|
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node,
|
||||||
true);
|
true);
|
||||||
queue_work(adapter->workqueue, &adapter->main_work);
|
queue_work(adapter->workqueue, &adapter->main_work);
|
||||||
|
|
||||||
|
/* Perform internal scan synchronously */
|
||||||
|
if (!priv->scan_request)
|
||||||
|
mwifiex_wait_queue_complete(adapter, cmd_node);
|
||||||
} else {
|
} else {
|
||||||
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
|
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
|
||||||
flags);
|
flags);
|
||||||
|
@ -1946,9 +1949,6 @@ int mwifiex_request_scan(struct mwifiex_private *priv,
|
||||||
/* Normal scan */
|
/* Normal scan */
|
||||||
ret = mwifiex_scan_networks(priv, NULL);
|
ret = mwifiex_scan_networks(priv, NULL);
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
ret = mwifiex_wait_queue_complete(priv->adapter);
|
|
||||||
|
|
||||||
up(&priv->async_sem);
|
up(&priv->async_sem);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -54,16 +54,10 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
|
||||||
* This function waits on a cmd wait queue. It also cancels the pending
|
* This function waits on a cmd wait queue. It also cancels the pending
|
||||||
* request after waking up, in case of errors.
|
* request after waking up, in case of errors.
|
||||||
*/
|
*/
|
||||||
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
|
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter,
|
||||||
|
struct cmd_ctrl_node *cmd_queued)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
struct cmd_ctrl_node *cmd_queued;
|
|
||||||
|
|
||||||
if (!adapter->cmd_queued)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
cmd_queued = adapter->cmd_queued;
|
|
||||||
adapter->cmd_queued = NULL;
|
|
||||||
|
|
||||||
dev_dbg(adapter->dev, "cmd pending\n");
|
dev_dbg(adapter->dev, "cmd pending\n");
|
||||||
atomic_inc(&adapter->cmd_pending);
|
atomic_inc(&adapter->cmd_pending);
|
||||||
|
|
|
@ -850,6 +850,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
|
||||||
if (unlikely(!_urb)) {
|
if (unlikely(!_urb)) {
|
||||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||||
"Can't allocate urb. Drop skb!\n");
|
"Can't allocate urb. Drop skb!\n");
|
||||||
|
kfree_skb(skb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_rtl_submit_tx_urb(hw, _urb);
|
_rtl_submit_tx_urb(hw, _urb);
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
/* Adding event notification support elements */
|
/* Adding event notification support elements */
|
||||||
#define THERMAL_GENL_FAMILY_NAME "thermal_event"
|
#define THERMAL_GENL_FAMILY_NAME "thermal_event"
|
||||||
#define THERMAL_GENL_VERSION 0x01
|
#define THERMAL_GENL_VERSION 0x01
|
||||||
#define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group"
|
#define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp"
|
||||||
|
|
||||||
/* Default Thermal Governor */
|
/* Default Thermal Governor */
|
||||||
#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE)
|
#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE)
|
||||||
|
|
|
@ -33,9 +33,11 @@ enum {
|
||||||
PACKET_DIAG_TX_RING,
|
PACKET_DIAG_TX_RING,
|
||||||
PACKET_DIAG_FANOUT,
|
PACKET_DIAG_FANOUT,
|
||||||
|
|
||||||
PACKET_DIAG_MAX,
|
__PACKET_DIAG_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1)
|
||||||
|
|
||||||
struct packet_diag_info {
|
struct packet_diag_info {
|
||||||
__u32 pdi_index;
|
__u32 pdi_index;
|
||||||
__u32 pdi_version;
|
__u32 pdi_version;
|
||||||
|
|
|
@ -39,9 +39,11 @@ enum {
|
||||||
UNIX_DIAG_MEMINFO,
|
UNIX_DIAG_MEMINFO,
|
||||||
UNIX_DIAG_SHUTDOWN,
|
UNIX_DIAG_SHUTDOWN,
|
||||||
|
|
||||||
UNIX_DIAG_MAX,
|
__UNIX_DIAG_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1)
|
||||||
|
|
||||||
struct unix_diag_vfs {
|
struct unix_diag_vfs {
|
||||||
__u32 udiag_vfs_ino;
|
__u32 udiag_vfs_ino;
|
||||||
__u32 udiag_vfs_dev;
|
__u32 udiag_vfs_dev;
|
||||||
|
|
|
@ -359,6 +359,7 @@ static void __sco_sock_close(struct sock *sk)
|
||||||
sco_chan_del(sk, ECONNRESET);
|
sco_chan_del(sk, ECONNRESET);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case BT_CONNECT2:
|
||||||
case BT_CONNECT:
|
case BT_CONNECT:
|
||||||
case BT_DISCONN:
|
case BT_DISCONN:
|
||||||
sco_chan_del(sk, ECONNRESET);
|
sco_chan_del(sk, ECONNRESET);
|
||||||
|
|
|
@ -1640,8 +1640,11 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
|
||||||
goto send_now;
|
goto send_now;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ok, it looks like it is advisable to defer. */
|
/* Ok, it looks like it is advisable to defer.
|
||||||
tp->tso_deferred = 1 | (jiffies << 1);
|
* Do not rearm the timer if already set to not break TCP ACK clocking.
|
||||||
|
*/
|
||||||
|
if (!tp->tso_deferred)
|
||||||
|
tp->tso_deferred = 1 | (jiffies << 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue