mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-21 22:31:51 +00:00
940 lines
30 KiB
Diff
940 lines
30 KiB
Diff
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-loopback b/Documentation/ABI/testing/configfs-usb-gadget-loopback
|
|
index 9aae5bfb9908..06beefbcf061 100644
|
|
--- a/Documentation/ABI/testing/configfs-usb-gadget-loopback
|
|
+++ b/Documentation/ABI/testing/configfs-usb-gadget-loopback
|
|
@@ -5,4 +5,4 @@ Description:
|
|
The attributes:
|
|
|
|
qlen - depth of loopback queue
|
|
- bulk_buflen - buffer length
|
|
+ buflen - buffer length
|
|
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
|
|
index 29477c319f61..bc7ff731aa0c 100644
|
|
--- a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
|
|
+++ b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
|
|
@@ -9,4 +9,4 @@ Description:
|
|
isoc_maxpacket - 0 - 1023 (fs), 0 - 1024 (hs/ss)
|
|
isoc_mult - 0..2 (hs/ss only)
|
|
isoc_maxburst - 0..15 (ss only)
|
|
- qlen - buffer length
|
|
+ buflen - buffer length
|
|
diff --git a/Makefile b/Makefile
|
|
index 3a5d4316c4c7..86d227774ae6 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1,6 +1,6 @@
|
|
VERSION = 3
|
|
PATCHLEVEL = 14
|
|
-SUBLEVEL = 52
|
|
+SUBLEVEL = 53
|
|
EXTRAVERSION =
|
|
NAME = Remembering Coco
|
|
|
|
diff --git a/arch/arm/mach-omap2/clockdomains7xx_data.c b/arch/arm/mach-omap2/clockdomains7xx_data.c
|
|
index 57d5df0c1fbd..7581e036bda6 100644
|
|
--- a/arch/arm/mach-omap2/clockdomains7xx_data.c
|
|
+++ b/arch/arm/mach-omap2/clockdomains7xx_data.c
|
|
@@ -331,7 +331,7 @@ static struct clockdomain l4per2_7xx_clkdm = {
|
|
.dep_bit = DRA7XX_L4PER2_STATDEP_SHIFT,
|
|
.wkdep_srcs = l4per2_wkup_sleep_deps,
|
|
.sleepdep_srcs = l4per2_wkup_sleep_deps,
|
|
- .flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
+ .flags = CLKDM_CAN_SWSUP,
|
|
};
|
|
|
|
static struct clockdomain mpu0_7xx_clkdm = {
|
|
diff --git a/arch/x86/crypto/ghash-clmulni-intel_glue.c b/arch/x86/crypto/ghash-clmulni-intel_glue.c
|
|
index a8d6f69f92a3..4bcf841e4701 100644
|
|
--- a/arch/x86/crypto/ghash-clmulni-intel_glue.c
|
|
+++ b/arch/x86/crypto/ghash-clmulni-intel_glue.c
|
|
@@ -291,6 +291,7 @@ static struct ahash_alg ghash_async_alg = {
|
|
.cra_name = "ghash",
|
|
.cra_driver_name = "ghash-clmulni",
|
|
.cra_priority = 400,
|
|
+ .cra_ctxsize = sizeof(struct ghash_async_ctx),
|
|
.cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
|
|
.cra_blocksize = GHASH_BLOCK_SIZE,
|
|
.cra_type = &crypto_ahash_type,
|
|
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
|
|
index aa0779372e3d..dba56fb5e383 100644
|
|
--- a/arch/x86/kvm/mmu.c
|
|
+++ b/arch/x86/kvm/mmu.c
|
|
@@ -381,12 +381,6 @@ static u64 __get_spte_lockless(u64 *sptep)
|
|
{
|
|
return ACCESS_ONCE(*sptep);
|
|
}
|
|
-
|
|
-static bool __check_direct_spte_mmio_pf(u64 spte)
|
|
-{
|
|
- /* It is valid if the spte is zapped. */
|
|
- return spte == 0ull;
|
|
-}
|
|
#else
|
|
union split_spte {
|
|
struct {
|
|
@@ -502,23 +496,6 @@ retry:
|
|
|
|
return spte.spte;
|
|
}
|
|
-
|
|
-static bool __check_direct_spte_mmio_pf(u64 spte)
|
|
-{
|
|
- union split_spte sspte = (union split_spte)spte;
|
|
- u32 high_mmio_mask = shadow_mmio_mask >> 32;
|
|
-
|
|
- /* It is valid if the spte is zapped. */
|
|
- if (spte == 0ull)
|
|
- return true;
|
|
-
|
|
- /* It is valid if the spte is being zapped. */
|
|
- if (sspte.spte_low == 0ull &&
|
|
- (sspte.spte_high & high_mmio_mask) == high_mmio_mask)
|
|
- return true;
|
|
-
|
|
- return false;
|
|
-}
|
|
#endif
|
|
|
|
static bool spte_is_locklessly_modifiable(u64 spte)
|
|
@@ -3215,21 +3192,6 @@ static bool quickly_check_mmio_pf(struct kvm_vcpu *vcpu, u64 addr, bool direct)
|
|
return vcpu_match_mmio_gva(vcpu, addr);
|
|
}
|
|
|
|
-
|
|
-/*
|
|
- * On direct hosts, the last spte is only allows two states
|
|
- * for mmio page fault:
|
|
- * - It is the mmio spte
|
|
- * - It is zapped or it is being zapped.
|
|
- *
|
|
- * This function completely checks the spte when the last spte
|
|
- * is not the mmio spte.
|
|
- */
|
|
-static bool check_direct_spte_mmio_pf(u64 spte)
|
|
-{
|
|
- return __check_direct_spte_mmio_pf(spte);
|
|
-}
|
|
-
|
|
static u64 walk_shadow_page_get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr)
|
|
{
|
|
struct kvm_shadow_walk_iterator iterator;
|
|
@@ -3272,13 +3234,6 @@ int handle_mmio_page_fault_common(struct kvm_vcpu *vcpu, u64 addr, bool direct)
|
|
}
|
|
|
|
/*
|
|
- * It's ok if the gva is remapped by other cpus on shadow guest,
|
|
- * it's a BUG if the gfn is not a mmio page.
|
|
- */
|
|
- if (direct && !check_direct_spte_mmio_pf(spte))
|
|
- return RET_MMIO_PF_BUG;
|
|
-
|
|
- /*
|
|
* If the page table is zapped by other cpus, let CPU fault again on
|
|
* the address.
|
|
*/
|
|
diff --git a/arch/xtensa/include/asm/traps.h b/arch/xtensa/include/asm/traps.h
|
|
index 677bfcf4ee5d..28f33a8b7f5f 100644
|
|
--- a/arch/xtensa/include/asm/traps.h
|
|
+++ b/arch/xtensa/include/asm/traps.h
|
|
@@ -25,30 +25,39 @@ static inline void spill_registers(void)
|
|
{
|
|
#if XCHAL_NUM_AREGS > 16
|
|
__asm__ __volatile__ (
|
|
- " call12 1f\n"
|
|
+ " call8 1f\n"
|
|
" _j 2f\n"
|
|
" retw\n"
|
|
" .align 4\n"
|
|
"1:\n"
|
|
+#if XCHAL_NUM_AREGS == 32
|
|
+ " _entry a1, 32\n"
|
|
+ " addi a8, a0, 3\n"
|
|
+ " _entry a1, 16\n"
|
|
+ " mov a12, a12\n"
|
|
+ " retw\n"
|
|
+#else
|
|
" _entry a1, 48\n"
|
|
- " addi a12, a0, 3\n"
|
|
-#if XCHAL_NUM_AREGS > 32
|
|
- " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n"
|
|
+ " call12 1f\n"
|
|
+ " retw\n"
|
|
+ " .align 4\n"
|
|
+ "1:\n"
|
|
+ " .rept (" __stringify(XCHAL_NUM_AREGS) " - 16) / 12\n"
|
|
" _entry a1, 48\n"
|
|
" mov a12, a0\n"
|
|
" .endr\n"
|
|
-#endif
|
|
- " _entry a1, 48\n"
|
|
+ " _entry a1, 16\n"
|
|
#if XCHAL_NUM_AREGS % 12 == 0
|
|
- " mov a8, a8\n"
|
|
-#elif XCHAL_NUM_AREGS % 12 == 4
|
|
" mov a12, a12\n"
|
|
-#elif XCHAL_NUM_AREGS % 12 == 8
|
|
+#elif XCHAL_NUM_AREGS % 12 == 4
|
|
" mov a4, a4\n"
|
|
+#elif XCHAL_NUM_AREGS % 12 == 8
|
|
+ " mov a8, a8\n"
|
|
#endif
|
|
" retw\n"
|
|
+#endif
|
|
"2:\n"
|
|
- : : : "a12", "a13", "memory");
|
|
+ : : : "a8", "a9", "memory");
|
|
#else
|
|
__asm__ __volatile__ (
|
|
" mov a12, a12\n"
|
|
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
|
|
index a06b7efaae82..cf8a354fa628 100644
|
|
--- a/arch/xtensa/kernel/entry.S
|
|
+++ b/arch/xtensa/kernel/entry.S
|
|
@@ -568,12 +568,13 @@ user_exception_exit:
|
|
* (if we have restored WSBITS-1 frames).
|
|
*/
|
|
|
|
+2:
|
|
#if XCHAL_HAVE_THREADPTR
|
|
l32i a3, a1, PT_THREADPTR
|
|
wur a3, threadptr
|
|
#endif
|
|
|
|
-2: j common_exception_exit
|
|
+ j common_exception_exit
|
|
|
|
/* This is the kernel exception exit.
|
|
* We avoided to do a MOVSP when we entered the exception, but we
|
|
@@ -1792,7 +1793,7 @@ ENDPROC(system_call)
|
|
mov a12, a0
|
|
.endr
|
|
#endif
|
|
- _entry a1, 48
|
|
+ _entry a1, 16
|
|
#if XCHAL_NUM_AREGS % 12 == 0
|
|
mov a8, a8
|
|
#elif XCHAL_NUM_AREGS % 12 == 4
|
|
@@ -1816,7 +1817,7 @@ ENDPROC(system_call)
|
|
|
|
ENTRY(_switch_to)
|
|
|
|
- entry a1, 16
|
|
+ entry a1, 48
|
|
|
|
mov a11, a3 # and 'next' (a3)
|
|
|
|
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
|
|
index 5b93852392b8..0d752851a1ee 100644
|
|
--- a/drivers/auxdisplay/ks0108.c
|
|
+++ b/drivers/auxdisplay/ks0108.c
|
|
@@ -139,6 +139,7 @@ static int __init ks0108_init(void)
|
|
|
|
ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME,
|
|
NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
|
|
+ parport_put_port(ks0108_parport);
|
|
if (ks0108_pardevice == NULL) {
|
|
printk(KERN_ERR KS0108_NAME ": ERROR: "
|
|
"parport didn't register new device\n");
|
|
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
|
|
index 545c4de412c3..cbe0b58bab3c 100644
|
|
--- a/drivers/base/devres.c
|
|
+++ b/drivers/base/devres.c
|
|
@@ -297,10 +297,10 @@ void * devres_get(struct device *dev, void *new_res,
|
|
if (!dr) {
|
|
add_dr(dev, &new_dr->node);
|
|
dr = new_dr;
|
|
- new_dr = NULL;
|
|
+ new_res = NULL;
|
|
}
|
|
spin_unlock_irqrestore(&dev->devres_lock, flags);
|
|
- devres_free(new_dr);
|
|
+ devres_free(new_res);
|
|
|
|
return dr->data;
|
|
}
|
|
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
|
|
index 9dbf4ef2b2a3..57d8f671d1f6 100644
|
|
--- a/drivers/base/platform.c
|
|
+++ b/drivers/base/platform.c
|
|
@@ -354,9 +354,7 @@ int platform_device_add(struct platform_device *pdev)
|
|
|
|
while (--i >= 0) {
|
|
struct resource *r = &pdev->resource[i];
|
|
- unsigned long type = resource_type(r);
|
|
-
|
|
- if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
|
|
+ if (r->parent)
|
|
release_resource(r);
|
|
}
|
|
|
|
@@ -387,9 +385,7 @@ void platform_device_del(struct platform_device *pdev)
|
|
|
|
for (i = 0; i < pdev->num_resources; i++) {
|
|
struct resource *r = &pdev->resource[i];
|
|
- unsigned long type = resource_type(r);
|
|
-
|
|
- if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
|
|
+ if (r->parent)
|
|
release_resource(r);
|
|
}
|
|
}
|
|
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
|
|
index c6e86a9a2aa3..5122ef25f595 100644
|
|
--- a/drivers/clk/versatile/clk-sp810.c
|
|
+++ b/drivers/clk/versatile/clk-sp810.c
|
|
@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec,
|
|
{
|
|
struct clk_sp810 *sp810 = data;
|
|
|
|
- if (WARN_ON(clkspec->args_count != 1 || clkspec->args[0] >
|
|
- ARRAY_SIZE(sp810->timerclken)))
|
|
+ if (WARN_ON(clkspec->args_count != 1 ||
|
|
+ clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken)))
|
|
return NULL;
|
|
|
|
return sp810->timerclken[clkspec->args[0]].clk;
|
|
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
|
|
index c39c414c7751..8e3267a8bd4f 100644
|
|
--- a/drivers/gpu/drm/qxl/qxl_display.c
|
|
+++ b/drivers/gpu/drm/qxl/qxl_display.c
|
|
@@ -136,9 +136,35 @@ static int qxl_add_monitors_config_modes(struct drm_connector *connector,
|
|
*pwidth = head->width;
|
|
*pheight = head->height;
|
|
drm_mode_probed_add(connector, mode);
|
|
+ /* remember the last custom size for mode validation */
|
|
+ qdev->monitors_config_width = mode->hdisplay;
|
|
+ qdev->monitors_config_height = mode->vdisplay;
|
|
return 1;
|
|
}
|
|
|
|
+static struct mode_size {
|
|
+ int w;
|
|
+ int h;
|
|
+} common_modes[] = {
|
|
+ { 640, 480},
|
|
+ { 720, 480},
|
|
+ { 800, 600},
|
|
+ { 848, 480},
|
|
+ {1024, 768},
|
|
+ {1152, 768},
|
|
+ {1280, 720},
|
|
+ {1280, 800},
|
|
+ {1280, 854},
|
|
+ {1280, 960},
|
|
+ {1280, 1024},
|
|
+ {1440, 900},
|
|
+ {1400, 1050},
|
|
+ {1680, 1050},
|
|
+ {1600, 1200},
|
|
+ {1920, 1080},
|
|
+ {1920, 1200}
|
|
+};
|
|
+
|
|
static int qxl_add_common_modes(struct drm_connector *connector,
|
|
unsigned pwidth,
|
|
unsigned pheight)
|
|
@@ -146,29 +172,6 @@ static int qxl_add_common_modes(struct drm_connector *connector,
|
|
struct drm_device *dev = connector->dev;
|
|
struct drm_display_mode *mode = NULL;
|
|
int i;
|
|
- struct mode_size {
|
|
- int w;
|
|
- int h;
|
|
- } common_modes[] = {
|
|
- { 640, 480},
|
|
- { 720, 480},
|
|
- { 800, 600},
|
|
- { 848, 480},
|
|
- {1024, 768},
|
|
- {1152, 768},
|
|
- {1280, 720},
|
|
- {1280, 800},
|
|
- {1280, 854},
|
|
- {1280, 960},
|
|
- {1280, 1024},
|
|
- {1440, 900},
|
|
- {1400, 1050},
|
|
- {1680, 1050},
|
|
- {1600, 1200},
|
|
- {1920, 1080},
|
|
- {1920, 1200}
|
|
- };
|
|
-
|
|
for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
|
|
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h,
|
|
60, false, false, false);
|
|
@@ -753,11 +756,22 @@ static int qxl_conn_get_modes(struct drm_connector *connector)
|
|
static int qxl_conn_mode_valid(struct drm_connector *connector,
|
|
struct drm_display_mode *mode)
|
|
{
|
|
+ struct drm_device *ddev = connector->dev;
|
|
+ struct qxl_device *qdev = ddev->dev_private;
|
|
+ int i;
|
|
+
|
|
/* TODO: is this called for user defined modes? (xrandr --add-mode)
|
|
* TODO: check that the mode fits in the framebuffer */
|
|
- DRM_DEBUG("%s: %dx%d status=%d\n", mode->name, mode->hdisplay,
|
|
- mode->vdisplay, mode->status);
|
|
- return MODE_OK;
|
|
+
|
|
+ if(qdev->monitors_config_width == mode->hdisplay &&
|
|
+ qdev->monitors_config_height == mode->vdisplay)
|
|
+ return MODE_OK;
|
|
+
|
|
+ for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
|
|
+ if (common_modes[i].w == mode->hdisplay && common_modes[i].h == mode->vdisplay)
|
|
+ return MODE_OK;
|
|
+ }
|
|
+ return MODE_BAD;
|
|
}
|
|
|
|
static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
|
|
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
|
|
index 36ed40ba773f..8aa077ca8244 100644
|
|
--- a/drivers/gpu/drm/qxl/qxl_drv.h
|
|
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
|
|
@@ -325,6 +325,8 @@ struct qxl_device {
|
|
struct work_struct fb_work;
|
|
|
|
struct drm_property *hotplug_mode_update_property;
|
|
+ int monitors_config_width;
|
|
+ int monitors_config_height;
|
|
};
|
|
|
|
/* forward declaration for QXL_INFO_IO */
|
|
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
|
|
index 4d36b9e86275..17ae621dbdab 100644
|
|
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
|
|
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
|
|
@@ -71,6 +71,11 @@ void radeon_connector_hotplug(struct drm_connector *connector)
|
|
if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
|
|
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
|
|
} else if (radeon_dp_needs_link_train(radeon_connector)) {
|
|
+ /* Don't try to start link training before we
|
|
+ * have the dpcd */
|
|
+ if (!radeon_dp_getdpcd(radeon_connector))
|
|
+ return;
|
|
+
|
|
/* set it to OFF so that drm_helper_connector_dpms()
|
|
* won't return immediately since the current state
|
|
* is ON at this point.
|
|
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
|
|
index 617c47f9ebe6..deabd2c8772d 100644
|
|
--- a/drivers/hid/usbhid/hid-core.c
|
|
+++ b/drivers/hid/usbhid/hid-core.c
|
|
@@ -180,7 +180,7 @@ static void hid_io_error(struct hid_device *hid)
|
|
if (time_after(jiffies, usbhid->stop_retry)) {
|
|
|
|
/* Retries failed, so do a port reset unless we lack bandwidth*/
|
|
- if (test_bit(HID_NO_BANDWIDTH, &usbhid->iofl)
|
|
+ if (!test_bit(HID_NO_BANDWIDTH, &usbhid->iofl)
|
|
&& !test_and_set_bit(HID_RESET_PENDING, &usbhid->iofl)) {
|
|
|
|
schedule_work(&usbhid->reset_work);
|
|
diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig
|
|
index ac2d69e34c8c..6f64c5cc5387 100644
|
|
--- a/drivers/iio/gyro/Kconfig
|
|
+++ b/drivers/iio/gyro/Kconfig
|
|
@@ -93,7 +93,8 @@ config IIO_ST_GYRO_SPI_3AXIS
|
|
config ITG3200
|
|
tristate "InvenSense ITG3200 Digital 3-Axis Gyroscope I2C driver"
|
|
depends on I2C
|
|
- select IIO_TRIGGERED_BUFFER if IIO_BUFFER
|
|
+ select IIO_BUFFER
|
|
+ select IIO_TRIGGERED_BUFFER
|
|
help
|
|
Say yes here to add support for the InvenSense ITG3200 digital
|
|
3-axis gyroscope sensor.
|
|
diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
|
|
index dd4206cac62d..5e1b117d4e3b 100644
|
|
--- a/drivers/iio/imu/adis16480.c
|
|
+++ b/drivers/iio/imu/adis16480.c
|
|
@@ -110,6 +110,10 @@
|
|
struct adis16480_chip_info {
|
|
unsigned int num_channels;
|
|
const struct iio_chan_spec *channels;
|
|
+ unsigned int gyro_max_val;
|
|
+ unsigned int gyro_max_scale;
|
|
+ unsigned int accel_max_val;
|
|
+ unsigned int accel_max_scale;
|
|
};
|
|
|
|
struct adis16480 {
|
|
@@ -533,19 +537,21 @@ static int adis16480_set_filter_freq(struct iio_dev *indio_dev,
|
|
static int adis16480_read_raw(struct iio_dev *indio_dev,
|
|
const struct iio_chan_spec *chan, int *val, int *val2, long info)
|
|
{
|
|
+ struct adis16480 *st = iio_priv(indio_dev);
|
|
+
|
|
switch (info) {
|
|
case IIO_CHAN_INFO_RAW:
|
|
return adis_single_conversion(indio_dev, chan, 0, val);
|
|
case IIO_CHAN_INFO_SCALE:
|
|
switch (chan->type) {
|
|
case IIO_ANGL_VEL:
|
|
- *val = 0;
|
|
- *val2 = IIO_DEGREE_TO_RAD(20000); /* 0.02 degree/sec */
|
|
- return IIO_VAL_INT_PLUS_MICRO;
|
|
+ *val = st->chip_info->gyro_max_scale;
|
|
+ *val2 = st->chip_info->gyro_max_val;
|
|
+ return IIO_VAL_FRACTIONAL;
|
|
case IIO_ACCEL:
|
|
- *val = 0;
|
|
- *val2 = IIO_G_TO_M_S_2(800); /* 0.8 mg */
|
|
- return IIO_VAL_INT_PLUS_MICRO;
|
|
+ *val = st->chip_info->accel_max_scale;
|
|
+ *val2 = st->chip_info->accel_max_val;
|
|
+ return IIO_VAL_FRACTIONAL;
|
|
case IIO_MAGN:
|
|
*val = 0;
|
|
*val2 = 100; /* 0.0001 gauss */
|
|
@@ -702,18 +708,39 @@ static const struct adis16480_chip_info adis16480_chip_info[] = {
|
|
[ADIS16375] = {
|
|
.channels = adis16485_channels,
|
|
.num_channels = ARRAY_SIZE(adis16485_channels),
|
|
+ /*
|
|
+ * storing the value in rad/degree and the scale in degree
|
|
+ * gives us the result in rad and better precession than
|
|
+ * storing the scale directly in rad.
|
|
+ */
|
|
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22887),
|
|
+ .gyro_max_scale = 300,
|
|
+ .accel_max_val = IIO_M_S_2_TO_G(21973),
|
|
+ .accel_max_scale = 18,
|
|
},
|
|
[ADIS16480] = {
|
|
.channels = adis16480_channels,
|
|
.num_channels = ARRAY_SIZE(adis16480_channels),
|
|
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
|
+ .gyro_max_scale = 450,
|
|
+ .accel_max_val = IIO_M_S_2_TO_G(12500),
|
|
+ .accel_max_scale = 5,
|
|
},
|
|
[ADIS16485] = {
|
|
.channels = adis16485_channels,
|
|
.num_channels = ARRAY_SIZE(adis16485_channels),
|
|
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
|
+ .gyro_max_scale = 450,
|
|
+ .accel_max_val = IIO_M_S_2_TO_G(20000),
|
|
+ .accel_max_scale = 5,
|
|
},
|
|
[ADIS16488] = {
|
|
.channels = adis16480_channels,
|
|
.num_channels = ARRAY_SIZE(adis16480_channels),
|
|
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
|
+ .gyro_max_scale = 450,
|
|
+ .accel_max_val = IIO_M_S_2_TO_G(22500),
|
|
+ .accel_max_scale = 18,
|
|
},
|
|
};
|
|
|
|
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
|
|
index 0f1d9b2ccdfa..37b52bd44f86 100644
|
|
--- a/drivers/iio/industrialio-buffer.c
|
|
+++ b/drivers/iio/industrialio-buffer.c
|
|
@@ -96,7 +96,7 @@ unsigned int iio_buffer_poll(struct file *filp,
|
|
struct iio_buffer *rb = indio_dev->buffer;
|
|
|
|
if (!indio_dev->info)
|
|
- return -ENODEV;
|
|
+ return 0;
|
|
|
|
poll_wait(filp, &rb->pollq, wait);
|
|
if (iio_buffer_data_available(rb))
|
|
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
|
|
index f9360f497ed4..05b59941c400 100644
|
|
--- a/drivers/iio/industrialio-event.c
|
|
+++ b/drivers/iio/industrialio-event.c
|
|
@@ -83,7 +83,7 @@ static unsigned int iio_event_poll(struct file *filep,
|
|
unsigned int events = 0;
|
|
|
|
if (!indio_dev->info)
|
|
- return -ENODEV;
|
|
+ return events;
|
|
|
|
poll_wait(filep, &ev_int->wait, wait);
|
|
|
|
diff --git a/drivers/of/address.c b/drivers/of/address.c
|
|
index 005c65715846..9eae613c2a52 100644
|
|
--- a/drivers/of/address.c
|
|
+++ b/drivers/of/address.c
|
|
@@ -704,10 +704,10 @@ struct device_node *of_find_matching_node_by_address(struct device_node *from,
|
|
struct resource res;
|
|
|
|
while (dn) {
|
|
- if (of_address_to_resource(dn, 0, &res))
|
|
- continue;
|
|
- if (res.start == base_address)
|
|
+ if (!of_address_to_resource(dn, 0, &res) &&
|
|
+ res.start == base_address)
|
|
return dn;
|
|
+
|
|
dn = of_find_matching_node(dn, matches);
|
|
}
|
|
|
|
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
|
index 27abeb40dfab..2afa4803280f 100644
|
|
--- a/drivers/pci/quirks.c
|
|
+++ b/drivers/pci/quirks.c
|
|
@@ -2790,12 +2790,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
|
|
|
|
static void fixup_ti816x_class(struct pci_dev *dev)
|
|
{
|
|
+ u32 class = dev->class;
|
|
+
|
|
/* TI 816x devices do not have class code set when in PCIe boot mode */
|
|
- dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
|
|
- dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
|
|
+ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8;
|
|
+ dev_info(&dev->dev, "PCI class overridden (%#08x -> %#08x)\n",
|
|
+ class, dev->class);
|
|
}
|
|
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
|
|
- PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
|
|
+ PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
|
|
|
|
/* Some PCIe devices do not work reliably with the claimed maximum
|
|
* payload size supported.
|
|
diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
|
|
index 82f2c389b4d1..b334f68ebe46 100644
|
|
--- a/drivers/s390/char/sclp_early.c
|
|
+++ b/drivers/s390/char/sclp_early.c
|
|
@@ -7,6 +7,7 @@
|
|
#define KMSG_COMPONENT "sclp_early"
|
|
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
|
|
|
+#include <linux/errno.h>
|
|
#include <asm/ctl_reg.h>
|
|
#include <asm/sclp.h>
|
|
#include <asm/ipl.h>
|
|
diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c
|
|
index 6f622b4de698..927edd130ce9 100644
|
|
--- a/drivers/staging/comedi/drivers/adl_pci7x3x.c
|
|
+++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c
|
|
@@ -113,8 +113,20 @@ static int adl_pci7x3x_do_insn_bits(struct comedi_device *dev,
|
|
{
|
|
unsigned long reg = (unsigned long)s->private;
|
|
|
|
- if (comedi_dio_update_state(s, data))
|
|
- outl(s->state, dev->iobase + reg);
|
|
+ if (comedi_dio_update_state(s, data)) {
|
|
+ unsigned int val = s->state;
|
|
+
|
|
+ if (s->n_chan == 16) {
|
|
+ /*
|
|
+ * It seems the PCI-7230 needs the 16-bit DO state
|
|
+ * to be shifted left by 16 bits before being written
|
|
+ * to the 32-bit register. Set the value in both
|
|
+ * halves of the register to be sure.
|
|
+ */
|
|
+ val |= val << 16;
|
|
+ }
|
|
+ outl(val, dev->iobase + reg);
|
|
+ }
|
|
|
|
data[1] = s->state;
|
|
|
|
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
|
|
index 682a2fbe5c06..2b22cc1e57a2 100644
|
|
--- a/drivers/tty/serial/8250/8250_pnp.c
|
|
+++ b/drivers/tty/serial/8250/8250_pnp.c
|
|
@@ -364,6 +364,11 @@ static const struct pnp_device_id pnp_dev_table[] = {
|
|
/* Winbond CIR port, should not be probed. We should keep track
|
|
of it to prevent the legacy serial driver from probing it */
|
|
{ "WEC1022", CIR_PORT },
|
|
+ /*
|
|
+ * SMSC IrCC SIR/FIR port, should not be probed by serial driver
|
|
+ * as well so its own driver can bind to it.
|
|
+ */
|
|
+ { "SMCF010", CIR_PORT },
|
|
{ "", 0 }
|
|
};
|
|
|
|
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
|
|
index 2978ca596a7f..0e75d2a76511 100644
|
|
--- a/drivers/tty/vt/consolemap.c
|
|
+++ b/drivers/tty/vt/consolemap.c
|
|
@@ -540,6 +540,12 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
|
|
|
|
/* Save original vc_unipagdir_loc in case we allocate a new one */
|
|
p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
+
|
|
+ if (!p) {
|
|
+ err = -EINVAL;
|
|
+
|
|
+ goto out_unlock;
|
|
+ }
|
|
if (p->readonly) {
|
|
console_unlock();
|
|
return -EIO;
|
|
@@ -633,6 +639,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
|
|
set_inverse_transl(vc, p, i); /* Update inverse translations */
|
|
set_inverse_trans_unicode(vc, p);
|
|
|
|
+out_unlock:
|
|
console_unlock();
|
|
return err;
|
|
}
|
|
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
|
|
index a05fc58d9b60..965c9ac85d6f 100644
|
|
--- a/drivers/usb/dwc3/ep0.c
|
|
+++ b/drivers/usb/dwc3/ep0.c
|
|
@@ -793,6 +793,11 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
|
|
unsigned maxp = ep0->endpoint.maxpacket;
|
|
|
|
transfer_size += (maxp - (transfer_size % maxp));
|
|
+
|
|
+ /* Maximum of DWC3_EP0_BOUNCE_SIZE can only be received */
|
|
+ if (transfer_size > DWC3_EP0_BOUNCE_SIZE)
|
|
+ transfer_size = DWC3_EP0_BOUNCE_SIZE;
|
|
+
|
|
transferred = min_t(u32, ur->length,
|
|
transfer_size - length);
|
|
memcpy(ur->buf, dwc->ep0_bounce, transferred);
|
|
@@ -905,11 +910,14 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
|
|
return;
|
|
}
|
|
|
|
- WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE);
|
|
-
|
|
maxpacket = dep->endpoint.maxpacket;
|
|
transfer_size = roundup(req->request.length, maxpacket);
|
|
|
|
+ if (transfer_size > DWC3_EP0_BOUNCE_SIZE) {
|
|
+ dev_WARN(dwc->dev, "bounce buf can't handle req len\n");
|
|
+ transfer_size = DWC3_EP0_BOUNCE_SIZE;
|
|
+ }
|
|
+
|
|
dwc->ep0_bounced = true;
|
|
|
|
/*
|
|
diff --git a/drivers/usb/host/ehci-sysfs.c b/drivers/usb/host/ehci-sysfs.c
|
|
index f6459dfb6f54..94054dad7710 100644
|
|
--- a/drivers/usb/host/ehci-sysfs.c
|
|
+++ b/drivers/usb/host/ehci-sysfs.c
|
|
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,
|
|
int count = PAGE_SIZE;
|
|
char *ptr = buf;
|
|
|
|
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
|
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
|
nports = HCS_N_PORTS(ehci->hcs_params);
|
|
|
|
for (index = 0; index < nports; ++index) {
|
|
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,
|
|
struct ehci_hcd *ehci;
|
|
int portnum, new_owner;
|
|
|
|
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
|
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
|
new_owner = PORT_OWNER; /* Owned by companion */
|
|
if (sscanf(buf, "%d", &portnum) != 1)
|
|
return -EINVAL;
|
|
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,
|
|
struct ehci_hcd *ehci;
|
|
int n;
|
|
|
|
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
|
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
|
n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max);
|
|
return n;
|
|
}
|
|
@@ -101,7 +101,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,
|
|
unsigned long flags;
|
|
ssize_t ret;
|
|
|
|
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
|
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
|
if (kstrtouint(buf, 0, &uframe_periodic_max) < 0)
|
|
return -EINVAL;
|
|
|
|
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
|
|
index bc77ea7cde48..7fb81dbbdc8d 100644
|
|
--- a/drivers/usb/serial/ftdi_sio.c
|
|
+++ b/drivers/usb/serial/ftdi_sio.c
|
|
@@ -618,6 +618,10 @@ static const struct usb_device_id id_table_combined[] = {
|
|
{ USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID),
|
|
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
|
{ USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) },
|
|
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) },
|
|
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) },
|
|
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) },
|
|
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) },
|
|
/*
|
|
* ELV devices:
|
|
*/
|
|
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
|
|
index 792e054126de..2943b97b2a83 100644
|
|
--- a/drivers/usb/serial/ftdi_sio_ids.h
|
|
+++ b/drivers/usb/serial/ftdi_sio_ids.h
|
|
@@ -568,6 +568,14 @@
|
|
*/
|
|
#define FTDI_SYNAPSE_SS200_PID 0x9090 /* SS200 - SNAP Stick 200 */
|
|
|
|
+/*
|
|
+ * CustomWare / ShipModul NMEA multiplexers product ids (FTDI_VID)
|
|
+ */
|
|
+#define FTDI_CUSTOMWARE_MINIPLEX_PID 0xfd48 /* MiniPlex first generation NMEA Multiplexer */
|
|
+#define FTDI_CUSTOMWARE_MINIPLEX2_PID 0xfd49 /* MiniPlex-USB and MiniPlex-2 series */
|
|
+#define FTDI_CUSTOMWARE_MINIPLEX2WI_PID 0xfd4a /* MiniPlex-2Wi */
|
|
+#define FTDI_CUSTOMWARE_MINIPLEX3_PID 0xfd4b /* MiniPlex-3 series */
|
|
+
|
|
|
|
/********************************/
|
|
/** third-party VID/PID combos **/
|
|
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
|
|
index 9fa7dd413e83..5e5e88209eeb 100644
|
|
--- a/drivers/usb/serial/symbolserial.c
|
|
+++ b/drivers/usb/serial/symbolserial.c
|
|
@@ -96,7 +96,7 @@ exit:
|
|
|
|
static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port)
|
|
{
|
|
- struct symbol_private *priv = usb_get_serial_data(port->serial);
|
|
+ struct symbol_private *priv = usb_get_serial_port_data(port);
|
|
unsigned long flags;
|
|
int result = 0;
|
|
|
|
@@ -122,7 +122,7 @@ static void symbol_close(struct usb_serial_port *port)
|
|
static void symbol_throttle(struct tty_struct *tty)
|
|
{
|
|
struct usb_serial_port *port = tty->driver_data;
|
|
- struct symbol_private *priv = usb_get_serial_data(port->serial);
|
|
+ struct symbol_private *priv = usb_get_serial_port_data(port);
|
|
|
|
spin_lock_irq(&priv->lock);
|
|
priv->throttled = true;
|
|
@@ -132,7 +132,7 @@ static void symbol_throttle(struct tty_struct *tty)
|
|
static void symbol_unthrottle(struct tty_struct *tty)
|
|
{
|
|
struct usb_serial_port *port = tty->driver_data;
|
|
- struct symbol_private *priv = usb_get_serial_data(port->serial);
|
|
+ struct symbol_private *priv = usb_get_serial_port_data(port);
|
|
int result;
|
|
bool was_throttled;
|
|
|
|
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
|
|
index 1b39afdd86fd..5f60bb21905c 100644
|
|
--- a/fs/hpfs/namei.c
|
|
+++ b/fs/hpfs/namei.c
|
|
@@ -8,6 +8,17 @@
|
|
#include <linux/sched.h>
|
|
#include "hpfs_fn.h"
|
|
|
|
+static void hpfs_update_directory_times(struct inode *dir)
|
|
+{
|
|
+ time_t t = get_seconds();
|
|
+ if (t == dir->i_mtime.tv_sec &&
|
|
+ t == dir->i_ctime.tv_sec)
|
|
+ return;
|
|
+ dir->i_mtime.tv_sec = dir->i_ctime.tv_sec = t;
|
|
+ dir->i_mtime.tv_nsec = dir->i_ctime.tv_nsec = 0;
|
|
+ hpfs_write_inode_nolock(dir);
|
|
+}
|
|
+
|
|
static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
|
{
|
|
const unsigned char *name = dentry->d_name.name;
|
|
@@ -99,6 +110,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
|
result->i_mode = mode | S_IFDIR;
|
|
hpfs_write_inode_nolock(result);
|
|
}
|
|
+ hpfs_update_directory_times(dir);
|
|
d_instantiate(dentry, result);
|
|
hpfs_unlock(dir->i_sb);
|
|
return 0;
|
|
@@ -187,6 +199,7 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, b
|
|
result->i_mode = mode | S_IFREG;
|
|
hpfs_write_inode_nolock(result);
|
|
}
|
|
+ hpfs_update_directory_times(dir);
|
|
d_instantiate(dentry, result);
|
|
hpfs_unlock(dir->i_sb);
|
|
return 0;
|
|
@@ -262,6 +275,7 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de
|
|
insert_inode_hash(result);
|
|
|
|
hpfs_write_inode_nolock(result);
|
|
+ hpfs_update_directory_times(dir);
|
|
d_instantiate(dentry, result);
|
|
brelse(bh);
|
|
hpfs_unlock(dir->i_sb);
|
|
@@ -340,6 +354,7 @@ static int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *sy
|
|
insert_inode_hash(result);
|
|
|
|
hpfs_write_inode_nolock(result);
|
|
+ hpfs_update_directory_times(dir);
|
|
d_instantiate(dentry, result);
|
|
hpfs_unlock(dir->i_sb);
|
|
return 0;
|
|
@@ -423,6 +438,8 @@ again:
|
|
out1:
|
|
hpfs_brelse4(&qbh);
|
|
out:
|
|
+ if (!err)
|
|
+ hpfs_update_directory_times(dir);
|
|
hpfs_unlock(dir->i_sb);
|
|
return err;
|
|
}
|
|
@@ -477,6 +494,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
|
|
out1:
|
|
hpfs_brelse4(&qbh);
|
|
out:
|
|
+ if (!err)
|
|
+ hpfs_update_directory_times(dir);
|
|
hpfs_unlock(dir->i_sb);
|
|
return err;
|
|
}
|
|
@@ -595,7 +614,7 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|
goto end1;
|
|
}
|
|
|
|
- end:
|
|
+end:
|
|
hpfs_i(i)->i_parent_dir = new_dir->i_ino;
|
|
if (S_ISDIR(i->i_mode)) {
|
|
inc_nlink(new_dir);
|
|
@@ -610,6 +629,10 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|
brelse(bh);
|
|
}
|
|
end1:
|
|
+ if (!err) {
|
|
+ hpfs_update_directory_times(old_dir);
|
|
+ hpfs_update_directory_times(new_dir);
|
|
+ }
|
|
hpfs_unlock(i->i_sb);
|
|
return err;
|
|
}
|
|
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
|
|
index 75a8a20c8179..c2fb6f3ff44b 100644
|
|
--- a/include/linux/iio/iio.h
|
|
+++ b/include/linux/iio/iio.h
|
|
@@ -593,6 +593,15 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
|
|
#define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)
|
|
|
|
/**
|
|
+ * IIO_RAD_TO_DEGREE() - Convert rad to degree
|
|
+ * @rad: A value in rad
|
|
+ *
|
|
+ * Returns the given value converted from rad to degree
|
|
+ */
|
|
+#define IIO_RAD_TO_DEGREE(rad) \
|
|
+ (((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL)
|
|
+
|
|
+/**
|
|
* IIO_G_TO_M_S_2() - Convert g to meter / second**2
|
|
* @g: A value in g
|
|
*
|
|
@@ -600,4 +609,12 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
|
|
*/
|
|
#define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL)
|
|
|
|
+/**
|
|
+ * IIO_M_S_2_TO_G() - Convert meter / second**2 to g
|
|
+ * @ms2: A value in meter / second**2
|
|
+ *
|
|
+ * Returns the given value converted from meter / second**2 to g
|
|
+ */
|
|
+#define IIO_M_S_2_TO_G(ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL)
|
|
+
|
|
#endif /* _INDUSTRIAL_IO_H_ */
|