mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Merge tag 'v3.10.20' into linux-linaro-lsk
This is the 3.10.20 stable release
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 19
|
||||
SUBLEVEL = 20
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
|
||||
@@ -776,7 +776,7 @@ static int sh_vou_try_fmt_vid_out(struct file *file, void *priv,
|
||||
v4l_bound_align_image(&pix->width, 0, VOU_MAX_IMAGE_WIDTH, 1,
|
||||
&pix->height, 0, VOU_MAX_IMAGE_HEIGHT, 1, 0);
|
||||
|
||||
for (i = 0; ARRAY_SIZE(vou_fmt); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(vou_fmt); i++)
|
||||
if (vou_fmt[i].pfmt == pix->pixelformat)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -90,8 +90,10 @@ int pwm_channel_alloc(int index, struct pwm_channel *ch)
|
||||
unsigned long flags;
|
||||
int status = 0;
|
||||
|
||||
/* insist on PWM init, with this signal pinned out */
|
||||
if (!pwm || !(pwm->mask & 1 << index))
|
||||
if (!pwm)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
if (!(pwm->mask & 1 << index))
|
||||
return -ENODEV;
|
||||
|
||||
if (index < 0 || index >= PWM_NCHAN || !ch)
|
||||
|
||||
@@ -1600,7 +1600,8 @@ static void write_ofld_wr(struct adapter *adap, struct sk_buff *skb,
|
||||
flits = skb_transport_offset(skb) / 8;
|
||||
sgp = ndesc == 1 ? (struct sg_ent *)&d->flit[flits] : sgl;
|
||||
sgl_flits = make_sgl(skb, sgp, skb_transport_header(skb),
|
||||
skb->tail - skb->transport_header,
|
||||
skb_tail_pointer(skb) -
|
||||
skb_transport_header(skb),
|
||||
adap->pdev);
|
||||
if (need_skb_unmap()) {
|
||||
setup_deferred_unmapping(skb, adap->pdev, sgp, sgl_flits);
|
||||
|
||||
@@ -1544,7 +1544,7 @@ static void mlx4_master_deactivate_admin_state(struct mlx4_priv *priv, int slave
|
||||
vp_oper->vlan_idx = NO_INDX;
|
||||
}
|
||||
if (NO_INDX != vp_oper->mac_idx) {
|
||||
__mlx4_unregister_mac(&priv->dev, port, vp_oper->mac_idx);
|
||||
__mlx4_unregister_mac(&priv->dev, port, vp_oper->state.mac);
|
||||
vp_oper->mac_idx = NO_INDX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1096,11 +1096,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb,
|
||||
{
|
||||
struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb);
|
||||
|
||||
mutex_lock(&vi->config_lock);
|
||||
|
||||
if (!vi->config_enable)
|
||||
goto done;
|
||||
|
||||
switch(action & ~CPU_TASKS_FROZEN) {
|
||||
case CPU_ONLINE:
|
||||
case CPU_DOWN_FAILED:
|
||||
@@ -1114,8 +1109,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb,
|
||||
break;
|
||||
}
|
||||
|
||||
done:
|
||||
mutex_unlock(&vi->config_lock);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
@@ -1672,6 +1665,8 @@ static int virtnet_freeze(struct virtio_device *vdev)
|
||||
struct virtnet_info *vi = vdev->priv;
|
||||
int i;
|
||||
|
||||
unregister_hotcpu_notifier(&vi->nb);
|
||||
|
||||
/* Prevent config work handler from accessing the device */
|
||||
mutex_lock(&vi->config_lock);
|
||||
vi->config_enable = false;
|
||||
@@ -1720,6 +1715,10 @@ static int virtnet_restore(struct virtio_device *vdev)
|
||||
virtnet_set_queues(vi, vi->curr_queue_pairs);
|
||||
rtnl_unlock();
|
||||
|
||||
err = register_hotcpu_notifier(&vi->nb);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -125,7 +125,7 @@ static const struct iwl_ht_params iwl7000_ht_params = {
|
||||
|
||||
|
||||
const struct iwl_cfg iwl7260_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC7260",
|
||||
.name = "Intel(R) Dual Band Wireless AC 7260",
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
@@ -133,8 +133,44 @@ const struct iwl_cfg iwl7260_2ac_cfg = {
|
||||
.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC3160",
|
||||
const struct iwl_cfg iwl7260_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 7260",
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL7260_NVM_VERSION,
|
||||
.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7260_n_cfg = {
|
||||
.name = "Intel(R) Wireless N 7260",
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL7260_NVM_VERSION,
|
||||
.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 3160",
|
||||
.fw_name_pre = IWL3160_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL3160_NVM_VERSION,
|
||||
.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 3160",
|
||||
.fw_name_pre = IWL3160_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL3160_NVM_VERSION,
|
||||
.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_n_cfg = {
|
||||
.name = "Intel(R) Wireless N 3160",
|
||||
.fw_name_pre = IWL3160_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
|
||||
@@ -321,6 +321,10 @@ extern const struct iwl_cfg iwl105_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl105_bgn_d_cfg;
|
||||
extern const struct iwl_cfg iwl135_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl7260_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl3160_ac_cfg;
|
||||
extern const struct iwl_cfg iwl7260_2n_cfg;
|
||||
extern const struct iwl_cfg iwl7260_n_cfg;
|
||||
extern const struct iwl_cfg iwl3160_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl3160_2n_cfg;
|
||||
extern const struct iwl_cfg iwl3160_n_cfg;
|
||||
|
||||
#endif /* __IWL_CONFIG_H__ */
|
||||
|
||||
@@ -267,10 +267,83 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
||||
|
||||
/* 7000 Series */
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4070, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4062, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4072, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4170, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4060, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x406A, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4160, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4062, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4162, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4270, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4272, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4260, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x426A, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4262, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4470, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4472, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4460, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x446A, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4462, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4870, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x486E, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4570, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4560, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4370, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4360, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x5070, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4020, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x402A, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0x4220, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0x4420, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC070, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0070, iwl3160_ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8070, iwl3160_ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC072, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC170, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC060, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC06A, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC160, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC062, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC162, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC770, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC760, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC270, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC272, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC260, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC26A, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC262, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC470, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC472, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC460, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC462, iwl7260_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC570, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC560, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC370, iwl7260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC360, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC020, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC02A, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B2, 0xC220, iwl7260_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B1, 0xC420, iwl7260_2n_cfg)},
|
||||
|
||||
/* 3160 Series */
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0070, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0072, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0170, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0172, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0060, iwl3160_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0062, iwl3160_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B4, 0x0270, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B4, 0x0272, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0470, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x0472, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B4, 0x0370, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8070, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8072, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8170, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8172, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8060, iwl3160_2n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8062, iwl3160_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B4, 0x8270, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8470, iwl3160_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x08B3, 0x8570, iwl3160_2ac_cfg)},
|
||||
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -88,6 +88,7 @@ struct xenvif {
|
||||
unsigned long credit_usec;
|
||||
unsigned long remaining_credit;
|
||||
struct timer_list credit_timeout;
|
||||
u64 credit_window_start;
|
||||
|
||||
/* Statistics */
|
||||
unsigned long rx_gso_checksum_fixup;
|
||||
|
||||
@@ -275,8 +275,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
|
||||
vif->credit_bytes = vif->remaining_credit = ~0UL;
|
||||
vif->credit_usec = 0UL;
|
||||
init_timer(&vif->credit_timeout);
|
||||
/* Initialize 'expires' now: it's used to track the credit window. */
|
||||
vif->credit_timeout.expires = jiffies;
|
||||
vif->credit_window_start = get_jiffies_64();
|
||||
|
||||
dev->netdev_ops = &xenvif_netdev_ops;
|
||||
dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
|
||||
|
||||
@@ -1423,9 +1423,8 @@ out:
|
||||
|
||||
static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
|
||||
{
|
||||
unsigned long now = jiffies;
|
||||
unsigned long next_credit =
|
||||
vif->credit_timeout.expires +
|
||||
u64 now = get_jiffies_64();
|
||||
u64 next_credit = vif->credit_window_start +
|
||||
msecs_to_jiffies(vif->credit_usec / 1000);
|
||||
|
||||
/* Timer could already be pending in rare cases. */
|
||||
@@ -1433,8 +1432,8 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
|
||||
return true;
|
||||
|
||||
/* Passed the point where we can replenish credit? */
|
||||
if (time_after_eq(now, next_credit)) {
|
||||
vif->credit_timeout.expires = now;
|
||||
if (time_after_eq64(now, next_credit)) {
|
||||
vif->credit_window_start = now;
|
||||
tx_add_credit(vif);
|
||||
}
|
||||
|
||||
@@ -1446,6 +1445,7 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
|
||||
tx_credit_callback;
|
||||
mod_timer(&vif->credit_timeout,
|
||||
next_credit);
|
||||
vif->credit_window_start = next_credit;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
struct backend_info {
|
||||
struct xenbus_device *dev;
|
||||
struct xenvif *vif;
|
||||
|
||||
/* This is the state that will be reflected in xenstore when any
|
||||
* active hotplug script completes.
|
||||
*/
|
||||
enum xenbus_state state;
|
||||
|
||||
enum xenbus_state frontend_state;
|
||||
struct xenbus_watch hotplug_status_watch;
|
||||
u8 have_hotplug_status_watch:1;
|
||||
@@ -33,11 +39,15 @@ static int connect_rings(struct backend_info *);
|
||||
static void connect(struct backend_info *);
|
||||
static void backend_create_xenvif(struct backend_info *be);
|
||||
static void unregister_hotplug_status_watch(struct backend_info *be);
|
||||
static void set_backend_state(struct backend_info *be,
|
||||
enum xenbus_state state);
|
||||
|
||||
static int netback_remove(struct xenbus_device *dev)
|
||||
{
|
||||
struct backend_info *be = dev_get_drvdata(&dev->dev);
|
||||
|
||||
set_backend_state(be, XenbusStateClosed);
|
||||
|
||||
unregister_hotplug_status_watch(be);
|
||||
if (be->vif) {
|
||||
kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
|
||||
@@ -126,6 +136,8 @@ static int netback_probe(struct xenbus_device *dev,
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
be->state = XenbusStateInitWait;
|
||||
|
||||
/* This kicks hotplug scripts, so do it immediately. */
|
||||
backend_create_xenvif(be);
|
||||
|
||||
@@ -198,24 +210,113 @@ static void backend_create_xenvif(struct backend_info *be)
|
||||
kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
|
||||
}
|
||||
|
||||
|
||||
static void disconnect_backend(struct xenbus_device *dev)
|
||||
static void backend_disconnect(struct backend_info *be)
|
||||
{
|
||||
struct backend_info *be = dev_get_drvdata(&dev->dev);
|
||||
|
||||
if (be->vif)
|
||||
xenvif_disconnect(be->vif);
|
||||
}
|
||||
|
||||
static void destroy_backend(struct xenbus_device *dev)
|
||||
static void backend_connect(struct backend_info *be)
|
||||
{
|
||||
struct backend_info *be = dev_get_drvdata(&dev->dev);
|
||||
if (be->vif)
|
||||
connect(be);
|
||||
}
|
||||
|
||||
if (be->vif) {
|
||||
kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
|
||||
xenbus_rm(XBT_NIL, dev->nodename, "hotplug-status");
|
||||
xenvif_free(be->vif);
|
||||
be->vif = NULL;
|
||||
static inline void backend_switch_state(struct backend_info *be,
|
||||
enum xenbus_state state)
|
||||
{
|
||||
struct xenbus_device *dev = be->dev;
|
||||
|
||||
pr_debug("%s -> %s\n", dev->nodename, xenbus_strstate(state));
|
||||
be->state = state;
|
||||
|
||||
/* If we are waiting for a hotplug script then defer the
|
||||
* actual xenbus state change.
|
||||
*/
|
||||
if (!be->have_hotplug_status_watch)
|
||||
xenbus_switch_state(dev, state);
|
||||
}
|
||||
|
||||
/* Handle backend state transitions:
|
||||
*
|
||||
* The backend state starts in InitWait and the following transitions are
|
||||
* allowed.
|
||||
*
|
||||
* InitWait -> Connected
|
||||
*
|
||||
* ^ \ |
|
||||
* | \ |
|
||||
* | \ |
|
||||
* | \ |
|
||||
* | \ |
|
||||
* | \ |
|
||||
* | V V
|
||||
*
|
||||
* Closed <-> Closing
|
||||
*
|
||||
* The state argument specifies the eventual state of the backend and the
|
||||
* function transitions to that state via the shortest path.
|
||||
*/
|
||||
static void set_backend_state(struct backend_info *be,
|
||||
enum xenbus_state state)
|
||||
{
|
||||
while (be->state != state) {
|
||||
switch (be->state) {
|
||||
case XenbusStateClosed:
|
||||
switch (state) {
|
||||
case XenbusStateInitWait:
|
||||
case XenbusStateConnected:
|
||||
pr_info("%s: prepare for reconnect\n",
|
||||
be->dev->nodename);
|
||||
backend_switch_state(be, XenbusStateInitWait);
|
||||
break;
|
||||
case XenbusStateClosing:
|
||||
backend_switch_state(be, XenbusStateClosing);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
break;
|
||||
case XenbusStateInitWait:
|
||||
switch (state) {
|
||||
case XenbusStateConnected:
|
||||
backend_connect(be);
|
||||
backend_switch_state(be, XenbusStateConnected);
|
||||
break;
|
||||
case XenbusStateClosing:
|
||||
case XenbusStateClosed:
|
||||
backend_switch_state(be, XenbusStateClosing);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
break;
|
||||
case XenbusStateConnected:
|
||||
switch (state) {
|
||||
case XenbusStateInitWait:
|
||||
case XenbusStateClosing:
|
||||
case XenbusStateClosed:
|
||||
backend_disconnect(be);
|
||||
backend_switch_state(be, XenbusStateClosing);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
break;
|
||||
case XenbusStateClosing:
|
||||
switch (state) {
|
||||
case XenbusStateInitWait:
|
||||
case XenbusStateConnected:
|
||||
case XenbusStateClosed:
|
||||
backend_switch_state(be, XenbusStateClosed);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,41 +328,33 @@ static void frontend_changed(struct xenbus_device *dev,
|
||||
{
|
||||
struct backend_info *be = dev_get_drvdata(&dev->dev);
|
||||
|
||||
pr_debug("frontend state %s", xenbus_strstate(frontend_state));
|
||||
pr_debug("%s -> %s\n", dev->otherend, xenbus_strstate(frontend_state));
|
||||
|
||||
be->frontend_state = frontend_state;
|
||||
|
||||
switch (frontend_state) {
|
||||
case XenbusStateInitialising:
|
||||
if (dev->state == XenbusStateClosed) {
|
||||
printk(KERN_INFO "%s: %s: prepare for reconnect\n",
|
||||
__func__, dev->nodename);
|
||||
xenbus_switch_state(dev, XenbusStateInitWait);
|
||||
}
|
||||
set_backend_state(be, XenbusStateInitWait);
|
||||
break;
|
||||
|
||||
case XenbusStateInitialised:
|
||||
break;
|
||||
|
||||
case XenbusStateConnected:
|
||||
if (dev->state == XenbusStateConnected)
|
||||
break;
|
||||
if (be->vif)
|
||||
connect(be);
|
||||
set_backend_state(be, XenbusStateConnected);
|
||||
break;
|
||||
|
||||
case XenbusStateClosing:
|
||||
disconnect_backend(dev);
|
||||
xenbus_switch_state(dev, XenbusStateClosing);
|
||||
set_backend_state(be, XenbusStateClosing);
|
||||
break;
|
||||
|
||||
case XenbusStateClosed:
|
||||
xenbus_switch_state(dev, XenbusStateClosed);
|
||||
set_backend_state(be, XenbusStateClosed);
|
||||
if (xenbus_dev_is_online(dev))
|
||||
break;
|
||||
destroy_backend(dev);
|
||||
/* fall through if not online */
|
||||
case XenbusStateUnknown:
|
||||
set_backend_state(be, XenbusStateClosed);
|
||||
device_unregister(&dev->dev);
|
||||
break;
|
||||
|
||||
@@ -354,7 +447,9 @@ static void hotplug_status_changed(struct xenbus_watch *watch,
|
||||
if (IS_ERR(str))
|
||||
return;
|
||||
if (len == sizeof("connected")-1 && !memcmp(str, "connected", len)) {
|
||||
xenbus_switch_state(be->dev, XenbusStateConnected);
|
||||
/* Complete any pending state change */
|
||||
xenbus_switch_state(be->dev, be->state);
|
||||
|
||||
/* Not interested in this watch anymore. */
|
||||
unregister_hotplug_status_watch(be);
|
||||
}
|
||||
@@ -384,12 +479,8 @@ static void connect(struct backend_info *be)
|
||||
err = xenbus_watch_pathfmt(dev, &be->hotplug_status_watch,
|
||||
hotplug_status_changed,
|
||||
"%s/%s", dev->nodename, "hotplug-status");
|
||||
if (err) {
|
||||
/* Switch now, since we can't do a watch. */
|
||||
xenbus_switch_state(dev, XenbusStateConnected);
|
||||
} else {
|
||||
if (!err)
|
||||
be->have_hotplug_status_watch = 1;
|
||||
}
|
||||
|
||||
netif_wake_queue(be->vif->dev);
|
||||
}
|
||||
|
||||
@@ -1010,6 +1010,7 @@ static int register_root_hub(struct usb_hcd *hcd)
|
||||
dev_name(&usb_dev->dev), retval);
|
||||
return retval;
|
||||
}
|
||||
usb_dev->lpm_capable = usb_device_supports_lpm(usb_dev);
|
||||
}
|
||||
|
||||
retval = usb_new_device (usb_dev);
|
||||
|
||||
@@ -135,7 +135,7 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev)
|
||||
return usb_get_intfdata(hdev->actconfig->interface[0]);
|
||||
}
|
||||
|
||||
static int usb_device_supports_lpm(struct usb_device *udev)
|
||||
int usb_device_supports_lpm(struct usb_device *udev)
|
||||
{
|
||||
/* USB 2.1 (and greater) devices indicate LPM support through
|
||||
* their USB 2.0 Extended Capabilities BOS descriptor.
|
||||
@@ -156,6 +156,11 @@ static int usb_device_supports_lpm(struct usb_device *udev)
|
||||
"Power management will be impacted.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* udev is root hub */
|
||||
if (!udev->parent)
|
||||
return 1;
|
||||
|
||||
if (udev->parent->lpm_capable)
|
||||
return 1;
|
||||
|
||||
@@ -1557,10 +1562,15 @@ static int hub_configure(struct usb_hub *hub,
|
||||
if (hub->has_indicators && blinkenlights)
|
||||
hub->indicator [0] = INDICATOR_CYCLE;
|
||||
|
||||
for (i = 0; i < hdev->maxchild; i++)
|
||||
if (usb_hub_create_port_device(hub, i + 1) < 0)
|
||||
for (i = 0; i < hdev->maxchild; i++) {
|
||||
ret = usb_hub_create_port_device(hub, i + 1);
|
||||
if (ret < 0) {
|
||||
dev_err(hub->intfdev,
|
||||
"couldn't create port%d device.\n", i + 1);
|
||||
hdev->maxchild = i;
|
||||
goto fail_keep_maxchild;
|
||||
}
|
||||
}
|
||||
|
||||
usb_hub_adjust_deviceremovable(hdev, hub->descriptor);
|
||||
|
||||
@@ -1568,6 +1578,8 @@ static int hub_configure(struct usb_hub *hub,
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
hdev->maxchild = 0;
|
||||
fail_keep_maxchild:
|
||||
dev_err (hub_dev, "config failed, %s (err %d)\n",
|
||||
message, ret);
|
||||
/* hub_disconnect() frees urb and descriptor */
|
||||
|
||||
@@ -35,6 +35,7 @@ extern int usb_get_device_descriptor(struct usb_device *dev,
|
||||
unsigned int size);
|
||||
extern int usb_get_bos_descriptor(struct usb_device *dev);
|
||||
extern void usb_release_bos_descriptor(struct usb_device *dev);
|
||||
extern int usb_device_supports_lpm(struct usb_device *udev);
|
||||
extern char *usb_cache_string(struct usb_device *udev, int index);
|
||||
extern int usb_set_configuration(struct usb_device *dev, int configuration);
|
||||
extern int usb_choose_configuration(struct usb_device *udev);
|
||||
|
||||
@@ -1376,6 +1376,23 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = (kernel_ulong_t)&net_intf2_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf2_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1545, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1546, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1547, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1565, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1566, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1567, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1589, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1590, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1591, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1592, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1594, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1596, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1598, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1600, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff,
|
||||
0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
|
||||
|
||||
@@ -118,7 +118,7 @@ static const struct backlight_ops atmel_pwm_bl_ops = {
|
||||
.update_status = atmel_pwm_bl_set_intensity,
|
||||
};
|
||||
|
||||
static int __init atmel_pwm_bl_probe(struct platform_device *pdev)
|
||||
static int atmel_pwm_bl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct backlight_properties props;
|
||||
const struct atmel_pwm_bl_platform_data *pdata;
|
||||
@@ -203,7 +203,7 @@ err_free_mem:
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int __exit atmel_pwm_bl_remove(struct platform_device *pdev)
|
||||
static int atmel_pwm_bl_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct atmel_pwm_bl *pwmbl = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -222,10 +222,11 @@ static struct platform_driver atmel_pwm_bl_driver = {
|
||||
.name = "atmel-pwm-bl",
|
||||
},
|
||||
/* REVISIT add suspend() and resume() */
|
||||
.remove = __exit_p(atmel_pwm_bl_remove),
|
||||
.probe = atmel_pwm_bl_probe,
|
||||
.remove = atmel_pwm_bl_remove,
|
||||
};
|
||||
|
||||
module_platform_driver_probe(atmel_pwm_bl_driver, atmel_pwm_bl_probe);
|
||||
module_platform_driver(atmel_pwm_bl_driver);
|
||||
|
||||
MODULE_AUTHOR("Hans-Christian egtvedt <hans-christian.egtvedt@atmel.com>");
|
||||
MODULE_DESCRIPTION("Atmel PWM backlight driver");
|
||||
|
||||
@@ -795,12 +795,21 @@ static int hvfb_remove(struct hv_device *hdev)
|
||||
}
|
||||
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(pci_stub_id_table) = {
|
||||
{
|
||||
.vendor = PCI_VENDOR_ID_MICROSOFT,
|
||||
.device = PCI_DEVICE_ID_HYPERV_VIDEO,
|
||||
},
|
||||
{ /* end of list */ }
|
||||
};
|
||||
|
||||
static const struct hv_vmbus_device_id id_table[] = {
|
||||
/* Synthetic Video Device GUID */
|
||||
{HV_SYNTHVID_GUID},
|
||||
{}
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, pci_stub_id_table);
|
||||
MODULE_DEVICE_TABLE(vmbus, id_table);
|
||||
|
||||
static struct hv_driver hvfb_drv = {
|
||||
@@ -810,14 +819,43 @@ static struct hv_driver hvfb_drv = {
|
||||
.remove = hvfb_remove,
|
||||
};
|
||||
|
||||
static int hvfb_pci_stub_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hvfb_pci_stub_remove(struct pci_dev *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct pci_driver hvfb_pci_stub_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = pci_stub_id_table,
|
||||
.probe = hvfb_pci_stub_probe,
|
||||
.remove = hvfb_pci_stub_remove,
|
||||
};
|
||||
|
||||
static int __init hvfb_drv_init(void)
|
||||
{
|
||||
return vmbus_driver_register(&hvfb_drv);
|
||||
int ret;
|
||||
|
||||
ret = vmbus_driver_register(&hvfb_drv);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
ret = pci_register_driver(&hvfb_pci_stub_driver);
|
||||
if (ret != 0) {
|
||||
vmbus_driver_unregister(&hvfb_drv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit hvfb_drv_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&hvfb_pci_stub_driver);
|
||||
vmbus_driver_unregister(&hvfb_drv);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,6 +165,7 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
|
||||
static inline void rt6_clean_expires(struct rt6_info *rt)
|
||||
{
|
||||
rt->rt6i_flags &= ~RTF_EXPIRES;
|
||||
rt->dst.expires = 0;
|
||||
}
|
||||
|
||||
static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user