diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-22 10:30:03 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-22 10:30:03 -0400 |
| commit | d84a2b0d6fecbb6e29875dd9dc97cdcdaa15744a (patch) | |
| tree | ea756d49395ac4a08d6cdff98d74e60384a322a6 /drivers | |
| parent | 3f76a4ea5383ba2f9e76f9625f77ff246907a134 (diff) | |
| parent | 0f33be009b89d2268e94194dc4fd01a7851b6d51 (diff) | |
Merge 3.17-rc6 into staging-next.
We want the fixes in there, and it resolves a merge issue with
drivers/iio/accel/bma180.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
85 files changed, 448 insertions, 244 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 8581f5b84f48..8b67bd0f6bb5 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
| @@ -177,16 +177,6 @@ void acpi_bus_detach_private_data(acpi_handle handle) | |||
| 177 | } | 177 | } |
| 178 | EXPORT_SYMBOL_GPL(acpi_bus_detach_private_data); | 178 | EXPORT_SYMBOL_GPL(acpi_bus_detach_private_data); |
| 179 | 179 | ||
| 180 | void acpi_bus_no_hotplug(acpi_handle handle) | ||
| 181 | { | ||
| 182 | struct acpi_device *adev = NULL; | ||
| 183 | |||
| 184 | acpi_bus_get_device(handle, &adev); | ||
| 185 | if (adev) | ||
| 186 | adev->flags.no_hotplug = true; | ||
| 187 | } | ||
| 188 | EXPORT_SYMBOL_GPL(acpi_bus_no_hotplug); | ||
| 189 | |||
| 190 | static void acpi_print_osc_error(acpi_handle handle, | 180 | static void acpi_print_osc_error(acpi_handle handle, |
| 191 | struct acpi_osc_context *context, char *error) | 181 | struct acpi_osc_context *context, char *error) |
| 192 | { | 182 | { |
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 65ea7b256b3e..0c94b661c16f 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c | |||
| @@ -512,7 +512,14 @@ void regmap_debugfs_init(struct regmap *map, const char *name) | |||
| 512 | map, ®map_reg_ranges_fops); | 512 | map, ®map_reg_ranges_fops); |
| 513 | 513 | ||
| 514 | if (map->max_register || regmap_readable(map, 0)) { | 514 | if (map->max_register || regmap_readable(map, 0)) { |
| 515 | debugfs_create_file("registers", 0400, map->debugfs, | 515 | umode_t registers_mode; |
| 516 | |||
| 517 | if (IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS)) | ||
| 518 | registers_mode = 0600; | ||
| 519 | else | ||
| 520 | registers_mode = 0400; | ||
| 521 | |||
| 522 | debugfs_create_file("registers", registers_mode, map->debugfs, | ||
| 516 | map, ®map_map_fops); | 523 | map, ®map_map_fops); |
| 517 | debugfs_create_file("access", 0400, map->debugfs, | 524 | debugfs_create_file("access", 0400, map->debugfs, |
| 518 | map, ®map_access_fops); | 525 | map, ®map_access_fops); |
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 2e3139eda93b..132c9ccfdc62 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
| @@ -36,6 +36,7 @@ struct virtrng_info { | |||
| 36 | int index; | 36 | int index; |
| 37 | bool busy; | 37 | bool busy; |
| 38 | bool hwrng_register_done; | 38 | bool hwrng_register_done; |
| 39 | bool hwrng_removed; | ||
| 39 | }; | 40 | }; |
| 40 | 41 | ||
| 41 | 42 | ||
| @@ -68,6 +69,9 @@ static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait) | |||
| 68 | int ret; | 69 | int ret; |
| 69 | struct virtrng_info *vi = (struct virtrng_info *)rng->priv; | 70 | struct virtrng_info *vi = (struct virtrng_info *)rng->priv; |
| 70 | 71 | ||
| 72 | if (vi->hwrng_removed) | ||
| 73 | return -ENODEV; | ||
| 74 | |||
| 71 | if (!vi->busy) { | 75 | if (!vi->busy) { |
| 72 | vi->busy = true; | 76 | vi->busy = true; |
| 73 | init_completion(&vi->have_data); | 77 | init_completion(&vi->have_data); |
| @@ -137,6 +141,9 @@ static void remove_common(struct virtio_device *vdev) | |||
| 137 | { | 141 | { |
| 138 | struct virtrng_info *vi = vdev->priv; | 142 | struct virtrng_info *vi = vdev->priv; |
| 139 | 143 | ||
| 144 | vi->hwrng_removed = true; | ||
| 145 | vi->data_avail = 0; | ||
| 146 | complete(&vi->have_data); | ||
| 140 | vdev->config->reset(vdev); | 147 | vdev->config->reset(vdev); |
| 141 | vi->busy = false; | 148 | vi->busy = false; |
| 142 | if (vi->hwrng_register_done) | 149 | if (vi->hwrng_register_done) |
diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c index a56bb3528755..c846a9608cbd 100644 --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c | |||
| @@ -22,7 +22,7 @@ efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, | |||
| 22 | unsigned long map_size, unsigned long desc_size, | 22 | unsigned long map_size, unsigned long desc_size, |
| 23 | u32 desc_ver) | 23 | u32 desc_ver) |
| 24 | { | 24 | { |
| 25 | int node, prev; | 25 | int node, prev, num_rsv; |
| 26 | int status; | 26 | int status; |
| 27 | u32 fdt_val32; | 27 | u32 fdt_val32; |
| 28 | u64 fdt_val64; | 28 | u64 fdt_val64; |
| @@ -73,6 +73,14 @@ efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, | |||
| 73 | prev = node; | 73 | prev = node; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | /* | ||
| 77 | * Delete all memory reserve map entries. When booting via UEFI, | ||
| 78 | * kernel will use the UEFI memory map to find reserved regions. | ||
| 79 | */ | ||
| 80 | num_rsv = fdt_num_mem_rsv(fdt); | ||
| 81 | while (num_rsv-- > 0) | ||
| 82 | fdt_del_mem_rsv(fdt, num_rsv); | ||
| 83 | |||
| 76 | node = fdt_subnode_offset(fdt, 0, "chosen"); | 84 | node = fdt_subnode_offset(fdt, 0, "chosen"); |
| 77 | if (node < 0) { | 85 | if (node < 0) { |
| 78 | node = fdt_add_subnode(fdt, 0, "chosen"); | 86 | node = fdt_add_subnode(fdt, 0, "chosen"); |
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 9d7346b92653..6b7efcf363d6 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c | |||
| @@ -250,6 +250,7 @@ static void bochs_connector_init(struct drm_device *dev) | |||
| 250 | DRM_MODE_CONNECTOR_VIRTUAL); | 250 | DRM_MODE_CONNECTOR_VIRTUAL); |
| 251 | drm_connector_helper_add(connector, | 251 | drm_connector_helper_add(connector, |
| 252 | &bochs_connector_connector_helper_funcs); | 252 | &bochs_connector_connector_helper_funcs); |
| 253 | drm_connector_register(connector); | ||
| 253 | } | 254 | } |
| 254 | 255 | ||
| 255 | 256 | ||
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index e1c5c3222129..c7c5a9d91fa0 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c | |||
| @@ -555,6 +555,7 @@ static struct drm_connector *cirrus_vga_init(struct drm_device *dev) | |||
| 555 | 555 | ||
| 556 | drm_connector_helper_add(connector, &cirrus_vga_connector_helper_funcs); | 556 | drm_connector_helper_add(connector, &cirrus_vga_connector_helper_funcs); |
| 557 | 557 | ||
| 558 | drm_connector_register(connector); | ||
| 558 | return connector; | 559 | return connector; |
| 559 | } | 560 | } |
| 560 | 561 | ||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 81d7681faa63..fdff1d420c14 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
| @@ -1631,6 +1631,10 @@ static void intel_dp_get_config(struct intel_encoder *encoder, | |||
| 1631 | 1631 | ||
| 1632 | pipe_config->adjusted_mode.flags |= flags; | 1632 | pipe_config->adjusted_mode.flags |= flags; |
| 1633 | 1633 | ||
| 1634 | if (!HAS_PCH_SPLIT(dev) && !IS_VALLEYVIEW(dev) && | ||
| 1635 | tmp & DP_COLOR_RANGE_16_235) | ||
| 1636 | pipe_config->limited_color_range = true; | ||
| 1637 | |||
| 1634 | pipe_config->has_dp_encoder = true; | 1638 | pipe_config->has_dp_encoder = true; |
| 1635 | 1639 | ||
| 1636 | intel_dp_get_m_n(crtc, pipe_config); | 1640 | intel_dp_get_m_n(crtc, pipe_config); |
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index f9151f6641d9..ca34de7f6a7b 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
| @@ -712,7 +712,8 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder, | |||
| 712 | struct intel_crtc_config *pipe_config) | 712 | struct intel_crtc_config *pipe_config) |
| 713 | { | 713 | { |
| 714 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); | 714 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); |
| 715 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; | 715 | struct drm_device *dev = encoder->base.dev; |
| 716 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
| 716 | u32 tmp, flags = 0; | 717 | u32 tmp, flags = 0; |
| 717 | int dotclock; | 718 | int dotclock; |
| 718 | 719 | ||
| @@ -734,6 +735,10 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder, | |||
| 734 | if (tmp & HDMI_MODE_SELECT_HDMI) | 735 | if (tmp & HDMI_MODE_SELECT_HDMI) |
| 735 | pipe_config->has_audio = true; | 736 | pipe_config->has_audio = true; |
| 736 | 737 | ||
| 738 | if (!HAS_PCH_SPLIT(dev) && | ||
| 739 | tmp & HDMI_COLOR_RANGE_16_235) | ||
| 740 | pipe_config->limited_color_range = true; | ||
| 741 | |||
| 737 | pipe_config->adjusted_mode.flags |= flags; | 742 | pipe_config->adjusted_mode.flags |= flags; |
| 738 | 743 | ||
| 739 | if ((tmp & SDVO_COLOR_FORMAT_MASK) == HDMI_COLOR_FORMAT_12bpc) | 744 | if ((tmp & SDVO_COLOR_FORMAT_MASK) == HDMI_COLOR_FORMAT_12bpc) |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 2d068edd1adc..47a126a0493f 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
| @@ -1400,7 +1400,7 @@ i830_dispatch_execbuffer(struct intel_engine_cs *ring, | |||
| 1400 | */ | 1400 | */ |
| 1401 | intel_ring_emit(ring, SRC_COPY_BLT_CMD | BLT_WRITE_RGBA); | 1401 | intel_ring_emit(ring, SRC_COPY_BLT_CMD | BLT_WRITE_RGBA); |
| 1402 | intel_ring_emit(ring, BLT_DEPTH_32 | BLT_ROP_SRC_COPY | 4096); | 1402 | intel_ring_emit(ring, BLT_DEPTH_32 | BLT_ROP_SRC_COPY | 4096); |
| 1403 | intel_ring_emit(ring, DIV_ROUND_UP(len, 4096) << 16 | 1024); | 1403 | intel_ring_emit(ring, DIV_ROUND_UP(len, 4096) << 16 | 4096); |
| 1404 | intel_ring_emit(ring, cs_offset); | 1404 | intel_ring_emit(ring, cs_offset); |
| 1405 | intel_ring_emit(ring, 4096); | 1405 | intel_ring_emit(ring, 4096); |
| 1406 | intel_ring_emit(ring, offset); | 1406 | intel_ring_emit(ring, offset); |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c b/drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c index 0a44459844e3..05a278bab247 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c | |||
| @@ -200,7 +200,6 @@ nvc0_bar_init(struct nouveau_object *object) | |||
| 200 | 200 | ||
| 201 | nv_mask(priv, 0x000200, 0x00000100, 0x00000000); | 201 | nv_mask(priv, 0x000200, 0x00000100, 0x00000000); |
| 202 | nv_mask(priv, 0x000200, 0x00000100, 0x00000100); | 202 | nv_mask(priv, 0x000200, 0x00000100, 0x00000100); |
| 203 | nv_mask(priv, 0x100c80, 0x00000001, 0x00000000); | ||
| 204 | 203 | ||
| 205 | nv_wr32(priv, 0x001704, 0x80000000 | priv->bar[1].mem->addr >> 12); | 204 | nv_wr32(priv, 0x001704, 0x80000000 | priv->bar[1].mem->addr >> 12); |
| 206 | if (priv->bar[0].mem) | 205 | if (priv->bar[0].mem) |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c index b19a2b3c1081..32f28dc73ef2 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c | |||
| @@ -60,6 +60,7 @@ nvc0_fb_init(struct nouveau_object *object) | |||
| 60 | 60 | ||
| 61 | if (priv->r100c10_page) | 61 | if (priv->r100c10_page) |
| 62 | nv_wr32(priv, 0x100c10, priv->r100c10 >> 8); | 62 | nv_wr32(priv, 0x100c10, priv->r100c10 >> 8); |
| 63 | nv_mask(priv, 0x100c80, 0x00000001, 0x00000000); /* 128KiB lpg */ | ||
| 63 | return 0; | 64 | return 0; |
| 64 | } | 65 | } |
| 65 | 66 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c b/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c index b54b582e72c4..d5d65285efe5 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c +++ b/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c | |||
| @@ -98,6 +98,7 @@ static int | |||
| 98 | gf100_ltc_init(struct nouveau_object *object) | 98 | gf100_ltc_init(struct nouveau_object *object) |
| 99 | { | 99 | { |
| 100 | struct nvkm_ltc_priv *priv = (void *)object; | 100 | struct nvkm_ltc_priv *priv = (void *)object; |
| 101 | u32 lpg128 = !(nv_rd32(priv, 0x100c80) & 0x00000001); | ||
| 101 | int ret; | 102 | int ret; |
| 102 | 103 | ||
| 103 | ret = nvkm_ltc_init(priv); | 104 | ret = nvkm_ltc_init(priv); |
| @@ -107,6 +108,7 @@ gf100_ltc_init(struct nouveau_object *object) | |||
| 107 | nv_mask(priv, 0x17e820, 0x00100000, 0x00000000); /* INTR_EN &= ~0x10 */ | 108 | nv_mask(priv, 0x17e820, 0x00100000, 0x00000000); /* INTR_EN &= ~0x10 */ |
| 108 | nv_wr32(priv, 0x17e8d8, priv->ltc_nr); | 109 | nv_wr32(priv, 0x17e8d8, priv->ltc_nr); |
| 109 | nv_wr32(priv, 0x17e8d4, priv->tag_base); | 110 | nv_wr32(priv, 0x17e8d4, priv->tag_base); |
| 111 | nv_mask(priv, 0x17e8c0, 0x00000002, lpg128 ? 0x00000002 : 0x00000000); | ||
| 110 | return 0; | 112 | return 0; |
| 111 | } | 113 | } |
| 112 | 114 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/ltc/gk104.c b/drivers/gpu/drm/nouveau/core/subdev/ltc/gk104.c index ea716569745d..b39b5d0eb8f9 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/ltc/gk104.c +++ b/drivers/gpu/drm/nouveau/core/subdev/ltc/gk104.c | |||
| @@ -28,6 +28,7 @@ static int | |||
| 28 | gk104_ltc_init(struct nouveau_object *object) | 28 | gk104_ltc_init(struct nouveau_object *object) |
| 29 | { | 29 | { |
| 30 | struct nvkm_ltc_priv *priv = (void *)object; | 30 | struct nvkm_ltc_priv *priv = (void *)object; |
| 31 | u32 lpg128 = !(nv_rd32(priv, 0x100c80) & 0x00000001); | ||
| 31 | int ret; | 32 | int ret; |
| 32 | 33 | ||
| 33 | ret = nvkm_ltc_init(priv); | 34 | ret = nvkm_ltc_init(priv); |
| @@ -37,6 +38,7 @@ gk104_ltc_init(struct nouveau_object *object) | |||
| 37 | nv_wr32(priv, 0x17e8d8, priv->ltc_nr); | 38 | nv_wr32(priv, 0x17e8d8, priv->ltc_nr); |
| 38 | nv_wr32(priv, 0x17e000, priv->ltc_nr); | 39 | nv_wr32(priv, 0x17e000, priv->ltc_nr); |
| 39 | nv_wr32(priv, 0x17e8d4, priv->tag_base); | 40 | nv_wr32(priv, 0x17e8d4, priv->tag_base); |
| 41 | nv_mask(priv, 0x17e8c0, 0x00000002, lpg128 ? 0x00000002 : 0x00000000); | ||
| 40 | return 0; | 42 | return 0; |
| 41 | } | 43 | } |
| 42 | 44 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c b/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c index 4761b2e9af00..a4de64289762 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c +++ b/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c | |||
| @@ -98,6 +98,7 @@ static int | |||
| 98 | gm107_ltc_init(struct nouveau_object *object) | 98 | gm107_ltc_init(struct nouveau_object *object) |
| 99 | { | 99 | { |
| 100 | struct nvkm_ltc_priv *priv = (void *)object; | 100 | struct nvkm_ltc_priv *priv = (void *)object; |
| 101 | u32 lpg128 = !(nv_rd32(priv, 0x100c80) & 0x00000001); | ||
| 101 | int ret; | 102 | int ret; |
| 102 | 103 | ||
| 103 | ret = nvkm_ltc_init(priv); | 104 | ret = nvkm_ltc_init(priv); |
| @@ -106,6 +107,7 @@ gm107_ltc_init(struct nouveau_object *object) | |||
| 106 | 107 | ||
| 107 | nv_wr32(priv, 0x17e27c, priv->ltc_nr); | 108 | nv_wr32(priv, 0x17e27c, priv->ltc_nr); |
| 108 | nv_wr32(priv, 0x17e278, priv->tag_base); | 109 | nv_wr32(priv, 0x17e278, priv->tag_base); |
| 110 | nv_mask(priv, 0x17e264, 0x00000002, lpg128 ? 0x00000002 : 0x00000000); | ||
| 109 | return 0; | 111 | return 0; |
| 110 | } | 112 | } |
| 111 | 113 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 279206997e5c..622424692b3b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c | |||
| @@ -46,7 +46,6 @@ static struct nouveau_dsm_priv { | |||
| 46 | bool dsm_detected; | 46 | bool dsm_detected; |
| 47 | bool optimus_detected; | 47 | bool optimus_detected; |
| 48 | acpi_handle dhandle; | 48 | acpi_handle dhandle; |
| 49 | acpi_handle other_handle; | ||
| 50 | acpi_handle rom_handle; | 49 | acpi_handle rom_handle; |
| 51 | } nouveau_dsm_priv; | 50 | } nouveau_dsm_priv; |
| 52 | 51 | ||
| @@ -222,10 +221,9 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev) | |||
| 222 | if (!dhandle) | 221 | if (!dhandle) |
| 223 | return false; | 222 | return false; |
| 224 | 223 | ||
| 225 | if (!acpi_has_method(dhandle, "_DSM")) { | 224 | if (!acpi_has_method(dhandle, "_DSM")) |
| 226 | nouveau_dsm_priv.other_handle = dhandle; | ||
| 227 | return false; | 225 | return false; |
| 228 | } | 226 | |
| 229 | if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102, | 227 | if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102, |
| 230 | 1 << NOUVEAU_DSM_POWER)) | 228 | 1 << NOUVEAU_DSM_POWER)) |
| 231 | retval |= NOUVEAU_DSM_HAS_MUX; | 229 | retval |= NOUVEAU_DSM_HAS_MUX; |
| @@ -301,16 +299,6 @@ static bool nouveau_dsm_detect(void) | |||
| 301 | printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n", | 299 | printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n", |
| 302 | acpi_method_name); | 300 | acpi_method_name); |
| 303 | nouveau_dsm_priv.dsm_detected = true; | 301 | nouveau_dsm_priv.dsm_detected = true; |
| 304 | /* | ||
| 305 | * On some systems hotplug events are generated for the device | ||
| 306 | * being switched off when _DSM is executed. They cause ACPI | ||
| 307 | * hotplug to trigger and attempt to remove the device from | ||
| 308 | * the system, which causes it to break down. Prevent that from | ||
| 309 | * happening by setting the no_hotplug flag for the involved | ||
| 310 | * ACPI device objects. | ||
| 311 | */ | ||
| 312 | acpi_bus_no_hotplug(nouveau_dsm_priv.dhandle); | ||
| 313 | acpi_bus_no_hotplug(nouveau_dsm_priv.other_handle); | ||
| 314 | ret = true; | 302 | ret = true; |
| 315 | } | 303 | } |
| 316 | 304 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 250a5e88c751..9c3af96a7153 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c | |||
| @@ -627,6 +627,7 @@ int nouveau_pmops_suspend(struct device *dev) | |||
| 627 | 627 | ||
| 628 | pci_save_state(pdev); | 628 | pci_save_state(pdev); |
| 629 | pci_disable_device(pdev); | 629 | pci_disable_device(pdev); |
| 630 | pci_ignore_hotplug(pdev); | ||
| 630 | pci_set_power_state(pdev, PCI_D3hot); | 631 | pci_set_power_state(pdev, PCI_D3hot); |
| 631 | return 0; | 632 | return 0; |
| 632 | } | 633 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index 18d55d447248..c7592ec8ecb8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c | |||
| @@ -108,7 +108,16 @@ void | |||
| 108 | nouveau_vga_fini(struct nouveau_drm *drm) | 108 | nouveau_vga_fini(struct nouveau_drm *drm) |
| 109 | { | 109 | { |
| 110 | struct drm_device *dev = drm->dev; | 110 | struct drm_device *dev = drm->dev; |
| 111 | bool runtime = false; | ||
| 112 | |||
| 113 | if (nouveau_runtime_pm == 1) | ||
| 114 | runtime = true; | ||
| 115 | if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) | ||
| 116 | runtime = true; | ||
| 117 | |||
| 111 | vga_switcheroo_unregister_client(dev->pdev); | 118 | vga_switcheroo_unregister_client(dev->pdev); |
| 119 | if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus()) | ||
| 120 | vga_switcheroo_fini_domain_pm_ops(drm->dev->dev); | ||
| 112 | vga_client_register(dev->pdev, NULL, NULL, NULL); | 121 | vga_client_register(dev->pdev, NULL, NULL, NULL); |
| 113 | } | 122 | } |
| 114 | 123 | ||
diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c index 192278bc993c..c4ffa54b1e3d 100644 --- a/drivers/gpu/drm/radeon/cik_sdma.c +++ b/drivers/gpu/drm/radeon/cik_sdma.c | |||
| @@ -489,13 +489,6 @@ int cik_sdma_resume(struct radeon_device *rdev) | |||
| 489 | { | 489 | { |
| 490 | int r; | 490 | int r; |
| 491 | 491 | ||
| 492 | /* Reset dma */ | ||
| 493 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_SDMA | SOFT_RESET_SDMA1); | ||
| 494 | RREG32(SRBM_SOFT_RESET); | ||
| 495 | udelay(50); | ||
| 496 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 497 | RREG32(SRBM_SOFT_RESET); | ||
| 498 | |||
| 499 | r = cik_sdma_load_microcode(rdev); | 492 | r = cik_sdma_load_microcode(rdev); |
| 500 | if (r) | 493 | if (r) |
| 501 | return r; | 494 | return r; |
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c index 8b58e11b64fa..67cb472d188c 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | #define KV_MINIMUM_ENGINE_CLOCK 800 | 33 | #define KV_MINIMUM_ENGINE_CLOCK 800 |
| 34 | #define SMC_RAM_END 0x40000 | 34 | #define SMC_RAM_END 0x40000 |
| 35 | 35 | ||
| 36 | static int kv_enable_nb_dpm(struct radeon_device *rdev, | ||
| 37 | bool enable); | ||
| 36 | static void kv_init_graphics_levels(struct radeon_device *rdev); | 38 | static void kv_init_graphics_levels(struct radeon_device *rdev); |
| 37 | static int kv_calculate_ds_divider(struct radeon_device *rdev); | 39 | static int kv_calculate_ds_divider(struct radeon_device *rdev); |
| 38 | static int kv_calculate_nbps_level_settings(struct radeon_device *rdev); | 40 | static int kv_calculate_nbps_level_settings(struct radeon_device *rdev); |
| @@ -1295,6 +1297,9 @@ void kv_dpm_disable(struct radeon_device *rdev) | |||
| 1295 | { | 1297 | { |
| 1296 | kv_smc_bapm_enable(rdev, false); | 1298 | kv_smc_bapm_enable(rdev, false); |
| 1297 | 1299 | ||
| 1300 | if (rdev->family == CHIP_MULLINS) | ||
| 1301 | kv_enable_nb_dpm(rdev, false); | ||
| 1302 | |||
| 1298 | /* powerup blocks */ | 1303 | /* powerup blocks */ |
| 1299 | kv_dpm_powergate_acp(rdev, false); | 1304 | kv_dpm_powergate_acp(rdev, false); |
| 1300 | kv_dpm_powergate_samu(rdev, false); | 1305 | kv_dpm_powergate_samu(rdev, false); |
| @@ -1769,15 +1774,24 @@ static int kv_update_dfs_bypass_settings(struct radeon_device *rdev, | |||
| 1769 | return ret; | 1774 | return ret; |
| 1770 | } | 1775 | } |
| 1771 | 1776 | ||
| 1772 | static int kv_enable_nb_dpm(struct radeon_device *rdev) | 1777 | static int kv_enable_nb_dpm(struct radeon_device *rdev, |
| 1778 | bool enable) | ||
| 1773 | { | 1779 | { |
| 1774 | struct kv_power_info *pi = kv_get_pi(rdev); | 1780 | struct kv_power_info *pi = kv_get_pi(rdev); |
| 1775 | int ret = 0; | 1781 | int ret = 0; |
| 1776 | 1782 | ||
| 1777 | if (pi->enable_nb_dpm && !pi->nb_dpm_enabled) { | 1783 | if (enable) { |
| 1778 | ret = kv_notify_message_to_smu(rdev, PPSMC_MSG_NBDPM_Enable); | 1784 | if (pi->enable_nb_dpm && !pi->nb_dpm_enabled) { |
| 1779 | if (ret == 0) | 1785 | ret = kv_notify_message_to_smu(rdev, PPSMC_MSG_NBDPM_Enable); |
| 1780 | pi->nb_dpm_enabled = true; | 1786 | if (ret == 0) |
| 1787 | pi->nb_dpm_enabled = true; | ||
| 1788 | } | ||
| 1789 | } else { | ||
| 1790 | if (pi->enable_nb_dpm && pi->nb_dpm_enabled) { | ||
| 1791 | ret = kv_notify_message_to_smu(rdev, PPSMC_MSG_NBDPM_Disable); | ||
| 1792 | if (ret == 0) | ||
| 1793 | pi->nb_dpm_enabled = false; | ||
| 1794 | } | ||
| 1781 | } | 1795 | } |
| 1782 | 1796 | ||
| 1783 | return ret; | 1797 | return ret; |
| @@ -1864,7 +1878,7 @@ int kv_dpm_set_power_state(struct radeon_device *rdev) | |||
| 1864 | } | 1878 | } |
| 1865 | kv_update_sclk_t(rdev); | 1879 | kv_update_sclk_t(rdev); |
| 1866 | if (rdev->family == CHIP_MULLINS) | 1880 | if (rdev->family == CHIP_MULLINS) |
| 1867 | kv_enable_nb_dpm(rdev); | 1881 | kv_enable_nb_dpm(rdev, true); |
| 1868 | } | 1882 | } |
| 1869 | } else { | 1883 | } else { |
| 1870 | if (pi->enable_dpm) { | 1884 | if (pi->enable_dpm) { |
| @@ -1889,7 +1903,7 @@ int kv_dpm_set_power_state(struct radeon_device *rdev) | |||
| 1889 | } | 1903 | } |
| 1890 | kv_update_acp_boot_level(rdev); | 1904 | kv_update_acp_boot_level(rdev); |
| 1891 | kv_update_sclk_t(rdev); | 1905 | kv_update_sclk_t(rdev); |
| 1892 | kv_enable_nb_dpm(rdev); | 1906 | kv_enable_nb_dpm(rdev, true); |
| 1893 | } | 1907 | } |
| 1894 | } | 1908 | } |
| 1895 | 1909 | ||
diff --git a/drivers/gpu/drm/radeon/ni_dma.c b/drivers/gpu/drm/radeon/ni_dma.c index 8a3e6221cece..f26f0a9fb522 100644 --- a/drivers/gpu/drm/radeon/ni_dma.c +++ b/drivers/gpu/drm/radeon/ni_dma.c | |||
| @@ -191,12 +191,6 @@ int cayman_dma_resume(struct radeon_device *rdev) | |||
| 191 | u32 reg_offset, wb_offset; | 191 | u32 reg_offset, wb_offset; |
| 192 | int i, r; | 192 | int i, r; |
| 193 | 193 | ||
| 194 | /* Reset dma */ | ||
| 195 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1); | ||
| 196 | RREG32(SRBM_SOFT_RESET); | ||
| 197 | udelay(50); | ||
| 198 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 199 | |||
| 200 | for (i = 0; i < 2; i++) { | 194 | for (i = 0; i < 2; i++) { |
| 201 | if (i == 0) { | 195 | if (i == 0) { |
| 202 | ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX]; | 196 | ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX]; |
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 4c5ec44ff328..b0098e792e62 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
| @@ -821,6 +821,20 @@ u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc) | |||
| 821 | return RREG32(RADEON_CRTC2_CRNT_FRAME); | 821 | return RREG32(RADEON_CRTC2_CRNT_FRAME); |
| 822 | } | 822 | } |
| 823 | 823 | ||
| 824 | /** | ||
| 825 | * r100_ring_hdp_flush - flush Host Data Path via the ring buffer | ||
| 826 | * rdev: radeon device structure | ||
| 827 | * ring: ring buffer struct for emitting packets | ||
| 828 | */ | ||
| 829 | static void r100_ring_hdp_flush(struct radeon_device *rdev, struct radeon_ring *ring) | ||
| 830 | { | ||
| 831 | radeon_ring_write(ring, PACKET0(RADEON_HOST_PATH_CNTL, 0)); | ||
| 832 | radeon_ring_write(ring, rdev->config.r100.hdp_cntl | | ||
| 833 | RADEON_HDP_READ_BUFFER_INVALIDATE); | ||
| 834 | radeon_ring_write(ring, PACKET0(RADEON_HOST_PATH_CNTL, 0)); | ||
| 835 | radeon_ring_write(ring, rdev->config.r100.hdp_cntl); | ||
| 836 | } | ||
| 837 | |||
| 824 | /* Who ever call radeon_fence_emit should call ring_lock and ask | 838 | /* Who ever call radeon_fence_emit should call ring_lock and ask |
| 825 | * for enough space (today caller are ib schedule and buffer move) */ | 839 | * for enough space (today caller are ib schedule and buffer move) */ |
| 826 | void r100_fence_ring_emit(struct radeon_device *rdev, | 840 | void r100_fence_ring_emit(struct radeon_device *rdev, |
| @@ -1056,20 +1070,6 @@ void r100_gfx_set_wptr(struct radeon_device *rdev, | |||
| 1056 | (void)RREG32(RADEON_CP_RB_WPTR); | 1070 | (void)RREG32(RADEON_CP_RB_WPTR); |
| 1057 | } | 1071 | } |
| 1058 | 1072 | ||
| 1059 | /** | ||
| 1060 | * r100_ring_hdp_flush - flush Host Data Path via the ring buffer | ||
| 1061 | * rdev: radeon device structure | ||
| 1062 | * ring: ring buffer struct for emitting packets | ||
| 1063 | */ | ||
| 1064 | void r100_ring_hdp_flush(struct radeon_device *rdev, struct radeon_ring *ring) | ||
| 1065 | { | ||
| 1066 | radeon_ring_write(ring, PACKET0(RADEON_HOST_PATH_CNTL, 0)); | ||
| 1067 | radeon_ring_write(ring, rdev->config.r100.hdp_cntl | | ||
| 1068 | RADEON_HDP_READ_BUFFER_INVALIDATE); | ||
| 1069 | radeon_ring_write(ring, PACKET0(RADEON_HOST_PATH_CNTL, 0)); | ||
| 1070 | radeon_ring_write(ring, rdev->config.r100.hdp_cntl); | ||
| 1071 | } | ||
| 1072 | |||
| 1073 | static void r100_cp_load_microcode(struct radeon_device *rdev) | 1073 | static void r100_cp_load_microcode(struct radeon_device *rdev) |
| 1074 | { | 1074 | { |
| 1075 | const __be32 *fw_data; | 1075 | const __be32 *fw_data; |
diff --git a/drivers/gpu/drm/radeon/r600_dma.c b/drivers/gpu/drm/radeon/r600_dma.c index 51fd98553eaf..a908daa006d2 100644 --- a/drivers/gpu/drm/radeon/r600_dma.c +++ b/drivers/gpu/drm/radeon/r600_dma.c | |||
| @@ -124,15 +124,6 @@ int r600_dma_resume(struct radeon_device *rdev) | |||
| 124 | u32 rb_bufsz; | 124 | u32 rb_bufsz; |
| 125 | int r; | 125 | int r; |
| 126 | 126 | ||
| 127 | /* Reset dma */ | ||
| 128 | if (rdev->family >= CHIP_RV770) | ||
| 129 | WREG32(SRBM_SOFT_RESET, RV770_SOFT_RESET_DMA); | ||
| 130 | else | ||
| 131 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA); | ||
| 132 | RREG32(SRBM_SOFT_RESET); | ||
| 133 | udelay(50); | ||
| 134 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 135 | |||
| 136 | WREG32(DMA_SEM_INCOMPLETE_TIMER_CNTL, 0); | 127 | WREG32(DMA_SEM_INCOMPLETE_TIMER_CNTL, 0); |
| 137 | WREG32(DMA_SEM_WAIT_FAIL_TIMER_CNTL, 0); | 128 | WREG32(DMA_SEM_WAIT_FAIL_TIMER_CNTL, 0); |
| 138 | 129 | ||
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h index 0c4a7d8d93e0..31e1052ad3e3 100644 --- a/drivers/gpu/drm/radeon/r600d.h +++ b/drivers/gpu/drm/radeon/r600d.h | |||
| @@ -44,13 +44,6 @@ | |||
| 44 | #define R6XX_MAX_PIPES 8 | 44 | #define R6XX_MAX_PIPES 8 |
| 45 | #define R6XX_MAX_PIPES_MASK 0xff | 45 | #define R6XX_MAX_PIPES_MASK 0xff |
| 46 | 46 | ||
| 47 | /* PTE flags */ | ||
| 48 | #define PTE_VALID (1 << 0) | ||
| 49 | #define PTE_SYSTEM (1 << 1) | ||
| 50 | #define PTE_SNOOPED (1 << 2) | ||
| 51 | #define PTE_READABLE (1 << 5) | ||
| 52 | #define PTE_WRITEABLE (1 << 6) | ||
| 53 | |||
| 54 | /* tiling bits */ | 47 | /* tiling bits */ |
| 55 | #define ARRAY_LINEAR_GENERAL 0x00000000 | 48 | #define ARRAY_LINEAR_GENERAL 0x00000000 |
| 56 | #define ARRAY_LINEAR_ALIGNED 0x00000001 | 49 | #define ARRAY_LINEAR_ALIGNED 0x00000001 |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index eeeeabe09758..2dd5847f9b98 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
| @@ -185,7 +185,6 @@ static struct radeon_asic_ring r100_gfx_ring = { | |||
| 185 | .get_rptr = &r100_gfx_get_rptr, | 185 | .get_rptr = &r100_gfx_get_rptr, |
| 186 | .get_wptr = &r100_gfx_get_wptr, | 186 | .get_wptr = &r100_gfx_get_wptr, |
| 187 | .set_wptr = &r100_gfx_set_wptr, | 187 | .set_wptr = &r100_gfx_set_wptr, |
| 188 | .hdp_flush = &r100_ring_hdp_flush, | ||
| 189 | }; | 188 | }; |
| 190 | 189 | ||
| 191 | static struct radeon_asic r100_asic = { | 190 | static struct radeon_asic r100_asic = { |
| @@ -332,7 +331,6 @@ static struct radeon_asic_ring r300_gfx_ring = { | |||
| 332 | .get_rptr = &r100_gfx_get_rptr, | 331 | .get_rptr = &r100_gfx_get_rptr, |
| 333 | .get_wptr = &r100_gfx_get_wptr, | 332 | .get_wptr = &r100_gfx_get_wptr, |
| 334 | .set_wptr = &r100_gfx_set_wptr, | 333 | .set_wptr = &r100_gfx_set_wptr, |
| 335 | .hdp_flush = &r100_ring_hdp_flush, | ||
| 336 | }; | 334 | }; |
| 337 | 335 | ||
| 338 | static struct radeon_asic r300_asic = { | 336 | static struct radeon_asic r300_asic = { |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 275a5dc01780..7756bc1e1cd3 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
| @@ -148,8 +148,7 @@ u32 r100_gfx_get_wptr(struct radeon_device *rdev, | |||
| 148 | struct radeon_ring *ring); | 148 | struct radeon_ring *ring); |
| 149 | void r100_gfx_set_wptr(struct radeon_device *rdev, | 149 | void r100_gfx_set_wptr(struct radeon_device *rdev, |
| 150 | struct radeon_ring *ring); | 150 | struct radeon_ring *ring); |
| 151 | void r100_ring_hdp_flush(struct radeon_device *rdev, | 151 | |
| 152 | struct radeon_ring *ring); | ||
| 153 | /* | 152 | /* |
| 154 | * r200,rv250,rs300,rv280 | 153 | * r200,rv250,rs300,rv280 |
| 155 | */ | 154 | */ |
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index a9fb0d016d38..8bc7d0bbd3c8 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c | |||
| @@ -33,7 +33,6 @@ static struct radeon_atpx_priv { | |||
| 33 | bool atpx_detected; | 33 | bool atpx_detected; |
| 34 | /* handle for device - and atpx */ | 34 | /* handle for device - and atpx */ |
| 35 | acpi_handle dhandle; | 35 | acpi_handle dhandle; |
| 36 | acpi_handle other_handle; | ||
| 37 | struct radeon_atpx atpx; | 36 | struct radeon_atpx atpx; |
| 38 | } radeon_atpx_priv; | 37 | } radeon_atpx_priv; |
| 39 | 38 | ||
| @@ -453,10 +452,9 @@ static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev) | |||
| 453 | return false; | 452 | return false; |
| 454 | 453 | ||
| 455 | status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); | 454 | status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); |
| 456 | if (ACPI_FAILURE(status)) { | 455 | if (ACPI_FAILURE(status)) |
| 457 | radeon_atpx_priv.other_handle = dhandle; | ||
| 458 | return false; | 456 | return false; |
| 459 | } | 457 | |
| 460 | radeon_atpx_priv.dhandle = dhandle; | 458 | radeon_atpx_priv.dhandle = dhandle; |
| 461 | radeon_atpx_priv.atpx.handle = atpx_handle; | 459 | radeon_atpx_priv.atpx.handle = atpx_handle; |
| 462 | return true; | 460 | return true; |
| @@ -540,16 +538,6 @@ static bool radeon_atpx_detect(void) | |||
| 540 | printk(KERN_INFO "VGA switcheroo: detected switching method %s handle\n", | 538 | printk(KERN_INFO "VGA switcheroo: detected switching method %s handle\n", |
| 541 | acpi_method_name); | 539 | acpi_method_name); |
| 542 | radeon_atpx_priv.atpx_detected = true; | 540 | radeon_atpx_priv.atpx_detected = true; |
| 543 | /* | ||
| 544 | * On some systems hotplug events are generated for the device | ||
| 545 | * being switched off when ATPX is executed. They cause ACPI | ||
| 546 | * hotplug to trigger and attempt to remove the device from | ||
| 547 | * the system, which causes it to break down. Prevent that from | ||
| 548 | * happening by setting the no_hotplug flag for the involved | ||
| 549 | * ACPI device objects. | ||
| 550 | */ | ||
| 551 | acpi_bus_no_hotplug(radeon_atpx_priv.dhandle); | ||
| 552 | acpi_bus_no_hotplug(radeon_atpx_priv.other_handle); | ||
| 553 | return true; | 541 | return true; |
| 554 | } | 542 | } |
| 555 | return false; | 543 | return false; |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 6a219bcee66d..75223dd3a8a3 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
| @@ -1393,7 +1393,7 @@ int radeon_device_init(struct radeon_device *rdev, | |||
| 1393 | 1393 | ||
| 1394 | r = radeon_init(rdev); | 1394 | r = radeon_init(rdev); |
| 1395 | if (r) | 1395 | if (r) |
| 1396 | return r; | 1396 | goto failed; |
| 1397 | 1397 | ||
| 1398 | r = radeon_ib_ring_tests(rdev); | 1398 | r = radeon_ib_ring_tests(rdev); |
| 1399 | if (r) | 1399 | if (r) |
| @@ -1413,7 +1413,7 @@ int radeon_device_init(struct radeon_device *rdev, | |||
| 1413 | radeon_agp_disable(rdev); | 1413 | radeon_agp_disable(rdev); |
| 1414 | r = radeon_init(rdev); | 1414 | r = radeon_init(rdev); |
| 1415 | if (r) | 1415 | if (r) |
| 1416 | return r; | 1416 | goto failed; |
| 1417 | } | 1417 | } |
| 1418 | 1418 | ||
| 1419 | if ((radeon_testing & 1)) { | 1419 | if ((radeon_testing & 1)) { |
| @@ -1435,6 +1435,11 @@ int radeon_device_init(struct radeon_device *rdev, | |||
| 1435 | DRM_INFO("radeon: acceleration disabled, skipping benchmarks\n"); | 1435 | DRM_INFO("radeon: acceleration disabled, skipping benchmarks\n"); |
| 1436 | } | 1436 | } |
| 1437 | return 0; | 1437 | return 0; |
| 1438 | |||
| 1439 | failed: | ||
| 1440 | if (runtime) | ||
| 1441 | vga_switcheroo_fini_domain_pm_ops(rdev->dev); | ||
| 1442 | return r; | ||
| 1438 | } | 1443 | } |
| 1439 | 1444 | ||
| 1440 | static void radeon_debugfs_remove_files(struct radeon_device *rdev); | 1445 | static void radeon_debugfs_remove_files(struct radeon_device *rdev); |
| @@ -1455,6 +1460,8 @@ void radeon_device_fini(struct radeon_device *rdev) | |||
| 1455 | radeon_bo_evict_vram(rdev); | 1460 | radeon_bo_evict_vram(rdev); |
| 1456 | radeon_fini(rdev); | 1461 | radeon_fini(rdev); |
| 1457 | vga_switcheroo_unregister_client(rdev->pdev); | 1462 | vga_switcheroo_unregister_client(rdev->pdev); |
| 1463 | if (rdev->flags & RADEON_IS_PX) | ||
| 1464 | vga_switcheroo_fini_domain_pm_ops(rdev->dev); | ||
| 1458 | vga_client_register(rdev->pdev, NULL, NULL, NULL); | 1465 | vga_client_register(rdev->pdev, NULL, NULL, NULL); |
| 1459 | if (rdev->rio_mem) | 1466 | if (rdev->rio_mem) |
| 1460 | pci_iounmap(rdev->pdev, rdev->rio_mem); | 1467 | pci_iounmap(rdev->pdev, rdev->rio_mem); |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 8df888908833..4126fd0937a2 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
| @@ -83,7 +83,7 @@ | |||
| 83 | * CIK: 1D and linear tiling modes contain valid PIPE_CONFIG | 83 | * CIK: 1D and linear tiling modes contain valid PIPE_CONFIG |
| 84 | * 2.39.0 - Add INFO query for number of active CUs | 84 | * 2.39.0 - Add INFO query for number of active CUs |
| 85 | * 2.40.0 - Add RADEON_GEM_GTT_WC/UC, flush HDP cache before submitting | 85 | * 2.40.0 - Add RADEON_GEM_GTT_WC/UC, flush HDP cache before submitting |
| 86 | * CS to GPU | 86 | * CS to GPU on >= r600 |
| 87 | */ | 87 | */ |
| 88 | #define KMS_DRIVER_MAJOR 2 | 88 | #define KMS_DRIVER_MAJOR 2 |
| 89 | #define KMS_DRIVER_MINOR 40 | 89 | #define KMS_DRIVER_MINOR 40 |
| @@ -440,6 +440,7 @@ static int radeon_pmops_runtime_suspend(struct device *dev) | |||
| 440 | ret = radeon_suspend_kms(drm_dev, false, false); | 440 | ret = radeon_suspend_kms(drm_dev, false, false); |
| 441 | pci_save_state(pdev); | 441 | pci_save_state(pdev); |
| 442 | pci_disable_device(pdev); | 442 | pci_disable_device(pdev); |
| 443 | pci_ignore_hotplug(pdev); | ||
| 443 | pci_set_power_state(pdev, PCI_D3cold); | 444 | pci_set_power_state(pdev, PCI_D3cold); |
| 444 | drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; | 445 | drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; |
| 445 | 446 | ||
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 6c1fc339d228..c5799f16aa4b 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c | |||
| @@ -221,9 +221,9 @@ void rs400_gart_set_page(struct radeon_device *rdev, unsigned i, | |||
| 221 | entry = (lower_32_bits(addr) & PAGE_MASK) | | 221 | entry = (lower_32_bits(addr) & PAGE_MASK) | |
| 222 | ((upper_32_bits(addr) & 0xff) << 4); | 222 | ((upper_32_bits(addr) & 0xff) << 4); |
| 223 | if (flags & RADEON_GART_PAGE_READ) | 223 | if (flags & RADEON_GART_PAGE_READ) |
| 224 | addr |= RS400_PTE_READABLE; | 224 | entry |= RS400_PTE_READABLE; |
| 225 | if (flags & RADEON_GART_PAGE_WRITE) | 225 | if (flags & RADEON_GART_PAGE_WRITE) |
| 226 | addr |= RS400_PTE_WRITEABLE; | 226 | entry |= RS400_PTE_WRITEABLE; |
| 227 | if (!(flags & RADEON_GART_PAGE_SNOOP)) | 227 | if (!(flags & RADEON_GART_PAGE_SNOOP)) |
| 228 | entry |= RS400_PTE_UNSNOOPED; | 228 | entry |= RS400_PTE_UNSNOOPED; |
| 229 | entry = cpu_to_le32(entry); | 229 | entry = cpu_to_le32(entry); |
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index ef93156a69c6..b22968c08d1f 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c | |||
| @@ -298,7 +298,6 @@ static int hdmi_avi_infoframe_config(struct sti_hdmi *hdmi) | |||
| 298 | hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD2(HDMI_IFRAME_SLOT_AVI)); | 298 | hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD2(HDMI_IFRAME_SLOT_AVI)); |
| 299 | 299 | ||
| 300 | val = frame[0xC]; | 300 | val = frame[0xC]; |
| 301 | val |= frame[0xD] << 8; | ||
| 302 | hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD3(HDMI_IFRAME_SLOT_AVI)); | 301 | hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD3(HDMI_IFRAME_SLOT_AVI)); |
| 303 | 302 | ||
| 304 | /* Enable transmission slot for AVI infoframe | 303 | /* Enable transmission slot for AVI infoframe |
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 6866448083b2..37ac7b5dbd06 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c | |||
| @@ -660,6 +660,12 @@ int vga_switcheroo_init_domain_pm_ops(struct device *dev, struct dev_pm_domain * | |||
| 660 | } | 660 | } |
| 661 | EXPORT_SYMBOL(vga_switcheroo_init_domain_pm_ops); | 661 | EXPORT_SYMBOL(vga_switcheroo_init_domain_pm_ops); |
| 662 | 662 | ||
| 663 | void vga_switcheroo_fini_domain_pm_ops(struct device *dev) | ||
| 664 | { | ||
| 665 | dev->pm_domain = NULL; | ||
| 666 | } | ||
| 667 | EXPORT_SYMBOL(vga_switcheroo_fini_domain_pm_ops); | ||
| 668 | |||
| 663 | static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev) | 669 | static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev) |
| 664 | { | 670 | { |
| 665 | struct pci_dev *pdev = to_pci_dev(dev); | 671 | struct pci_dev *pdev = to_pci_dev(dev); |
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index d2077f040f3e..77711623b973 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/poll.h> | 41 | #include <linux/poll.h> |
| 42 | #include <linux/miscdevice.h> | 42 | #include <linux/miscdevice.h> |
| 43 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
| 44 | #include <linux/screen_info.h> | ||
| 44 | 45 | ||
| 45 | #include <linux/uaccess.h> | 46 | #include <linux/uaccess.h> |
| 46 | 47 | ||
| @@ -112,10 +113,8 @@ both: | |||
| 112 | return 1; | 113 | return 1; |
| 113 | } | 114 | } |
| 114 | 115 | ||
| 115 | #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE | ||
| 116 | /* this is only used a cookie - it should not be dereferenced */ | 116 | /* this is only used a cookie - it should not be dereferenced */ |
| 117 | static struct pci_dev *vga_default; | 117 | static struct pci_dev *vga_default; |
| 118 | #endif | ||
| 119 | 118 | ||
| 120 | static void vga_arb_device_card_gone(struct pci_dev *pdev); | 119 | static void vga_arb_device_card_gone(struct pci_dev *pdev); |
| 121 | 120 | ||
| @@ -131,7 +130,6 @@ static struct vga_device *vgadev_find(struct pci_dev *pdev) | |||
| 131 | } | 130 | } |
| 132 | 131 | ||
| 133 | /* Returns the default VGA device (vgacon's babe) */ | 132 | /* Returns the default VGA device (vgacon's babe) */ |
| 134 | #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE | ||
| 135 | struct pci_dev *vga_default_device(void) | 133 | struct pci_dev *vga_default_device(void) |
| 136 | { | 134 | { |
| 137 | return vga_default; | 135 | return vga_default; |
| @@ -147,7 +145,6 @@ void vga_set_default_device(struct pci_dev *pdev) | |||
| 147 | pci_dev_put(vga_default); | 145 | pci_dev_put(vga_default); |
| 148 | vga_default = pci_dev_get(pdev); | 146 | vga_default = pci_dev_get(pdev); |
| 149 | } | 147 | } |
| 150 | #endif | ||
| 151 | 148 | ||
| 152 | static inline void vga_irq_set_state(struct vga_device *vgadev, bool state) | 149 | static inline void vga_irq_set_state(struct vga_device *vgadev, bool state) |
| 153 | { | 150 | { |
| @@ -583,11 +580,12 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) | |||
| 583 | /* Deal with VGA default device. Use first enabled one | 580 | /* Deal with VGA default device. Use first enabled one |
| 584 | * by default if arch doesn't have it's own hook | 581 | * by default if arch doesn't have it's own hook |
| 585 | */ | 582 | */ |
| 586 | #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE | ||
| 587 | if (vga_default == NULL && | 583 | if (vga_default == NULL && |
| 588 | ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) | 584 | ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) { |
| 585 | pr_info("vgaarb: setting as boot device: PCI:%s\n", | ||
| 586 | pci_name(pdev)); | ||
| 589 | vga_set_default_device(pdev); | 587 | vga_set_default_device(pdev); |
| 590 | #endif | 588 | } |
| 591 | 589 | ||
| 592 | vga_arbiter_check_bridge_sharing(vgadev); | 590 | vga_arbiter_check_bridge_sharing(vgadev); |
| 593 | 591 | ||
| @@ -621,10 +619,8 @@ static bool vga_arbiter_del_pci_device(struct pci_dev *pdev) | |||
| 621 | goto bail; | 619 | goto bail; |
| 622 | } | 620 | } |
| 623 | 621 | ||
| 624 | #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE | ||
| 625 | if (vga_default == pdev) | 622 | if (vga_default == pdev) |
| 626 | vga_set_default_device(NULL); | 623 | vga_set_default_device(NULL); |
| 627 | #endif | ||
| 628 | 624 | ||
| 629 | if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)) | 625 | if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)) |
| 630 | vga_decode_count--; | 626 | vga_decode_count--; |
| @@ -1320,6 +1316,38 @@ static int __init vga_arb_device_init(void) | |||
| 1320 | pr_info("vgaarb: loaded\n"); | 1316 | pr_info("vgaarb: loaded\n"); |
| 1321 | 1317 | ||
| 1322 | list_for_each_entry(vgadev, &vga_list, list) { | 1318 | list_for_each_entry(vgadev, &vga_list, list) { |
| 1319 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) | ||
| 1320 | /* Override I/O based detection done by vga_arbiter_add_pci_device() | ||
| 1321 | * as it may take the wrong device (e.g. on Apple system under EFI). | ||
| 1322 | * | ||
| 1323 | * Select the device owning the boot framebuffer if there is one. | ||
| 1324 | */ | ||
| 1325 | resource_size_t start, end; | ||
| 1326 | int i; | ||
| 1327 | |||
| 1328 | /* Does firmware framebuffer belong to us? */ | ||
| 1329 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
| 1330 | if (!(pci_resource_flags(vgadev->pdev, i) & IORESOURCE_MEM)) | ||
| 1331 | continue; | ||
| 1332 | |||
| 1333 | start = pci_resource_start(vgadev->pdev, i); | ||
| 1334 | end = pci_resource_end(vgadev->pdev, i); | ||
| 1335 | |||
| 1336 | if (!start || !end) | ||
| 1337 | continue; | ||
| 1338 | |||
| 1339 | if (screen_info.lfb_base < start || | ||
| 1340 | (screen_info.lfb_base + screen_info.lfb_size) >= end) | ||
| 1341 | continue; | ||
| 1342 | if (!vga_default_device()) | ||
| 1343 | pr_info("vgaarb: setting as boot device: PCI:%s\n", | ||
| 1344 | pci_name(vgadev->pdev)); | ||
| 1345 | else if (vgadev->pdev != vga_default_device()) | ||
| 1346 | pr_info("vgaarb: overriding boot device: PCI:%s\n", | ||
| 1347 | pci_name(vgadev->pdev)); | ||
| 1348 | vga_set_default_device(vgadev->pdev); | ||
| 1349 | } | ||
| 1350 | #endif | ||
| 1323 | if (vgadev->bridge_has_one_vga) | 1351 | if (vgadev->bridge_has_one_vga) |
| 1324 | pr_info("vgaarb: bridge control possible %s\n", pci_name(vgadev->pdev)); | 1352 | pr_info("vgaarb: bridge control possible %s\n", pci_name(vgadev->pdev)); |
| 1325 | else | 1353 | else |
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 6ef19641457c..f081b007f7d2 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c | |||
| @@ -748,7 +748,7 @@ static int bma180_probe(struct i2c_client *client, | |||
| 748 | data->trig->dev.parent = &client->dev; | 748 | data->trig->dev.parent = &client->dev; |
| 749 | data->trig->ops = &bma180_trigger_ops; | 749 | data->trig->ops = &bma180_trigger_ops; |
| 750 | iio_trigger_set_drvdata(data->trig, indio_dev); | 750 | iio_trigger_set_drvdata(data->trig, indio_dev); |
| 751 | indio_dev->trig = data->trig; | 751 | indio_dev->trig = iio_trigger_get(trig); |
| 752 | 752 | ||
| 753 | ret = iio_trigger_register(data->trig); | 753 | ret = iio_trigger_register(data->trig); |
| 754 | if (ret) | 754 | if (ret) |
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index c55b81f7f970..d10bd0c97233 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c | |||
| @@ -472,7 +472,7 @@ static int ad_sd_probe_trigger(struct iio_dev *indio_dev) | |||
| 472 | goto error_free_irq; | 472 | goto error_free_irq; |
| 473 | 473 | ||
| 474 | /* select default trigger */ | 474 | /* select default trigger */ |
| 475 | indio_dev->trig = sigma_delta->trig; | 475 | indio_dev->trig = iio_trigger_get(sigma_delta->trig); |
| 476 | 476 | ||
| 477 | return 0; | 477 | return 0; |
| 478 | 478 | ||
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 7807e0ef5b29..ff61ae55dd3f 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c | |||
| @@ -196,6 +196,7 @@ struct at91_adc_state { | |||
| 196 | bool done; | 196 | bool done; |
| 197 | int irq; | 197 | int irq; |
| 198 | u16 last_value; | 198 | u16 last_value; |
| 199 | int chnb; | ||
| 199 | struct mutex lock; | 200 | struct mutex lock; |
| 200 | u8 num_channels; | 201 | u8 num_channels; |
| 201 | void __iomem *reg_base; | 202 | void __iomem *reg_base; |
| @@ -274,7 +275,7 @@ static void handle_adc_eoc_trigger(int irq, struct iio_dev *idev) | |||
| 274 | disable_irq_nosync(irq); | 275 | disable_irq_nosync(irq); |
| 275 | iio_trigger_poll(idev->trig); | 276 | iio_trigger_poll(idev->trig); |
| 276 | } else { | 277 | } else { |
| 277 | st->last_value = at91_adc_readl(st, AT91_ADC_LCDR); | 278 | st->last_value = at91_adc_readl(st, AT91_ADC_CHAN(st, st->chnb)); |
| 278 | st->done = true; | 279 | st->done = true; |
| 279 | wake_up_interruptible(&st->wq_data_avail); | 280 | wake_up_interruptible(&st->wq_data_avail); |
| 280 | } | 281 | } |
| @@ -351,7 +352,7 @@ static irqreturn_t at91_adc_rl_interrupt(int irq, void *private) | |||
| 351 | unsigned int reg; | 352 | unsigned int reg; |
| 352 | 353 | ||
| 353 | status &= at91_adc_readl(st, AT91_ADC_IMR); | 354 | status &= at91_adc_readl(st, AT91_ADC_IMR); |
| 354 | if (status & st->registers->drdy_mask) | 355 | if (status & GENMASK(st->num_channels - 1, 0)) |
| 355 | handle_adc_eoc_trigger(irq, idev); | 356 | handle_adc_eoc_trigger(irq, idev); |
| 356 | 357 | ||
| 357 | if (status & AT91RL_ADC_IER_PEN) { | 358 | if (status & AT91RL_ADC_IER_PEN) { |
| @@ -418,7 +419,7 @@ static irqreturn_t at91_adc_9x5_interrupt(int irq, void *private) | |||
| 418 | AT91_ADC_IER_YRDY | | 419 | AT91_ADC_IER_YRDY | |
| 419 | AT91_ADC_IER_PRDY; | 420 | AT91_ADC_IER_PRDY; |
| 420 | 421 | ||
| 421 | if (status & st->registers->drdy_mask) | 422 | if (status & GENMASK(st->num_channels - 1, 0)) |
| 422 | handle_adc_eoc_trigger(irq, idev); | 423 | handle_adc_eoc_trigger(irq, idev); |
| 423 | 424 | ||
| 424 | if (status & AT91_ADC_IER_PEN) { | 425 | if (status & AT91_ADC_IER_PEN) { |
| @@ -689,9 +690,10 @@ static int at91_adc_read_raw(struct iio_dev *idev, | |||
| 689 | case IIO_CHAN_INFO_RAW: | 690 | case IIO_CHAN_INFO_RAW: |
| 690 | mutex_lock(&st->lock); | 691 | mutex_lock(&st->lock); |
| 691 | 692 | ||
| 693 | st->chnb = chan->channel; | ||
| 692 | at91_adc_writel(st, AT91_ADC_CHER, | 694 | at91_adc_writel(st, AT91_ADC_CHER, |
| 693 | AT91_ADC_CH(chan->channel)); | 695 | AT91_ADC_CH(chan->channel)); |
| 694 | at91_adc_writel(st, AT91_ADC_IER, st->registers->drdy_mask); | 696 | at91_adc_writel(st, AT91_ADC_IER, BIT(chan->channel)); |
| 695 | at91_adc_writel(st, AT91_ADC_CR, AT91_ADC_START); | 697 | at91_adc_writel(st, AT91_ADC_CR, AT91_ADC_START); |
| 696 | 698 | ||
| 697 | ret = wait_event_interruptible_timeout(st->wq_data_avail, | 699 | ret = wait_event_interruptible_timeout(st->wq_data_avail, |
| @@ -708,7 +710,7 @@ static int at91_adc_read_raw(struct iio_dev *idev, | |||
| 708 | 710 | ||
| 709 | at91_adc_writel(st, AT91_ADC_CHDR, | 711 | at91_adc_writel(st, AT91_ADC_CHDR, |
| 710 | AT91_ADC_CH(chan->channel)); | 712 | AT91_ADC_CH(chan->channel)); |
| 711 | at91_adc_writel(st, AT91_ADC_IDR, st->registers->drdy_mask); | 713 | at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel)); |
| 712 | 714 | ||
| 713 | st->last_value = 0; | 715 | st->last_value = 0; |
| 714 | st->done = false; | 716 | st->done = false; |
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c index 5d52a3106fac..a221f7329b79 100644 --- a/drivers/iio/adc/xilinx-xadc-core.c +++ b/drivers/iio/adc/xilinx-xadc-core.c | |||
| @@ -1126,7 +1126,7 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np, | |||
| 1126 | chan->address = XADC_REG_VPVN; | 1126 | chan->address = XADC_REG_VPVN; |
| 1127 | } else { | 1127 | } else { |
| 1128 | chan->scan_index = 15 + reg; | 1128 | chan->scan_index = 15 + reg; |
| 1129 | chan->scan_index = XADC_REG_VAUX(reg - 1); | 1129 | chan->address = XADC_REG_VAUX(reg - 1); |
| 1130 | } | 1130 | } |
| 1131 | num_channels++; | 1131 | num_channels++; |
| 1132 | chan++; | 1132 | chan++; |
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index a3109a6f4d86..92068cdbf8c7 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c | |||
| @@ -122,7 +122,8 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, | |||
| 122 | dev_err(&indio_dev->dev, "Trigger Register Failed\n"); | 122 | dev_err(&indio_dev->dev, "Trigger Register Failed\n"); |
| 123 | goto error_free_trig; | 123 | goto error_free_trig; |
| 124 | } | 124 | } |
| 125 | indio_dev->trig = attrb->trigger = trig; | 125 | attrb->trigger = trig; |
| 126 | indio_dev->trig = iio_trigger_get(trig); | ||
| 126 | 127 | ||
| 127 | return ret; | 128 | return ret; |
| 128 | 129 | ||
diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index 8fc3a97eb266..8d8ca6f1e16a 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c | |||
| @@ -49,7 +49,7 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | |||
| 49 | dev_err(&indio_dev->dev, "failed to register iio trigger.\n"); | 49 | dev_err(&indio_dev->dev, "failed to register iio trigger.\n"); |
| 50 | goto iio_trigger_register_error; | 50 | goto iio_trigger_register_error; |
| 51 | } | 51 | } |
| 52 | indio_dev->trig = sdata->trig; | 52 | indio_dev->trig = iio_trigger_get(sdata->trig); |
| 53 | 53 | ||
| 54 | return 0; | 54 | return 0; |
| 55 | 55 | ||
diff --git a/drivers/iio/gyro/itg3200_buffer.c b/drivers/iio/gyro/itg3200_buffer.c index e3b3c5084070..eef50e91f17c 100644 --- a/drivers/iio/gyro/itg3200_buffer.c +++ b/drivers/iio/gyro/itg3200_buffer.c | |||
| @@ -132,7 +132,7 @@ int itg3200_probe_trigger(struct iio_dev *indio_dev) | |||
| 132 | goto error_free_irq; | 132 | goto error_free_irq; |
| 133 | 133 | ||
| 134 | /* select default trigger */ | 134 | /* select default trigger */ |
| 135 | indio_dev->trig = st->trig; | 135 | indio_dev->trig = iio_trigger_get(st->trig); |
| 136 | 136 | ||
| 137 | return 0; | 137 | return 0; |
| 138 | 138 | ||
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c index 03b9372c1212..926fccea8de0 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | |||
| @@ -135,7 +135,7 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev) | |||
| 135 | ret = iio_trigger_register(st->trig); | 135 | ret = iio_trigger_register(st->trig); |
| 136 | if (ret) | 136 | if (ret) |
| 137 | goto error_free_irq; | 137 | goto error_free_irq; |
| 138 | indio_dev->trig = st->trig; | 138 | indio_dev->trig = iio_trigger_get(st->trig); |
| 139 | 139 | ||
| 140 | return 0; | 140 | return 0; |
| 141 | 141 | ||
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index c7497009d60a..f0846108d006 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c | |||
| @@ -178,7 +178,7 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np, | |||
| 178 | index = of_property_match_string(np, "io-channel-names", | 178 | index = of_property_match_string(np, "io-channel-names", |
| 179 | name); | 179 | name); |
| 180 | chan = of_iio_channel_get(np, index); | 180 | chan = of_iio_channel_get(np, index); |
| 181 | if (!IS_ERR(chan)) | 181 | if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER) |
| 182 | break; | 182 | break; |
| 183 | else if (name && index >= 0) { | 183 | else if (name && index >= 0) { |
| 184 | pr_err("ERROR: could not get IIO channel %s:%s(%i)\n", | 184 | pr_err("ERROR: could not get IIO channel %s:%s(%i)\n", |
diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index a4b64130ac2f..68cae86dbd29 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c | |||
| @@ -42,7 +42,8 @@ | |||
| 42 | #define ST_MAGN_FS_AVL_5600MG 5600 | 42 | #define ST_MAGN_FS_AVL_5600MG 5600 |
| 43 | #define ST_MAGN_FS_AVL_8000MG 8000 | 43 | #define ST_MAGN_FS_AVL_8000MG 8000 |
| 44 | #define ST_MAGN_FS_AVL_8100MG 8100 | 44 | #define ST_MAGN_FS_AVL_8100MG 8100 |
| 45 | #define ST_MAGN_FS_AVL_10000MG 10000 | 45 | #define ST_MAGN_FS_AVL_12000MG 12000 |
| 46 | #define ST_MAGN_FS_AVL_16000MG 16000 | ||
| 46 | 47 | ||
| 47 | /* CUSTOM VALUES FOR SENSOR 1 */ | 48 | /* CUSTOM VALUES FOR SENSOR 1 */ |
| 48 | #define ST_MAGN_1_WAI_EXP 0x3c | 49 | #define ST_MAGN_1_WAI_EXP 0x3c |
| @@ -69,20 +70,20 @@ | |||
| 69 | #define ST_MAGN_1_FS_AVL_4700_VAL 0x05 | 70 | #define ST_MAGN_1_FS_AVL_4700_VAL 0x05 |
| 70 | #define ST_MAGN_1_FS_AVL_5600_VAL 0x06 | 71 | #define ST_MAGN_1_FS_AVL_5600_VAL 0x06 |
| 71 | #define ST_MAGN_1_FS_AVL_8100_VAL 0x07 | 72 | #define ST_MAGN_1_FS_AVL_8100_VAL 0x07 |
| 72 | #define ST_MAGN_1_FS_AVL_1300_GAIN_XY 1100 | 73 | #define ST_MAGN_1_FS_AVL_1300_GAIN_XY 909 |
| 73 | #define ST_MAGN_1_FS_AVL_1900_GAIN_XY 855 | 74 | #define ST_MAGN_1_FS_AVL_1900_GAIN_XY 1169 |
| 74 | #define ST_MAGN_1_FS_AVL_2500_GAIN_XY 670 | 75 | #define ST_MAGN_1_FS_AVL_2500_GAIN_XY 1492 |
| 75 | #define ST_MAGN_1_FS_AVL_4000_GAIN_XY 450 | 76 | #define ST_MAGN_1_FS_AVL_4000_GAIN_XY 2222 |
| 76 | #define ST_MAGN_1_FS_AVL_4700_GAIN_XY 400 | 77 | #define ST_MAGN_1_FS_AVL_4700_GAIN_XY 2500 |
| 77 | #define ST_MAGN_1_FS_AVL_5600_GAIN_XY 330 | 78 | #define ST_MAGN_1_FS_AVL_5600_GAIN_XY 3030 |
| 78 | #define ST_MAGN_1_FS_AVL_8100_GAIN_XY 230 | 79 | #define ST_MAGN_1_FS_AVL_8100_GAIN_XY 4347 |
| 79 | #define ST_MAGN_1_FS_AVL_1300_GAIN_Z 980 | 80 | #define ST_MAGN_1_FS_AVL_1300_GAIN_Z 1020 |
| 80 | #define ST_MAGN_1_FS_AVL_1900_GAIN_Z 760 | 81 | #define ST_MAGN_1_FS_AVL_1900_GAIN_Z 1315 |
| 81 | #define ST_MAGN_1_FS_AVL_2500_GAIN_Z 600 | 82 | #define ST_MAGN_1_FS_AVL_2500_GAIN_Z 1666 |
| 82 | #define ST_MAGN_1_FS_AVL_4000_GAIN_Z 400 | 83 | #define ST_MAGN_1_FS_AVL_4000_GAIN_Z 2500 |
| 83 | #define ST_MAGN_1_FS_AVL_4700_GAIN_Z 355 | 84 | #define ST_MAGN_1_FS_AVL_4700_GAIN_Z 2816 |
| 84 | #define ST_MAGN_1_FS_AVL_5600_GAIN_Z 295 | 85 | #define ST_MAGN_1_FS_AVL_5600_GAIN_Z 3389 |
| 85 | #define ST_MAGN_1_FS_AVL_8100_GAIN_Z 205 | 86 | #define ST_MAGN_1_FS_AVL_8100_GAIN_Z 4878 |
| 86 | #define ST_MAGN_1_MULTIREAD_BIT false | 87 | #define ST_MAGN_1_MULTIREAD_BIT false |
| 87 | 88 | ||
| 88 | /* CUSTOM VALUES FOR SENSOR 2 */ | 89 | /* CUSTOM VALUES FOR SENSOR 2 */ |
| @@ -105,10 +106,12 @@ | |||
| 105 | #define ST_MAGN_2_FS_MASK 0x60 | 106 | #define ST_MAGN_2_FS_MASK 0x60 |
| 106 | #define ST_MAGN_2_FS_AVL_4000_VAL 0x00 | 107 | #define ST_MAGN_2_FS_AVL_4000_VAL 0x00 |
| 107 | #define ST_MAGN_2_FS_AVL_8000_VAL 0x01 | 108 | #define ST_MAGN_2_FS_AVL_8000_VAL 0x01 |
| 108 | #define ST_MAGN_2_FS_AVL_10000_VAL 0x02 | 109 | #define ST_MAGN_2_FS_AVL_12000_VAL 0x02 |
| 109 | #define ST_MAGN_2_FS_AVL_4000_GAIN 430 | 110 | #define ST_MAGN_2_FS_AVL_16000_VAL 0x03 |
| 110 | #define ST_MAGN_2_FS_AVL_8000_GAIN 230 | 111 | #define ST_MAGN_2_FS_AVL_4000_GAIN 146 |
| 111 | #define ST_MAGN_2_FS_AVL_10000_GAIN 230 | 112 | #define ST_MAGN_2_FS_AVL_8000_GAIN 292 |
| 113 | #define ST_MAGN_2_FS_AVL_12000_GAIN 438 | ||
| 114 | #define ST_MAGN_2_FS_AVL_16000_GAIN 584 | ||
| 112 | #define ST_MAGN_2_MULTIREAD_BIT false | 115 | #define ST_MAGN_2_MULTIREAD_BIT false |
| 113 | #define ST_MAGN_2_OUT_X_L_ADDR 0x28 | 116 | #define ST_MAGN_2_OUT_X_L_ADDR 0x28 |
| 114 | #define ST_MAGN_2_OUT_Y_L_ADDR 0x2a | 117 | #define ST_MAGN_2_OUT_Y_L_ADDR 0x2a |
| @@ -266,9 +269,14 @@ static const struct st_sensors st_magn_sensors[] = { | |||
| 266 | .gain = ST_MAGN_2_FS_AVL_8000_GAIN, | 269 | .gain = ST_MAGN_2_FS_AVL_8000_GAIN, |
| 267 | }, | 270 | }, |
| 268 | [2] = { | 271 | [2] = { |
| 269 | .num = ST_MAGN_FS_AVL_10000MG, | 272 | .num = ST_MAGN_FS_AVL_12000MG, |
| 270 | .value = ST_MAGN_2_FS_AVL_10000_VAL, | 273 | .value = ST_MAGN_2_FS_AVL_12000_VAL, |
| 271 | .gain = ST_MAGN_2_FS_AVL_10000_GAIN, | 274 | .gain = ST_MAGN_2_FS_AVL_12000_GAIN, |
| 275 | }, | ||
| 276 | [3] = { | ||
| 277 | .num = ST_MAGN_FS_AVL_16000MG, | ||
| 278 | .value = ST_MAGN_2_FS_AVL_16000_VAL, | ||
| 279 | .gain = ST_MAGN_2_FS_AVL_16000_GAIN, | ||
| 272 | }, | 280 | }, |
| 273 | }, | 281 | }, |
| 274 | }, | 282 | }, |
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index d4c7928a0f36..da8ff124762a 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
| @@ -586,17 +586,12 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) | |||
| 586 | init_completion(&isert_conn->conn_wait); | 586 | init_completion(&isert_conn->conn_wait); |
| 587 | init_completion(&isert_conn->conn_wait_comp_err); | 587 | init_completion(&isert_conn->conn_wait_comp_err); |
| 588 | kref_init(&isert_conn->conn_kref); | 588 | kref_init(&isert_conn->conn_kref); |
| 589 | kref_get(&isert_conn->conn_kref); | ||
| 590 | mutex_init(&isert_conn->conn_mutex); | 589 | mutex_init(&isert_conn->conn_mutex); |
| 591 | spin_lock_init(&isert_conn->conn_lock); | 590 | spin_lock_init(&isert_conn->conn_lock); |
| 592 | INIT_LIST_HEAD(&isert_conn->conn_fr_pool); | 591 | INIT_LIST_HEAD(&isert_conn->conn_fr_pool); |
| 593 | 592 | ||
| 594 | cma_id->context = isert_conn; | 593 | cma_id->context = isert_conn; |
| 595 | isert_conn->conn_cm_id = cma_id; | 594 | isert_conn->conn_cm_id = cma_id; |
| 596 | isert_conn->responder_resources = event->param.conn.responder_resources; | ||
| 597 | isert_conn->initiator_depth = event->param.conn.initiator_depth; | ||
| 598 | pr_debug("Using responder_resources: %u initiator_depth: %u\n", | ||
| 599 | isert_conn->responder_resources, isert_conn->initiator_depth); | ||
| 600 | 595 | ||
| 601 | isert_conn->login_buf = kzalloc(ISCSI_DEF_MAX_RECV_SEG_LEN + | 596 | isert_conn->login_buf = kzalloc(ISCSI_DEF_MAX_RECV_SEG_LEN + |
| 602 | ISER_RX_LOGIN_SIZE, GFP_KERNEL); | 597 | ISER_RX_LOGIN_SIZE, GFP_KERNEL); |
| @@ -643,6 +638,12 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) | |||
| 643 | goto out_rsp_dma_map; | 638 | goto out_rsp_dma_map; |
| 644 | } | 639 | } |
| 645 | 640 | ||
| 641 | /* Set max inflight RDMA READ requests */ | ||
| 642 | isert_conn->initiator_depth = min_t(u8, | ||
| 643 | event->param.conn.initiator_depth, | ||
| 644 | device->dev_attr.max_qp_init_rd_atom); | ||
| 645 | pr_debug("Using initiator_depth: %u\n", isert_conn->initiator_depth); | ||
| 646 | |||
| 646 | isert_conn->conn_device = device; | 647 | isert_conn->conn_device = device; |
| 647 | isert_conn->conn_pd = ib_alloc_pd(isert_conn->conn_device->ib_device); | 648 | isert_conn->conn_pd = ib_alloc_pd(isert_conn->conn_device->ib_device); |
| 648 | if (IS_ERR(isert_conn->conn_pd)) { | 649 | if (IS_ERR(isert_conn->conn_pd)) { |
| @@ -746,7 +747,9 @@ isert_connect_release(struct isert_conn *isert_conn) | |||
| 746 | static void | 747 | static void |
| 747 | isert_connected_handler(struct rdma_cm_id *cma_id) | 748 | isert_connected_handler(struct rdma_cm_id *cma_id) |
| 748 | { | 749 | { |
| 749 | return; | 750 | struct isert_conn *isert_conn = cma_id->context; |
| 751 | |||
| 752 | kref_get(&isert_conn->conn_kref); | ||
| 750 | } | 753 | } |
| 751 | 754 | ||
| 752 | static void | 755 | static void |
| @@ -798,7 +801,6 @@ isert_disconnect_work(struct work_struct *work) | |||
| 798 | 801 | ||
| 799 | wake_up: | 802 | wake_up: |
| 800 | complete(&isert_conn->conn_wait); | 803 | complete(&isert_conn->conn_wait); |
| 801 | isert_put_conn(isert_conn); | ||
| 802 | } | 804 | } |
| 803 | 805 | ||
| 804 | static void | 806 | static void |
| @@ -3067,7 +3069,6 @@ isert_rdma_accept(struct isert_conn *isert_conn) | |||
| 3067 | int ret; | 3069 | int ret; |
| 3068 | 3070 | ||
| 3069 | memset(&cp, 0, sizeof(struct rdma_conn_param)); | 3071 | memset(&cp, 0, sizeof(struct rdma_conn_param)); |
| 3070 | cp.responder_resources = isert_conn->responder_resources; | ||
| 3071 | cp.initiator_depth = isert_conn->initiator_depth; | 3072 | cp.initiator_depth = isert_conn->initiator_depth; |
| 3072 | cp.retry_count = 7; | 3073 | cp.retry_count = 7; |
| 3073 | cp.rnr_retry_count = 7; | 3074 | cp.rnr_retry_count = 7; |
| @@ -3215,7 +3216,7 @@ static void isert_wait_conn(struct iscsi_conn *conn) | |||
| 3215 | pr_debug("isert_wait_conn: Starting \n"); | 3216 | pr_debug("isert_wait_conn: Starting \n"); |
| 3216 | 3217 | ||
| 3217 | mutex_lock(&isert_conn->conn_mutex); | 3218 | mutex_lock(&isert_conn->conn_mutex); |
| 3218 | if (isert_conn->conn_cm_id) { | 3219 | if (isert_conn->conn_cm_id && !isert_conn->disconnect) { |
| 3219 | pr_debug("Calling rdma_disconnect from isert_wait_conn\n"); | 3220 | pr_debug("Calling rdma_disconnect from isert_wait_conn\n"); |
| 3220 | rdma_disconnect(isert_conn->conn_cm_id); | 3221 | rdma_disconnect(isert_conn->conn_cm_id); |
| 3221 | } | 3222 | } |
| @@ -3234,6 +3235,7 @@ static void isert_wait_conn(struct iscsi_conn *conn) | |||
| 3234 | wait_for_completion(&isert_conn->conn_wait_comp_err); | 3235 | wait_for_completion(&isert_conn->conn_wait_comp_err); |
| 3235 | 3236 | ||
| 3236 | wait_for_completion(&isert_conn->conn_wait); | 3237 | wait_for_completion(&isert_conn->conn_wait); |
| 3238 | isert_put_conn(isert_conn); | ||
| 3237 | } | 3239 | } |
| 3238 | 3240 | ||
| 3239 | static void isert_free_conn(struct iscsi_conn *conn) | 3241 | static void isert_free_conn(struct iscsi_conn *conn) |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 2dd1d0dd4f7d..6f5d79569136 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
| @@ -1791,14 +1791,6 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { | |||
| 1791 | { | 1791 | { |
| 1792 | .matches = { | 1792 | .matches = { |
| 1793 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), | 1793 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), |
| 1794 | DMI_MATCH(DMI_PRODUCT_NAME, "LW25-B7HV"), | ||
| 1795 | }, | ||
| 1796 | .callback = atkbd_deactivate_fixup, | ||
| 1797 | }, | ||
| 1798 | { | ||
| 1799 | .matches = { | ||
| 1800 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), | ||
| 1801 | DMI_MATCH(DMI_PRODUCT_NAME, "P1-J273B"), | ||
| 1802 | }, | 1794 | }, |
| 1803 | .callback = atkbd_deactivate_fixup, | 1795 | .callback = atkbd_deactivate_fixup, |
| 1804 | }, | 1796 | }, |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 136b7b204f56..713e3ddb43bd 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
| @@ -465,6 +465,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { | |||
| 465 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), | 465 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), |
| 466 | }, | 466 | }, |
| 467 | }, | 467 | }, |
| 468 | { | ||
| 469 | /* Avatar AVIU-145A6 */ | ||
| 470 | .matches = { | ||
| 471 | DMI_MATCH(DMI_SYS_VENDOR, "Intel"), | ||
| 472 | DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"), | ||
| 473 | }, | ||
| 474 | }, | ||
| 468 | { } | 475 | { } |
| 469 | }; | 476 | }; |
| 470 | 477 | ||
| @@ -608,6 +615,14 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = { | |||
| 608 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), | 615 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), |
| 609 | }, | 616 | }, |
| 610 | }, | 617 | }, |
| 618 | { | ||
| 619 | /* Fujitsu U574 laptop */ | ||
| 620 | /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ | ||
| 621 | .matches = { | ||
| 622 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
| 623 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U574"), | ||
| 624 | }, | ||
| 625 | }, | ||
| 611 | { } | 626 | { } |
| 612 | }; | 627 | }; |
| 613 | 628 | ||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 3807c3e971cc..f5a98af3b325 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
| @@ -1254,6 +1254,8 @@ static int __init i8042_create_aux_port(int idx) | |||
| 1254 | } else { | 1254 | } else { |
| 1255 | snprintf(serio->name, sizeof(serio->name), "i8042 AUX%d port", idx); | 1255 | snprintf(serio->name, sizeof(serio->name), "i8042 AUX%d port", idx); |
| 1256 | snprintf(serio->phys, sizeof(serio->phys), I8042_MUX_PHYS_DESC, idx + 1); | 1256 | snprintf(serio->phys, sizeof(serio->phys), I8042_MUX_PHYS_DESC, idx + 1); |
| 1257 | strlcpy(serio->firmware_id, i8042_aux_firmware_id, | ||
| 1258 | sizeof(serio->firmware_id)); | ||
| 1257 | } | 1259 | } |
| 1258 | 1260 | ||
| 1259 | port->serio = serio; | 1261 | port->serio = serio; |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index f60bad491eb6..3c89fcbc621e 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
| @@ -182,7 +182,6 @@ config MEDIA_SUBDRV_AUTOSELECT | |||
| 182 | depends on HAS_IOMEM | 182 | depends on HAS_IOMEM |
| 183 | select I2C | 183 | select I2C |
| 184 | select I2C_MUX | 184 | select I2C_MUX |
| 185 | select SPI | ||
| 186 | default y | 185 | default y |
| 187 | help | 186 | help |
| 188 | By default, a media driver auto-selects all possible ancillary | 187 | By default, a media driver auto-selects all possible ancillary |
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h index 5135a096bfa6..12ce19c98ded 100644 --- a/drivers/media/dvb-core/dvb-usb-ids.h +++ b/drivers/media/dvb-core/dvb-usb-ids.h | |||
| @@ -280,6 +280,8 @@ | |||
| 280 | #define USB_PID_PCTV_400E 0x020f | 280 | #define USB_PID_PCTV_400E 0x020f |
| 281 | #define USB_PID_PCTV_450E 0x0222 | 281 | #define USB_PID_PCTV_450E 0x0222 |
| 282 | #define USB_PID_PCTV_452E 0x021f | 282 | #define USB_PID_PCTV_452E 0x021f |
| 283 | #define USB_PID_PCTV_78E 0x025a | ||
| 284 | #define USB_PID_PCTV_79E 0x0262 | ||
| 283 | #define USB_PID_REALTEK_RTL2831U 0x2831 | 285 | #define USB_PID_REALTEK_RTL2831U 0x2831 |
| 284 | #define USB_PID_REALTEK_RTL2832U 0x2832 | 286 | #define USB_PID_REALTEK_RTL2832U 0x2832 |
| 285 | #define USB_PID_TECHNOTREND_CONNECT_S2_3600 0x3007 | 287 | #define USB_PID_TECHNOTREND_CONNECT_S2_3600 0x3007 |
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index be4bec2a9640..5c90ea683a7e 100644 --- a/drivers/media/dvb-frontends/af9033.c +++ b/drivers/media/dvb-frontends/af9033.c | |||
| @@ -314,6 +314,19 @@ static int af9033_init(struct dvb_frontend *fe) | |||
| 314 | goto err; | 314 | goto err; |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | /* feed clock to RF tuner */ | ||
| 318 | switch (state->cfg.tuner) { | ||
| 319 | case AF9033_TUNER_IT9135_38: | ||
| 320 | case AF9033_TUNER_IT9135_51: | ||
| 321 | case AF9033_TUNER_IT9135_52: | ||
| 322 | case AF9033_TUNER_IT9135_60: | ||
| 323 | case AF9033_TUNER_IT9135_61: | ||
| 324 | case AF9033_TUNER_IT9135_62: | ||
| 325 | ret = af9033_wr_reg(state, 0x80fba8, 0x00); | ||
| 326 | if (ret < 0) | ||
| 327 | goto err; | ||
| 328 | } | ||
| 329 | |||
| 317 | /* settings for TS interface */ | 330 | /* settings for TS interface */ |
| 318 | if (state->cfg.ts_mode == AF9033_TS_MODE_USB) { | 331 | if (state->cfg.ts_mode == AF9033_TS_MODE_USB) { |
| 319 | ret = af9033_wr_reg_mask(state, 0x80f9a5, 0x00, 0x01); | 332 | ret = af9033_wr_reg_mask(state, 0x80f9a5, 0x00, 0x01); |
diff --git a/drivers/media/dvb-frontends/af9033_priv.h b/drivers/media/dvb-frontends/af9033_priv.h index fc2ad581e302..ded7b67d7526 100644 --- a/drivers/media/dvb-frontends/af9033_priv.h +++ b/drivers/media/dvb-frontends/af9033_priv.h | |||
| @@ -1418,7 +1418,7 @@ static const struct reg_val tuner_init_it9135_60[] = { | |||
| 1418 | { 0x800068, 0x0a }, | 1418 | { 0x800068, 0x0a }, |
| 1419 | { 0x80006a, 0x03 }, | 1419 | { 0x80006a, 0x03 }, |
| 1420 | { 0x800070, 0x0a }, | 1420 | { 0x800070, 0x0a }, |
| 1421 | { 0x800071, 0x05 }, | 1421 | { 0x800071, 0x0a }, |
| 1422 | { 0x800072, 0x02 }, | 1422 | { 0x800072, 0x02 }, |
| 1423 | { 0x800075, 0x8c }, | 1423 | { 0x800075, 0x8c }, |
| 1424 | { 0x800076, 0x8c }, | 1424 | { 0x800076, 0x8c }, |
| @@ -1484,7 +1484,6 @@ static const struct reg_val tuner_init_it9135_60[] = { | |||
| 1484 | { 0x800104, 0x02 }, | 1484 | { 0x800104, 0x02 }, |
| 1485 | { 0x800105, 0xbe }, | 1485 | { 0x800105, 0xbe }, |
| 1486 | { 0x800106, 0x00 }, | 1486 | { 0x800106, 0x00 }, |
| 1487 | { 0x800109, 0x02 }, | ||
| 1488 | { 0x800115, 0x0a }, | 1487 | { 0x800115, 0x0a }, |
| 1489 | { 0x800116, 0x03 }, | 1488 | { 0x800116, 0x03 }, |
| 1490 | { 0x80011a, 0xbe }, | 1489 | { 0x80011a, 0xbe }, |
| @@ -1510,7 +1509,6 @@ static const struct reg_val tuner_init_it9135_60[] = { | |||
| 1510 | { 0x80014b, 0x8c }, | 1509 | { 0x80014b, 0x8c }, |
| 1511 | { 0x80014d, 0xac }, | 1510 | { 0x80014d, 0xac }, |
| 1512 | { 0x80014e, 0xc6 }, | 1511 | { 0x80014e, 0xc6 }, |
| 1513 | { 0x80014f, 0x03 }, | ||
| 1514 | { 0x800151, 0x1e }, | 1512 | { 0x800151, 0x1e }, |
| 1515 | { 0x800153, 0xbc }, | 1513 | { 0x800153, 0xbc }, |
| 1516 | { 0x800178, 0x09 }, | 1514 | { 0x800178, 0x09 }, |
| @@ -1522,9 +1520,10 @@ static const struct reg_val tuner_init_it9135_60[] = { | |||
| 1522 | { 0x80018d, 0x5f }, | 1520 | { 0x80018d, 0x5f }, |
| 1523 | { 0x80018f, 0xa0 }, | 1521 | { 0x80018f, 0xa0 }, |
| 1524 | { 0x800190, 0x5a }, | 1522 | { 0x800190, 0x5a }, |
| 1525 | { 0x80ed02, 0xff }, | 1523 | { 0x800191, 0x00 }, |
| 1526 | { 0x80ee42, 0xff }, | 1524 | { 0x80ed02, 0x40 }, |
| 1527 | { 0x80ee82, 0xff }, | 1525 | { 0x80ee42, 0x40 }, |
| 1526 | { 0x80ee82, 0x40 }, | ||
| 1528 | { 0x80f000, 0x0f }, | 1527 | { 0x80f000, 0x0f }, |
| 1529 | { 0x80f01f, 0x8c }, | 1528 | { 0x80f01f, 0x8c }, |
| 1530 | { 0x80f020, 0x00 }, | 1529 | { 0x80f020, 0x00 }, |
| @@ -1699,7 +1698,6 @@ static const struct reg_val tuner_init_it9135_61[] = { | |||
| 1699 | { 0x800104, 0x02 }, | 1698 | { 0x800104, 0x02 }, |
| 1700 | { 0x800105, 0xc8 }, | 1699 | { 0x800105, 0xc8 }, |
| 1701 | { 0x800106, 0x00 }, | 1700 | { 0x800106, 0x00 }, |
| 1702 | { 0x800109, 0x02 }, | ||
| 1703 | { 0x800115, 0x0a }, | 1701 | { 0x800115, 0x0a }, |
| 1704 | { 0x800116, 0x03 }, | 1702 | { 0x800116, 0x03 }, |
| 1705 | { 0x80011a, 0xc6 }, | 1703 | { 0x80011a, 0xc6 }, |
| @@ -1725,7 +1723,6 @@ static const struct reg_val tuner_init_it9135_61[] = { | |||
| 1725 | { 0x80014b, 0x8c }, | 1723 | { 0x80014b, 0x8c }, |
| 1726 | { 0x80014d, 0xa8 }, | 1724 | { 0x80014d, 0xa8 }, |
| 1727 | { 0x80014e, 0xc6 }, | 1725 | { 0x80014e, 0xc6 }, |
| 1728 | { 0x80014f, 0x03 }, | ||
| 1729 | { 0x800151, 0x28 }, | 1726 | { 0x800151, 0x28 }, |
| 1730 | { 0x800153, 0xcc }, | 1727 | { 0x800153, 0xcc }, |
| 1731 | { 0x800178, 0x09 }, | 1728 | { 0x800178, 0x09 }, |
| @@ -1737,9 +1734,10 @@ static const struct reg_val tuner_init_it9135_61[] = { | |||
| 1737 | { 0x80018d, 0x5f }, | 1734 | { 0x80018d, 0x5f }, |
| 1738 | { 0x80018f, 0xfb }, | 1735 | { 0x80018f, 0xfb }, |
| 1739 | { 0x800190, 0x5c }, | 1736 | { 0x800190, 0x5c }, |
| 1740 | { 0x80ed02, 0xff }, | 1737 | { 0x800191, 0x00 }, |
| 1741 | { 0x80ee42, 0xff }, | 1738 | { 0x80ed02, 0x40 }, |
| 1742 | { 0x80ee82, 0xff }, | 1739 | { 0x80ee42, 0x40 }, |
| 1740 | { 0x80ee82, 0x40 }, | ||
| 1743 | { 0x80f000, 0x0f }, | 1741 | { 0x80f000, 0x0f }, |
| 1744 | { 0x80f01f, 0x8c }, | 1742 | { 0x80f01f, 0x8c }, |
| 1745 | { 0x80f020, 0x00 }, | 1743 | { 0x80f020, 0x00 }, |
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 1eaf975d3612..62acb10630f9 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c | |||
| @@ -1282,19 +1282,12 @@ static int smiapp_set_power(struct v4l2_subdev *subdev, int on) | |||
| 1282 | 1282 | ||
| 1283 | mutex_lock(&sensor->power_mutex); | 1283 | mutex_lock(&sensor->power_mutex); |
| 1284 | 1284 | ||
| 1285 | /* | 1285 | if (on && !sensor->power_count) { |
| 1286 | * If the power count is modified from 0 to != 0 or from != 0 | ||
| 1287 | * to 0, update the power state. | ||
| 1288 | */ | ||
| 1289 | if (!sensor->power_count == !on) | ||
| 1290 | goto out; | ||
| 1291 | |||
| 1292 | if (on) { | ||
| 1293 | /* Power on and perform initialisation. */ | 1286 | /* Power on and perform initialisation. */ |
| 1294 | ret = smiapp_power_on(sensor); | 1287 | ret = smiapp_power_on(sensor); |
| 1295 | if (ret < 0) | 1288 | if (ret < 0) |
| 1296 | goto out; | 1289 | goto out; |
| 1297 | } else { | 1290 | } else if (!on && sensor->power_count == 1) { |
| 1298 | smiapp_power_off(sensor); | 1291 | smiapp_power_off(sensor); |
| 1299 | } | 1292 | } |
| 1300 | 1293 | ||
| @@ -2572,7 +2565,7 @@ static int smiapp_registered(struct v4l2_subdev *subdev) | |||
| 2572 | 2565 | ||
| 2573 | this->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; | 2566 | this->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; |
| 2574 | this->sd.internal_ops = &smiapp_internal_ops; | 2567 | this->sd.internal_ops = &smiapp_internal_ops; |
| 2575 | this->sd.owner = NULL; | 2568 | this->sd.owner = THIS_MODULE; |
| 2576 | v4l2_set_subdevdata(&this->sd, client); | 2569 | v4l2_set_subdevdata(&this->sd, client); |
| 2577 | 2570 | ||
| 2578 | rval = media_entity_init(&this->sd.entity, | 2571 | rval = media_entity_init(&this->sd.entity, |
diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c index 716bdc57fac6..83f5074706f9 100644 --- a/drivers/media/pci/cx18/cx18-driver.c +++ b/drivers/media/pci/cx18/cx18-driver.c | |||
| @@ -1091,6 +1091,7 @@ static int cx18_probe(struct pci_dev *pci_dev, | |||
| 1091 | setup.addr = ADDR_UNSET; | 1091 | setup.addr = ADDR_UNSET; |
| 1092 | setup.type = cx->options.tuner; | 1092 | setup.type = cx->options.tuner; |
| 1093 | setup.mode_mask = T_ANALOG_TV; /* matches TV tuners */ | 1093 | setup.mode_mask = T_ANALOG_TV; /* matches TV tuners */ |
| 1094 | setup.config = NULL; | ||
| 1094 | if (cx->options.radio > 0) | 1095 | if (cx->options.radio > 0) |
| 1095 | setup.mode_mask |= T_RADIO; | 1096 | setup.mode_mask |= T_RADIO; |
| 1096 | setup.tuner_callback = (setup.type == TUNER_XC2028) ? | 1097 | setup.tuner_callback = (setup.type == TUNER_XC2028) ? |
diff --git a/drivers/media/tuners/tuner_it913x.c b/drivers/media/tuners/tuner_it913x.c index 6f30d7e535b8..3d83c425bccf 100644 --- a/drivers/media/tuners/tuner_it913x.c +++ b/drivers/media/tuners/tuner_it913x.c | |||
| @@ -396,6 +396,7 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe, | |||
| 396 | struct i2c_adapter *i2c_adap, u8 i2c_addr, u8 config) | 396 | struct i2c_adapter *i2c_adap, u8 i2c_addr, u8 config) |
| 397 | { | 397 | { |
| 398 | struct it913x_state *state = NULL; | 398 | struct it913x_state *state = NULL; |
| 399 | int ret; | ||
| 399 | 400 | ||
| 400 | /* allocate memory for the internal state */ | 401 | /* allocate memory for the internal state */ |
| 401 | state = kzalloc(sizeof(struct it913x_state), GFP_KERNEL); | 402 | state = kzalloc(sizeof(struct it913x_state), GFP_KERNEL); |
| @@ -425,6 +426,11 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe, | |||
| 425 | state->tuner_type = config; | 426 | state->tuner_type = config; |
| 426 | state->firmware_ver = 1; | 427 | state->firmware_ver = 1; |
| 427 | 428 | ||
| 429 | /* tuner RF initial */ | ||
| 430 | ret = it913x_wr_reg(state, PRO_DMOD, 0xec4c, 0x68); | ||
| 431 | if (ret < 0) | ||
| 432 | goto error; | ||
| 433 | |||
| 428 | fe->tuner_priv = state; | 434 | fe->tuner_priv = state; |
| 429 | memcpy(&fe->ops.tuner_ops, &it913x_tuner_ops, | 435 | memcpy(&fe->ops.tuner_ops, &it913x_tuner_ops, |
| 430 | sizeof(struct dvb_tuner_ops)); | 436 | sizeof(struct dvb_tuner_ops)); |
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 75ec1c659fdd..c82beac0e0cb 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c | |||
| @@ -1575,6 +1575,10 @@ static const struct usb_device_id af9035_id_table[] = { | |||
| 1575 | &af9035_props, "Leadtek WinFast DTV Dongle Dual", NULL) }, | 1575 | &af9035_props, "Leadtek WinFast DTV Dongle Dual", NULL) }, |
| 1576 | { DVB_USB_DEVICE(USB_VID_HAUPPAUGE, 0xf900, | 1576 | { DVB_USB_DEVICE(USB_VID_HAUPPAUGE, 0xf900, |
| 1577 | &af9035_props, "Hauppauge WinTV-MiniStick 2", NULL) }, | 1577 | &af9035_props, "Hauppauge WinTV-MiniStick 2", NULL) }, |
| 1578 | { DVB_USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_78E, | ||
| 1579 | &af9035_props, "PCTV 78e", RC_MAP_IT913X_V1) }, | ||
| 1580 | { DVB_USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_79E, | ||
| 1581 | &af9035_props, "PCTV 79e", RC_MAP_IT913X_V2) }, | ||
| 1578 | { } | 1582 | { } |
| 1579 | }; | 1583 | }; |
| 1580 | MODULE_DEVICE_TABLE(usb, af9035_id_table); | 1584 | MODULE_DEVICE_TABLE(usb, af9035_id_table); |
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index a568efaa331c..35fc73a8d0b3 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c | |||
| @@ -49,6 +49,9 @@ struct imx6_pcie { | |||
| 49 | 49 | ||
| 50 | /* PCIe Port Logic registers (memory-mapped) */ | 50 | /* PCIe Port Logic registers (memory-mapped) */ |
| 51 | #define PL_OFFSET 0x700 | 51 | #define PL_OFFSET 0x700 |
| 52 | #define PCIE_PL_PFLR (PL_OFFSET + 0x08) | ||
| 53 | #define PCIE_PL_PFLR_LINK_STATE_MASK (0x3f << 16) | ||
| 54 | #define PCIE_PL_PFLR_FORCE_LINK (1 << 15) | ||
| 52 | #define PCIE_PHY_DEBUG_R0 (PL_OFFSET + 0x28) | 55 | #define PCIE_PHY_DEBUG_R0 (PL_OFFSET + 0x28) |
| 53 | #define PCIE_PHY_DEBUG_R1 (PL_OFFSET + 0x2c) | 56 | #define PCIE_PHY_DEBUG_R1 (PL_OFFSET + 0x2c) |
| 54 | #define PCIE_PHY_DEBUG_R1_XMLH_LINK_IN_TRAINING (1 << 29) | 57 | #define PCIE_PHY_DEBUG_R1_XMLH_LINK_IN_TRAINING (1 << 29) |
| @@ -214,6 +217,32 @@ static int imx6q_pcie_abort_handler(unsigned long addr, | |||
| 214 | static int imx6_pcie_assert_core_reset(struct pcie_port *pp) | 217 | static int imx6_pcie_assert_core_reset(struct pcie_port *pp) |
| 215 | { | 218 | { |
| 216 | struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); | 219 | struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); |
| 220 | u32 val, gpr1, gpr12; | ||
| 221 | |||
| 222 | /* | ||
| 223 | * If the bootloader already enabled the link we need some special | ||
| 224 | * handling to get the core back into a state where it is safe to | ||
| 225 | * touch it for configuration. As there is no dedicated reset signal | ||
| 226 | * wired up for MX6QDL, we need to manually force LTSSM into "detect" | ||
| 227 | * state before completely disabling LTSSM, which is a prerequisite | ||
| 228 | * for core configuration. | ||
| 229 | * | ||
| 230 | * If both LTSSM_ENABLE and REF_SSP_ENABLE are active we have a strong | ||
| 231 | * indication that the bootloader activated the link. | ||
| 232 | */ | ||
| 233 | regmap_read(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, &gpr1); | ||
| 234 | regmap_read(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, &gpr12); | ||
| 235 | |||
| 236 | if ((gpr1 & IMX6Q_GPR1_PCIE_REF_CLK_EN) && | ||
| 237 | (gpr12 & IMX6Q_GPR12_PCIE_CTL_2)) { | ||
| 238 | val = readl(pp->dbi_base + PCIE_PL_PFLR); | ||
| 239 | val &= ~PCIE_PL_PFLR_LINK_STATE_MASK; | ||
| 240 | val |= PCIE_PL_PFLR_FORCE_LINK; | ||
| 241 | writel(val, pp->dbi_base + PCIE_PL_PFLR); | ||
| 242 | |||
| 243 | regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, | ||
| 244 | IMX6Q_GPR12_PCIE_CTL_2, 0 << 10); | ||
| 245 | } | ||
| 217 | 246 | ||
| 218 | regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, | 247 | regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, |
| 219 | IMX6Q_GPR1_PCIE_TEST_PD, 1 << 18); | 248 | IMX6Q_GPR1_PCIE_TEST_PD, 1 << 18); |
| @@ -589,6 +618,14 @@ static int __init imx6_pcie_probe(struct platform_device *pdev) | |||
| 589 | return 0; | 618 | return 0; |
| 590 | } | 619 | } |
| 591 | 620 | ||
| 621 | static void imx6_pcie_shutdown(struct platform_device *pdev) | ||
| 622 | { | ||
| 623 | struct imx6_pcie *imx6_pcie = platform_get_drvdata(pdev); | ||
| 624 | |||
| 625 | /* bring down link, so bootloader gets clean state in case of reboot */ | ||
| 626 | imx6_pcie_assert_core_reset(&imx6_pcie->pp); | ||
| 627 | } | ||
| 628 | |||
| 592 | static const struct of_device_id imx6_pcie_of_match[] = { | 629 | static const struct of_device_id imx6_pcie_of_match[] = { |
| 593 | { .compatible = "fsl,imx6q-pcie", }, | 630 | { .compatible = "fsl,imx6q-pcie", }, |
| 594 | {}, | 631 | {}, |
| @@ -601,6 +638,7 @@ static struct platform_driver imx6_pcie_driver = { | |||
| 601 | .owner = THIS_MODULE, | 638 | .owner = THIS_MODULE, |
| 602 | .of_match_table = imx6_pcie_of_match, | 639 | .of_match_table = imx6_pcie_of_match, |
| 603 | }, | 640 | }, |
| 641 | .shutdown = imx6_pcie_shutdown, | ||
| 604 | }; | 642 | }; |
| 605 | 643 | ||
| 606 | /* Freescale PCIe driver does not allow module unload */ | 644 | /* Freescale PCIe driver does not allow module unload */ |
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 70741c8c46a0..6cd5160fc057 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
| @@ -560,19 +560,15 @@ static void disable_slot(struct acpiphp_slot *slot) | |||
| 560 | slot->flags &= (~SLOT_ENABLED); | 560 | slot->flags &= (~SLOT_ENABLED); |
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | static bool acpiphp_no_hotplug(struct acpi_device *adev) | ||
| 564 | { | ||
| 565 | return adev && adev->flags.no_hotplug; | ||
| 566 | } | ||
| 567 | |||
| 568 | static bool slot_no_hotplug(struct acpiphp_slot *slot) | 563 | static bool slot_no_hotplug(struct acpiphp_slot *slot) |
| 569 | { | 564 | { |
| 570 | struct acpiphp_func *func; | 565 | struct pci_bus *bus = slot->bus; |
| 566 | struct pci_dev *dev; | ||
| 571 | 567 | ||
| 572 | list_for_each_entry(func, &slot->funcs, sibling) | 568 | list_for_each_entry(dev, &bus->devices, bus_list) { |
| 573 | if (acpiphp_no_hotplug(func_to_acpi_device(func))) | 569 | if (PCI_SLOT(dev->devfn) == slot->device && dev->ignore_hotplug) |
| 574 | return true; | 570 | return true; |
| 575 | 571 | } | |
| 576 | return false; | 572 | return false; |
| 577 | } | 573 | } |
| 578 | 574 | ||
| @@ -645,7 +641,7 @@ static void trim_stale_devices(struct pci_dev *dev) | |||
| 645 | 641 | ||
| 646 | status = acpi_evaluate_integer(adev->handle, "_STA", NULL, &sta); | 642 | status = acpi_evaluate_integer(adev->handle, "_STA", NULL, &sta); |
| 647 | alive = (ACPI_SUCCESS(status) && device_status_valid(sta)) | 643 | alive = (ACPI_SUCCESS(status) && device_status_valid(sta)) |
| 648 | || acpiphp_no_hotplug(adev); | 644 | || dev->ignore_hotplug; |
| 649 | } | 645 | } |
| 650 | if (!alive) | 646 | if (!alive) |
| 651 | alive = pci_device_is_present(dev); | 647 | alive = pci_device_is_present(dev); |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 9da84b8b27d8..5e01ae39ec46 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
| @@ -506,6 +506,8 @@ static irqreturn_t pcie_isr(int irq, void *dev_id) | |||
| 506 | { | 506 | { |
| 507 | struct controller *ctrl = (struct controller *)dev_id; | 507 | struct controller *ctrl = (struct controller *)dev_id; |
| 508 | struct pci_dev *pdev = ctrl_dev(ctrl); | 508 | struct pci_dev *pdev = ctrl_dev(ctrl); |
| 509 | struct pci_bus *subordinate = pdev->subordinate; | ||
| 510 | struct pci_dev *dev; | ||
| 509 | struct slot *slot = ctrl->slot; | 511 | struct slot *slot = ctrl->slot; |
| 510 | u16 detected, intr_loc; | 512 | u16 detected, intr_loc; |
| 511 | 513 | ||
| @@ -539,6 +541,16 @@ static irqreturn_t pcie_isr(int irq, void *dev_id) | |||
| 539 | wake_up(&ctrl->queue); | 541 | wake_up(&ctrl->queue); |
| 540 | } | 542 | } |
| 541 | 543 | ||
| 544 | if (subordinate) { | ||
| 545 | list_for_each_entry(dev, &subordinate->devices, bus_list) { | ||
| 546 | if (dev->ignore_hotplug) { | ||
| 547 | ctrl_dbg(ctrl, "ignoring hotplug event %#06x (%s requested no hotplug)\n", | ||
| 548 | intr_loc, pci_name(dev)); | ||
| 549 | return IRQ_HANDLED; | ||
| 550 | } | ||
| 551 | } | ||
| 552 | } | ||
| 553 | |||
| 542 | if (!(intr_loc & ~PCI_EXP_SLTSTA_CC)) | 554 | if (!(intr_loc & ~PCI_EXP_SLTSTA_CC)) |
| 543 | return IRQ_HANDLED; | 555 | return IRQ_HANDLED; |
| 544 | 556 | ||
diff --git a/drivers/pci/hotplug/pcihp_slot.c b/drivers/pci/hotplug/pcihp_slot.c index e246a10a0d2c..3e36ec8d708a 100644 --- a/drivers/pci/hotplug/pcihp_slot.c +++ b/drivers/pci/hotplug/pcihp_slot.c | |||
| @@ -46,7 +46,6 @@ static void program_hpp_type0(struct pci_dev *dev, struct hpp_type0 *hpp) | |||
| 46 | */ | 46 | */ |
| 47 | if (pci_is_pcie(dev)) | 47 | if (pci_is_pcie(dev)) |
| 48 | return; | 48 | return; |
| 49 | dev_info(&dev->dev, "using default PCI settings\n"); | ||
| 50 | hpp = &pci_default_type0; | 49 | hpp = &pci_default_type0; |
| 51 | } | 50 | } |
| 52 | 51 | ||
| @@ -153,7 +152,6 @@ void pci_configure_slot(struct pci_dev *dev) | |||
| 153 | { | 152 | { |
| 154 | struct pci_dev *cdev; | 153 | struct pci_dev *cdev; |
| 155 | struct hotplug_params hpp; | 154 | struct hotplug_params hpp; |
| 156 | int ret; | ||
| 157 | 155 | ||
| 158 | if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL || | 156 | if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL || |
| 159 | (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE && | 157 | (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE && |
| @@ -163,9 +161,7 @@ void pci_configure_slot(struct pci_dev *dev) | |||
| 163 | pcie_bus_configure_settings(dev->bus); | 161 | pcie_bus_configure_settings(dev->bus); |
| 164 | 162 | ||
| 165 | memset(&hpp, 0, sizeof(hpp)); | 163 | memset(&hpp, 0, sizeof(hpp)); |
| 166 | ret = pci_get_hp_params(dev, &hpp); | 164 | pci_get_hp_params(dev, &hpp); |
| 167 | if (ret) | ||
| 168 | dev_warn(&dev->dev, "no hotplug settings from platform\n"); | ||
| 169 | 165 | ||
| 170 | program_hpp_type2(dev, hpp.t2); | 166 | program_hpp_type2(dev, hpp.t2); |
| 171 | program_hpp_type1(dev, hpp.t1); | 167 | program_hpp_type1(dev, hpp.t1); |
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 4ff8cbb620d3..f833aa271a2e 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig | |||
| @@ -214,12 +214,14 @@ config PHY_QCOM_IPQ806X_SATA | |||
| 214 | config PHY_ST_SPEAR1310_MIPHY | 214 | config PHY_ST_SPEAR1310_MIPHY |
| 215 | tristate "ST SPEAR1310-MIPHY driver" | 215 | tristate "ST SPEAR1310-MIPHY driver" |
| 216 | select GENERIC_PHY | 216 | select GENERIC_PHY |
| 217 | depends on MACH_SPEAR1310 || COMPILE_TEST | ||
| 217 | help | 218 | help |
| 218 | Support for ST SPEAr1310 MIPHY which can be used for PCIe and SATA. | 219 | Support for ST SPEAr1310 MIPHY which can be used for PCIe and SATA. |
| 219 | 220 | ||
| 220 | config PHY_ST_SPEAR1340_MIPHY | 221 | config PHY_ST_SPEAR1340_MIPHY |
| 221 | tristate "ST SPEAR1340-MIPHY driver" | 222 | tristate "ST SPEAR1340-MIPHY driver" |
| 222 | select GENERIC_PHY | 223 | select GENERIC_PHY |
| 224 | depends on MACH_SPEAR1340 || COMPILE_TEST | ||
| 223 | help | 225 | help |
| 224 | Support for ST SPEAr1340 MIPHY which can be used for PCIe and SATA. | 226 | Support for ST SPEAr1340 MIPHY which can be used for PCIe and SATA. |
| 225 | 227 | ||
diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c index e111baf187ce..e0fb7a1e5a5a 100644 --- a/drivers/phy/phy-miphy365x.c +++ b/drivers/phy/phy-miphy365x.c | |||
| @@ -163,6 +163,7 @@ enum miphy_sata_gen { | |||
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | static u8 rx_tx_spd[] = { | 165 | static u8 rx_tx_spd[] = { |
| 166 | 0, /* GEN0 doesn't exist. */ | ||
| 166 | TX_SPDSEL_GEN1_VAL | RX_SPDSEL_GEN1_VAL, | 167 | TX_SPDSEL_GEN1_VAL | RX_SPDSEL_GEN1_VAL, |
| 167 | TX_SPDSEL_GEN2_VAL | RX_SPDSEL_GEN2_VAL, | 168 | TX_SPDSEL_GEN2_VAL | RX_SPDSEL_GEN2_VAL, |
| 168 | TX_SPDSEL_GEN3_VAL | RX_SPDSEL_GEN3_VAL | 169 | TX_SPDSEL_GEN3_VAL | RX_SPDSEL_GEN3_VAL |
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 337634ad0562..6d77dcd7dcf6 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
| @@ -319,7 +319,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev, | |||
| 319 | struct regulator_config *config) | 319 | struct regulator_config *config) |
| 320 | { | 320 | { |
| 321 | struct device_node *nproot, *np; | 321 | struct device_node *nproot, *np; |
| 322 | nproot = of_node_get(pdev->dev.parent->of_node); | 322 | nproot = pdev->dev.parent->of_node; |
| 323 | if (!nproot) | 323 | if (!nproot) |
| 324 | return -ENODEV; | 324 | return -ENODEV; |
| 325 | nproot = of_get_child_by_name(nproot, "regulators"); | 325 | nproot = of_get_child_by_name(nproot, "regulators"); |
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index fdb6ea8ae7e6..00033625a09c 100644 --- a/drivers/regulator/da9052-regulator.c +++ b/drivers/regulator/da9052-regulator.c | |||
| @@ -422,9 +422,9 @@ static int da9052_regulator_probe(struct platform_device *pdev) | |||
| 422 | config.init_data = pdata->regulators[pdev->id]; | 422 | config.init_data = pdata->regulators[pdev->id]; |
| 423 | } else { | 423 | } else { |
| 424 | #ifdef CONFIG_OF | 424 | #ifdef CONFIG_OF |
| 425 | struct device_node *nproot, *np; | 425 | struct device_node *nproot = da9052->dev->of_node; |
| 426 | struct device_node *np; | ||
| 426 | 427 | ||
| 427 | nproot = of_node_get(da9052->dev->of_node); | ||
| 428 | if (!nproot) | 428 | if (!nproot) |
| 429 | return -ENODEV; | 429 | return -ENODEV; |
| 430 | 430 | ||
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index 9623e9e290bf..3426be89c9f6 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c | |||
| @@ -226,7 +226,7 @@ static int max8907_regulator_parse_dt(struct platform_device *pdev) | |||
| 226 | struct device_node *np, *regulators; | 226 | struct device_node *np, *regulators; |
| 227 | int ret; | 227 | int ret; |
| 228 | 228 | ||
| 229 | np = of_node_get(pdev->dev.parent->of_node); | 229 | np = pdev->dev.parent->of_node; |
| 230 | if (!np) | 230 | if (!np) |
| 231 | return 0; | 231 | return 0; |
| 232 | 232 | ||
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index dad2bcd14e96..7770777befc4 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c | |||
| @@ -250,7 +250,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev, | |||
| 250 | struct device_node *nproot, *np; | 250 | struct device_node *nproot, *np; |
| 251 | int rcount; | 251 | int rcount; |
| 252 | 252 | ||
| 253 | nproot = of_node_get(pdev->dev.parent->of_node); | 253 | nproot = pdev->dev.parent->of_node; |
| 254 | if (!nproot) | 254 | if (!nproot) |
| 255 | return -ENODEV; | 255 | return -ENODEV; |
| 256 | np = of_get_child_by_name(nproot, "regulators"); | 256 | np = of_get_child_by_name(nproot, "regulators"); |
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index 90b4c530dee5..9c31e215a521 100644 --- a/drivers/regulator/max8997.c +++ b/drivers/regulator/max8997.c | |||
| @@ -917,7 +917,7 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev, | |||
| 917 | struct max8997_regulator_data *rdata; | 917 | struct max8997_regulator_data *rdata; |
| 918 | unsigned int i, dvs_voltage_nr = 1, ret; | 918 | unsigned int i, dvs_voltage_nr = 1, ret; |
| 919 | 919 | ||
| 920 | pmic_np = of_node_get(iodev->dev->of_node); | 920 | pmic_np = iodev->dev->of_node; |
| 921 | if (!pmic_np) { | 921 | if (!pmic_np) { |
| 922 | dev_err(&pdev->dev, "could not find pmic sub-node\n"); | 922 | dev_err(&pdev->dev, "could not find pmic sub-node\n"); |
| 923 | return -ENODEV; | 923 | return -ENODEV; |
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index a7ce34d1b5f2..1878e5b567ef 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
| @@ -1427,7 +1427,6 @@ static void palmas_dt_to_pdata(struct device *dev, | |||
| 1427 | u32 prop; | 1427 | u32 prop; |
| 1428 | int idx, ret; | 1428 | int idx, ret; |
| 1429 | 1429 | ||
| 1430 | node = of_node_get(node); | ||
| 1431 | regulators = of_get_child_by_name(node, "regulators"); | 1430 | regulators = of_get_child_by_name(node, "regulators"); |
| 1432 | if (!regulators) { | 1431 | if (!regulators) { |
| 1433 | dev_info(dev, "regulator node not found\n"); | 1432 | dev_info(dev, "regulator node not found\n"); |
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index fa7db8847578..e584c998b55f 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
| @@ -1014,7 +1014,7 @@ static struct tps65910_board *tps65910_parse_dt_reg_data( | |||
| 1014 | if (!pmic_plat_data) | 1014 | if (!pmic_plat_data) |
| 1015 | return NULL; | 1015 | return NULL; |
| 1016 | 1016 | ||
| 1017 | np = of_node_get(pdev->dev.parent->of_node); | 1017 | np = pdev->dev.parent->of_node; |
| 1018 | regulators = of_get_child_by_name(np, "regulators"); | 1018 | regulators = of_get_child_by_name(np, "regulators"); |
| 1019 | if (!regulators) { | 1019 | if (!regulators) { |
| 1020 | dev_err(&pdev->dev, "regulator node not found\n"); | 1020 | dev_err(&pdev->dev, "regulator node not found\n"); |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index ea025e4806b6..191b59793519 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
| @@ -717,11 +717,21 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, | |||
| 717 | return NULL; | 717 | return NULL; |
| 718 | } | 718 | } |
| 719 | 719 | ||
| 720 | if (data_size > ISCSI_DEF_MAX_RECV_SEG_LEN) { | ||
| 721 | iscsi_conn_printk(KERN_ERR, conn, "Invalid buffer len of %u for login task. Max len is %u\n", data_size, ISCSI_DEF_MAX_RECV_SEG_LEN); | ||
| 722 | return NULL; | ||
| 723 | } | ||
| 724 | |||
| 720 | task = conn->login_task; | 725 | task = conn->login_task; |
| 721 | } else { | 726 | } else { |
| 722 | if (session->state != ISCSI_STATE_LOGGED_IN) | 727 | if (session->state != ISCSI_STATE_LOGGED_IN) |
| 723 | return NULL; | 728 | return NULL; |
| 724 | 729 | ||
| 730 | if (data_size != 0) { | ||
| 731 | iscsi_conn_printk(KERN_ERR, conn, "Can not send data buffer of len %u for op 0x%x\n", data_size, opcode); | ||
| 732 | return NULL; | ||
| 733 | } | ||
| 734 | |||
| 725 | BUG_ON(conn->c_stage == ISCSI_CONN_INITIAL_STAGE); | 735 | BUG_ON(conn->c_stage == ISCSI_CONN_INITIAL_STAGE); |
| 726 | BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED); | 736 | BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED); |
| 727 | 737 | ||
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index d837dc180522..aaea4b98af16 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
| @@ -733,12 +733,13 @@ static bool scsi_end_request(struct request *req, int error, | |||
| 733 | } else { | 733 | } else { |
| 734 | unsigned long flags; | 734 | unsigned long flags; |
| 735 | 735 | ||
| 736 | if (bidi_bytes) | ||
| 737 | scsi_release_bidi_buffers(cmd); | ||
| 738 | |||
| 736 | spin_lock_irqsave(q->queue_lock, flags); | 739 | spin_lock_irqsave(q->queue_lock, flags); |
| 737 | blk_finish_request(req, error); | 740 | blk_finish_request(req, error); |
| 738 | spin_unlock_irqrestore(q->queue_lock, flags); | 741 | spin_unlock_irqrestore(q->queue_lock, flags); |
| 739 | 742 | ||
| 740 | if (bidi_bytes) | ||
| 741 | scsi_release_bidi_buffers(cmd); | ||
| 742 | scsi_release_buffers(cmd); | 743 | scsi_release_buffers(cmd); |
| 743 | scsi_next_command(cmd); | 744 | scsi_next_command(cmd); |
| 744 | } | 745 | } |
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 48f1d26e6ad9..134fb6eb7b19 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
| @@ -397,24 +397,21 @@ static int davinci_spi_setup(struct spi_device *spi) | |||
| 397 | struct spi_master *master = spi->master; | 397 | struct spi_master *master = spi->master; |
| 398 | struct device_node *np = spi->dev.of_node; | 398 | struct device_node *np = spi->dev.of_node; |
| 399 | bool internal_cs = true; | 399 | bool internal_cs = true; |
| 400 | unsigned long flags = GPIOF_DIR_OUT; | ||
| 401 | 400 | ||
| 402 | dspi = spi_master_get_devdata(spi->master); | 401 | dspi = spi_master_get_devdata(spi->master); |
| 403 | pdata = &dspi->pdata; | 402 | pdata = &dspi->pdata; |
| 404 | 403 | ||
| 405 | flags |= (spi->mode & SPI_CS_HIGH) ? GPIOF_INIT_LOW : GPIOF_INIT_HIGH; | ||
| 406 | |||
| 407 | if (!(spi->mode & SPI_NO_CS)) { | 404 | if (!(spi->mode & SPI_NO_CS)) { |
| 408 | if (np && (master->cs_gpios != NULL) && (spi->cs_gpio >= 0)) { | 405 | if (np && (master->cs_gpios != NULL) && (spi->cs_gpio >= 0)) { |
| 409 | retval = gpio_request_one(spi->cs_gpio, | 406 | retval = gpio_direction_output( |
| 410 | flags, dev_name(&spi->dev)); | 407 | spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); |
| 411 | internal_cs = false; | 408 | internal_cs = false; |
| 412 | } else if (pdata->chip_sel && | 409 | } else if (pdata->chip_sel && |
| 413 | spi->chip_select < pdata->num_chipselect && | 410 | spi->chip_select < pdata->num_chipselect && |
| 414 | pdata->chip_sel[spi->chip_select] != SPI_INTERN_CS) { | 411 | pdata->chip_sel[spi->chip_select] != SPI_INTERN_CS) { |
| 415 | spi->cs_gpio = pdata->chip_sel[spi->chip_select]; | 412 | spi->cs_gpio = pdata->chip_sel[spi->chip_select]; |
| 416 | retval = gpio_request_one(spi->cs_gpio, | 413 | retval = gpio_direction_output( |
| 417 | flags, dev_name(&spi->dev)); | 414 | spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); |
| 418 | internal_cs = false; | 415 | internal_cs = false; |
| 419 | } | 416 | } |
| 420 | 417 | ||
| @@ -439,12 +436,6 @@ static int davinci_spi_setup(struct spi_device *spi) | |||
| 439 | return retval; | 436 | return retval; |
| 440 | } | 437 | } |
| 441 | 438 | ||
| 442 | static void davinci_spi_cleanup(struct spi_device *spi) | ||
| 443 | { | ||
| 444 | if (spi->cs_gpio >= 0) | ||
| 445 | gpio_free(spi->cs_gpio); | ||
| 446 | } | ||
| 447 | |||
| 448 | static int davinci_spi_check_error(struct davinci_spi *dspi, int int_status) | 439 | static int davinci_spi_check_error(struct davinci_spi *dspi, int int_status) |
| 449 | { | 440 | { |
| 450 | struct device *sdev = dspi->bitbang.master->dev.parent; | 441 | struct device *sdev = dspi->bitbang.master->dev.parent; |
| @@ -956,7 +947,6 @@ static int davinci_spi_probe(struct platform_device *pdev) | |||
| 956 | master->num_chipselect = pdata->num_chipselect; | 947 | master->num_chipselect = pdata->num_chipselect; |
| 957 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16); | 948 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16); |
| 958 | master->setup = davinci_spi_setup; | 949 | master->setup = davinci_spi_setup; |
| 959 | master->cleanup = davinci_spi_cleanup; | ||
| 960 | 950 | ||
| 961 | dspi->bitbang.chipselect = davinci_spi_chipselect; | 951 | dspi->bitbang.chipselect = davinci_spi_chipselect; |
| 962 | dspi->bitbang.setup_transfer = davinci_spi_setup_transfer; | 952 | dspi->bitbang.setup_transfer = davinci_spi_setup_transfer; |
| @@ -967,6 +957,27 @@ static int davinci_spi_probe(struct platform_device *pdev) | |||
| 967 | if (dspi->version == SPI_VERSION_2) | 957 | if (dspi->version == SPI_VERSION_2) |
| 968 | dspi->bitbang.flags |= SPI_READY; | 958 | dspi->bitbang.flags |= SPI_READY; |
| 969 | 959 | ||
| 960 | if (pdev->dev.of_node) { | ||
| 961 | int i; | ||
| 962 | |||
| 963 | for (i = 0; i < pdata->num_chipselect; i++) { | ||
| 964 | int cs_gpio = of_get_named_gpio(pdev->dev.of_node, | ||
| 965 | "cs-gpios", i); | ||
| 966 | |||
| 967 | if (cs_gpio == -EPROBE_DEFER) { | ||
| 968 | ret = cs_gpio; | ||
| 969 | goto free_clk; | ||
| 970 | } | ||
| 971 | |||
| 972 | if (gpio_is_valid(cs_gpio)) { | ||
| 973 | ret = devm_gpio_request(&pdev->dev, cs_gpio, | ||
| 974 | dev_name(&pdev->dev)); | ||
| 975 | if (ret) | ||
| 976 | goto free_clk; | ||
| 977 | } | ||
| 978 | } | ||
| 979 | } | ||
| 980 | |||
| 970 | r = platform_get_resource(pdev, IORESOURCE_DMA, 0); | 981 | r = platform_get_resource(pdev, IORESOURCE_DMA, 0); |
| 971 | if (r) | 982 | if (r) |
| 972 | dma_rx_chan = r->start; | 983 | dma_rx_chan = r->start; |
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 670f0627f3bf..0dd0623319b0 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c | |||
| @@ -547,8 +547,7 @@ static int dw_spi_setup(struct spi_device *spi) | |||
| 547 | /* Only alloc on first setup */ | 547 | /* Only alloc on first setup */ |
| 548 | chip = spi_get_ctldata(spi); | 548 | chip = spi_get_ctldata(spi); |
| 549 | if (!chip) { | 549 | if (!chip) { |
| 550 | chip = devm_kzalloc(&spi->dev, sizeof(struct chip_data), | 550 | chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL); |
| 551 | GFP_KERNEL); | ||
| 552 | if (!chip) | 551 | if (!chip) |
| 553 | return -ENOMEM; | 552 | return -ENOMEM; |
| 554 | spi_set_ctldata(spi, chip); | 553 | spi_set_ctldata(spi, chip); |
| @@ -606,6 +605,14 @@ static int dw_spi_setup(struct spi_device *spi) | |||
| 606 | return 0; | 605 | return 0; |
| 607 | } | 606 | } |
| 608 | 607 | ||
| 608 | static void dw_spi_cleanup(struct spi_device *spi) | ||
| 609 | { | ||
| 610 | struct chip_data *chip = spi_get_ctldata(spi); | ||
| 611 | |||
| 612 | kfree(chip); | ||
| 613 | spi_set_ctldata(spi, NULL); | ||
| 614 | } | ||
| 615 | |||
| 609 | /* Restart the controller, disable all interrupts, clean rx fifo */ | 616 | /* Restart the controller, disable all interrupts, clean rx fifo */ |
| 610 | static void spi_hw_init(struct dw_spi *dws) | 617 | static void spi_hw_init(struct dw_spi *dws) |
| 611 | { | 618 | { |
| @@ -661,6 +668,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) | |||
| 661 | master->bus_num = dws->bus_num; | 668 | master->bus_num = dws->bus_num; |
| 662 | master->num_chipselect = dws->num_cs; | 669 | master->num_chipselect = dws->num_cs; |
| 663 | master->setup = dw_spi_setup; | 670 | master->setup = dw_spi_setup; |
| 671 | master->cleanup = dw_spi_cleanup; | ||
| 664 | master->transfer_one_message = dw_spi_transfer_one_message; | 672 | master->transfer_one_message = dw_spi_transfer_one_message; |
| 665 | master->max_speed_hz = dws->max_freq; | 673 | master->max_speed_hz = dws->max_freq; |
| 666 | 674 | ||
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 8ebd724e4c59..429e11190265 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
| @@ -452,16 +452,16 @@ static int fsl_espi_setup(struct spi_device *spi) | |||
| 452 | int retval; | 452 | int retval; |
| 453 | u32 hw_mode; | 453 | u32 hw_mode; |
| 454 | u32 loop_mode; | 454 | u32 loop_mode; |
| 455 | struct spi_mpc8xxx_cs *cs = spi->controller_state; | 455 | struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi); |
| 456 | 456 | ||
| 457 | if (!spi->max_speed_hz) | 457 | if (!spi->max_speed_hz) |
| 458 | return -EINVAL; | 458 | return -EINVAL; |
| 459 | 459 | ||
| 460 | if (!cs) { | 460 | if (!cs) { |
| 461 | cs = devm_kzalloc(&spi->dev, sizeof(*cs), GFP_KERNEL); | 461 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); |
| 462 | if (!cs) | 462 | if (!cs) |
| 463 | return -ENOMEM; | 463 | return -ENOMEM; |
| 464 | spi->controller_state = cs; | 464 | spi_set_ctldata(spi, cs); |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | mpc8xxx_spi = spi_master_get_devdata(spi->master); | 467 | mpc8xxx_spi = spi_master_get_devdata(spi->master); |
| @@ -496,6 +496,14 @@ static int fsl_espi_setup(struct spi_device *spi) | |||
| 496 | return 0; | 496 | return 0; |
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | static void fsl_espi_cleanup(struct spi_device *spi) | ||
| 500 | { | ||
| 501 | struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi); | ||
| 502 | |||
| 503 | kfree(cs); | ||
| 504 | spi_set_ctldata(spi, NULL); | ||
| 505 | } | ||
| 506 | |||
| 499 | void fsl_espi_cpu_irq(struct mpc8xxx_spi *mspi, u32 events) | 507 | void fsl_espi_cpu_irq(struct mpc8xxx_spi *mspi, u32 events) |
| 500 | { | 508 | { |
| 501 | struct fsl_espi_reg *reg_base = mspi->reg_base; | 509 | struct fsl_espi_reg *reg_base = mspi->reg_base; |
| @@ -605,6 +613,7 @@ static struct spi_master * fsl_espi_probe(struct device *dev, | |||
| 605 | 613 | ||
| 606 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16); | 614 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16); |
| 607 | master->setup = fsl_espi_setup; | 615 | master->setup = fsl_espi_setup; |
| 616 | master->cleanup = fsl_espi_cleanup; | ||
| 608 | 617 | ||
| 609 | mpc8xxx_spi = spi_master_get_devdata(master); | 618 | mpc8xxx_spi = spi_master_get_devdata(master); |
| 610 | mpc8xxx_spi->spi_do_one_msg = fsl_espi_do_one_msg; | 619 | mpc8xxx_spi->spi_do_one_msg = fsl_espi_do_one_msg; |
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index 9452f6740997..590f31bc0aba 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c | |||
| @@ -425,16 +425,16 @@ static int fsl_spi_setup(struct spi_device *spi) | |||
| 425 | struct fsl_spi_reg *reg_base; | 425 | struct fsl_spi_reg *reg_base; |
| 426 | int retval; | 426 | int retval; |
| 427 | u32 hw_mode; | 427 | u32 hw_mode; |
| 428 | struct spi_mpc8xxx_cs *cs = spi->controller_state; | 428 | struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi); |
| 429 | 429 | ||
| 430 | if (!spi->max_speed_hz) | 430 | if (!spi->max_speed_hz) |
| 431 | return -EINVAL; | 431 | return -EINVAL; |
| 432 | 432 | ||
| 433 | if (!cs) { | 433 | if (!cs) { |
| 434 | cs = devm_kzalloc(&spi->dev, sizeof(*cs), GFP_KERNEL); | 434 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); |
| 435 | if (!cs) | 435 | if (!cs) |
| 436 | return -ENOMEM; | 436 | return -ENOMEM; |
| 437 | spi->controller_state = cs; | 437 | spi_set_ctldata(spi, cs); |
| 438 | } | 438 | } |
| 439 | mpc8xxx_spi = spi_master_get_devdata(spi->master); | 439 | mpc8xxx_spi = spi_master_get_devdata(spi->master); |
| 440 | 440 | ||
| @@ -496,9 +496,13 @@ static int fsl_spi_setup(struct spi_device *spi) | |||
| 496 | static void fsl_spi_cleanup(struct spi_device *spi) | 496 | static void fsl_spi_cleanup(struct spi_device *spi) |
| 497 | { | 497 | { |
| 498 | struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master); | 498 | struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master); |
| 499 | struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi); | ||
| 499 | 500 | ||
| 500 | if (mpc8xxx_spi->type == TYPE_GRLIB && gpio_is_valid(spi->cs_gpio)) | 501 | if (mpc8xxx_spi->type == TYPE_GRLIB && gpio_is_valid(spi->cs_gpio)) |
| 501 | gpio_free(spi->cs_gpio); | 502 | gpio_free(spi->cs_gpio); |
| 503 | |||
| 504 | kfree(cs); | ||
| 505 | spi_set_ctldata(spi, NULL); | ||
| 502 | } | 506 | } |
| 503 | 507 | ||
| 504 | static void fsl_spi_cpu_irq(struct mpc8xxx_spi *mspi, u32 events) | 508 | static void fsl_spi_cpu_irq(struct mpc8xxx_spi *mspi, u32 events) |
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 1189cfd96477..f1f0a587e4fc 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c | |||
| @@ -2136,7 +2136,7 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id) | |||
| 2136 | cs_gpio); | 2136 | cs_gpio); |
| 2137 | else if (gpio_direction_output(cs_gpio, 1)) | 2137 | else if (gpio_direction_output(cs_gpio, 1)) |
| 2138 | dev_err(&adev->dev, | 2138 | dev_err(&adev->dev, |
| 2139 | "could set gpio %d as output\n", | 2139 | "could not set gpio %d as output\n", |
| 2140 | cs_gpio); | 2140 | cs_gpio); |
| 2141 | } | 2141 | } |
| 2142 | } | 2142 | } |
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index cd0e08b0c9f6..3afc266b666d 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c | |||
| @@ -220,7 +220,7 @@ static inline void wait_for_idle(struct rockchip_spi *rs) | |||
| 220 | do { | 220 | do { |
| 221 | if (!(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)) | 221 | if (!(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)) |
| 222 | return; | 222 | return; |
| 223 | } while (time_before(jiffies, timeout)); | 223 | } while (!time_after(jiffies, timeout)); |
| 224 | 224 | ||
| 225 | dev_warn(rs->dev, "spi controller is in busy state!\n"); | 225 | dev_warn(rs->dev, "spi controller is in busy state!\n"); |
| 226 | } | 226 | } |
| @@ -529,7 +529,8 @@ static int rockchip_spi_transfer_one( | |||
| 529 | int ret = 0; | 529 | int ret = 0; |
| 530 | struct rockchip_spi *rs = spi_master_get_devdata(master); | 530 | struct rockchip_spi *rs = spi_master_get_devdata(master); |
| 531 | 531 | ||
| 532 | WARN_ON((readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)); | 532 | WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) && |
| 533 | (readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)); | ||
| 533 | 534 | ||
| 534 | if (!xfer->tx_buf && !xfer->rx_buf) { | 535 | if (!xfer->tx_buf && !xfer->rx_buf) { |
| 535 | dev_err(rs->dev, "No buffer for transfer\n"); | 536 | dev_err(rs->dev, "No buffer for transfer\n"); |
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 95ac276eaafe..6f0602fd7401 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c | |||
| @@ -312,6 +312,8 @@ static int spi_sirfsoc_cmd_transfer(struct spi_device *spi, | |||
| 312 | u32 cmd; | 312 | u32 cmd; |
| 313 | 313 | ||
| 314 | sspi = spi_master_get_devdata(spi->master); | 314 | sspi = spi_master_get_devdata(spi->master); |
| 315 | writel(SIRFSOC_SPI_FIFO_RESET, sspi->base + SIRFSOC_SPI_TXFIFO_OP); | ||
| 316 | writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP); | ||
| 315 | memcpy(&cmd, sspi->tx, t->len); | 317 | memcpy(&cmd, sspi->tx, t->len); |
| 316 | if (sspi->word_width == 1 && !(spi->mode & SPI_LSB_FIRST)) | 318 | if (sspi->word_width == 1 && !(spi->mode & SPI_LSB_FIRST)) |
| 317 | cmd = cpu_to_be32(cmd) >> | 319 | cmd = cpu_to_be32(cmd) >> |
| @@ -438,7 +440,8 @@ static void spi_sirfsoc_pio_transfer(struct spi_device *spi, | |||
| 438 | sspi->tx_word(sspi); | 440 | sspi->tx_word(sspi); |
| 439 | writel(SIRFSOC_SPI_TXFIFO_EMPTY_INT_EN | | 441 | writel(SIRFSOC_SPI_TXFIFO_EMPTY_INT_EN | |
| 440 | SIRFSOC_SPI_TX_UFLOW_INT_EN | | 442 | SIRFSOC_SPI_TX_UFLOW_INT_EN | |
| 441 | SIRFSOC_SPI_RX_OFLOW_INT_EN, | 443 | SIRFSOC_SPI_RX_OFLOW_INT_EN | |
| 444 | SIRFSOC_SPI_RX_IO_DMA_INT_EN, | ||
| 442 | sspi->base + SIRFSOC_SPI_INT_EN); | 445 | sspi->base + SIRFSOC_SPI_INT_EN); |
| 443 | writel(SIRFSOC_SPI_RX_EN | SIRFSOC_SPI_TX_EN, | 446 | writel(SIRFSOC_SPI_RX_EN | SIRFSOC_SPI_TX_EN, |
| 444 | sspi->base + SIRFSOC_SPI_TX_RX_EN); | 447 | sspi->base + SIRFSOC_SPI_TX_RX_EN); |
diff --git a/drivers/staging/iio/meter/ade7758_trigger.c b/drivers/staging/iio/meter/ade7758_trigger.c index ea01b8f7a2c3..6f45ce0478d7 100644 --- a/drivers/staging/iio/meter/ade7758_trigger.c +++ b/drivers/staging/iio/meter/ade7758_trigger.c | |||
| @@ -85,7 +85,7 @@ int ade7758_probe_trigger(struct iio_dev *indio_dev) | |||
| 85 | ret = iio_trigger_register(st->trig); | 85 | ret = iio_trigger_register(st->trig); |
| 86 | 86 | ||
| 87 | /* select default trigger */ | 87 | /* select default trigger */ |
| 88 | indio_dev->trig = st->trig; | 88 | indio_dev->trig = iio_trigger_get(st->trig); |
| 89 | if (ret) | 89 | if (ret) |
| 90 | goto error_free_irq; | 90 | goto error_free_irq; |
| 91 | 91 | ||
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 0dd87d481280..73429f4419df 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c | |||
| @@ -341,6 +341,9 @@ static int hostap_set_generic_element(struct vnt_private *pDevice, | |||
| 341 | { | 341 | { |
| 342 | PSMgmtObject pMgmt = pDevice->pMgmt; | 342 | PSMgmtObject pMgmt = pDevice->pMgmt; |
| 343 | 343 | ||
| 344 | if (param->u.generic_elem.len > sizeof(pMgmt->abyWPAIE)) | ||
| 345 | return -EINVAL; | ||
| 346 | |||
| 344 | memcpy(pMgmt->abyWPAIE, | 347 | memcpy(pMgmt->abyWPAIE, |
| 345 | param->u.generic_elem.data, | 348 | param->u.generic_elem.data, |
| 346 | param->u.generic_elem.len | 349 | param->u.generic_elem.len |
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 1f4c794f5fcc..260c3e1e312c 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
| @@ -4540,6 +4540,7 @@ static void iscsit_logout_post_handler_diffcid( | |||
| 4540 | { | 4540 | { |
| 4541 | struct iscsi_conn *l_conn; | 4541 | struct iscsi_conn *l_conn; |
| 4542 | struct iscsi_session *sess = conn->sess; | 4542 | struct iscsi_session *sess = conn->sess; |
| 4543 | bool conn_found = false; | ||
| 4543 | 4544 | ||
| 4544 | if (!sess) | 4545 | if (!sess) |
| 4545 | return; | 4546 | return; |
| @@ -4548,12 +4549,13 @@ static void iscsit_logout_post_handler_diffcid( | |||
| 4548 | list_for_each_entry(l_conn, &sess->sess_conn_list, conn_list) { | 4549 | list_for_each_entry(l_conn, &sess->sess_conn_list, conn_list) { |
| 4549 | if (l_conn->cid == cid) { | 4550 | if (l_conn->cid == cid) { |
| 4550 | iscsit_inc_conn_usage_count(l_conn); | 4551 | iscsit_inc_conn_usage_count(l_conn); |
| 4552 | conn_found = true; | ||
| 4551 | break; | 4553 | break; |
| 4552 | } | 4554 | } |
| 4553 | } | 4555 | } |
| 4554 | spin_unlock_bh(&sess->conn_lock); | 4556 | spin_unlock_bh(&sess->conn_lock); |
| 4555 | 4557 | ||
| 4556 | if (!l_conn) | 4558 | if (!conn_found) |
| 4557 | return; | 4559 | return; |
| 4558 | 4560 | ||
| 4559 | if (l_conn->sock) | 4561 | if (l_conn->sock) |
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c index 02f9de26f38a..18c29260b4a2 100644 --- a/drivers/target/iscsi/iscsi_target_parameters.c +++ b/drivers/target/iscsi/iscsi_target_parameters.c | |||
| @@ -601,7 +601,7 @@ int iscsi_copy_param_list( | |||
| 601 | param_list = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL); | 601 | param_list = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL); |
| 602 | if (!param_list) { | 602 | if (!param_list) { |
| 603 | pr_err("Unable to allocate memory for struct iscsi_param_list.\n"); | 603 | pr_err("Unable to allocate memory for struct iscsi_param_list.\n"); |
| 604 | goto err_out; | 604 | return -1; |
| 605 | } | 605 | } |
| 606 | INIT_LIST_HEAD(¶m_list->param_list); | 606 | INIT_LIST_HEAD(¶m_list->param_list); |
| 607 | INIT_LIST_HEAD(¶m_list->extra_response_list); | 607 | INIT_LIST_HEAD(¶m_list->extra_response_list); |
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index fd90b28f1d94..73355f4fca74 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c | |||
| @@ -400,6 +400,8 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt_or_dump( | |||
| 400 | 400 | ||
| 401 | spin_lock_bh(&conn->cmd_lock); | 401 | spin_lock_bh(&conn->cmd_lock); |
| 402 | list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) { | 402 | list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) { |
| 403 | if (cmd->cmd_flags & ICF_GOT_LAST_DATAOUT) | ||
| 404 | continue; | ||
| 403 | if (cmd->init_task_tag == init_task_tag) { | 405 | if (cmd->init_task_tag == init_task_tag) { |
| 404 | spin_unlock_bh(&conn->cmd_lock); | 406 | spin_unlock_bh(&conn->cmd_lock); |
| 405 | return cmd; | 407 | return cmd; |
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index bf55c5a04cfa..756def38c77a 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c | |||
| @@ -2363,7 +2363,7 @@ static ssize_t target_core_alua_tg_pt_gp_store_attr_alua_support_##_name(\ | |||
| 2363 | pr_err("Invalid value '%ld', must be '0' or '1'\n", tmp); \ | 2363 | pr_err("Invalid value '%ld', must be '0' or '1'\n", tmp); \ |
| 2364 | return -EINVAL; \ | 2364 | return -EINVAL; \ |
| 2365 | } \ | 2365 | } \ |
| 2366 | if (!tmp) \ | 2366 | if (tmp) \ |
| 2367 | t->_var |= _bit; \ | 2367 | t->_var |= _bit; \ |
| 2368 | else \ | 2368 | else \ |
| 2369 | t->_var &= ~_bit; \ | 2369 | t->_var &= ~_bit; \ |
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index 6cd7222738fc..bc286a67af7c 100644 --- a/drivers/target/target_core_spc.c +++ b/drivers/target/target_core_spc.c | |||
| @@ -664,7 +664,7 @@ spc_emulate_evpd_b3(struct se_cmd *cmd, unsigned char *buf) | |||
| 664 | buf[0] = dev->transport->get_device_type(dev); | 664 | buf[0] = dev->transport->get_device_type(dev); |
| 665 | buf[3] = 0x0c; | 665 | buf[3] = 0x0c; |
| 666 | put_unaligned_be32(dev->t10_alua.lba_map_segment_size, &buf[8]); | 666 | put_unaligned_be32(dev->t10_alua.lba_map_segment_size, &buf[8]); |
| 667 | put_unaligned_be32(dev->t10_alua.lba_map_segment_size, &buf[12]); | 667 | put_unaligned_be32(dev->t10_alua.lba_map_segment_multiplier, &buf[12]); |
| 668 | 668 | ||
| 669 | return 0; | 669 | return 0; |
| 670 | } | 670 | } |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 81cda09b47e3..488a30836c36 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
| @@ -965,8 +965,6 @@ rescan: | |||
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | qh->exception = 1; | 967 | qh->exception = 1; |
| 968 | if (ehci->rh_state < EHCI_RH_RUNNING) | ||
| 969 | qh->qh_state = QH_STATE_IDLE; | ||
| 970 | switch (qh->qh_state) { | 968 | switch (qh->qh_state) { |
| 971 | case QH_STATE_LINKED: | 969 | case QH_STATE_LINKED: |
| 972 | WARN_ON(!list_empty(&qh->qtd_list)); | 970 | WARN_ON(!list_empty(&qh->qtd_list)); |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 60cfcbc78552..4a5c68a47e46 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
| @@ -101,6 +101,12 @@ UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001, | |||
| 101 | "PhotoSmart R707", | 101 | "PhotoSmart R707", |
| 102 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), | 102 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), |
| 103 | 103 | ||
| 104 | UNUSUAL_DEV( 0x03f3, 0x0001, 0x0000, 0x9999, | ||
| 105 | "Adaptec", | ||
| 106 | "USBConnect 2000", | ||
| 107 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | ||
| 108 | US_FL_SCM_MULT_TARG ), | ||
| 109 | |||
| 104 | /* Reported by Sebastian Kapfer <sebastian_kapfer@gmx.net> | 110 | /* Reported by Sebastian Kapfer <sebastian_kapfer@gmx.net> |
| 105 | * and Olaf Hering <olh@suse.de> (different bcd's, same vendor/product) | 111 | * and Olaf Hering <olh@suse.de> (different bcd's, same vendor/product) |
| 106 | * for USB floppies that need the SINGLE_LUN enforcement. | 112 | * for USB floppies that need the SINGLE_LUN enforcement. |
| @@ -1125,6 +1131,18 @@ UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x0200, | |||
| 1125 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1131 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 1126 | US_FL_NOT_LOCKABLE), | 1132 | US_FL_NOT_LOCKABLE), |
| 1127 | 1133 | ||
| 1134 | UNUSUAL_DEV( 0x085a, 0x0026, 0x0100, 0x0133, | ||
| 1135 | "Xircom", | ||
| 1136 | "PortGear USB-SCSI (Mac USB Dock)", | ||
| 1137 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | ||
| 1138 | US_FL_SCM_MULT_TARG ), | ||
| 1139 | |||
| 1140 | UNUSUAL_DEV( 0x085a, 0x0028, 0x0100, 0x0133, | ||
| 1141 | "Xircom", | ||
| 1142 | "PortGear USB to SCSI Converter", | ||
| 1143 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | ||
| 1144 | US_FL_SCM_MULT_TARG ), | ||
| 1145 | |||
| 1128 | /* Submitted by Jan De Luyck <lkml@kcore.org> */ | 1146 | /* Submitted by Jan De Luyck <lkml@kcore.org> */ |
| 1129 | UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000, | 1147 | UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000, |
| 1130 | "CITIZEN", | 1148 | "CITIZEN", |
| @@ -1964,6 +1982,14 @@ UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100, | |||
| 1964 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1982 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 1965 | US_FL_IGNORE_RESIDUE | US_FL_SANE_SENSE ), | 1983 | US_FL_IGNORE_RESIDUE | US_FL_SANE_SENSE ), |
| 1966 | 1984 | ||
| 1985 | /* Entrega Technologies U1-SC25 (later Xircom PortGear PGSCSI) | ||
| 1986 | * and Mac USB Dock USB-SCSI */ | ||
| 1987 | UNUSUAL_DEV( 0x1645, 0x0007, 0x0100, 0x0133, | ||
| 1988 | "Entrega Technologies", | ||
| 1989 | "USB to SCSI Converter", | ||
| 1990 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | ||
| 1991 | US_FL_SCM_MULT_TARG ), | ||
| 1992 | |||
| 1967 | /* Reported by Robert Schedel <r.schedel@yahoo.de> | 1993 | /* Reported by Robert Schedel <r.schedel@yahoo.de> |
| 1968 | * Note: this is a 'super top' device like the above 14cd/6600 device */ | 1994 | * Note: this is a 'super top' device like the above 14cd/6600 device */ |
| 1969 | UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, | 1995 | UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, |
| @@ -1986,6 +2012,12 @@ UNUSUAL_DEV( 0x177f, 0x0400, 0x0000, 0x0000, | |||
| 1986 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2012 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 1987 | US_FL_BULK_IGNORE_TAG | US_FL_MAX_SECTORS_64 ), | 2013 | US_FL_BULK_IGNORE_TAG | US_FL_MAX_SECTORS_64 ), |
| 1988 | 2014 | ||
| 2015 | UNUSUAL_DEV( 0x1822, 0x0001, 0x0000, 0x9999, | ||
| 2016 | "Ariston Technologies", | ||
| 2017 | "iConnect USB to SCSI adapter", | ||
| 2018 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | ||
| 2019 | US_FL_SCM_MULT_TARG ), | ||
| 2020 | |||
| 1989 | /* Reported by Hans de Goede <hdegoede@redhat.com> | 2021 | /* Reported by Hans de Goede <hdegoede@redhat.com> |
| 1990 | * These Appotech controllers are found in Picture Frames, they provide a | 2022 | * These Appotech controllers are found in Picture Frames, they provide a |
| 1991 | * (buggy) emulation of a cdrom drive which contains the windows software | 2023 | * (buggy) emulation of a cdrom drive which contains the windows software |
