mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
This is the 4.14.226 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmBSIcgACgkQONu9yGCS aT6mhBAAwIyqor49jFlFTa/witigPg9dQAcZ7HrtJdOldwv8BJZ4913mG5erHcuB 1kYPK70whNXjF4lmWgMhhaM3Gyhzfman7u9Z/nafOx9DyuRPeu85m//ZF2VGwvK+ qVDCBo7HvB0ecj7hno12hnV+H97IBkC5bTIjAnmjXeXsceUoseAD+gjHEFga8P68 cahBbYr6HKep53i7eNvv/WzVJH3Dyn5lD5SCEC1sHNAhoOix5lw0NSS7a/VoQ1x2 FO0rsvOAfjCP6cJoFi9whm7zzffEWpGHfcJMRwxyJu5CTSJtQdgqNOhtF4/sVm// mdBecMuAvrfMgDECmpCF3ibU+UpTdzoBT+mHgdp8XTYclRTdzW4Kj3aUC58azv9G SLkih49V1rgG3AWYeYRWrbfM/P51wOPNtJszG+32a2dWkSkapLiD+0y8cZMYukrj QFnjWFdNtzehTd3cUrts2a8+JNHySBHEHa9zv3TIjiHKjBzWxoK+dTxGA3aZfBTx ZSxI9lM+2ZjrEk50Mba2TvTAA8a/6nGE3zLjTpP5WgHjZS8KEISPYrz8K/SlC5gt lGgucKscFRl/8BU/JhJaJFBOJz0uYW6LYfenbxWzUI8nwoSX4mQHDoip4+QmL0wT GZbwmWzyWgPPnOdV7lA19CQCJk0YgP2tjxVKLknt4BoZJp89Hjw= =tPXj -----END PGP SIGNATURE----- Merge 4.14.226 into android-4.14-stable Changes in 4.14.226 uapi: nfnetlink_cthelper.h: fix userspace compilation error ethernet: alx: fix order of calls on resume ath9k: fix transmitting to stations in dynamic SMPS mode net: Fix gro aggregation for udp encaps with zero csum net: Introduce parse_protocol header_ops callback net: check if protocol extracted by virtio_net_hdr_set_proto is correct net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership can: flexcan: assert FRZ bit in flexcan_chip_freeze() can: flexcan: enable RX FIFO after FRZ/HALT valid netfilter: x_tables: gpf inside xt_find_revision() cifs: return proper error code in statfs(2) scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names Revert "mm, slub: consider rest of partial list if acquire_slab() fails" sh_eth: fix TRSCER mask for SH771x net/mlx4_en: update moderation when config reset net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10 net: sched: avoid duplicates in classes dump net: usb: qmi_wwan: allow qmimux add/del with master up cipso,calipso: resolve a number of problems with the DOI refcounts net: lapbether: Remove netif_start_queue / netif_stop_queue net: davicom: Fix regulator not turned off on failed probe net: davicom: Fix regulator not turned off on driver removal net: stmmac: stop each tx channel independently perf traceevent: Ensure read cmdlines are null terminated. s390/cio: return -EFAULT if copy_to_user() fails again drm/compat: Clear bounce structures drm: meson_drv add shutdown function s390/cio: return -EFAULT if copy_to_user() fails media: usbtv: Fix deadlock on suspend net: phy: fix save wrong speed and duplex problem if autoneg is on udf: fix silent AED tagLocation corruption mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()' mmc: mediatek: fix race condition between msdc_request_timeout and irq powerpc: improve handling of unrecoverable system reset powerpc/perf: Record counter overflow always if SAMPLE_IP is unset PCI: xgene-msi: Fix race in installing chained irq handler PCI: mediatek: Add missing of_node_put() to fix reference leak s390/smp: __smp_rescan_cpus() - move cpumask away from stack scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling ALSA: hda/hdmi: Cancel pending works before suspend ALSA: hda: Drop the BATCH workaround for AMD controllers ALSA: hda: Avoid spurious unsol event handling during S3/S4 ALSA: usb-audio: Fix "cannot get freq eq" errors on Dell AE515 sound bar Revert 95ebabde382c ("capabilities: Don't allow writing ambiguous v3 file capabilities") s390/dasd: fix hanging DASD driver unbind s390/dasd: fix hanging IO request during DASD driver unbind mmc: core: Fix partition switch time for eMMC Goodix Fingerprint device is not a modem USB: gadget: u_ether: Fix a configfs return code usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot usb: gadget: f_uac1: stop playback on function disable usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM xhci: Improve detection of device initiated wake signal. usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing USB: serial: io_edgeport: fix memory leak in edge_startup USB: serial: ch341: add new Product ID USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter USB: serial: cp210x: add some more GE USB IDs usbip: fix stub_dev to check for stream socket usbip: fix vhci_hcd to check for stream socket usbip: fix vudc to check for stream socket usbip: fix stub_dev usbip_sockfd_store() races leading to gpf usbip: fix vhci_hcd attach_store() races leading to gpf staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan() staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() staging: rtl8712: unterminated string leads to read overflow staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data() staging: ks7010: prevent buffer overflow in ks_wlan_set_scan() staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan staging: comedi: addi_apci_1032: Fix endian problem for COS sample staging: comedi: addi_apci_1500: Fix endian problem for command sample staging: comedi: adv_pci1710: Fix endian problem for AI command data staging: comedi: das6402: Fix endian problem for AI command data staging: comedi: das800: Fix endian problem for AI command data staging: comedi: dmm32at: Fix endian problem for AI command data staging: comedi: me4000: Fix endian problem for AI command data staging: comedi: pcl711: Fix endian problem for AI command data staging: comedi: pcl818: Fix endian problem for AI command data sh_eth: fix TRSCER mask for R7S72100 NFSv4.2: fix return value of _nfs4_get_security_label() block: rsxx: fix error return code of rsxx_pci_probe() configfs: fix a use-after-free in __configfs_open_file stop_machine: mark helpers __always_inline include/linux/sched/mm.h: use rcu_dereference in in_vfork() powerpc/64s: Fix instruction encoding for lis in ppc_function_entry() binfmt_misc: fix possible deadlock in bm_register_write hwmon: (lm90) Fix max6658 sporadic wrong temperature reading KVM: arm64: Fix exclusive limit for IPA size iio: imu: adis16400: release allocated memory on failure xen/events: reset affinity of 2-level event when tearing it down xen/events: don't unmask an event channel when an eoi is pending xen/events: avoid handling the same event on two cpus at the same time Linux 4.14.226 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ib4c6af910e10e6c04445ded8ccb1d877d9abb898
This commit is contained in:
commit
9da02745a1
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 14
|
PATCHLEVEL = 14
|
||||||
SUBLEVEL = 225
|
SUBLEVEL = 226
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Petit Gorille
|
NAME = Petit Gorille
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ void __patch_exception(int exc, unsigned long addr);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define OP_RT_RA_MASK 0xffff0000UL
|
#define OP_RT_RA_MASK 0xffff0000UL
|
||||||
#define LIS_R2 0x3c020000UL
|
#define LIS_R2 0x3c400000UL
|
||||||
#define ADDIS_R2_R12 0x3c4c0000UL
|
#define ADDIS_R2_R12 0x3c4c0000UL
|
||||||
#define ADDI_R2_R2 0x38420000UL
|
#define ADDI_R2_R2 0x38420000UL
|
||||||
|
|
||||||
|
@ -360,8 +360,11 @@ out:
|
|||||||
die("Unrecoverable nested System Reset", regs, SIGABRT);
|
die("Unrecoverable nested System Reset", regs, SIGABRT);
|
||||||
#endif
|
#endif
|
||||||
/* Must die if the interrupt is not recoverable */
|
/* Must die if the interrupt is not recoverable */
|
||||||
if (!(regs->msr & MSR_RI))
|
if (!(regs->msr & MSR_RI)) {
|
||||||
|
/* For the reason explained in die_mce, nmi_exit before die */
|
||||||
|
nmi_exit();
|
||||||
die("Unrecoverable System Reset", regs, SIGABRT);
|
die("Unrecoverable System Reset", regs, SIGABRT);
|
||||||
|
}
|
||||||
|
|
||||||
if (!nested)
|
if (!nested)
|
||||||
nmi_exit();
|
nmi_exit();
|
||||||
|
@ -2054,7 +2054,17 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
|
|||||||
left += period;
|
left += period;
|
||||||
if (left <= 0)
|
if (left <= 0)
|
||||||
left = period;
|
left = period;
|
||||||
record = siar_valid(regs);
|
|
||||||
|
/*
|
||||||
|
* If address is not requested in the sample via
|
||||||
|
* PERF_SAMPLE_IP, just record that sample irrespective
|
||||||
|
* of SIAR valid check.
|
||||||
|
*/
|
||||||
|
if (event->attr.sample_type & PERF_SAMPLE_IP)
|
||||||
|
record = siar_valid(regs);
|
||||||
|
else
|
||||||
|
record = 1;
|
||||||
|
|
||||||
event->hw.last_period = event->hw.sample_period;
|
event->hw.last_period = event->hw.sample_period;
|
||||||
}
|
}
|
||||||
if (left < 0x80000000LL)
|
if (left < 0x80000000LL)
|
||||||
@ -2072,9 +2082,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
|
|||||||
* MMCR2. Check attr.exclude_kernel and address to drop the sample in
|
* MMCR2. Check attr.exclude_kernel and address to drop the sample in
|
||||||
* these cases.
|
* these cases.
|
||||||
*/
|
*/
|
||||||
if (event->attr.exclude_kernel && record)
|
if (event->attr.exclude_kernel &&
|
||||||
if (is_kernel_addr(mfspr(SPRN_SIAR)))
|
(event->attr.sample_type & PERF_SAMPLE_IP) &&
|
||||||
record = 0;
|
is_kernel_addr(mfspr(SPRN_SIAR)))
|
||||||
|
record = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finally record data if requested.
|
* Finally record data if requested.
|
||||||
|
@ -761,7 +761,7 @@ static int smp_add_core(struct sclp_core_entry *core, cpumask_t *avail,
|
|||||||
static int __smp_rescan_cpus(struct sclp_core_info *info, bool early)
|
static int __smp_rescan_cpus(struct sclp_core_info *info, bool early)
|
||||||
{
|
{
|
||||||
struct sclp_core_entry *core;
|
struct sclp_core_entry *core;
|
||||||
cpumask_t avail;
|
static cpumask_t avail;
|
||||||
bool configured;
|
bool configured;
|
||||||
u16 core_id;
|
u16 core_id;
|
||||||
int nr, i;
|
int nr, i;
|
||||||
|
@ -892,6 +892,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
|
|||||||
card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
|
card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
|
||||||
if (!card->event_wq) {
|
if (!card->event_wq) {
|
||||||
dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
|
dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
|
||||||
|
st = -ENOMEM;
|
||||||
goto failed_event_handler;
|
goto failed_event_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +96,8 @@ static int compat_drm_version(struct file *file, unsigned int cmd,
|
|||||||
if (copy_from_user(&v32, (void __user *)arg, sizeof(v32)))
|
if (copy_from_user(&v32, (void __user *)arg, sizeof(v32)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
memset(&v, 0, sizeof(v));
|
||||||
|
|
||||||
v = (struct drm_version) {
|
v = (struct drm_version) {
|
||||||
.name_len = v32.name_len,
|
.name_len = v32.name_len,
|
||||||
.name = compat_ptr(v32.name),
|
.name = compat_ptr(v32.name),
|
||||||
@ -134,6 +136,9 @@ static int compat_drm_getunique(struct file *file, unsigned int cmd,
|
|||||||
|
|
||||||
if (copy_from_user(&uq32, (void __user *)arg, sizeof(uq32)))
|
if (copy_from_user(&uq32, (void __user *)arg, sizeof(uq32)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
memset(&uq, 0, sizeof(uq));
|
||||||
|
|
||||||
uq = (struct drm_unique){
|
uq = (struct drm_unique){
|
||||||
.unique_len = uq32.unique_len,
|
.unique_len = uq32.unique_len,
|
||||||
.unique = compat_ptr(uq32.unique),
|
.unique = compat_ptr(uq32.unique),
|
||||||
@ -260,6 +265,8 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd,
|
|||||||
if (copy_from_user(&c32, argp, sizeof(c32)))
|
if (copy_from_user(&c32, argp, sizeof(c32)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
memset(&client, 0, sizeof(client));
|
||||||
|
|
||||||
client.idx = c32.idx;
|
client.idx = c32.idx;
|
||||||
|
|
||||||
err = drm_ioctl_kernel(file, drm_getclient, &client, DRM_UNLOCKED);
|
err = drm_ioctl_kernel(file, drm_getclient, &client, DRM_UNLOCKED);
|
||||||
@ -842,6 +849,8 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,
|
|||||||
if (copy_from_user(&req32, argp, sizeof(req32)))
|
if (copy_from_user(&req32, argp, sizeof(req32)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
memset(&req, 0, sizeof(req));
|
||||||
|
|
||||||
req.request.type = req32.request.type;
|
req.request.type = req32.request.type;
|
||||||
req.request.sequence = req32.request.sequence;
|
req.request.sequence = req32.request.sequence;
|
||||||
req.request.signal = req32.request.signal;
|
req.request.signal = req32.request.signal;
|
||||||
@ -879,6 +888,8 @@ static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd,
|
|||||||
struct drm_mode_fb_cmd2 req64;
|
struct drm_mode_fb_cmd2 req64;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
memset(&req64, 0, sizeof(req64));
|
||||||
|
|
||||||
if (copy_from_user(&req64, argp,
|
if (copy_from_user(&req64, argp,
|
||||||
offsetof(drm_mode_fb_cmd232_t, modifier)))
|
offsetof(drm_mode_fb_cmd232_t, modifier)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -361,6 +361,16 @@ static int meson_probe_remote(struct platform_device *pdev,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void meson_drv_shutdown(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct meson_drm *priv = dev_get_drvdata(&pdev->dev);
|
||||||
|
struct drm_device *drm = priv->drm;
|
||||||
|
|
||||||
|
DRM_DEBUG_DRIVER("\n");
|
||||||
|
drm_kms_helper_poll_fini(drm);
|
||||||
|
drm_atomic_helper_shutdown(drm);
|
||||||
|
}
|
||||||
|
|
||||||
static int meson_drv_probe(struct platform_device *pdev)
|
static int meson_drv_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct component_match *match = NULL;
|
struct component_match *match = NULL;
|
||||||
@ -405,6 +415,7 @@ MODULE_DEVICE_TABLE(of, dt_match);
|
|||||||
|
|
||||||
static struct platform_driver meson_drm_platform_driver = {
|
static struct platform_driver meson_drm_platform_driver = {
|
||||||
.probe = meson_drv_probe,
|
.probe = meson_drv_probe,
|
||||||
|
.shutdown = meson_drv_shutdown,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "meson-drm",
|
.name = "meson-drm",
|
||||||
.of_match_table = dt_match,
|
.of_match_table = dt_match,
|
||||||
|
@ -187,6 +187,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
|
|||||||
#define LM90_HAVE_EMERGENCY_ALARM (1 << 5)/* emergency alarm */
|
#define LM90_HAVE_EMERGENCY_ALARM (1 << 5)/* emergency alarm */
|
||||||
#define LM90_HAVE_TEMP3 (1 << 6) /* 3rd temperature sensor */
|
#define LM90_HAVE_TEMP3 (1 << 6) /* 3rd temperature sensor */
|
||||||
#define LM90_HAVE_BROKEN_ALERT (1 << 7) /* Broken alert */
|
#define LM90_HAVE_BROKEN_ALERT (1 << 7) /* Broken alert */
|
||||||
|
#define LM90_PAUSE_FOR_CONFIG (1 << 8) /* Pause conversion for config */
|
||||||
|
|
||||||
/* LM90 status */
|
/* LM90 status */
|
||||||
#define LM90_STATUS_LTHRM (1 << 0) /* local THERM limit tripped */
|
#define LM90_STATUS_LTHRM (1 << 0) /* local THERM limit tripped */
|
||||||
@ -380,6 +381,7 @@ static const struct lm90_params lm90_params[] = {
|
|||||||
.reg_local_ext = MAX6657_REG_R_LOCAL_TEMPL,
|
.reg_local_ext = MAX6657_REG_R_LOCAL_TEMPL,
|
||||||
},
|
},
|
||||||
[max6657] = {
|
[max6657] = {
|
||||||
|
.flags = LM90_PAUSE_FOR_CONFIG,
|
||||||
.alert_alarms = 0x7c,
|
.alert_alarms = 0x7c,
|
||||||
.max_convrate = 8,
|
.max_convrate = 8,
|
||||||
.reg_local_ext = MAX6657_REG_R_LOCAL_TEMPL,
|
.reg_local_ext = MAX6657_REG_R_LOCAL_TEMPL,
|
||||||
@ -580,6 +582,38 @@ static inline int lm90_select_remote_channel(struct i2c_client *client,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lm90_write_convrate(struct i2c_client *client,
|
||||||
|
struct lm90_data *data, int val)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
int config_orig, config_stop;
|
||||||
|
|
||||||
|
/* Save config and pause conversion */
|
||||||
|
if (data->flags & LM90_PAUSE_FOR_CONFIG) {
|
||||||
|
config_orig = lm90_read_reg(client, LM90_REG_R_CONFIG1);
|
||||||
|
if (config_orig < 0)
|
||||||
|
return config_orig;
|
||||||
|
config_stop = config_orig | 0x40;
|
||||||
|
if (config_orig != config_stop) {
|
||||||
|
err = i2c_smbus_write_byte_data(client,
|
||||||
|
LM90_REG_W_CONFIG1,
|
||||||
|
config_stop);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set conv rate */
|
||||||
|
err = i2c_smbus_write_byte_data(client, LM90_REG_W_CONVRATE, val);
|
||||||
|
|
||||||
|
/* Revert change to config */
|
||||||
|
if (data->flags & LM90_PAUSE_FOR_CONFIG && config_orig != config_stop)
|
||||||
|
i2c_smbus_write_byte_data(client, LM90_REG_W_CONFIG1,
|
||||||
|
config_orig);
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set conversion rate.
|
* Set conversion rate.
|
||||||
* client->update_lock must be held when calling this function (unless we are
|
* client->update_lock must be held when calling this function (unless we are
|
||||||
@ -600,7 +634,7 @@ static int lm90_set_convrate(struct i2c_client *client, struct lm90_data *data,
|
|||||||
if (interval >= update_interval * 3 / 4)
|
if (interval >= update_interval * 3 / 4)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
err = i2c_smbus_write_byte_data(client, LM90_REG_W_CONVRATE, i);
|
err = lm90_write_convrate(client, data, i);
|
||||||
data->update_interval = DIV_ROUND_CLOSEST(update_interval, 64);
|
data->update_interval = DIV_ROUND_CLOSEST(update_interval, 64);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@ -1606,8 +1640,7 @@ static void lm90_restore_conf(void *_data)
|
|||||||
struct i2c_client *client = data->client;
|
struct i2c_client *client = data->client;
|
||||||
|
|
||||||
/* Restore initial configuration */
|
/* Restore initial configuration */
|
||||||
i2c_smbus_write_byte_data(client, LM90_REG_W_CONVRATE,
|
lm90_write_convrate(client, data, data->convrate_orig);
|
||||||
data->convrate_orig);
|
|
||||||
i2c_smbus_write_byte_data(client, LM90_REG_W_CONFIG1,
|
i2c_smbus_write_byte_data(client, LM90_REG_W_CONFIG1,
|
||||||
data->config_orig);
|
data->config_orig);
|
||||||
}
|
}
|
||||||
@ -1624,12 +1657,13 @@ static int lm90_init_client(struct i2c_client *client, struct lm90_data *data)
|
|||||||
/*
|
/*
|
||||||
* Start the conversions.
|
* Start the conversions.
|
||||||
*/
|
*/
|
||||||
lm90_set_convrate(client, data, 500); /* 500ms; 2Hz conversion rate */
|
|
||||||
config = lm90_read_reg(client, LM90_REG_R_CONFIG1);
|
config = lm90_read_reg(client, LM90_REG_R_CONFIG1);
|
||||||
if (config < 0)
|
if (config < 0)
|
||||||
return config;
|
return config;
|
||||||
data->config_orig = config;
|
data->config_orig = config;
|
||||||
|
|
||||||
|
lm90_set_convrate(client, data, 500); /* 500ms; 2Hz conversion rate */
|
||||||
|
|
||||||
/* Check Temperature Range Select */
|
/* Check Temperature Range Select */
|
||||||
if (data->kind == adt7461 || data->kind == tmp451) {
|
if (data->kind == adt7461 || data->kind == tmp451) {
|
||||||
if (config & 0x04)
|
if (config & 0x04)
|
||||||
|
@ -39,8 +39,11 @@ int adis_update_scan_mode(struct iio_dev *indio_dev,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
adis->buffer = kzalloc(indio_dev->scan_bytes * 2, GFP_KERNEL);
|
adis->buffer = kzalloc(indio_dev->scan_bytes * 2, GFP_KERNEL);
|
||||||
if (!adis->buffer)
|
if (!adis->buffer) {
|
||||||
|
kfree(adis->xfer);
|
||||||
|
adis->xfer = NULL;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
rx = adis->buffer;
|
rx = adis->buffer;
|
||||||
tx = rx + scan_count;
|
tx = rx + scan_count;
|
||||||
|
@ -398,7 +398,7 @@ void usbtv_audio_free(struct usbtv *usbtv)
|
|||||||
cancel_work_sync(&usbtv->snd_trigger);
|
cancel_work_sync(&usbtv->snd_trigger);
|
||||||
|
|
||||||
if (usbtv->snd && usbtv->udev) {
|
if (usbtv->snd && usbtv->udev) {
|
||||||
snd_card_free(usbtv->snd);
|
snd_card_free_when_closed(usbtv->snd);
|
||||||
usbtv->snd = NULL;
|
usbtv->snd = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -426,10 +426,6 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
|||||||
|
|
||||||
/* EXT_CSD value is in units of 10ms, but we store in ms */
|
/* EXT_CSD value is in units of 10ms, but we store in ms */
|
||||||
card->ext_csd.part_time = 10 * ext_csd[EXT_CSD_PART_SWITCH_TIME];
|
card->ext_csd.part_time = 10 * ext_csd[EXT_CSD_PART_SWITCH_TIME];
|
||||||
/* Some eMMC set the value too low so set a minimum */
|
|
||||||
if (card->ext_csd.part_time &&
|
|
||||||
card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
|
|
||||||
card->ext_csd.part_time = MMC_MIN_PART_SWITCH_TIME;
|
|
||||||
|
|
||||||
/* Sleep / awake timeout in 100ns units */
|
/* Sleep / awake timeout in 100ns units */
|
||||||
if (sa_shift > 0 && sa_shift <= 0x17)
|
if (sa_shift > 0 && sa_shift <= 0x17)
|
||||||
@ -619,6 +615,17 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
|||||||
card->ext_csd.data_sector_size = 512;
|
card->ext_csd.data_sector_size = 512;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GENERIC_CMD6_TIME is to be used "unless a specific timeout is defined
|
||||||
|
* when accessing a specific field", so use it here if there is no
|
||||||
|
* PARTITION_SWITCH_TIME.
|
||||||
|
*/
|
||||||
|
if (!card->ext_csd.part_time)
|
||||||
|
card->ext_csd.part_time = card->ext_csd.generic_cmd6_time;
|
||||||
|
/* Some eMMC set the value too low so set a minimum */
|
||||||
|
if (card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
|
||||||
|
card->ext_csd.part_time = MMC_MIN_PART_SWITCH_TIME;
|
||||||
|
|
||||||
/* eMMC v5 or later */
|
/* eMMC v5 or later */
|
||||||
if (card->ext_csd.rev >= 7) {
|
if (card->ext_csd.rev >= 7) {
|
||||||
memcpy(card->ext_csd.fwrev, &ext_csd[EXT_CSD_FIRMWARE_VERSION],
|
memcpy(card->ext_csd.fwrev, &ext_csd[EXT_CSD_FIRMWARE_VERSION],
|
||||||
|
@ -758,13 +758,13 @@ static void msdc_track_cmd_data(struct msdc_host *host,
|
|||||||
static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq)
|
static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
bool ret;
|
|
||||||
|
|
||||||
ret = cancel_delayed_work(&host->req_timeout);
|
/*
|
||||||
if (!ret) {
|
* No need check the return value of cancel_delayed_work, as only ONE
|
||||||
/* delay work already running */
|
* path will go here!
|
||||||
return;
|
*/
|
||||||
}
|
cancel_delayed_work(&host->req_timeout);
|
||||||
|
|
||||||
spin_lock_irqsave(&host->lock, flags);
|
spin_lock_irqsave(&host->lock, flags);
|
||||||
host->mrq = NULL;
|
host->mrq = NULL;
|
||||||
spin_unlock_irqrestore(&host->lock, flags);
|
spin_unlock_irqrestore(&host->lock, flags);
|
||||||
@ -782,7 +782,7 @@ static bool msdc_cmd_done(struct msdc_host *host, int events,
|
|||||||
bool done = false;
|
bool done = false;
|
||||||
bool sbc_error;
|
bool sbc_error;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 *rsp = cmd->resp;
|
u32 *rsp;
|
||||||
|
|
||||||
if (mrq->sbc && cmd == mrq->cmd &&
|
if (mrq->sbc && cmd == mrq->cmd &&
|
||||||
(events & (MSDC_INT_ACMDRDY | MSDC_INT_ACMDCRCERR
|
(events & (MSDC_INT_ACMDRDY | MSDC_INT_ACMDCRCERR
|
||||||
@ -803,6 +803,7 @@ static bool msdc_cmd_done(struct msdc_host *host, int events,
|
|||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
return true;
|
return true;
|
||||||
|
rsp = cmd->resp;
|
||||||
|
|
||||||
sdr_clr_bits(host->base + MSDC_INTEN, cmd_ints_mask);
|
sdr_clr_bits(host->base + MSDC_INTEN, cmd_ints_mask);
|
||||||
|
|
||||||
@ -984,7 +985,7 @@ static void msdc_data_xfer_next(struct msdc_host *host,
|
|||||||
static bool msdc_data_xfer_done(struct msdc_host *host, u32 events,
|
static bool msdc_data_xfer_done(struct msdc_host *host, u32 events,
|
||||||
struct mmc_request *mrq, struct mmc_data *data)
|
struct mmc_request *mrq, struct mmc_data *data)
|
||||||
{
|
{
|
||||||
struct mmc_command *stop = data->stop;
|
struct mmc_command *stop;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
bool done;
|
bool done;
|
||||||
unsigned int check_data = events &
|
unsigned int check_data = events &
|
||||||
@ -1000,6 +1001,7 @@ static bool msdc_data_xfer_done(struct msdc_host *host, u32 events,
|
|||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
return true;
|
return true;
|
||||||
|
stop = data->stop;
|
||||||
|
|
||||||
if (check_data || (stop && stop->error)) {
|
if (check_data || (stop && stop->error)) {
|
||||||
dev_dbg(host->dev, "DMA status: 0x%8X\n",
|
dev_dbg(host->dev, "DMA status: 0x%8X\n",
|
||||||
|
@ -659,7 +659,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = mmc_of_parse(mmc);
|
ret = mmc_of_parse(mmc);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_clk_disable;
|
goto out_free_dma;
|
||||||
|
|
||||||
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
|
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ static int flexcan_chip_freeze(struct flexcan_priv *priv)
|
|||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
reg = flexcan_read(®s->mcr);
|
reg = flexcan_read(®s->mcr);
|
||||||
reg |= FLEXCAN_MCR_HALT;
|
reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT;
|
||||||
flexcan_write(reg, ®s->mcr);
|
flexcan_write(reg, ®s->mcr);
|
||||||
|
|
||||||
while (timeout-- && !(flexcan_read(®s->mcr) & FLEXCAN_MCR_FRZ_ACK))
|
while (timeout-- && !(flexcan_read(®s->mcr) & FLEXCAN_MCR_FRZ_ACK))
|
||||||
@ -1217,10 +1217,14 @@ static int register_flexcandev(struct net_device *dev)
|
|||||||
if (err)
|
if (err)
|
||||||
goto out_chip_disable;
|
goto out_chip_disable;
|
||||||
|
|
||||||
/* set freeze, halt and activate FIFO, restrict register access */
|
/* set freeze, halt */
|
||||||
|
err = flexcan_chip_freeze(priv);
|
||||||
|
if (err)
|
||||||
|
goto out_chip_disable;
|
||||||
|
|
||||||
|
/* activate FIFO, restrict register access */
|
||||||
reg = flexcan_read(®s->mcr);
|
reg = flexcan_read(®s->mcr);
|
||||||
reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT |
|
reg |= FLEXCAN_MCR_FEN | FLEXCAN_MCR_SUPV;
|
||||||
FLEXCAN_MCR_FEN | FLEXCAN_MCR_SUPV;
|
|
||||||
flexcan_write(reg, ®s->mcr);
|
flexcan_write(reg, ®s->mcr);
|
||||||
|
|
||||||
/* Currently we only support newer versions of this core
|
/* Currently we only support newer versions of this core
|
||||||
|
@ -1904,13 +1904,16 @@ static int alx_resume(struct device *dev)
|
|||||||
|
|
||||||
if (!netif_running(alx->dev))
|
if (!netif_running(alx->dev))
|
||||||
return 0;
|
return 0;
|
||||||
netif_device_attach(alx->dev);
|
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
err = __alx_open(alx, true);
|
err = __alx_open(alx, true);
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
return err;
|
netif_device_attach(alx->dev);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
|
static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
|
||||||
|
@ -143,6 +143,8 @@ struct board_info {
|
|||||||
u32 wake_state;
|
u32 wake_state;
|
||||||
|
|
||||||
int ip_summed;
|
int ip_summed;
|
||||||
|
|
||||||
|
struct regulator *power_supply;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* debug code */
|
/* debug code */
|
||||||
@ -1460,7 +1462,7 @@ dm9000_probe(struct platform_device *pdev)
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to request reset gpio %d: %d\n",
|
dev_err(dev, "failed to request reset gpio %d: %d\n",
|
||||||
reset_gpios, ret);
|
reset_gpios, ret);
|
||||||
return -ENODEV;
|
goto out_regulator_disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* According to manual PWRST# Low Period Min 1ms */
|
/* According to manual PWRST# Low Period Min 1ms */
|
||||||
@ -1472,8 +1474,10 @@ dm9000_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
if (!pdata) {
|
if (!pdata) {
|
||||||
pdata = dm9000_parse_dt(&pdev->dev);
|
pdata = dm9000_parse_dt(&pdev->dev);
|
||||||
if (IS_ERR(pdata))
|
if (IS_ERR(pdata)) {
|
||||||
return PTR_ERR(pdata);
|
ret = PTR_ERR(pdata);
|
||||||
|
goto out_regulator_disable;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Init network device */
|
/* Init network device */
|
||||||
@ -1490,6 +1494,8 @@ dm9000_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
db->dev = &pdev->dev;
|
db->dev = &pdev->dev;
|
||||||
db->ndev = ndev;
|
db->ndev = ndev;
|
||||||
|
if (!IS_ERR(power))
|
||||||
|
db->power_supply = power;
|
||||||
|
|
||||||
spin_lock_init(&db->lock);
|
spin_lock_init(&db->lock);
|
||||||
mutex_init(&db->addr_lock);
|
mutex_init(&db->addr_lock);
|
||||||
@ -1716,6 +1722,10 @@ out:
|
|||||||
dm9000_release_board(pdev, db);
|
dm9000_release_board(pdev, db);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
|
out_regulator_disable:
|
||||||
|
if (!IS_ERR(power))
|
||||||
|
regulator_disable(power);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1775,10 +1785,13 @@ static int
|
|||||||
dm9000_drv_remove(struct platform_device *pdev)
|
dm9000_drv_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct net_device *ndev = platform_get_drvdata(pdev);
|
struct net_device *ndev = platform_get_drvdata(pdev);
|
||||||
|
struct board_info *dm = to_dm9000_board(ndev);
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
dm9000_release_board(pdev, netdev_priv(ndev));
|
dm9000_release_board(pdev, dm);
|
||||||
free_netdev(ndev); /* free device structure */
|
free_netdev(ndev); /* free device structure */
|
||||||
|
if (dm->power_supply)
|
||||||
|
regulator_disable(dm->power_supply);
|
||||||
|
|
||||||
dev_dbg(&pdev->dev, "released and freed device\n");
|
dev_dbg(&pdev->dev, "released and freed device\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#define EN_ETHTOOL_SHORT_MASK cpu_to_be16(0xffff)
|
#define EN_ETHTOOL_SHORT_MASK cpu_to_be16(0xffff)
|
||||||
#define EN_ETHTOOL_WORD_MASK cpu_to_be32(0xffffffff)
|
#define EN_ETHTOOL_WORD_MASK cpu_to_be32(0xffffffff)
|
||||||
|
|
||||||
static int mlx4_en_moderation_update(struct mlx4_en_priv *priv)
|
int mlx4_en_moderation_update(struct mlx4_en_priv *priv)
|
||||||
{
|
{
|
||||||
int i, t;
|
int i, t;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -3673,6 +3673,8 @@ int mlx4_en_reset_config(struct net_device *dev,
|
|||||||
en_err(priv, "Failed starting port\n");
|
en_err(priv, "Failed starting port\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!err)
|
||||||
|
err = mlx4_en_moderation_update(priv);
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&mdev->state_lock);
|
mutex_unlock(&mdev->state_lock);
|
||||||
kfree(tmp);
|
kfree(tmp);
|
||||||
|
@ -789,6 +789,7 @@ void mlx4_en_ptp_overflow_check(struct mlx4_en_dev *mdev);
|
|||||||
#define DEV_FEATURE_CHANGED(dev, new_features, feature) \
|
#define DEV_FEATURE_CHANGED(dev, new_features, feature) \
|
||||||
((dev->features & feature) ^ (new_features & feature))
|
((dev->features & feature) ^ (new_features & feature))
|
||||||
|
|
||||||
|
int mlx4_en_moderation_update(struct mlx4_en_priv *priv);
|
||||||
int mlx4_en_reset_config(struct net_device *dev,
|
int mlx4_en_reset_config(struct net_device *dev,
|
||||||
struct hwtstamp_config ts_config,
|
struct hwtstamp_config ts_config,
|
||||||
netdev_features_t new_features);
|
netdev_features_t new_features);
|
||||||
|
@ -533,6 +533,8 @@ static struct sh_eth_cpu_data r7s72100_data = {
|
|||||||
EESR_TDE,
|
EESR_TDE,
|
||||||
.fdr_value = 0x0000070f,
|
.fdr_value = 0x0000070f,
|
||||||
|
|
||||||
|
.trscer_err_mask = DESC_I_RINT8 | DESC_I_RINT5,
|
||||||
|
|
||||||
.no_psr = 1,
|
.no_psr = 1,
|
||||||
.apr = 1,
|
.apr = 1,
|
||||||
.mpr = 1,
|
.mpr = 1,
|
||||||
@ -935,6 +937,9 @@ static struct sh_eth_cpu_data sh771x_data = {
|
|||||||
EESIPR_CEEFIP | EESIPR_CELFIP |
|
EESIPR_CEEFIP | EESIPR_CELFIP |
|
||||||
EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
|
EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
|
||||||
EESIPR_PREIP | EESIPR_CERFIP,
|
EESIPR_PREIP | EESIPR_CERFIP,
|
||||||
|
|
||||||
|
.trscer_err_mask = DESC_I_RINT8,
|
||||||
|
|
||||||
.tsu = 1,
|
.tsu = 1,
|
||||||
.dual_port = 1,
|
.dual_port = 1,
|
||||||
};
|
};
|
||||||
|
@ -115,6 +115,23 @@ static void dwmac4_dma_init_channel(void __iomem *ioaddr,
|
|||||||
ioaddr + DMA_CHAN_INTR_ENA(chan));
|
ioaddr + DMA_CHAN_INTR_ENA(chan));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dwmac410_dma_init_channel(void __iomem *ioaddr,
|
||||||
|
struct stmmac_dma_cfg *dma_cfg, u32 chan)
|
||||||
|
{
|
||||||
|
u32 value;
|
||||||
|
|
||||||
|
/* common channel control register config */
|
||||||
|
value = readl(ioaddr + DMA_CHAN_CONTROL(chan));
|
||||||
|
if (dma_cfg->pblx8)
|
||||||
|
value = value | DMA_BUS_MODE_PBL;
|
||||||
|
|
||||||
|
writel(value, ioaddr + DMA_CHAN_CONTROL(chan));
|
||||||
|
|
||||||
|
/* Mask interrupts by writing to CSR7 */
|
||||||
|
writel(DMA_CHAN_INTR_DEFAULT_MASK_4_10,
|
||||||
|
ioaddr + DMA_CHAN_INTR_ENA(chan));
|
||||||
|
}
|
||||||
|
|
||||||
static void dwmac4_dma_init(void __iomem *ioaddr,
|
static void dwmac4_dma_init(void __iomem *ioaddr,
|
||||||
struct stmmac_dma_cfg *dma_cfg,
|
struct stmmac_dma_cfg *dma_cfg,
|
||||||
u32 dma_tx, u32 dma_rx, int atds)
|
u32 dma_tx, u32 dma_rx, int atds)
|
||||||
@ -416,7 +433,7 @@ const struct stmmac_dma_ops dwmac4_dma_ops = {
|
|||||||
const struct stmmac_dma_ops dwmac410_dma_ops = {
|
const struct stmmac_dma_ops dwmac410_dma_ops = {
|
||||||
.reset = dwmac4_dma_reset,
|
.reset = dwmac4_dma_reset,
|
||||||
.init = dwmac4_dma_init,
|
.init = dwmac4_dma_init,
|
||||||
.init_chan = dwmac4_dma_init_channel,
|
.init_chan = dwmac410_dma_init_channel,
|
||||||
.init_rx_chan = dwmac4_dma_init_rx_chan,
|
.init_rx_chan = dwmac4_dma_init_rx_chan,
|
||||||
.init_tx_chan = dwmac4_dma_init_tx_chan,
|
.init_tx_chan = dwmac4_dma_init_tx_chan,
|
||||||
.axi = dwmac4_dma_axi,
|
.axi = dwmac4_dma_axi,
|
||||||
|
@ -63,10 +63,6 @@ void dwmac4_dma_stop_tx(void __iomem *ioaddr, u32 chan)
|
|||||||
|
|
||||||
value &= ~DMA_CONTROL_ST;
|
value &= ~DMA_CONTROL_ST;
|
||||||
writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
|
writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
|
||||||
|
|
||||||
value = readl(ioaddr + GMAC_CONFIG);
|
|
||||||
value &= ~GMAC_CONFIG_TE;
|
|
||||||
writel(value, ioaddr + GMAC_CONFIG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dwmac4_dma_start_rx(void __iomem *ioaddr, u32 chan)
|
void dwmac4_dma_start_rx(void __iomem *ioaddr, u32 chan)
|
||||||
|
@ -335,7 +335,10 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
|
|||||||
|
|
||||||
phydev->autoneg = autoneg;
|
phydev->autoneg = autoneg;
|
||||||
|
|
||||||
phydev->speed = speed;
|
if (autoneg == AUTONEG_DISABLE) {
|
||||||
|
phydev->speed = speed;
|
||||||
|
phydev->duplex = duplex;
|
||||||
|
}
|
||||||
|
|
||||||
phydev->advertising = advertising;
|
phydev->advertising = advertising;
|
||||||
|
|
||||||
@ -344,8 +347,6 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
|
|||||||
else
|
else
|
||||||
phydev->advertising &= ~ADVERTISED_Autoneg;
|
phydev->advertising &= ~ADVERTISED_Autoneg;
|
||||||
|
|
||||||
phydev->duplex = duplex;
|
|
||||||
|
|
||||||
phydev->mdix_ctrl = cmd->base.eth_tp_mdix_ctrl;
|
phydev->mdix_ctrl = cmd->base.eth_tp_mdix_ctrl;
|
||||||
|
|
||||||
/* Restart the PHY */
|
/* Restart the PHY */
|
||||||
|
@ -378,13 +378,6 @@ static ssize_t add_mux_store(struct device *d, struct device_attribute *attr, c
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we don't want to modify a running netdev */
|
|
||||||
if (netif_running(dev->net)) {
|
|
||||||
netdev_err(dev->net, "Cannot change a running device\n");
|
|
||||||
ret = -EBUSY;
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = qmimux_register_device(dev->net, mux_id);
|
ret = qmimux_register_device(dev->net, mux_id);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
info->flags |= QMI_WWAN_FLAG_MUX;
|
info->flags |= QMI_WWAN_FLAG_MUX;
|
||||||
@ -414,13 +407,6 @@ static ssize_t del_mux_store(struct device *d, struct device_attribute *attr, c
|
|||||||
if (!rtnl_trylock())
|
if (!rtnl_trylock())
|
||||||
return restart_syscall();
|
return restart_syscall();
|
||||||
|
|
||||||
/* we don't want to modify a running netdev */
|
|
||||||
if (netif_running(dev->net)) {
|
|
||||||
netdev_err(dev->net, "Cannot change a running device\n");
|
|
||||||
ret = -EBUSY;
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
del_dev = qmimux_find_dev(dev, mux_id);
|
del_dev = qmimux_find_dev(dev, mux_id);
|
||||||
if (!del_dev) {
|
if (!del_dev) {
|
||||||
netdev_err(dev->net, "mux_id not present\n");
|
netdev_err(dev->net, "mux_id not present\n");
|
||||||
|
@ -286,7 +286,6 @@ static int lapbeth_open(struct net_device *dev)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
netif_start_queue(dev);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,8 +293,6 @@ static int lapbeth_close(struct net_device *dev)
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
netif_stop_queue(dev);
|
|
||||||
|
|
||||||
if ((err = lapb_unregister(dev)) != LAPB_OK)
|
if ((err = lapb_unregister(dev)) != LAPB_OK)
|
||||||
pr_err("lapb_unregister error: %d\n", err);
|
pr_err("lapb_unregister error: %d\n", err);
|
||||||
|
|
||||||
|
@ -179,7 +179,8 @@ struct ath_frame_info {
|
|||||||
s8 txq;
|
s8 txq;
|
||||||
u8 keyix;
|
u8 keyix;
|
||||||
u8 rtscts_rate;
|
u8 rtscts_rate;
|
||||||
u8 retries : 7;
|
u8 retries : 6;
|
||||||
|
u8 dyn_smps : 1;
|
||||||
u8 baw_tracked : 1;
|
u8 baw_tracked : 1;
|
||||||
u8 tx_power;
|
u8 tx_power;
|
||||||
enum ath9k_key_type keytype:2;
|
enum ath9k_key_type keytype:2;
|
||||||
|
@ -1314,6 +1314,11 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf,
|
|||||||
is_40, is_sgi, is_sp);
|
is_40, is_sgi, is_sp);
|
||||||
if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC))
|
if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC))
|
||||||
info->rates[i].RateFlags |= ATH9K_RATESERIES_STBC;
|
info->rates[i].RateFlags |= ATH9K_RATESERIES_STBC;
|
||||||
|
if (rix >= 8 && fi->dyn_smps) {
|
||||||
|
info->rates[i].RateFlags |=
|
||||||
|
ATH9K_RATESERIES_RTS_CTS;
|
||||||
|
info->flags |= ATH9K_TXDESC_CTSENA;
|
||||||
|
}
|
||||||
|
|
||||||
info->txpower[i] = ath_get_rate_txpower(sc, bf, rix,
|
info->txpower[i] = ath_get_rate_txpower(sc, bf, rix,
|
||||||
is_40, false);
|
is_40, false);
|
||||||
@ -2178,6 +2183,7 @@ static void setup_frame_info(struct ieee80211_hw *hw,
|
|||||||
fi->keyix = an->ps_key;
|
fi->keyix = an->ps_key;
|
||||||
else
|
else
|
||||||
fi->keyix = ATH9K_TXKEYIX_INVALID;
|
fi->keyix = ATH9K_TXKEYIX_INVALID;
|
||||||
|
fi->dyn_smps = sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC;
|
||||||
fi->keytype = keytype;
|
fi->keytype = keytype;
|
||||||
fi->framelen = framelen;
|
fi->framelen = framelen;
|
||||||
fi->tx_power = txpower;
|
fi->tx_power = txpower;
|
||||||
|
@ -393,13 +393,9 @@ static int xgene_msi_hwirq_alloc(unsigned int cpu)
|
|||||||
if (!msi_group->gic_irq)
|
if (!msi_group->gic_irq)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
irq_set_chained_handler(msi_group->gic_irq,
|
irq_set_chained_handler_and_data(msi_group->gic_irq,
|
||||||
xgene_msi_isr);
|
xgene_msi_isr, msi_group);
|
||||||
err = irq_set_handler_data(msi_group->gic_irq, msi_group);
|
|
||||||
if (err) {
|
|
||||||
pr_err("failed to register GIC IRQ handler\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Statically allocate MSI GIC IRQs to each CPU core.
|
* Statically allocate MSI GIC IRQs to each CPU core.
|
||||||
* With 8-core X-Gene v1, 2 MSI GIC IRQs are allocated
|
* With 8-core X-Gene v1, 2 MSI GIC IRQs are allocated
|
||||||
|
@ -1042,14 +1042,14 @@ static int mtk_pcie_setup(struct mtk_pcie *pcie)
|
|||||||
err = of_pci_get_devfn(child);
|
err = of_pci_get_devfn(child);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(dev, "failed to parse devfn: %d\n", err);
|
dev_err(dev, "failed to parse devfn: %d\n", err);
|
||||||
return err;
|
goto error_put_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
slot = PCI_SLOT(err);
|
slot = PCI_SLOT(err);
|
||||||
|
|
||||||
err = mtk_pcie_parse_port(pcie, child, slot);
|
err = mtk_pcie_parse_port(pcie, child, slot);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto error_put_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = mtk_pcie_subsys_powerup(pcie);
|
err = mtk_pcie_subsys_powerup(pcie);
|
||||||
@ -1065,6 +1065,9 @@ static int mtk_pcie_setup(struct mtk_pcie *pcie)
|
|||||||
mtk_pcie_subsys_powerdown(pcie);
|
mtk_pcie_subsys_powerdown(pcie);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
error_put_node:
|
||||||
|
of_node_put(child);
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
|
static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
|
||||||
|
@ -2998,7 +2998,8 @@ static blk_status_t do_dasd_request(struct blk_mq_hw_ctx *hctx,
|
|||||||
|
|
||||||
basedev = block->base;
|
basedev = block->base;
|
||||||
spin_lock_irq(&dq->lock);
|
spin_lock_irq(&dq->lock);
|
||||||
if (basedev->state < DASD_STATE_READY) {
|
if (basedev->state < DASD_STATE_READY ||
|
||||||
|
test_bit(DASD_FLAG_OFFLINE, &basedev->flags)) {
|
||||||
DBF_DEV_EVENT(DBF_ERR, basedev,
|
DBF_DEV_EVENT(DBF_ERR, basedev,
|
||||||
"device not ready for request %p", req);
|
"device not ready for request %p", req);
|
||||||
rc = BLK_STS_IOERR;
|
rc = BLK_STS_IOERR;
|
||||||
@ -3489,8 +3490,6 @@ void dasd_generic_remove(struct ccw_device *cdev)
|
|||||||
struct dasd_device *device;
|
struct dasd_device *device;
|
||||||
struct dasd_block *block;
|
struct dasd_block *block;
|
||||||
|
|
||||||
cdev->handler = NULL;
|
|
||||||
|
|
||||||
device = dasd_device_from_cdev(cdev);
|
device = dasd_device_from_cdev(cdev);
|
||||||
if (IS_ERR(device)) {
|
if (IS_ERR(device)) {
|
||||||
dasd_remove_sysfs_files(cdev);
|
dasd_remove_sysfs_files(cdev);
|
||||||
@ -3509,6 +3508,7 @@ void dasd_generic_remove(struct ccw_device *cdev)
|
|||||||
* no quite down yet.
|
* no quite down yet.
|
||||||
*/
|
*/
|
||||||
dasd_set_target_state(device, DASD_STATE_NEW);
|
dasd_set_target_state(device, DASD_STATE_NEW);
|
||||||
|
cdev->handler = NULL;
|
||||||
/* dasd_delete_device destroys the device reference. */
|
/* dasd_delete_device destroys the device reference. */
|
||||||
block = device->block;
|
block = device->block;
|
||||||
dasd_delete_device(device);
|
dasd_delete_device(device);
|
||||||
|
@ -341,7 +341,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struct mdev_device *mdev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return copy_to_user((void __user *)arg, &info, minsz);
|
return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0;
|
||||||
}
|
}
|
||||||
case VFIO_DEVICE_GET_REGION_INFO:
|
case VFIO_DEVICE_GET_REGION_INFO:
|
||||||
{
|
{
|
||||||
@ -362,7 +362,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struct mdev_device *mdev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return copy_to_user((void __user *)arg, &info, minsz);
|
return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0;
|
||||||
}
|
}
|
||||||
case VFIO_DEVICE_GET_IRQ_INFO:
|
case VFIO_DEVICE_GET_IRQ_INFO:
|
||||||
{
|
{
|
||||||
@ -383,7 +383,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struct mdev_device *mdev,
|
|||||||
if (info.count == -1)
|
if (info.count == -1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
return copy_to_user((void __user *)arg, &info, minsz);
|
return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0;
|
||||||
}
|
}
|
||||||
case VFIO_DEVICE_SET_IRQS:
|
case VFIO_DEVICE_SET_IRQS:
|
||||||
{
|
{
|
||||||
|
@ -1569,14 +1569,9 @@ check_mgmt:
|
|||||||
}
|
}
|
||||||
rc = iscsi_prep_scsi_cmd_pdu(conn->task);
|
rc = iscsi_prep_scsi_cmd_pdu(conn->task);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
if (rc == -ENOMEM || rc == -EACCES) {
|
if (rc == -ENOMEM || rc == -EACCES)
|
||||||
spin_lock_bh(&conn->taskqueuelock);
|
fail_scsi_task(conn->task, DID_IMM_RETRY);
|
||||||
list_add_tail(&conn->task->running,
|
else
|
||||||
&conn->cmdqueue);
|
|
||||||
conn->task = NULL;
|
|
||||||
spin_unlock_bh(&conn->taskqueuelock);
|
|
||||||
goto done;
|
|
||||||
} else
|
|
||||||
fail_scsi_task(conn->task, DID_ABORT);
|
fail_scsi_task(conn->task, DID_ABORT);
|
||||||
spin_lock_bh(&conn->taskqueuelock);
|
spin_lock_bh(&conn->taskqueuelock);
|
||||||
continue;
|
continue;
|
||||||
|
@ -269,6 +269,7 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
|
|||||||
struct apci1032_private *devpriv = dev->private;
|
struct apci1032_private *devpriv = dev->private;
|
||||||
struct comedi_subdevice *s = dev->read_subdev;
|
struct comedi_subdevice *s = dev->read_subdev;
|
||||||
unsigned int ctrl;
|
unsigned int ctrl;
|
||||||
|
unsigned short val;
|
||||||
|
|
||||||
/* check interrupt is from this device */
|
/* check interrupt is from this device */
|
||||||
if ((inl(devpriv->amcc_iobase + AMCC_OP_REG_INTCSR) &
|
if ((inl(devpriv->amcc_iobase + AMCC_OP_REG_INTCSR) &
|
||||||
@ -284,7 +285,8 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
|
|||||||
outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG);
|
outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG);
|
||||||
|
|
||||||
s->state = inl(dev->iobase + APCI1032_STATUS_REG) & 0xffff;
|
s->state = inl(dev->iobase + APCI1032_STATUS_REG) & 0xffff;
|
||||||
comedi_buf_write_samples(s, &s->state, 1);
|
val = s->state;
|
||||||
|
comedi_buf_write_samples(s, &val, 1);
|
||||||
comedi_handle_events(dev, s);
|
comedi_handle_events(dev, s);
|
||||||
|
|
||||||
/* enable the interrupt */
|
/* enable the interrupt */
|
||||||
|
@ -217,7 +217,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
|
|||||||
struct comedi_device *dev = d;
|
struct comedi_device *dev = d;
|
||||||
struct apci1500_private *devpriv = dev->private;
|
struct apci1500_private *devpriv = dev->private;
|
||||||
struct comedi_subdevice *s = dev->read_subdev;
|
struct comedi_subdevice *s = dev->read_subdev;
|
||||||
unsigned int status = 0;
|
unsigned short status = 0;
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
|
|
||||||
val = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);
|
val = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);
|
||||||
@ -247,14 +247,14 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
|
|||||||
*
|
*
|
||||||
* Mask Meaning
|
* Mask Meaning
|
||||||
* ---------- ------------------------------------------
|
* ---------- ------------------------------------------
|
||||||
* 0x00000001 Event 1 has occurred
|
* 0b00000001 Event 1 has occurred
|
||||||
* 0x00000010 Event 2 has occurred
|
* 0b00000010 Event 2 has occurred
|
||||||
* 0x00000100 Counter/timer 1 has run down (not implemented)
|
* 0b00000100 Counter/timer 1 has run down (not implemented)
|
||||||
* 0x00001000 Counter/timer 2 has run down (not implemented)
|
* 0b00001000 Counter/timer 2 has run down (not implemented)
|
||||||
* 0x00010000 Counter 3 has run down (not implemented)
|
* 0b00010000 Counter 3 has run down (not implemented)
|
||||||
* 0x00100000 Watchdog has run down (not implemented)
|
* 0b00100000 Watchdog has run down (not implemented)
|
||||||
* 0x01000000 Voltage error
|
* 0b01000000 Voltage error
|
||||||
* 0x10000000 Short-circuit error
|
* 0b10000000 Short-circuit error
|
||||||
*/
|
*/
|
||||||
comedi_buf_write_samples(s, &status, 1);
|
comedi_buf_write_samples(s, &status, 1);
|
||||||
comedi_handle_events(dev, s);
|
comedi_handle_events(dev, s);
|
||||||
|
@ -299,11 +299,11 @@ static int pci1710_ai_eoc(struct comedi_device *dev,
|
|||||||
static int pci1710_ai_read_sample(struct comedi_device *dev,
|
static int pci1710_ai_read_sample(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
unsigned int cur_chan,
|
unsigned int cur_chan,
|
||||||
unsigned int *val)
|
unsigned short *val)
|
||||||
{
|
{
|
||||||
const struct boardtype *board = dev->board_ptr;
|
const struct boardtype *board = dev->board_ptr;
|
||||||
struct pci1710_private *devpriv = dev->private;
|
struct pci1710_private *devpriv = dev->private;
|
||||||
unsigned int sample;
|
unsigned short sample;
|
||||||
unsigned int chan;
|
unsigned int chan;
|
||||||
|
|
||||||
sample = inw(dev->iobase + PCI171X_AD_DATA_REG);
|
sample = inw(dev->iobase + PCI171X_AD_DATA_REG);
|
||||||
@ -344,7 +344,7 @@ static int pci1710_ai_insn_read(struct comedi_device *dev,
|
|||||||
pci1710_ai_setup_chanlist(dev, s, &insn->chanspec, 1, 1);
|
pci1710_ai_setup_chanlist(dev, s, &insn->chanspec, 1, 1);
|
||||||
|
|
||||||
for (i = 0; i < insn->n; i++) {
|
for (i = 0; i < insn->n; i++) {
|
||||||
unsigned int val;
|
unsigned short val;
|
||||||
|
|
||||||
/* start conversion */
|
/* start conversion */
|
||||||
outw(0, dev->iobase + PCI171X_SOFTTRG_REG);
|
outw(0, dev->iobase + PCI171X_SOFTTRG_REG);
|
||||||
@ -394,7 +394,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
|
|||||||
{
|
{
|
||||||
struct comedi_cmd *cmd = &s->async->cmd;
|
struct comedi_cmd *cmd = &s->async->cmd;
|
||||||
unsigned int status;
|
unsigned int status;
|
||||||
unsigned int val;
|
unsigned short val;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
status = inw(dev->iobase + PCI171X_STATUS_REG);
|
status = inw(dev->iobase + PCI171X_STATUS_REG);
|
||||||
@ -454,7 +454,7 @@ static void pci1710_handle_fifo(struct comedi_device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < devpriv->max_samples; i++) {
|
for (i = 0; i < devpriv->max_samples; i++) {
|
||||||
unsigned int val;
|
unsigned short val;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = pci1710_ai_read_sample(dev, s, s->async->cur_chan, &val);
|
ret = pci1710_ai_read_sample(dev, s, s->async->cur_chan, &val);
|
||||||
|
@ -195,7 +195,7 @@ static irqreturn_t das6402_interrupt(int irq, void *d)
|
|||||||
if (status & DAS6402_STATUS_FFULL) {
|
if (status & DAS6402_STATUS_FFULL) {
|
||||||
async->events |= COMEDI_CB_OVERFLOW;
|
async->events |= COMEDI_CB_OVERFLOW;
|
||||||
} else if (status & DAS6402_STATUS_FFNE) {
|
} else if (status & DAS6402_STATUS_FFNE) {
|
||||||
unsigned int val;
|
unsigned short val;
|
||||||
|
|
||||||
val = das6402_ai_read_sample(dev, s);
|
val = das6402_ai_read_sample(dev, s);
|
||||||
comedi_buf_write_samples(s, &val, 1);
|
comedi_buf_write_samples(s, &val, 1);
|
||||||
|
@ -436,7 +436,7 @@ static irqreturn_t das800_interrupt(int irq, void *d)
|
|||||||
struct comedi_cmd *cmd;
|
struct comedi_cmd *cmd;
|
||||||
unsigned long irq_flags;
|
unsigned long irq_flags;
|
||||||
unsigned int status;
|
unsigned int status;
|
||||||
unsigned int val;
|
unsigned short val;
|
||||||
bool fifo_empty;
|
bool fifo_empty;
|
||||||
bool fifo_overflow;
|
bool fifo_overflow;
|
||||||
int i;
|
int i;
|
||||||
|
@ -413,7 +413,7 @@ static irqreturn_t dmm32at_isr(int irq, void *d)
|
|||||||
{
|
{
|
||||||
struct comedi_device *dev = d;
|
struct comedi_device *dev = d;
|
||||||
unsigned char intstat;
|
unsigned char intstat;
|
||||||
unsigned int val;
|
unsigned short val;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!dev->attached) {
|
if (!dev->attached) {
|
||||||
|
@ -933,7 +933,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
|
|||||||
struct comedi_subdevice *s = dev->read_subdev;
|
struct comedi_subdevice *s = dev->read_subdev;
|
||||||
int i;
|
int i;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
unsigned int lval;
|
unsigned short lval;
|
||||||
|
|
||||||
if (!dev->attached)
|
if (!dev->attached)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
@ -193,7 +193,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d)
|
|||||||
struct comedi_device *dev = d;
|
struct comedi_device *dev = d;
|
||||||
struct comedi_subdevice *s = dev->read_subdev;
|
struct comedi_subdevice *s = dev->read_subdev;
|
||||||
struct comedi_cmd *cmd = &s->async->cmd;
|
struct comedi_cmd *cmd = &s->async->cmd;
|
||||||
unsigned int data;
|
unsigned short data;
|
||||||
|
|
||||||
if (!dev->attached) {
|
if (!dev->attached) {
|
||||||
dev_err(dev->class_dev, "spurious interrupt\n");
|
dev_err(dev->class_dev, "spurious interrupt\n");
|
||||||
|
@ -422,7 +422,7 @@ static int pcl818_ai_eoc(struct comedi_device *dev,
|
|||||||
|
|
||||||
static bool pcl818_ai_write_sample(struct comedi_device *dev,
|
static bool pcl818_ai_write_sample(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
unsigned int chan, unsigned int val)
|
unsigned int chan, unsigned short val)
|
||||||
{
|
{
|
||||||
struct pcl818_private *devpriv = dev->private;
|
struct pcl818_private *devpriv = dev->private;
|
||||||
struct comedi_cmd *cmd = &s->async->cmd;
|
struct comedi_cmd *cmd = &s->async->cmd;
|
||||||
|
@ -1290,6 +1290,7 @@ static int ks_wlan_set_scan(struct net_device *dev,
|
|||||||
{
|
{
|
||||||
struct ks_wlan_private *priv = netdev_priv(dev);
|
struct ks_wlan_private *priv = netdev_priv(dev);
|
||||||
struct iw_scan_req *req = NULL;
|
struct iw_scan_req *req = NULL;
|
||||||
|
int len;
|
||||||
|
|
||||||
DPRINTK(2, "\n");
|
DPRINTK(2, "\n");
|
||||||
|
|
||||||
@ -1301,8 +1302,9 @@ static int ks_wlan_set_scan(struct net_device *dev,
|
|||||||
if (wrqu->data.length == sizeof(struct iw_scan_req) &&
|
if (wrqu->data.length == sizeof(struct iw_scan_req) &&
|
||||||
wrqu->data.flags & IW_SCAN_THIS_ESSID) {
|
wrqu->data.flags & IW_SCAN_THIS_ESSID) {
|
||||||
req = (struct iw_scan_req *)extra;
|
req = (struct iw_scan_req *)extra;
|
||||||
priv->scan_ssid_len = req->essid_len;
|
len = min_t(int, req->essid_len, IW_ESSID_MAX_SIZE);
|
||||||
memcpy(priv->scan_ssid, req->essid, priv->scan_ssid_len);
|
priv->scan_ssid_len = len;
|
||||||
|
memcpy(priv->scan_ssid, req->essid, len);
|
||||||
} else {
|
} else {
|
||||||
priv->scan_ssid_len = 0;
|
priv->scan_ssid_len = 0;
|
||||||
}
|
}
|
||||||
|
@ -912,6 +912,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||||||
/* SSID */
|
/* SSID */
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p && ie_len > 0) {
|
if (p && ie_len > 0) {
|
||||||
|
ie_len = min_t(int, ie_len, sizeof(pbss_network->Ssid.Ssid));
|
||||||
memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
||||||
pbss_network->Ssid.SsidLength = ie_len;
|
pbss_network->Ssid.SsidLength = ie_len;
|
||||||
@ -930,6 +931,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||||||
/* get supported rates */
|
/* get supported rates */
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p) {
|
if (p) {
|
||||||
|
ie_len = min_t(int, ie_len, NDIS_802_11_LENGTH_RATES_EX);
|
||||||
memcpy(supportRate, p + 2, ie_len);
|
memcpy(supportRate, p + 2, ie_len);
|
||||||
supportRateNum = ie_len;
|
supportRateNum = ie_len;
|
||||||
}
|
}
|
||||||
@ -937,6 +939,8 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||||||
/* get ext_supported rates */
|
/* get ext_supported rates */
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
|
||||||
if (p) {
|
if (p) {
|
||||||
|
ie_len = min_t(int, ie_len,
|
||||||
|
NDIS_802_11_LENGTH_RATES_EX - supportRateNum);
|
||||||
memcpy(supportRate + supportRateNum, p + 2, ie_len);
|
memcpy(supportRate + supportRateNum, p + 2, ie_len);
|
||||||
supportRateNum += ie_len;
|
supportRateNum += ie_len;
|
||||||
}
|
}
|
||||||
@ -1050,6 +1054,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||||||
|
|
||||||
pht_cap->mcs.rx_mask[0] = 0xff;
|
pht_cap->mcs.rx_mask[0] = 0xff;
|
||||||
pht_cap->mcs.rx_mask[1] = 0x0;
|
pht_cap->mcs.rx_mask[1] = 0x0;
|
||||||
|
ie_len = min_t(int, ie_len, sizeof(pmlmepriv->htpriv.ht_cap));
|
||||||
memcpy(&pmlmepriv->htpriv.ht_cap, p+2, ie_len);
|
memcpy(&pmlmepriv->htpriv.ht_cap, p+2, ie_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1169,9 +1169,11 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sec_len = *(pos++); len -= 1;
|
sec_len = *(pos++); len -= 1;
|
||||||
if (sec_len > 0 && sec_len <= len) {
|
if (sec_len > 0 &&
|
||||||
|
sec_len <= len &&
|
||||||
|
sec_len <= 32) {
|
||||||
ssid[ssid_index].SsidLength = sec_len;
|
ssid[ssid_index].SsidLength = sec_len;
|
||||||
memcpy(ssid[ssid_index].Ssid, pos, ssid[ssid_index].SsidLength);
|
memcpy(ssid[ssid_index].Ssid, pos, sec_len);
|
||||||
ssid_index++;
|
ssid_index++;
|
||||||
}
|
}
|
||||||
pos += sec_len;
|
pos += sec_len;
|
||||||
|
@ -419,9 +419,10 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
|
|||||||
struct iw_scan_req *req = (struct iw_scan_req *)b;
|
struct iw_scan_req *req = (struct iw_scan_req *)b;
|
||||||
|
|
||||||
if (req->essid_len) {
|
if (req->essid_len) {
|
||||||
ieee->current_network.ssid_len = req->essid_len;
|
int len = min_t(int, req->essid_len, IW_ESSID_MAX_SIZE);
|
||||||
memcpy(ieee->current_network.ssid, req->essid,
|
|
||||||
req->essid_len);
|
ieee->current_network.ssid_len = len;
|
||||||
|
memcpy(ieee->current_network.ssid, req->essid, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,8 +333,10 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
|||||||
struct iw_scan_req *req = (struct iw_scan_req *)b;
|
struct iw_scan_req *req = (struct iw_scan_req *)b;
|
||||||
|
|
||||||
if (req->essid_len) {
|
if (req->essid_len) {
|
||||||
ieee->current_network.ssid_len = req->essid_len;
|
int len = min_t(int, req->essid_len, IW_ESSID_MAX_SIZE);
|
||||||
memcpy(ieee->current_network.ssid, req->essid, req->essid_len);
|
|
||||||
|
ieee->current_network.ssid_len = len;
|
||||||
|
memcpy(ieee->current_network.ssid, req->essid, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,8 +242,10 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
|
|||||||
psurveyPara->ss_ssidlen = 0;
|
psurveyPara->ss_ssidlen = 0;
|
||||||
memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
|
memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
|
||||||
if ((pssid != NULL) && (pssid->SsidLength)) {
|
if ((pssid != NULL) && (pssid->SsidLength)) {
|
||||||
memcpy(psurveyPara->ss_ssid, pssid->Ssid, pssid->SsidLength);
|
int len = min_t(int, pssid->SsidLength, IW_ESSID_MAX_SIZE);
|
||||||
psurveyPara->ss_ssidlen = cpu_to_le32(pssid->SsidLength);
|
|
||||||
|
memcpy(psurveyPara->ss_ssid, pssid->Ssid, len);
|
||||||
|
psurveyPara->ss_ssidlen = cpu_to_le32(len);
|
||||||
}
|
}
|
||||||
set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
|
set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
|
||||||
r8712_enqueue_cmd(pcmdpriv, ph2c);
|
r8712_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
@ -927,7 +927,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
|
|||||||
struct iw_point *dwrq = (struct iw_point *)awrq;
|
struct iw_point *dwrq = (struct iw_point *)awrq;
|
||||||
|
|
||||||
len = dwrq->length;
|
len = dwrq->length;
|
||||||
ext = memdup_user(dwrq->pointer, len);
|
ext = strndup_user(dwrq->pointer, len);
|
||||||
if (IS_ERR(ext))
|
if (IS_ERR(ext))
|
||||||
return PTR_ERR(ext);
|
return PTR_ERR(ext);
|
||||||
|
|
||||||
|
@ -1986,6 +1986,11 @@ static const struct usb_device_id acm_ids[] = {
|
|||||||
.driver_info = SEND_ZERO_PACKET,
|
.driver_info = SEND_ZERO_PACKET,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* Exclude Goodix Fingerprint Reader */
|
||||||
|
{ USB_DEVICE(0x27c6, 0x5395),
|
||||||
|
.driver_info = IGNORE_DEVICE,
|
||||||
|
},
|
||||||
|
|
||||||
/* control interfaces without any protocol set */
|
/* control interfaces without any protocol set */
|
||||||
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
|
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
|
||||||
USB_CDC_PROTO_NONE) },
|
USB_CDC_PROTO_NONE) },
|
||||||
|
@ -503,6 +503,7 @@ static void f_audio_disable(struct usb_function *f)
|
|||||||
uac1->as_out_alt = 0;
|
uac1->as_out_alt = 0;
|
||||||
uac1->as_in_alt = 0;
|
uac1->as_in_alt = 0;
|
||||||
|
|
||||||
|
u_audio_stop_playback(&uac1->g_audio);
|
||||||
u_audio_stop_capture(&uac1->g_audio);
|
u_audio_stop_capture(&uac1->g_audio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ static int set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
|||||||
}
|
}
|
||||||
|
|
||||||
max_size_bw = num_channels(chmask) * ssize *
|
max_size_bw = num_channels(chmask) * ssize *
|
||||||
DIV_ROUND_UP(srate, factor / (1 << (ep_desc->bInterval - 1)));
|
((srate / (factor / (1 << (ep_desc->bInterval - 1)))) + 1);
|
||||||
ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_size_bw,
|
ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_size_bw,
|
||||||
max_size_ep));
|
max_size_ep));
|
||||||
|
|
||||||
|
@ -172,12 +172,11 @@ out: \
|
|||||||
size_t len) \
|
size_t len) \
|
||||||
{ \
|
{ \
|
||||||
struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
|
struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
|
||||||
int ret; \
|
int ret = -EINVAL; \
|
||||||
u8 val; \
|
u8 val; \
|
||||||
\
|
\
|
||||||
mutex_lock(&opts->lock); \
|
mutex_lock(&opts->lock); \
|
||||||
ret = sscanf(page, "%02hhx", &val); \
|
if (sscanf(page, "%02hhx", &val) > 0) { \
|
||||||
if (ret > 0) { \
|
|
||||||
opts->_n_ = val; \
|
opts->_n_ = val; \
|
||||||
ret = len; \
|
ret = len; \
|
||||||
} \
|
} \
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
|
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
|
||||||
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
|
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
|
||||||
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
|
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
|
||||||
|
#define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
|
||||||
|
|
||||||
static const char hcd_name[] = "xhci_hcd";
|
static const char hcd_name[] = "xhci_hcd";
|
||||||
|
|
||||||
@ -236,11 +237,14 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
|||||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
|
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
|
||||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
|
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) {
|
||||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||||
|
xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
|
||||||
|
}
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||||
(pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI ||
|
(pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI ||
|
||||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI))
|
pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI ||
|
||||||
|
pdev->device == PCI_DEVICE_ID_ASMEDIA_3242_XHCI))
|
||||||
xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
|
xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||||
|
@ -1021,6 +1021,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|||||||
struct usb_hcd *secondary_hcd;
|
struct usb_hcd *secondary_hcd;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
bool comp_timer_running = false;
|
bool comp_timer_running = false;
|
||||||
|
bool pending_portevent = false;
|
||||||
|
|
||||||
if (!hcd->state)
|
if (!hcd->state)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1154,13 +1155,22 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
if (retval == 0) {
|
if (retval == 0) {
|
||||||
/* Resume root hubs only when have pending events. */
|
/*
|
||||||
if (xhci_pending_portevent(xhci)) {
|
* Resume roothubs only if there are pending events.
|
||||||
|
* USB 3 devices resend U3 LFPS wake after a 100ms delay if
|
||||||
|
* the first wake signalling failed, give it that chance.
|
||||||
|
*/
|
||||||
|
pending_portevent = xhci_pending_portevent(xhci);
|
||||||
|
if (!pending_portevent) {
|
||||||
|
msleep(120);
|
||||||
|
pending_portevent = xhci_pending_portevent(xhci);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pending_portevent) {
|
||||||
usb_hcd_resume_root_hub(xhci->shared_hcd);
|
usb_hcd_resume_root_hub(xhci->shared_hcd);
|
||||||
usb_hcd_resume_root_hub(hcd);
|
usb_hcd_resume_root_hub(hcd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If system is subject to the Quirk, Compliance Mode Timer needs to
|
* If system is subject to the Quirk, Compliance Mode Timer needs to
|
||||||
* be re-initialized Always after a system resume. Ports are subject
|
* be re-initialized Always after a system resume. Ports are subject
|
||||||
|
@ -746,6 +746,8 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
|
|||||||
|
|
||||||
void usbhs_pipe_free(struct usbhs_pipe *pipe)
|
void usbhs_pipe_free(struct usbhs_pipe *pipe)
|
||||||
{
|
{
|
||||||
|
usbhsp_pipe_select(pipe);
|
||||||
|
usbhsp_pipe_cfg_set(pipe, 0xFFFF, 0);
|
||||||
usbhsp_put_pipe(pipe);
|
usbhsp_put_pipe(pipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ static const struct usb_device_id id_table[] = {
|
|||||||
{ USB_DEVICE(0x1a86, 0x7522) },
|
{ USB_DEVICE(0x1a86, 0x7522) },
|
||||||
{ USB_DEVICE(0x1a86, 0x7523) },
|
{ USB_DEVICE(0x1a86, 0x7523) },
|
||||||
{ USB_DEVICE(0x4348, 0x5523) },
|
{ USB_DEVICE(0x4348, 0x5523) },
|
||||||
|
{ USB_DEVICE(0x9986, 0x7523) },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(usb, id_table);
|
MODULE_DEVICE_TABLE(usb, id_table);
|
||||||
|
@ -149,6 +149,7 @@ static const struct usb_device_id id_table[] = {
|
|||||||
{ USB_DEVICE(0x10C4, 0x8857) }, /* CEL EM357 ZigBee USB Stick */
|
{ USB_DEVICE(0x10C4, 0x8857) }, /* CEL EM357 ZigBee USB Stick */
|
||||||
{ USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
|
{ USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
|
||||||
{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
|
{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
|
||||||
|
{ USB_DEVICE(0x10C4, 0x88D8) }, /* Acuity Brands nLight Air Adapter */
|
||||||
{ USB_DEVICE(0x10C4, 0x88FB) }, /* CESINEL MEDCAL STII Network Analyzer */
|
{ USB_DEVICE(0x10C4, 0x88FB) }, /* CESINEL MEDCAL STII Network Analyzer */
|
||||||
{ USB_DEVICE(0x10C4, 0x8938) }, /* CESINEL MEDCAL S II Network Analyzer */
|
{ USB_DEVICE(0x10C4, 0x8938) }, /* CESINEL MEDCAL S II Network Analyzer */
|
||||||
{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
|
{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
|
||||||
@ -205,6 +206,8 @@ static const struct usb_device_id id_table[] = {
|
|||||||
{ USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
|
{ USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
|
||||||
{ USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */
|
{ USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */
|
||||||
{ USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */
|
{ USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */
|
||||||
|
{ USB_DEVICE(0x1901, 0x0197) }, /* GE CS1000 Display serial interface */
|
||||||
|
{ USB_DEVICE(0x1901, 0x0198) }, /* GE CS1000 M.2 Key E serial interface */
|
||||||
{ USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */
|
{ USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */
|
||||||
{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
|
{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
|
||||||
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
||||||
|
@ -3025,26 +3025,32 @@ static int edge_startup(struct usb_serial *serial)
|
|||||||
response = -ENODEV;
|
response = -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
usb_free_urb(edge_serial->interrupt_read_urb);
|
goto error;
|
||||||
kfree(edge_serial->interrupt_in_buffer);
|
|
||||||
|
|
||||||
usb_free_urb(edge_serial->read_urb);
|
|
||||||
kfree(edge_serial->bulk_in_buffer);
|
|
||||||
|
|
||||||
kfree(edge_serial);
|
|
||||||
|
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* start interrupt read for this edgeport this interrupt will
|
/* start interrupt read for this edgeport this interrupt will
|
||||||
* continue as long as the edgeport is connected */
|
* continue as long as the edgeport is connected */
|
||||||
response = usb_submit_urb(edge_serial->interrupt_read_urb,
|
response = usb_submit_urb(edge_serial->interrupt_read_urb,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (response)
|
if (response) {
|
||||||
dev_err(ddev, "%s - Error %d submitting control urb\n",
|
dev_err(ddev, "%s - Error %d submitting control urb\n",
|
||||||
__func__, response);
|
__func__, response);
|
||||||
|
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
|
||||||
|
error:
|
||||||
|
usb_free_urb(edge_serial->interrupt_read_urb);
|
||||||
|
kfree(edge_serial->interrupt_in_buffer);
|
||||||
|
|
||||||
|
usb_free_urb(edge_serial->read_urb);
|
||||||
|
kfree(edge_serial->bulk_in_buffer);
|
||||||
|
|
||||||
|
kfree(edge_serial);
|
||||||
|
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +60,8 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
|
|||||||
int sockfd = 0;
|
int sockfd = 0;
|
||||||
struct socket *socket;
|
struct socket *socket;
|
||||||
int rv;
|
int rv;
|
||||||
|
struct task_struct *tcp_rx = NULL;
|
||||||
|
struct task_struct *tcp_tx = NULL;
|
||||||
|
|
||||||
if (!sdev) {
|
if (!sdev) {
|
||||||
dev_err(dev, "sdev is null\n");
|
dev_err(dev, "sdev is null\n");
|
||||||
@ -83,23 +85,47 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
socket = sockfd_lookup(sockfd, &err);
|
socket = sockfd_lookup(sockfd, &err);
|
||||||
if (!socket)
|
if (!socket) {
|
||||||
|
dev_err(dev, "failed to lookup sock");
|
||||||
goto err;
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (socket->type != SOCK_STREAM) {
|
||||||
|
dev_err(dev, "Expecting SOCK_STREAM - found %d",
|
||||||
|
socket->type);
|
||||||
|
goto sock_err;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* unlock and create threads and get tasks */
|
||||||
|
spin_unlock_irq(&sdev->ud.lock);
|
||||||
|
tcp_rx = kthread_create(stub_rx_loop, &sdev->ud, "stub_rx");
|
||||||
|
if (IS_ERR(tcp_rx)) {
|
||||||
|
sockfd_put(socket);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
tcp_tx = kthread_create(stub_tx_loop, &sdev->ud, "stub_tx");
|
||||||
|
if (IS_ERR(tcp_tx)) {
|
||||||
|
kthread_stop(tcp_rx);
|
||||||
|
sockfd_put(socket);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get task structs now */
|
||||||
|
get_task_struct(tcp_rx);
|
||||||
|
get_task_struct(tcp_tx);
|
||||||
|
|
||||||
|
/* lock and update sdev->ud state */
|
||||||
|
spin_lock_irq(&sdev->ud.lock);
|
||||||
sdev->ud.tcp_socket = socket;
|
sdev->ud.tcp_socket = socket;
|
||||||
sdev->ud.sockfd = sockfd;
|
sdev->ud.sockfd = sockfd;
|
||||||
|
sdev->ud.tcp_rx = tcp_rx;
|
||||||
spin_unlock_irq(&sdev->ud.lock);
|
sdev->ud.tcp_tx = tcp_tx;
|
||||||
|
|
||||||
sdev->ud.tcp_rx = kthread_get_run(stub_rx_loop, &sdev->ud,
|
|
||||||
"stub_rx");
|
|
||||||
sdev->ud.tcp_tx = kthread_get_run(stub_tx_loop, &sdev->ud,
|
|
||||||
"stub_tx");
|
|
||||||
|
|
||||||
spin_lock_irq(&sdev->ud.lock);
|
|
||||||
sdev->ud.status = SDEV_ST_USED;
|
sdev->ud.status = SDEV_ST_USED;
|
||||||
spin_unlock_irq(&sdev->ud.lock);
|
spin_unlock_irq(&sdev->ud.lock);
|
||||||
|
|
||||||
|
wake_up_process(sdev->ud.tcp_rx);
|
||||||
|
wake_up_process(sdev->ud.tcp_tx);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dev_info(dev, "stub down\n");
|
dev_info(dev, "stub down\n");
|
||||||
|
|
||||||
@ -114,6 +140,8 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
|
|||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
|
sock_err:
|
||||||
|
sockfd_put(socket);
|
||||||
err:
|
err:
|
||||||
spin_unlock_irq(&sdev->ud.lock);
|
spin_unlock_irq(&sdev->ud.lock);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -326,6 +326,8 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
|
|||||||
struct vhci *vhci;
|
struct vhci *vhci;
|
||||||
int err;
|
int err;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
struct task_struct *tcp_rx = NULL;
|
||||||
|
struct task_struct *tcp_tx = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @rhport: port number of vhci_hcd
|
* @rhport: port number of vhci_hcd
|
||||||
@ -363,12 +365,35 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
|
|||||||
|
|
||||||
/* Extract socket from fd. */
|
/* Extract socket from fd. */
|
||||||
socket = sockfd_lookup(sockfd, &err);
|
socket = sockfd_lookup(sockfd, &err);
|
||||||
if (!socket)
|
if (!socket) {
|
||||||
|
dev_err(dev, "failed to lookup sock");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
if (socket->type != SOCK_STREAM) {
|
||||||
|
dev_err(dev, "Expecting SOCK_STREAM - found %d",
|
||||||
|
socket->type);
|
||||||
|
sockfd_put(socket);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* now need lock until setting vdev status as used */
|
/* create threads before locking */
|
||||||
|
tcp_rx = kthread_create(vhci_rx_loop, &vdev->ud, "vhci_rx");
|
||||||
|
if (IS_ERR(tcp_rx)) {
|
||||||
|
sockfd_put(socket);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
tcp_tx = kthread_create(vhci_tx_loop, &vdev->ud, "vhci_tx");
|
||||||
|
if (IS_ERR(tcp_tx)) {
|
||||||
|
kthread_stop(tcp_rx);
|
||||||
|
sockfd_put(socket);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* begin a lock */
|
/* get task structs now */
|
||||||
|
get_task_struct(tcp_rx);
|
||||||
|
get_task_struct(tcp_tx);
|
||||||
|
|
||||||
|
/* now begin lock until setting vdev status set */
|
||||||
spin_lock_irqsave(&vhci->lock, flags);
|
spin_lock_irqsave(&vhci->lock, flags);
|
||||||
spin_lock(&vdev->ud.lock);
|
spin_lock(&vdev->ud.lock);
|
||||||
|
|
||||||
@ -378,6 +403,8 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
|
|||||||
spin_unlock_irqrestore(&vhci->lock, flags);
|
spin_unlock_irqrestore(&vhci->lock, flags);
|
||||||
|
|
||||||
sockfd_put(socket);
|
sockfd_put(socket);
|
||||||
|
kthread_stop_put(tcp_rx);
|
||||||
|
kthread_stop_put(tcp_tx);
|
||||||
|
|
||||||
dev_err(dev, "port %d already used\n", rhport);
|
dev_err(dev, "port %d already used\n", rhport);
|
||||||
/*
|
/*
|
||||||
@ -396,14 +423,16 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
|
|||||||
vdev->speed = speed;
|
vdev->speed = speed;
|
||||||
vdev->ud.sockfd = sockfd;
|
vdev->ud.sockfd = sockfd;
|
||||||
vdev->ud.tcp_socket = socket;
|
vdev->ud.tcp_socket = socket;
|
||||||
|
vdev->ud.tcp_rx = tcp_rx;
|
||||||
|
vdev->ud.tcp_tx = tcp_tx;
|
||||||
vdev->ud.status = VDEV_ST_NOTASSIGNED;
|
vdev->ud.status = VDEV_ST_NOTASSIGNED;
|
||||||
|
|
||||||
spin_unlock(&vdev->ud.lock);
|
spin_unlock(&vdev->ud.lock);
|
||||||
spin_unlock_irqrestore(&vhci->lock, flags);
|
spin_unlock_irqrestore(&vhci->lock, flags);
|
||||||
/* end the lock */
|
/* end the lock */
|
||||||
|
|
||||||
vdev->ud.tcp_rx = kthread_get_run(vhci_rx_loop, &vdev->ud, "vhci_rx");
|
wake_up_process(vdev->ud.tcp_rx);
|
||||||
vdev->ud.tcp_tx = kthread_get_run(vhci_tx_loop, &vdev->ud, "vhci_tx");
|
wake_up_process(vdev->ud.tcp_tx);
|
||||||
|
|
||||||
rh_port_connect(vdev, speed);
|
rh_port_connect(vdev, speed);
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <linux/usb/ch9.h>
|
#include <linux/usb/ch9.h>
|
||||||
#include <linux/sysfs.h>
|
#include <linux/sysfs.h>
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
|
#include <linux/file.h>
|
||||||
#include <linux/byteorder/generic.h>
|
#include <linux/byteorder/generic.h>
|
||||||
|
|
||||||
#include "usbip_common.h"
|
#include "usbip_common.h"
|
||||||
@ -150,6 +151,13 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
|
|||||||
goto unlock_ud;
|
goto unlock_ud;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (socket->type != SOCK_STREAM) {
|
||||||
|
dev_err(dev, "Expecting SOCK_STREAM - found %d",
|
||||||
|
socket->type);
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto sock_err;
|
||||||
|
}
|
||||||
|
|
||||||
udc->ud.tcp_socket = socket;
|
udc->ud.tcp_socket = socket;
|
||||||
|
|
||||||
spin_unlock_irq(&udc->ud.lock);
|
spin_unlock_irq(&udc->ud.lock);
|
||||||
@ -189,6 +197,8 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
|
|||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
|
sock_err:
|
||||||
|
sockfd_put(socket);
|
||||||
unlock_ud:
|
unlock_ud:
|
||||||
spin_unlock_irq(&udc->ud.lock);
|
spin_unlock_irq(&udc->ud.lock);
|
||||||
unlock:
|
unlock:
|
||||||
|
@ -47,6 +47,11 @@ static unsigned evtchn_2l_max_channels(void)
|
|||||||
return EVTCHN_2L_NR_CHANNELS;
|
return EVTCHN_2L_NR_CHANNELS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void evtchn_2l_remove(evtchn_port_t evtchn, unsigned int cpu)
|
||||||
|
{
|
||||||
|
clear_bit(evtchn, BM(per_cpu(cpu_evtchn_mask, cpu)));
|
||||||
|
}
|
||||||
|
|
||||||
static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned cpu)
|
static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned cpu)
|
||||||
{
|
{
|
||||||
clear_bit(info->evtchn, BM(per_cpu(cpu_evtchn_mask, info->cpu)));
|
clear_bit(info->evtchn, BM(per_cpu(cpu_evtchn_mask, info->cpu)));
|
||||||
@ -71,12 +76,6 @@ static bool evtchn_2l_is_pending(unsigned port)
|
|||||||
return sync_test_bit(port, BM(&s->evtchn_pending[0]));
|
return sync_test_bit(port, BM(&s->evtchn_pending[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool evtchn_2l_test_and_set_mask(unsigned port)
|
|
||||||
{
|
|
||||||
struct shared_info *s = HYPERVISOR_shared_info;
|
|
||||||
return sync_test_and_set_bit(port, BM(&s->evtchn_mask[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void evtchn_2l_mask(unsigned port)
|
static void evtchn_2l_mask(unsigned port)
|
||||||
{
|
{
|
||||||
struct shared_info *s = HYPERVISOR_shared_info;
|
struct shared_info *s = HYPERVISOR_shared_info;
|
||||||
@ -354,18 +353,27 @@ static void evtchn_2l_resume(void)
|
|||||||
EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD);
|
EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int evtchn_2l_percpu_deinit(unsigned int cpu)
|
||||||
|
{
|
||||||
|
memset(per_cpu(cpu_evtchn_mask, cpu), 0, sizeof(xen_ulong_t) *
|
||||||
|
EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct evtchn_ops evtchn_ops_2l = {
|
static const struct evtchn_ops evtchn_ops_2l = {
|
||||||
.max_channels = evtchn_2l_max_channels,
|
.max_channels = evtchn_2l_max_channels,
|
||||||
.nr_channels = evtchn_2l_max_channels,
|
.nr_channels = evtchn_2l_max_channels,
|
||||||
|
.remove = evtchn_2l_remove,
|
||||||
.bind_to_cpu = evtchn_2l_bind_to_cpu,
|
.bind_to_cpu = evtchn_2l_bind_to_cpu,
|
||||||
.clear_pending = evtchn_2l_clear_pending,
|
.clear_pending = evtchn_2l_clear_pending,
|
||||||
.set_pending = evtchn_2l_set_pending,
|
.set_pending = evtchn_2l_set_pending,
|
||||||
.is_pending = evtchn_2l_is_pending,
|
.is_pending = evtchn_2l_is_pending,
|
||||||
.test_and_set_mask = evtchn_2l_test_and_set_mask,
|
|
||||||
.mask = evtchn_2l_mask,
|
.mask = evtchn_2l_mask,
|
||||||
.unmask = evtchn_2l_unmask,
|
.unmask = evtchn_2l_unmask,
|
||||||
.handle_events = evtchn_2l_handle_events,
|
.handle_events = evtchn_2l_handle_events,
|
||||||
.resume = evtchn_2l_resume,
|
.resume = evtchn_2l_resume,
|
||||||
|
.percpu_deinit = evtchn_2l_percpu_deinit,
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init xen_evtchn_2l_init(void)
|
void __init xen_evtchn_2l_init(void)
|
||||||
|
@ -98,6 +98,7 @@ static DEFINE_RWLOCK(evtchn_rwlock);
|
|||||||
* evtchn_rwlock
|
* evtchn_rwlock
|
||||||
* IRQ-desc lock
|
* IRQ-desc lock
|
||||||
* percpu eoi_list_lock
|
* percpu eoi_list_lock
|
||||||
|
* irq_info->lock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static LIST_HEAD(xen_irq_list_head);
|
static LIST_HEAD(xen_irq_list_head);
|
||||||
@ -219,6 +220,8 @@ static int xen_irq_info_common_setup(struct irq_info *info,
|
|||||||
info->irq = irq;
|
info->irq = irq;
|
||||||
info->evtchn = evtchn;
|
info->evtchn = evtchn;
|
||||||
info->cpu = cpu;
|
info->cpu = cpu;
|
||||||
|
info->mask_reason = EVT_MASK_REASON_EXPLICIT;
|
||||||
|
spin_lock_init(&info->lock);
|
||||||
|
|
||||||
ret = set_evtchn_to_irq(evtchn, irq);
|
ret = set_evtchn_to_irq(evtchn, irq);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -285,6 +288,7 @@ static int xen_irq_info_pirq_setup(unsigned irq,
|
|||||||
static void xen_irq_info_cleanup(struct irq_info *info)
|
static void xen_irq_info_cleanup(struct irq_info *info)
|
||||||
{
|
{
|
||||||
set_evtchn_to_irq(info->evtchn, -1);
|
set_evtchn_to_irq(info->evtchn, -1);
|
||||||
|
xen_evtchn_port_remove(info->evtchn, info->cpu);
|
||||||
info->evtchn = 0;
|
info->evtchn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,6 +369,34 @@ unsigned int cpu_from_evtchn(unsigned int evtchn)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void do_mask(struct irq_info *info, u8 reason)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&info->lock, flags);
|
||||||
|
|
||||||
|
if (!info->mask_reason)
|
||||||
|
mask_evtchn(info->evtchn);
|
||||||
|
|
||||||
|
info->mask_reason |= reason;
|
||||||
|
|
||||||
|
spin_unlock_irqrestore(&info->lock, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void do_unmask(struct irq_info *info, u8 reason)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&info->lock, flags);
|
||||||
|
|
||||||
|
info->mask_reason &= ~reason;
|
||||||
|
|
||||||
|
if (!info->mask_reason)
|
||||||
|
unmask_evtchn(info->evtchn);
|
||||||
|
|
||||||
|
spin_unlock_irqrestore(&info->lock, flags);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86
|
#ifdef CONFIG_X86
|
||||||
static bool pirq_check_eoi_map(unsigned irq)
|
static bool pirq_check_eoi_map(unsigned irq)
|
||||||
{
|
{
|
||||||
@ -492,7 +524,7 @@ static void xen_irq_lateeoi_locked(struct irq_info *info, bool spurious)
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->eoi_time = 0;
|
info->eoi_time = 0;
|
||||||
unmask_evtchn(evtchn);
|
do_unmask(info, EVT_MASK_REASON_EOI_PENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xen_irq_lateeoi_worker(struct work_struct *work)
|
static void xen_irq_lateeoi_worker(struct work_struct *work)
|
||||||
@ -661,6 +693,12 @@ static void xen_evtchn_close(unsigned int port)
|
|||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void event_handler_exit(struct irq_info *info)
|
||||||
|
{
|
||||||
|
smp_store_release(&info->is_active, 0);
|
||||||
|
clear_evtchn(info->evtchn);
|
||||||
|
}
|
||||||
|
|
||||||
static void pirq_query_unmask(int irq)
|
static void pirq_query_unmask(int irq)
|
||||||
{
|
{
|
||||||
struct physdev_irq_status_query irq_status;
|
struct physdev_irq_status_query irq_status;
|
||||||
@ -679,7 +717,8 @@ static void pirq_query_unmask(int irq)
|
|||||||
|
|
||||||
static void eoi_pirq(struct irq_data *data)
|
static void eoi_pirq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
int evtchn = evtchn_from_irq(data->irq);
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
|
int evtchn = info ? info->evtchn : 0;
|
||||||
struct physdev_eoi eoi = { .irq = pirq_from_irq(data->irq) };
|
struct physdev_eoi eoi = { .irq = pirq_from_irq(data->irq) };
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
@ -688,16 +727,15 @@ static void eoi_pirq(struct irq_data *data)
|
|||||||
|
|
||||||
if (unlikely(irqd_is_setaffinity_pending(data)) &&
|
if (unlikely(irqd_is_setaffinity_pending(data)) &&
|
||||||
likely(!irqd_irq_disabled(data))) {
|
likely(!irqd_irq_disabled(data))) {
|
||||||
int masked = test_and_set_mask(evtchn);
|
do_mask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
|
|
||||||
clear_evtchn(evtchn);
|
event_handler_exit(info);
|
||||||
|
|
||||||
irq_move_masked_irq(data);
|
irq_move_masked_irq(data);
|
||||||
|
|
||||||
if (!masked)
|
do_unmask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
unmask_evtchn(evtchn);
|
|
||||||
} else
|
} else
|
||||||
clear_evtchn(evtchn);
|
event_handler_exit(info);
|
||||||
|
|
||||||
if (pirq_needs_eoi(data->irq)) {
|
if (pirq_needs_eoi(data->irq)) {
|
||||||
rc = HYPERVISOR_physdev_op(PHYSDEVOP_eoi, &eoi);
|
rc = HYPERVISOR_physdev_op(PHYSDEVOP_eoi, &eoi);
|
||||||
@ -748,7 +786,8 @@ static unsigned int __startup_pirq(unsigned int irq)
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
unmask_evtchn(evtchn);
|
do_unmask(info, EVT_MASK_REASON_EXPLICIT);
|
||||||
|
|
||||||
eoi_pirq(irq_get_irq_data(irq));
|
eoi_pirq(irq_get_irq_data(irq));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -775,7 +814,7 @@ static void shutdown_pirq(struct irq_data *data)
|
|||||||
if (!VALID_EVTCHN(evtchn))
|
if (!VALID_EVTCHN(evtchn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mask_evtchn(evtchn);
|
do_mask(info, EVT_MASK_REASON_EXPLICIT);
|
||||||
xen_evtchn_close(evtchn);
|
xen_evtchn_close(evtchn);
|
||||||
xen_irq_info_cleanup(info);
|
xen_irq_info_cleanup(info);
|
||||||
}
|
}
|
||||||
@ -1532,6 +1571,8 @@ void handle_irq_for_port(evtchn_port_t port, struct evtchn_loop_ctrl *ctrl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
info = info_for_irq(irq);
|
info = info_for_irq(irq);
|
||||||
|
if (xchg_acquire(&info->is_active, 1))
|
||||||
|
return;
|
||||||
|
|
||||||
if (ctrl->defer_eoi) {
|
if (ctrl->defer_eoi) {
|
||||||
info->eoi_cpu = smp_processor_id();
|
info->eoi_cpu = smp_processor_id();
|
||||||
@ -1634,10 +1675,10 @@ void rebind_evtchn_irq(int evtchn, int irq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Rebind an evtchn so that it gets delivered to a specific cpu */
|
/* Rebind an evtchn so that it gets delivered to a specific cpu */
|
||||||
static int xen_rebind_evtchn_to_cpu(int evtchn, unsigned int tcpu)
|
static int xen_rebind_evtchn_to_cpu(struct irq_info *info, unsigned int tcpu)
|
||||||
{
|
{
|
||||||
struct evtchn_bind_vcpu bind_vcpu;
|
struct evtchn_bind_vcpu bind_vcpu;
|
||||||
int masked;
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
if (!VALID_EVTCHN(evtchn))
|
if (!VALID_EVTCHN(evtchn))
|
||||||
return -1;
|
return -1;
|
||||||
@ -1653,7 +1694,7 @@ static int xen_rebind_evtchn_to_cpu(int evtchn, unsigned int tcpu)
|
|||||||
* Mask the event while changing the VCPU binding to prevent
|
* Mask the event while changing the VCPU binding to prevent
|
||||||
* it being delivered on an unexpected VCPU.
|
* it being delivered on an unexpected VCPU.
|
||||||
*/
|
*/
|
||||||
masked = test_and_set_mask(evtchn);
|
do_mask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this fails, it usually just indicates that we're dealing with a
|
* If this fails, it usually just indicates that we're dealing with a
|
||||||
@ -1663,8 +1704,7 @@ static int xen_rebind_evtchn_to_cpu(int evtchn, unsigned int tcpu)
|
|||||||
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
|
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
|
||||||
bind_evtchn_to_cpu(evtchn, tcpu);
|
bind_evtchn_to_cpu(evtchn, tcpu);
|
||||||
|
|
||||||
if (!masked)
|
do_unmask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
unmask_evtchn(evtchn);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1673,7 +1713,7 @@ static int set_affinity_irq(struct irq_data *data, const struct cpumask *dest,
|
|||||||
bool force)
|
bool force)
|
||||||
{
|
{
|
||||||
unsigned tcpu = cpumask_first_and(dest, cpu_online_mask);
|
unsigned tcpu = cpumask_first_and(dest, cpu_online_mask);
|
||||||
int ret = xen_rebind_evtchn_to_cpu(evtchn_from_irq(data->irq), tcpu);
|
int ret = xen_rebind_evtchn_to_cpu(info_for_irq(data->irq), tcpu);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
irq_data_update_effective_affinity(data, cpumask_of(tcpu));
|
irq_data_update_effective_affinity(data, cpumask_of(tcpu));
|
||||||
@ -1692,39 +1732,41 @@ EXPORT_SYMBOL_GPL(xen_set_affinity_evtchn);
|
|||||||
|
|
||||||
static void enable_dynirq(struct irq_data *data)
|
static void enable_dynirq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
int evtchn = evtchn_from_irq(data->irq);
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
if (VALID_EVTCHN(evtchn))
|
if (VALID_EVTCHN(evtchn))
|
||||||
unmask_evtchn(evtchn);
|
do_unmask(info, EVT_MASK_REASON_EXPLICIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disable_dynirq(struct irq_data *data)
|
static void disable_dynirq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
int evtchn = evtchn_from_irq(data->irq);
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
if (VALID_EVTCHN(evtchn))
|
if (VALID_EVTCHN(evtchn))
|
||||||
mask_evtchn(evtchn);
|
do_mask(info, EVT_MASK_REASON_EXPLICIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ack_dynirq(struct irq_data *data)
|
static void ack_dynirq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
int evtchn = evtchn_from_irq(data->irq);
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
if (!VALID_EVTCHN(evtchn))
|
if (!VALID_EVTCHN(evtchn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (unlikely(irqd_is_setaffinity_pending(data)) &&
|
if (unlikely(irqd_is_setaffinity_pending(data)) &&
|
||||||
likely(!irqd_irq_disabled(data))) {
|
likely(!irqd_irq_disabled(data))) {
|
||||||
int masked = test_and_set_mask(evtchn);
|
do_mask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
|
|
||||||
clear_evtchn(evtchn);
|
event_handler_exit(info);
|
||||||
|
|
||||||
irq_move_masked_irq(data);
|
irq_move_masked_irq(data);
|
||||||
|
|
||||||
if (!masked)
|
do_unmask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
unmask_evtchn(evtchn);
|
|
||||||
} else
|
} else
|
||||||
clear_evtchn(evtchn);
|
event_handler_exit(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mask_ack_dynirq(struct irq_data *data)
|
static void mask_ack_dynirq(struct irq_data *data)
|
||||||
@ -1733,18 +1775,39 @@ static void mask_ack_dynirq(struct irq_data *data)
|
|||||||
ack_dynirq(data);
|
ack_dynirq(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void lateeoi_ack_dynirq(struct irq_data *data)
|
||||||
|
{
|
||||||
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
|
if (VALID_EVTCHN(evtchn)) {
|
||||||
|
do_mask(info, EVT_MASK_REASON_EOI_PENDING);
|
||||||
|
event_handler_exit(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void lateeoi_mask_ack_dynirq(struct irq_data *data)
|
||||||
|
{
|
||||||
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
|
if (VALID_EVTCHN(evtchn)) {
|
||||||
|
do_mask(info, EVT_MASK_REASON_EXPLICIT);
|
||||||
|
event_handler_exit(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int retrigger_dynirq(struct irq_data *data)
|
static int retrigger_dynirq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned int evtchn = evtchn_from_irq(data->irq);
|
struct irq_info *info = info_for_irq(data->irq);
|
||||||
int masked;
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
if (!VALID_EVTCHN(evtchn))
|
if (!VALID_EVTCHN(evtchn))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
masked = test_and_set_mask(evtchn);
|
do_mask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
set_evtchn(evtchn);
|
set_evtchn(evtchn);
|
||||||
if (!masked)
|
do_unmask(info, EVT_MASK_REASON_TEMPORARY);
|
||||||
unmask_evtchn(evtchn);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1839,10 +1902,11 @@ static void restore_cpu_ipis(unsigned int cpu)
|
|||||||
/* Clear an irq's pending state, in preparation for polling on it */
|
/* Clear an irq's pending state, in preparation for polling on it */
|
||||||
void xen_clear_irq_pending(int irq)
|
void xen_clear_irq_pending(int irq)
|
||||||
{
|
{
|
||||||
int evtchn = evtchn_from_irq(irq);
|
struct irq_info *info = info_for_irq(irq);
|
||||||
|
evtchn_port_t evtchn = info ? info->evtchn : 0;
|
||||||
|
|
||||||
if (VALID_EVTCHN(evtchn))
|
if (VALID_EVTCHN(evtchn))
|
||||||
clear_evtchn(evtchn);
|
event_handler_exit(info);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(xen_clear_irq_pending);
|
EXPORT_SYMBOL(xen_clear_irq_pending);
|
||||||
void xen_set_irq_pending(int irq)
|
void xen_set_irq_pending(int irq)
|
||||||
@ -1950,8 +2014,8 @@ static struct irq_chip xen_lateeoi_chip __read_mostly = {
|
|||||||
.irq_mask = disable_dynirq,
|
.irq_mask = disable_dynirq,
|
||||||
.irq_unmask = enable_dynirq,
|
.irq_unmask = enable_dynirq,
|
||||||
|
|
||||||
.irq_ack = mask_ack_dynirq,
|
.irq_ack = lateeoi_ack_dynirq,
|
||||||
.irq_mask_ack = mask_ack_dynirq,
|
.irq_mask_ack = lateeoi_mask_ack_dynirq,
|
||||||
|
|
||||||
.irq_set_affinity = set_affinity_irq,
|
.irq_set_affinity = set_affinity_irq,
|
||||||
.irq_retrigger = retrigger_dynirq,
|
.irq_retrigger = retrigger_dynirq,
|
||||||
|
@ -209,12 +209,6 @@ static bool evtchn_fifo_is_pending(unsigned port)
|
|||||||
return sync_test_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word));
|
return sync_test_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool evtchn_fifo_test_and_set_mask(unsigned port)
|
|
||||||
{
|
|
||||||
event_word_t *word = event_word_from_port(port);
|
|
||||||
return sync_test_and_set_bit(EVTCHN_FIFO_BIT(MASKED, word), BM(word));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void evtchn_fifo_mask(unsigned port)
|
static void evtchn_fifo_mask(unsigned port)
|
||||||
{
|
{
|
||||||
event_word_t *word = event_word_from_port(port);
|
event_word_t *word = event_word_from_port(port);
|
||||||
@ -420,7 +414,6 @@ static const struct evtchn_ops evtchn_ops_fifo = {
|
|||||||
.clear_pending = evtchn_fifo_clear_pending,
|
.clear_pending = evtchn_fifo_clear_pending,
|
||||||
.set_pending = evtchn_fifo_set_pending,
|
.set_pending = evtchn_fifo_set_pending,
|
||||||
.is_pending = evtchn_fifo_is_pending,
|
.is_pending = evtchn_fifo_is_pending,
|
||||||
.test_and_set_mask = evtchn_fifo_test_and_set_mask,
|
|
||||||
.mask = evtchn_fifo_mask,
|
.mask = evtchn_fifo_mask,
|
||||||
.unmask = evtchn_fifo_unmask,
|
.unmask = evtchn_fifo_unmask,
|
||||||
.handle_events = evtchn_fifo_handle_events,
|
.handle_events = evtchn_fifo_handle_events,
|
||||||
|
@ -35,13 +35,19 @@ struct irq_info {
|
|||||||
struct list_head eoi_list;
|
struct list_head eoi_list;
|
||||||
short refcnt;
|
short refcnt;
|
||||||
short spurious_cnt;
|
short spurious_cnt;
|
||||||
enum xen_irq_type type; /* type */
|
short type; /* type */
|
||||||
|
u8 mask_reason; /* Why is event channel masked */
|
||||||
|
#define EVT_MASK_REASON_EXPLICIT 0x01
|
||||||
|
#define EVT_MASK_REASON_TEMPORARY 0x02
|
||||||
|
#define EVT_MASK_REASON_EOI_PENDING 0x04
|
||||||
|
u8 is_active; /* Is event just being handled? */
|
||||||
unsigned irq;
|
unsigned irq;
|
||||||
unsigned int evtchn; /* event channel */
|
unsigned int evtchn; /* event channel */
|
||||||
unsigned short cpu; /* cpu bound */
|
unsigned short cpu; /* cpu bound */
|
||||||
unsigned short eoi_cpu; /* EOI must happen on this cpu */
|
unsigned short eoi_cpu; /* EOI must happen on this cpu */
|
||||||
unsigned int irq_epoch; /* If eoi_cpu valid: irq_epoch of event */
|
unsigned int irq_epoch; /* If eoi_cpu valid: irq_epoch of event */
|
||||||
u64 eoi_time; /* Time in jiffies when to EOI. */
|
u64 eoi_time; /* Time in jiffies when to EOI. */
|
||||||
|
spinlock_t lock;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
unsigned short virq;
|
unsigned short virq;
|
||||||
@ -67,12 +73,12 @@ struct evtchn_ops {
|
|||||||
unsigned (*nr_channels)(void);
|
unsigned (*nr_channels)(void);
|
||||||
|
|
||||||
int (*setup)(struct irq_info *info);
|
int (*setup)(struct irq_info *info);
|
||||||
|
void (*remove)(evtchn_port_t port, unsigned int cpu);
|
||||||
void (*bind_to_cpu)(struct irq_info *info, unsigned cpu);
|
void (*bind_to_cpu)(struct irq_info *info, unsigned cpu);
|
||||||
|
|
||||||
void (*clear_pending)(unsigned port);
|
void (*clear_pending)(unsigned port);
|
||||||
void (*set_pending)(unsigned port);
|
void (*set_pending)(unsigned port);
|
||||||
bool (*is_pending)(unsigned port);
|
bool (*is_pending)(unsigned port);
|
||||||
bool (*test_and_set_mask)(unsigned port);
|
|
||||||
void (*mask)(unsigned port);
|
void (*mask)(unsigned port);
|
||||||
void (*unmask)(unsigned port);
|
void (*unmask)(unsigned port);
|
||||||
|
|
||||||
@ -109,6 +115,13 @@ static inline int xen_evtchn_port_setup(struct irq_info *info)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void xen_evtchn_port_remove(evtchn_port_t evtchn,
|
||||||
|
unsigned int cpu)
|
||||||
|
{
|
||||||
|
if (evtchn_ops->remove)
|
||||||
|
evtchn_ops->remove(evtchn, cpu);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void xen_evtchn_port_bind_to_cpu(struct irq_info *info,
|
static inline void xen_evtchn_port_bind_to_cpu(struct irq_info *info,
|
||||||
unsigned cpu)
|
unsigned cpu)
|
||||||
{
|
{
|
||||||
@ -130,11 +143,6 @@ static inline bool test_evtchn(unsigned port)
|
|||||||
return evtchn_ops->is_pending(port);
|
return evtchn_ops->is_pending(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool test_and_set_mask(unsigned port)
|
|
||||||
{
|
|
||||||
return evtchn_ops->test_and_set_mask(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void mask_evtchn(unsigned port)
|
static inline void mask_evtchn(unsigned port)
|
||||||
{
|
{
|
||||||
return evtchn_ops->mask(port);
|
return evtchn_ops->mask(port);
|
||||||
|
@ -694,12 +694,24 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer,
|
|||||||
struct super_block *sb = file_inode(file)->i_sb;
|
struct super_block *sb = file_inode(file)->i_sb;
|
||||||
struct dentry *root = sb->s_root, *dentry;
|
struct dentry *root = sb->s_root, *dentry;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
struct file *f = NULL;
|
||||||
|
|
||||||
e = create_entry(buffer, count);
|
e = create_entry(buffer, count);
|
||||||
|
|
||||||
if (IS_ERR(e))
|
if (IS_ERR(e))
|
||||||
return PTR_ERR(e);
|
return PTR_ERR(e);
|
||||||
|
|
||||||
|
if (e->flags & MISC_FMT_OPEN_FILE) {
|
||||||
|
f = open_exec(e->interpreter);
|
||||||
|
if (IS_ERR(f)) {
|
||||||
|
pr_notice("register: failed to install interpreter file %s\n",
|
||||||
|
e->interpreter);
|
||||||
|
kfree(e);
|
||||||
|
return PTR_ERR(f);
|
||||||
|
}
|
||||||
|
e->interp_file = f;
|
||||||
|
}
|
||||||
|
|
||||||
inode_lock(d_inode(root));
|
inode_lock(d_inode(root));
|
||||||
dentry = lookup_one_len(e->name, root, strlen(e->name));
|
dentry = lookup_one_len(e->name, root, strlen(e->name));
|
||||||
err = PTR_ERR(dentry);
|
err = PTR_ERR(dentry);
|
||||||
@ -723,21 +735,6 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer,
|
|||||||
goto out2;
|
goto out2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e->flags & MISC_FMT_OPEN_FILE) {
|
|
||||||
struct file *f;
|
|
||||||
|
|
||||||
f = open_exec(e->interpreter);
|
|
||||||
if (IS_ERR(f)) {
|
|
||||||
err = PTR_ERR(f);
|
|
||||||
pr_notice("register: failed to install interpreter file %s\n", e->interpreter);
|
|
||||||
simple_release_fs(&bm_mnt, &entry_count);
|
|
||||||
iput(inode);
|
|
||||||
inode = NULL;
|
|
||||||
goto out2;
|
|
||||||
}
|
|
||||||
e->interp_file = f;
|
|
||||||
}
|
|
||||||
|
|
||||||
e->dentry = dget(dentry);
|
e->dentry = dget(dentry);
|
||||||
inode->i_private = e;
|
inode->i_private = e;
|
||||||
inode->i_fop = &bm_entry_operations;
|
inode->i_fop = &bm_entry_operations;
|
||||||
@ -754,6 +751,8 @@ out:
|
|||||||
inode_unlock(d_inode(root));
|
inode_unlock(d_inode(root));
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
|
if (f)
|
||||||
|
filp_close(f, NULL);
|
||||||
kfree(e);
|
kfree(e);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||||||
rc = server->ops->queryfs(xid, tcon, buf);
|
rc = server->ops->queryfs(xid, tcon, buf);
|
||||||
|
|
||||||
free_xid(xid);
|
free_xid(xid);
|
||||||
return 0;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long cifs_fallocate(struct file *file, int mode, loff_t off, loff_t len)
|
static long cifs_fallocate(struct file *file, int mode, loff_t off, loff_t len)
|
||||||
|
@ -5329,7 +5329,7 @@ static int _nfs4_get_security_label(struct inode *inode, void *buf,
|
|||||||
return ret;
|
return ret;
|
||||||
if (!(fattr.valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL))
|
if (!(fattr.valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
return 0;
|
return label.len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nfs4_get_security_label(struct inode *inode, void *buf,
|
static int nfs4_get_security_label(struct inode *inode, void *buf,
|
||||||
|
@ -540,11 +540,14 @@ static int udf_do_extend_file(struct inode *inode,
|
|||||||
|
|
||||||
udf_write_aext(inode, last_pos, &last_ext->extLocation,
|
udf_write_aext(inode, last_pos, &last_ext->extLocation,
|
||||||
last_ext->extLength, 1);
|
last_ext->extLength, 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We've rewritten the last extent but there may be empty
|
* We've rewritten the last extent. If we are going to add
|
||||||
* indirect extent after it - enter it.
|
* more extents, we may need to enter possible following
|
||||||
|
* empty indirect extent.
|
||||||
*/
|
*/
|
||||||
udf_next_aext(inode, last_pos, &tmploc, &tmplen, 0);
|
if (new_block_bytes || prealloc_len)
|
||||||
|
udf_next_aext(inode, last_pos, &tmploc, &tmplen, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Managed to do everything necessary? */
|
/* Managed to do everything necessary? */
|
||||||
|
@ -49,8 +49,12 @@ static inline void can_skb_reserve(struct sk_buff *skb)
|
|||||||
|
|
||||||
static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
|
static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
|
||||||
{
|
{
|
||||||
if (sk) {
|
/* If the socket has already been closed by user space, the
|
||||||
sock_hold(sk);
|
* refcount may already be 0 (and the socket will be freed
|
||||||
|
* after the last TX skb has been freed). So only increase
|
||||||
|
* socket refcount if the refcount is > 0.
|
||||||
|
*/
|
||||||
|
if (sk && refcount_inc_not_zero(&sk->sk_refcnt)) {
|
||||||
skb->destructor = sock_efree;
|
skb->destructor = sock_efree;
|
||||||
skb->sk = sk;
|
skb->sk = sk;
|
||||||
}
|
}
|
||||||
|
@ -272,6 +272,7 @@ struct header_ops {
|
|||||||
const struct net_device *dev,
|
const struct net_device *dev,
|
||||||
const unsigned char *haddr);
|
const unsigned char *haddr);
|
||||||
bool (*validate)(const char *ll_header, unsigned int len);
|
bool (*validate)(const char *ll_header, unsigned int len);
|
||||||
|
__be16 (*parse_protocol)(const struct sk_buff *skb);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* These flag bits are private to the generic network queueing
|
/* These flag bits are private to the generic network queueing
|
||||||
@ -2731,6 +2732,15 @@ static inline int dev_parse_header(const struct sk_buff *skb,
|
|||||||
return dev->header_ops->parse(skb, haddr);
|
return dev->header_ops->parse(skb, haddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline __be16 dev_parse_header_protocol(const struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
const struct net_device *dev = skb->dev;
|
||||||
|
|
||||||
|
if (!dev->header_ops || !dev->header_ops->parse_protocol)
|
||||||
|
return 0;
|
||||||
|
return dev->header_ops->parse_protocol(skb);
|
||||||
|
}
|
||||||
|
|
||||||
/* ll_header must have at least hard_header_len allocated */
|
/* ll_header must have at least hard_header_len allocated */
|
||||||
static inline bool dev_validate_header(const struct net_device *dev,
|
static inline bool dev_validate_header(const struct net_device *dev,
|
||||||
char *ll_header, int len)
|
char *ll_header, int len)
|
||||||
|
@ -171,7 +171,8 @@ static inline bool in_vfork(struct task_struct *tsk)
|
|||||||
* another oom-unkillable task does this it should blame itself.
|
* another oom-unkillable task does this it should blame itself.
|
||||||
*/
|
*/
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
ret = tsk->vfork_done && tsk->real_parent->mm == tsk->mm;
|
ret = tsk->vfork_done &&
|
||||||
|
rcu_dereference(tsk->real_parent)->mm == tsk->mm;
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -138,7 +138,7 @@ int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
|
|||||||
const struct cpumask *cpus);
|
const struct cpumask *cpus);
|
||||||
#else /* CONFIG_SMP || CONFIG_HOTPLUG_CPU */
|
#else /* CONFIG_SMP || CONFIG_HOTPLUG_CPU */
|
||||||
|
|
||||||
static inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
|
static __always_inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
|
||||||
const struct cpumask *cpus)
|
const struct cpumask *cpus)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
@ -149,14 +149,15 @@ static inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int stop_machine(cpu_stop_fn_t fn, void *data,
|
static __always_inline int
|
||||||
const struct cpumask *cpus)
|
stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)
|
||||||
{
|
{
|
||||||
return stop_machine_cpuslocked(fn, data, cpus);
|
return stop_machine_cpuslocked(fn, data, cpus);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
|
static __always_inline int
|
||||||
const struct cpumask *cpus)
|
stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
|
||||||
|
const struct cpumask *cpus)
|
||||||
{
|
{
|
||||||
return stop_machine(fn, data, cpus);
|
return stop_machine(fn, data, cpus);
|
||||||
}
|
}
|
||||||
|
@ -79,8 +79,13 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
|||||||
if (gso_type && skb->network_header) {
|
if (gso_type && skb->network_header) {
|
||||||
struct flow_keys keys;
|
struct flow_keys keys;
|
||||||
|
|
||||||
if (!skb->protocol)
|
if (!skb->protocol) {
|
||||||
|
__be16 protocol = dev_parse_header_protocol(skb);
|
||||||
|
|
||||||
virtio_net_hdr_set_proto(skb, hdr);
|
virtio_net_hdr_set_proto(skb, hdr);
|
||||||
|
if (protocol && protocol != skb->protocol)
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
retry:
|
retry:
|
||||||
if (!skb_flow_dissect_flow_keys(skb, &keys, 0)) {
|
if (!skb_flow_dissect_flow_keys(skb, &keys, 0)) {
|
||||||
/* UFO does not specify ipv4 or 6: try both */
|
/* UFO does not specify ipv4 or 6: try both */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#define NFCT_HELPER_STATUS_DISABLED 0
|
#define NFCT_HELPER_STATUS_DISABLED 0
|
||||||
#define NFCT_HELPER_STATUS_ENABLED 1
|
#define NFCT_HELPER_STATUS_ENABLED 1
|
||||||
|
|
||||||
enum nfnl_acct_msg_types {
|
enum nfnl_cthelper_msg_types {
|
||||||
NFNL_MSG_CTHELPER_NEW,
|
NFNL_MSG_CTHELPER_NEW,
|
||||||
NFNL_MSG_CTHELPER_GET,
|
NFNL_MSG_CTHELPER_GET,
|
||||||
NFNL_MSG_CTHELPER_DEL,
|
NFNL_MSG_CTHELPER_DEL,
|
||||||
|
@ -1888,7 +1888,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n,
|
|||||||
|
|
||||||
t = acquire_slab(s, n, page, object == NULL, &objects);
|
t = acquire_slab(s, n, page, object == NULL, &objects);
|
||||||
if (!t)
|
if (!t)
|
||||||
continue; /* cmpxchg raced */
|
break;
|
||||||
|
|
||||||
available += objects;
|
available += objects;
|
||||||
if (!object) {
|
if (!object) {
|
||||||
|
@ -533,16 +533,10 @@ int cipso_v4_doi_remove(u32 doi, struct netlbl_audit *audit_info)
|
|||||||
ret_val = -ENOENT;
|
ret_val = -ENOENT;
|
||||||
goto doi_remove_return;
|
goto doi_remove_return;
|
||||||
}
|
}
|
||||||
if (!refcount_dec_and_test(&doi_def->refcount)) {
|
|
||||||
spin_unlock(&cipso_v4_doi_list_lock);
|
|
||||||
ret_val = -EBUSY;
|
|
||||||
goto doi_remove_return;
|
|
||||||
}
|
|
||||||
list_del_rcu(&doi_def->list);
|
list_del_rcu(&doi_def->list);
|
||||||
spin_unlock(&cipso_v4_doi_list_lock);
|
spin_unlock(&cipso_v4_doi_list_lock);
|
||||||
|
|
||||||
cipso_v4_cache_invalidate();
|
cipso_v4_doi_putdef(doi_def);
|
||||||
call_rcu(&doi_def->rcu, cipso_v4_doi_free_rcu);
|
|
||||||
ret_val = 0;
|
ret_val = 0;
|
||||||
|
|
||||||
doi_remove_return:
|
doi_remove_return:
|
||||||
@ -599,9 +593,6 @@ void cipso_v4_doi_putdef(struct cipso_v4_doi *doi_def)
|
|||||||
|
|
||||||
if (!refcount_dec_and_test(&doi_def->refcount))
|
if (!refcount_dec_and_test(&doi_def->refcount))
|
||||||
return;
|
return;
|
||||||
spin_lock(&cipso_v4_doi_list_lock);
|
|
||||||
list_del_rcu(&doi_def->list);
|
|
||||||
spin_unlock(&cipso_v4_doi_list_lock);
|
|
||||||
|
|
||||||
cipso_v4_cache_invalidate();
|
cipso_v4_cache_invalidate();
|
||||||
call_rcu(&doi_def->rcu, cipso_v4_doi_free_rcu);
|
call_rcu(&doi_def->rcu, cipso_v4_doi_free_rcu);
|
||||||
|
@ -254,7 +254,7 @@ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
|
|||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
|
|
||||||
if (NAPI_GRO_CB(skb)->encap_mark ||
|
if (NAPI_GRO_CB(skb)->encap_mark ||
|
||||||
(skb->ip_summed != CHECKSUM_PARTIAL &&
|
(uh->check && skb->ip_summed != CHECKSUM_PARTIAL &&
|
||||||
NAPI_GRO_CB(skb)->csum_cnt == 0 &&
|
NAPI_GRO_CB(skb)->csum_cnt == 0 &&
|
||||||
!NAPI_GRO_CB(skb)->csum_valid))
|
!NAPI_GRO_CB(skb)->csum_valid))
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -97,6 +97,9 @@ struct calipso_map_cache_entry {
|
|||||||
|
|
||||||
static struct calipso_map_cache_bkt *calipso_cache;
|
static struct calipso_map_cache_bkt *calipso_cache;
|
||||||
|
|
||||||
|
static void calipso_cache_invalidate(void);
|
||||||
|
static void calipso_doi_putdef(struct calipso_doi *doi_def);
|
||||||
|
|
||||||
/* Label Mapping Cache Functions
|
/* Label Mapping Cache Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -458,15 +461,10 @@ static int calipso_doi_remove(u32 doi, struct netlbl_audit *audit_info)
|
|||||||
ret_val = -ENOENT;
|
ret_val = -ENOENT;
|
||||||
goto doi_remove_return;
|
goto doi_remove_return;
|
||||||
}
|
}
|
||||||
if (!refcount_dec_and_test(&doi_def->refcount)) {
|
|
||||||
spin_unlock(&calipso_doi_list_lock);
|
|
||||||
ret_val = -EBUSY;
|
|
||||||
goto doi_remove_return;
|
|
||||||
}
|
|
||||||
list_del_rcu(&doi_def->list);
|
list_del_rcu(&doi_def->list);
|
||||||
spin_unlock(&calipso_doi_list_lock);
|
spin_unlock(&calipso_doi_list_lock);
|
||||||
|
|
||||||
call_rcu(&doi_def->rcu, calipso_doi_free_rcu);
|
calipso_doi_putdef(doi_def);
|
||||||
ret_val = 0;
|
ret_val = 0;
|
||||||
|
|
||||||
doi_remove_return:
|
doi_remove_return:
|
||||||
@ -522,10 +520,8 @@ static void calipso_doi_putdef(struct calipso_doi *doi_def)
|
|||||||
|
|
||||||
if (!refcount_dec_and_test(&doi_def->refcount))
|
if (!refcount_dec_and_test(&doi_def->refcount))
|
||||||
return;
|
return;
|
||||||
spin_lock(&calipso_doi_list_lock);
|
|
||||||
list_del_rcu(&doi_def->list);
|
|
||||||
spin_unlock(&calipso_doi_list_lock);
|
|
||||||
|
|
||||||
|
calipso_cache_invalidate();
|
||||||
call_rcu(&doi_def->rcu, calipso_doi_free_rcu);
|
call_rcu(&doi_def->rcu, calipso_doi_free_rcu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <linux/netdev_features.h>
|
#include <linux/netdev_features.h>
|
||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
|
#include <net/mpls.h>
|
||||||
|
|
||||||
static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
|
static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
|
||||||
netdev_features_t features)
|
netdev_features_t features)
|
||||||
@ -31,6 +32,8 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
|
|||||||
|
|
||||||
skb_reset_network_header(skb);
|
skb_reset_network_header(skb);
|
||||||
mpls_hlen = skb_inner_network_header(skb) - skb_network_header(skb);
|
mpls_hlen = skb_inner_network_header(skb) - skb_network_header(skb);
|
||||||
|
if (unlikely(!mpls_hlen || mpls_hlen % MPLS_HLEN))
|
||||||
|
goto out;
|
||||||
if (unlikely(!pskb_may_pull(skb, mpls_hlen)))
|
if (unlikely(!pskb_may_pull(skb, mpls_hlen)))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -329,6 +329,7 @@ static int match_revfn(u8 af, const char *name, u8 revision, int *bestp)
|
|||||||
const struct xt_match *m;
|
const struct xt_match *m;
|
||||||
int have_rev = 0;
|
int have_rev = 0;
|
||||||
|
|
||||||
|
mutex_lock(&xt[af].mutex);
|
||||||
list_for_each_entry(m, &xt[af].match, list) {
|
list_for_each_entry(m, &xt[af].match, list) {
|
||||||
if (strcmp(m->name, name) == 0) {
|
if (strcmp(m->name, name) == 0) {
|
||||||
if (m->revision > *bestp)
|
if (m->revision > *bestp)
|
||||||
@ -337,6 +338,7 @@ static int match_revfn(u8 af, const char *name, u8 revision, int *bestp)
|
|||||||
have_rev = 1;
|
have_rev = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&xt[af].mutex);
|
||||||
|
|
||||||
if (af != NFPROTO_UNSPEC && !have_rev)
|
if (af != NFPROTO_UNSPEC && !have_rev)
|
||||||
return match_revfn(NFPROTO_UNSPEC, name, revision, bestp);
|
return match_revfn(NFPROTO_UNSPEC, name, revision, bestp);
|
||||||
@ -349,6 +351,7 @@ static int target_revfn(u8 af, const char *name, u8 revision, int *bestp)
|
|||||||
const struct xt_target *t;
|
const struct xt_target *t;
|
||||||
int have_rev = 0;
|
int have_rev = 0;
|
||||||
|
|
||||||
|
mutex_lock(&xt[af].mutex);
|
||||||
list_for_each_entry(t, &xt[af].target, list) {
|
list_for_each_entry(t, &xt[af].target, list) {
|
||||||
if (strcmp(t->name, name) == 0) {
|
if (strcmp(t->name, name) == 0) {
|
||||||
if (t->revision > *bestp)
|
if (t->revision > *bestp)
|
||||||
@ -357,6 +360,7 @@ static int target_revfn(u8 af, const char *name, u8 revision, int *bestp)
|
|||||||
have_rev = 1;
|
have_rev = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&xt[af].mutex);
|
||||||
|
|
||||||
if (af != NFPROTO_UNSPEC && !have_rev)
|
if (af != NFPROTO_UNSPEC && !have_rev)
|
||||||
return target_revfn(NFPROTO_UNSPEC, name, revision, bestp);
|
return target_revfn(NFPROTO_UNSPEC, name, revision, bestp);
|
||||||
@ -370,12 +374,10 @@ int xt_find_revision(u8 af, const char *name, u8 revision, int target,
|
|||||||
{
|
{
|
||||||
int have_rev, best = -1;
|
int have_rev, best = -1;
|
||||||
|
|
||||||
mutex_lock(&xt[af].mutex);
|
|
||||||
if (target == 1)
|
if (target == 1)
|
||||||
have_rev = target_revfn(af, name, revision, &best);
|
have_rev = target_revfn(af, name, revision, &best);
|
||||||
else
|
else
|
||||||
have_rev = match_revfn(af, name, revision, &best);
|
have_rev = match_revfn(af, name, revision, &best);
|
||||||
mutex_unlock(&xt[af].mutex);
|
|
||||||
|
|
||||||
/* Nothing at all? Return 0 to try loading module. */
|
/* Nothing at all? Return 0 to try loading module. */
|
||||||
if (best == -1) {
|
if (best == -1) {
|
||||||
|
@ -581,6 +581,7 @@ list_start:
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
cipso_v4_doi_putdef(doi_def);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
genlmsg_end(ans_skb, data);
|
genlmsg_end(ans_skb, data);
|
||||||
@ -589,12 +590,14 @@ list_start:
|
|||||||
list_retry:
|
list_retry:
|
||||||
/* XXX - this limit is a guesstimate */
|
/* XXX - this limit is a guesstimate */
|
||||||
if (nlsze_mult < 4) {
|
if (nlsze_mult < 4) {
|
||||||
|
cipso_v4_doi_putdef(doi_def);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
kfree_skb(ans_skb);
|
kfree_skb(ans_skb);
|
||||||
nlsze_mult *= 2;
|
nlsze_mult *= 2;
|
||||||
goto list_start;
|
goto list_start;
|
||||||
}
|
}
|
||||||
list_failure_lock:
|
list_failure_lock:
|
||||||
|
cipso_v4_doi_putdef(doi_def);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
list_failure:
|
list_failure:
|
||||||
kfree_skb(ans_skb);
|
kfree_skb(ans_skb);
|
||||||
|
@ -1904,7 +1904,7 @@ static int tc_dump_tclass_qdisc(struct Qdisc *q, struct sk_buff *skb,
|
|||||||
|
|
||||||
static int tc_dump_tclass_root(struct Qdisc *root, struct sk_buff *skb,
|
static int tc_dump_tclass_root(struct Qdisc *root, struct sk_buff *skb,
|
||||||
struct tcmsg *tcm, struct netlink_callback *cb,
|
struct tcmsg *tcm, struct netlink_callback *cb,
|
||||||
int *t_p, int s_t)
|
int *t_p, int s_t, bool recur)
|
||||||
{
|
{
|
||||||
struct Qdisc *q;
|
struct Qdisc *q;
|
||||||
int b;
|
int b;
|
||||||
@ -1915,7 +1915,7 @@ static int tc_dump_tclass_root(struct Qdisc *root, struct sk_buff *skb,
|
|||||||
if (tc_dump_tclass_qdisc(root, skb, tcm, cb, t_p, s_t) < 0)
|
if (tc_dump_tclass_qdisc(root, skb, tcm, cb, t_p, s_t) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!qdisc_dev(root))
|
if (!qdisc_dev(root) || !recur)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (tcm->tcm_parent) {
|
if (tcm->tcm_parent) {
|
||||||
@ -1950,13 +1950,13 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb)
|
|||||||
s_t = cb->args[0];
|
s_t = cb->args[0];
|
||||||
t = 0;
|
t = 0;
|
||||||
|
|
||||||
if (tc_dump_tclass_root(dev->qdisc, skb, tcm, cb, &t, s_t) < 0)
|
if (tc_dump_tclass_root(dev->qdisc, skb, tcm, cb, &t, s_t, true) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
dev_queue = dev_ingress_queue(dev);
|
dev_queue = dev_ingress_queue(dev);
|
||||||
if (dev_queue &&
|
if (dev_queue &&
|
||||||
tc_dump_tclass_root(dev_queue->qdisc_sleeping, skb, tcm, cb,
|
tc_dump_tclass_root(dev_queue->qdisc_sleeping, skb, tcm, cb,
|
||||||
&t, s_t) < 0)
|
&t, s_t, false) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -415,7 +415,7 @@ static uint32_t (*w2)(uint16_t);
|
|||||||
static int
|
static int
|
||||||
is_mcounted_section_name(char const *const txtname)
|
is_mcounted_section_name(char const *const txtname)
|
||||||
{
|
{
|
||||||
return strcmp(".text", txtname) == 0 ||
|
return strncmp(".text", txtname, 5) == 0 ||
|
||||||
strcmp(".init.text", txtname) == 0 ||
|
strcmp(".init.text", txtname) == 0 ||
|
||||||
strcmp(".ref.text", txtname) == 0 ||
|
strcmp(".ref.text", txtname) == 0 ||
|
||||||
strcmp(".sched.text", txtname) == 0 ||
|
strcmp(".sched.text", txtname) == 0 ||
|
||||||
|
@ -142,6 +142,11 @@ my %text_sections = (
|
|||||||
".text.unlikely" => 1,
|
".text.unlikely" => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Acceptable section-prefixes to record.
|
||||||
|
my %text_section_prefixes = (
|
||||||
|
".text." => 1,
|
||||||
|
);
|
||||||
|
|
||||||
# Note: we are nice to C-programmers here, thus we skip the '||='-idiom.
|
# Note: we are nice to C-programmers here, thus we skip the '||='-idiom.
|
||||||
$objdump = 'objdump' if (!$objdump);
|
$objdump = 'objdump' if (!$objdump);
|
||||||
$objcopy = 'objcopy' if (!$objcopy);
|
$objcopy = 'objcopy' if (!$objcopy);
|
||||||
@ -507,6 +512,14 @@ while (<IN>) {
|
|||||||
|
|
||||||
# Only record text sections that we know are safe
|
# Only record text sections that we know are safe
|
||||||
$read_function = defined($text_sections{$1});
|
$read_function = defined($text_sections{$1});
|
||||||
|
if (!$read_function) {
|
||||||
|
foreach my $prefix (keys %text_section_prefixes) {
|
||||||
|
if (substr($1, 0, length $prefix) eq $prefix) {
|
||||||
|
$read_function = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
# print out any recorded offsets
|
# print out any recorded offsets
|
||||||
update_funcs();
|
update_funcs();
|
||||||
|
|
||||||
|
@ -512,8 +512,7 @@ int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size)
|
|||||||
__u32 magic, nsmagic;
|
__u32 magic, nsmagic;
|
||||||
struct inode *inode = d_backing_inode(dentry);
|
struct inode *inode = d_backing_inode(dentry);
|
||||||
struct user_namespace *task_ns = current_user_ns(),
|
struct user_namespace *task_ns = current_user_ns(),
|
||||||
*fs_ns = inode->i_sb->s_user_ns,
|
*fs_ns = inode->i_sb->s_user_ns;
|
||||||
*ancestor;
|
|
||||||
kuid_t rootid;
|
kuid_t rootid;
|
||||||
size_t newsize;
|
size_t newsize;
|
||||||
|
|
||||||
@ -536,15 +535,6 @@ int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size)
|
|||||||
if (nsrootid == -1)
|
if (nsrootid == -1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/*
|
|
||||||
* Do not allow allow adding a v3 filesystem capability xattr
|
|
||||||
* if the rootid field is ambiguous.
|
|
||||||
*/
|
|
||||||
for (ancestor = task_ns->parent; ancestor; ancestor = ancestor->parent) {
|
|
||||||
if (from_kuid(ancestor, rootid) == 0)
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
newsize = sizeof(struct vfs_ns_cap_data);
|
newsize = sizeof(struct vfs_ns_cap_data);
|
||||||
nscap = kmalloc(newsize, GFP_ATOMIC);
|
nscap = kmalloc(newsize, GFP_ATOMIC);
|
||||||
if (!nscap)
|
if (!nscap)
|
||||||
|
@ -46,6 +46,10 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev)
|
|||||||
if (codec->bus->shutdown)
|
if (codec->bus->shutdown)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* ignore unsol events during system suspend/resume */
|
||||||
|
if (codec->core.dev.power.power_state.event != PM_EVENT_ON)
|
||||||
|
return;
|
||||||
|
|
||||||
if (codec->patch_ops.unsol_event)
|
if (codec->patch_ops.unsol_event)
|
||||||
codec->patch_ops.unsol_event(codec, ev);
|
codec->patch_ops.unsol_event(codec, ev);
|
||||||
}
|
}
|
||||||
|
@ -624,13 +624,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
|
|||||||
20,
|
20,
|
||||||
178000000);
|
178000000);
|
||||||
|
|
||||||
/* by some reason, the playback stream stalls on PulseAudio with
|
|
||||||
* tsched=1 when a capture stream triggers. Until we figure out the
|
|
||||||
* real cause, disable tsched mode by telling the PCM info flag.
|
|
||||||
*/
|
|
||||||
if (chip->driver_caps & AZX_DCAPS_AMD_WORKAROUND)
|
|
||||||
runtime->hw.info |= SNDRV_PCM_INFO_BATCH;
|
|
||||||
|
|
||||||
if (chip->align_buffer_size)
|
if (chip->align_buffer_size)
|
||||||
/* constrain buffer sizes to be multiple of 128
|
/* constrain buffer sizes to be multiple of 128
|
||||||
bytes. This is more efficient in terms of memory
|
bytes. This is more efficient in terms of memory
|
||||||
|
@ -2324,6 +2324,18 @@ static void generic_hdmi_free(struct hda_codec *codec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
static int generic_hdmi_suspend(struct hda_codec *codec)
|
||||||
|
{
|
||||||
|
struct hdmi_spec *spec = codec->spec;
|
||||||
|
int pin_idx;
|
||||||
|
|
||||||
|
for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
|
||||||
|
struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
|
||||||
|
cancel_delayed_work_sync(&per_pin->work);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int generic_hdmi_resume(struct hda_codec *codec)
|
static int generic_hdmi_resume(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
struct hdmi_spec *spec = codec->spec;
|
struct hdmi_spec *spec = codec->spec;
|
||||||
@ -2347,6 +2359,7 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = {
|
|||||||
.build_controls = generic_hdmi_build_controls,
|
.build_controls = generic_hdmi_build_controls,
|
||||||
.unsol_event = hdmi_unsol_event,
|
.unsol_event = hdmi_unsol_event,
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
.suspend = generic_hdmi_suspend,
|
||||||
.resume = generic_hdmi_resume,
|
.resume = generic_hdmi_resume,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -1155,6 +1155,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
|
|||||||
case USB_ID(0x1de7, 0x0114): /* Phoenix Audio MT202pcs */
|
case USB_ID(0x1de7, 0x0114): /* Phoenix Audio MT202pcs */
|
||||||
case USB_ID(0x21B4, 0x0081): /* AudioQuest DragonFly */
|
case USB_ID(0x21B4, 0x0081): /* AudioQuest DragonFly */
|
||||||
case USB_ID(0x2912, 0x30c8): /* Audioengine D1 */
|
case USB_ID(0x2912, 0x30c8): /* Audioengine D1 */
|
||||||
|
case USB_ID(0x413c, 0xa506): /* Dell AE515 sound bar */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -382,6 +382,7 @@ static int read_saved_cmdline(struct pevent *pevent)
|
|||||||
pr_debug("error reading saved cmdlines\n");
|
pr_debug("error reading saved cmdlines\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
buf[ret] = '\0';
|
||||||
|
|
||||||
parse_saved_cmdline(pevent, buf, size);
|
parse_saved_cmdline(pevent, buf, size);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -1870,7 +1870,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
|
|||||||
* Prevent userspace from creating a memory region outside of the IPA
|
* Prevent userspace from creating a memory region outside of the IPA
|
||||||
* space addressable by the KVM guest IPA space.
|
* space addressable by the KVM guest IPA space.
|
||||||
*/
|
*/
|
||||||
if (memslot->base_gfn + memslot->npages >=
|
if (memslot->base_gfn + memslot->npages >
|
||||||
(KVM_PHYS_SIZE >> PAGE_SHIFT))
|
(KVM_PHYS_SIZE >> PAGE_SHIFT))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user