diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-10 12:15:30 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-10 12:15:30 -0500 |
commit | c454f813501b94cd687bf3c5c0783f815a854905 (patch) | |
tree | 8b6e1719ba4470e478d719ca0cf935501370e237 /drivers | |
parent | 1ad4fb2f7cbc21db9cdbb53e25ce348d93bbd6e7 (diff) | |
parent | 63fc5f3bb3d0ca9ab4767a801b518aa6335f87ad (diff) |
Merge branch 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards
* 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP: add minimal support for Nokia RM-696
ARM: OMAP: enable Bluetooth on the PandaBoard
ARM: OMAP: pandora: add support for backlight and poweroff
ARM: OMAP4: board-4430sdp: don't initialize value that is never used
ARM: OMAP3: cm-t3517: add EMAC support
ARM: OMAP: move generic EMAC init to separate file
ARM: OMAP3: RX-51: add explicit mux configuration of tsc2005 control gpios
ARM: OMAP: Add omap_reserve functionality
(includes sync-up to 3.3-rc6)
Diffstat (limited to 'drivers')
58 files changed, 437 insertions, 207 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 5d1d07645132..e8cd652d2017 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -1206,9 +1206,9 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
1206 | 1206 | ||
1207 | out_unmap_both: | 1207 | out_unmap_both: |
1208 | pci_set_drvdata(dev, NULL); | 1208 | pci_set_drvdata(dev, NULL); |
1209 | pci_iounmap(dev, card->config_regs); | ||
1210 | out_unmap_config: | ||
1211 | pci_iounmap(dev, card->buffers); | 1209 | pci_iounmap(dev, card->buffers); |
1210 | out_unmap_config: | ||
1211 | pci_iounmap(dev, card->config_regs); | ||
1212 | out_release_regions: | 1212 | out_release_regions: |
1213 | pci_release_regions(dev); | 1213 | pci_release_regions(dev); |
1214 | out: | 1214 | out: |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index f00f596c1029..789c9b579aea 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -102,6 +102,7 @@ static struct usb_device_id btusb_table[] = { | |||
102 | 102 | ||
103 | /* Broadcom BCM20702A0 */ | 103 | /* Broadcom BCM20702A0 */ |
104 | { USB_DEVICE(0x0a5c, 0x21e3) }, | 104 | { USB_DEVICE(0x0a5c, 0x21e3) }, |
105 | { USB_DEVICE(0x0a5c, 0x21f3) }, | ||
105 | { USB_DEVICE(0x413c, 0x8197) }, | 106 | { USB_DEVICE(0x413c, 0x8197) }, |
106 | 107 | ||
107 | { } /* Terminating entry */ | 108 | { } /* Terminating entry */ |
@@ -726,9 +727,6 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
726 | usb_fill_bulk_urb(urb, data->udev, pipe, | 727 | usb_fill_bulk_urb(urb, data->udev, pipe, |
727 | skb->data, skb->len, btusb_tx_complete, skb); | 728 | skb->data, skb->len, btusb_tx_complete, skb); |
728 | 729 | ||
729 | if (skb->priority >= HCI_PRIO_MAX - 1) | ||
730 | urb->transfer_flags = URB_ISO_ASAP; | ||
731 | |||
732 | hdev->stat.acl_tx++; | 730 | hdev->stat.acl_tx++; |
733 | break; | 731 | break; |
734 | 732 | ||
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 597235a2f8f9..0d40cf66b3cc 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
@@ -714,6 +714,7 @@ static int mv_hash_final(struct ahash_request *req) | |||
714 | { | 714 | { |
715 | struct mv_req_hash_ctx *ctx = ahash_request_ctx(req); | 715 | struct mv_req_hash_ctx *ctx = ahash_request_ctx(req); |
716 | 716 | ||
717 | ahash_request_set_crypt(req, NULL, req->result, 0); | ||
717 | mv_update_hash_req_ctx(ctx, 1, 0); | 718 | mv_update_hash_req_ctx(ctx, 1, 0); |
718 | return mv_handle_req(&req->base); | 719 | return mv_handle_req(&req->base); |
719 | } | 720 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index d620b0784257..618bd4d87d28 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "drmP.h" | 28 | #include "drmP.h" |
29 | #include "drm_crtc_helper.h" | 29 | #include "drm_crtc_helper.h" |
30 | 30 | ||
31 | #include <drm/exynos_drm.h> | ||
31 | #include "exynos_drm_drv.h" | 32 | #include "exynos_drm_drv.h" |
32 | #include "exynos_drm_encoder.h" | 33 | #include "exynos_drm_encoder.h" |
33 | 34 | ||
@@ -44,8 +45,9 @@ struct exynos_drm_connector { | |||
44 | /* convert exynos_video_timings to drm_display_mode */ | 45 | /* convert exynos_video_timings to drm_display_mode */ |
45 | static inline void | 46 | static inline void |
46 | convert_to_display_mode(struct drm_display_mode *mode, | 47 | convert_to_display_mode(struct drm_display_mode *mode, |
47 | struct fb_videomode *timing) | 48 | struct exynos_drm_panel_info *panel) |
48 | { | 49 | { |
50 | struct fb_videomode *timing = &panel->timing; | ||
49 | DRM_DEBUG_KMS("%s\n", __FILE__); | 51 | DRM_DEBUG_KMS("%s\n", __FILE__); |
50 | 52 | ||
51 | mode->clock = timing->pixclock / 1000; | 53 | mode->clock = timing->pixclock / 1000; |
@@ -60,6 +62,8 @@ convert_to_display_mode(struct drm_display_mode *mode, | |||
60 | mode->vsync_start = mode->vdisplay + timing->upper_margin; | 62 | mode->vsync_start = mode->vdisplay + timing->upper_margin; |
61 | mode->vsync_end = mode->vsync_start + timing->vsync_len; | 63 | mode->vsync_end = mode->vsync_start + timing->vsync_len; |
62 | mode->vtotal = mode->vsync_end + timing->lower_margin; | 64 | mode->vtotal = mode->vsync_end + timing->lower_margin; |
65 | mode->width_mm = panel->width_mm; | ||
66 | mode->height_mm = panel->height_mm; | ||
63 | 67 | ||
64 | if (timing->vmode & FB_VMODE_INTERLACED) | 68 | if (timing->vmode & FB_VMODE_INTERLACED) |
65 | mode->flags |= DRM_MODE_FLAG_INTERLACE; | 69 | mode->flags |= DRM_MODE_FLAG_INTERLACE; |
@@ -148,16 +152,18 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector) | |||
148 | connector->display_info.raw_edid = edid; | 152 | connector->display_info.raw_edid = edid; |
149 | } else { | 153 | } else { |
150 | struct drm_display_mode *mode = drm_mode_create(connector->dev); | 154 | struct drm_display_mode *mode = drm_mode_create(connector->dev); |
151 | struct fb_videomode *timing; | 155 | struct exynos_drm_panel_info *panel; |
152 | 156 | ||
153 | if (display_ops->get_timing) | 157 | if (display_ops->get_panel) |
154 | timing = display_ops->get_timing(manager->dev); | 158 | panel = display_ops->get_panel(manager->dev); |
155 | else { | 159 | else { |
156 | drm_mode_destroy(connector->dev, mode); | 160 | drm_mode_destroy(connector->dev, mode); |
157 | return 0; | 161 | return 0; |
158 | } | 162 | } |
159 | 163 | ||
160 | convert_to_display_mode(mode, timing); | 164 | convert_to_display_mode(mode, panel); |
165 | connector->display_info.width_mm = mode->width_mm; | ||
166 | connector->display_info.height_mm = mode->height_mm; | ||
161 | 167 | ||
162 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; | 168 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; |
163 | drm_mode_set_name(mode); | 169 | drm_mode_set_name(mode); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index e685e1e33055..13540de90bfc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
@@ -136,7 +136,7 @@ struct exynos_drm_overlay { | |||
136 | * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. | 136 | * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. |
137 | * @is_connected: check for that display is connected or not. | 137 | * @is_connected: check for that display is connected or not. |
138 | * @get_edid: get edid modes from display driver. | 138 | * @get_edid: get edid modes from display driver. |
139 | * @get_timing: get timing object from display driver. | 139 | * @get_panel: get panel object from display driver. |
140 | * @check_timing: check if timing is valid or not. | 140 | * @check_timing: check if timing is valid or not. |
141 | * @power_on: display device on or off. | 141 | * @power_on: display device on or off. |
142 | */ | 142 | */ |
@@ -145,7 +145,7 @@ struct exynos_drm_display_ops { | |||
145 | bool (*is_connected)(struct device *dev); | 145 | bool (*is_connected)(struct device *dev); |
146 | int (*get_edid)(struct device *dev, struct drm_connector *connector, | 146 | int (*get_edid)(struct device *dev, struct drm_connector *connector, |
147 | u8 *edid, int len); | 147 | u8 *edid, int len); |
148 | void *(*get_timing)(struct device *dev); | 148 | void *(*get_panel)(struct device *dev); |
149 | int (*check_timing)(struct device *dev, void *timing); | 149 | int (*check_timing)(struct device *dev, void *timing); |
150 | int (*power_on)(struct device *dev, int mode); | 150 | int (*power_on)(struct device *dev, int mode); |
151 | }; | 151 | }; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 0dbb32bb18a3..360adf2bba04 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -89,7 +89,7 @@ struct fimd_context { | |||
89 | bool suspended; | 89 | bool suspended; |
90 | struct mutex lock; | 90 | struct mutex lock; |
91 | 91 | ||
92 | struct fb_videomode *timing; | 92 | struct exynos_drm_panel_info *panel; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static bool fimd_display_is_connected(struct device *dev) | 95 | static bool fimd_display_is_connected(struct device *dev) |
@@ -101,13 +101,13 @@ static bool fimd_display_is_connected(struct device *dev) | |||
101 | return true; | 101 | return true; |
102 | } | 102 | } |
103 | 103 | ||
104 | static void *fimd_get_timing(struct device *dev) | 104 | static void *fimd_get_panel(struct device *dev) |
105 | { | 105 | { |
106 | struct fimd_context *ctx = get_fimd_context(dev); | 106 | struct fimd_context *ctx = get_fimd_context(dev); |
107 | 107 | ||
108 | DRM_DEBUG_KMS("%s\n", __FILE__); | 108 | DRM_DEBUG_KMS("%s\n", __FILE__); |
109 | 109 | ||
110 | return ctx->timing; | 110 | return ctx->panel; |
111 | } | 111 | } |
112 | 112 | ||
113 | static int fimd_check_timing(struct device *dev, void *timing) | 113 | static int fimd_check_timing(struct device *dev, void *timing) |
@@ -131,7 +131,7 @@ static int fimd_display_power_on(struct device *dev, int mode) | |||
131 | static struct exynos_drm_display_ops fimd_display_ops = { | 131 | static struct exynos_drm_display_ops fimd_display_ops = { |
132 | .type = EXYNOS_DISPLAY_TYPE_LCD, | 132 | .type = EXYNOS_DISPLAY_TYPE_LCD, |
133 | .is_connected = fimd_display_is_connected, | 133 | .is_connected = fimd_display_is_connected, |
134 | .get_timing = fimd_get_timing, | 134 | .get_panel = fimd_get_panel, |
135 | .check_timing = fimd_check_timing, | 135 | .check_timing = fimd_check_timing, |
136 | .power_on = fimd_display_power_on, | 136 | .power_on = fimd_display_power_on, |
137 | }; | 137 | }; |
@@ -193,7 +193,8 @@ static void fimd_apply(struct device *subdrv_dev) | |||
193 | static void fimd_commit(struct device *dev) | 193 | static void fimd_commit(struct device *dev) |
194 | { | 194 | { |
195 | struct fimd_context *ctx = get_fimd_context(dev); | 195 | struct fimd_context *ctx = get_fimd_context(dev); |
196 | struct fb_videomode *timing = ctx->timing; | 196 | struct exynos_drm_panel_info *panel = ctx->panel; |
197 | struct fb_videomode *timing = &panel->timing; | ||
197 | u32 val; | 198 | u32 val; |
198 | 199 | ||
199 | if (ctx->suspended) | 200 | if (ctx->suspended) |
@@ -786,7 +787,7 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
786 | struct fimd_context *ctx; | 787 | struct fimd_context *ctx; |
787 | struct exynos_drm_subdrv *subdrv; | 788 | struct exynos_drm_subdrv *subdrv; |
788 | struct exynos_drm_fimd_pdata *pdata; | 789 | struct exynos_drm_fimd_pdata *pdata; |
789 | struct fb_videomode *timing; | 790 | struct exynos_drm_panel_info *panel; |
790 | struct resource *res; | 791 | struct resource *res; |
791 | int win; | 792 | int win; |
792 | int ret = -EINVAL; | 793 | int ret = -EINVAL; |
@@ -799,9 +800,9 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
799 | return -EINVAL; | 800 | return -EINVAL; |
800 | } | 801 | } |
801 | 802 | ||
802 | timing = &pdata->timing; | 803 | panel = &pdata->panel; |
803 | if (!timing) { | 804 | if (!panel) { |
804 | dev_err(dev, "timing is null.\n"); | 805 | dev_err(dev, "panel is null.\n"); |
805 | return -EINVAL; | 806 | return -EINVAL; |
806 | } | 807 | } |
807 | 808 | ||
@@ -863,16 +864,16 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
863 | goto err_req_irq; | 864 | goto err_req_irq; |
864 | } | 865 | } |
865 | 866 | ||
866 | ctx->clkdiv = fimd_calc_clkdiv(ctx, timing); | 867 | ctx->clkdiv = fimd_calc_clkdiv(ctx, &panel->timing); |
867 | ctx->vidcon0 = pdata->vidcon0; | 868 | ctx->vidcon0 = pdata->vidcon0; |
868 | ctx->vidcon1 = pdata->vidcon1; | 869 | ctx->vidcon1 = pdata->vidcon1; |
869 | ctx->default_win = pdata->default_win; | 870 | ctx->default_win = pdata->default_win; |
870 | ctx->timing = timing; | 871 | ctx->panel = panel; |
871 | 872 | ||
872 | timing->pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv; | 873 | panel->timing.pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv; |
873 | 874 | ||
874 | DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n", | 875 | DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n", |
875 | timing->pixclock, ctx->clkdiv); | 876 | panel->timing.pixclock, ctx->clkdiv); |
876 | 877 | ||
877 | subdrv = &ctx->subdrv; | 878 | subdrv = &ctx->subdrv; |
878 | 879 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f425b23e3803..f851db7be2cc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4680,8 +4680,17 @@ sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane, | |||
4680 | 4680 | ||
4681 | crtc = intel_get_crtc_for_plane(dev, plane); | 4681 | crtc = intel_get_crtc_for_plane(dev, plane); |
4682 | clock = crtc->mode.clock; | 4682 | clock = crtc->mode.clock; |
4683 | if (!clock) { | ||
4684 | *sprite_wm = 0; | ||
4685 | return false; | ||
4686 | } | ||
4683 | 4687 | ||
4684 | line_time_us = (sprite_width * 1000) / clock; | 4688 | line_time_us = (sprite_width * 1000) / clock; |
4689 | if (!line_time_us) { | ||
4690 | *sprite_wm = 0; | ||
4691 | return false; | ||
4692 | } | ||
4693 | |||
4685 | line_count = (latency_ns / line_time_us + 1000) / 1000; | 4694 | line_count = (latency_ns / line_time_us + 1000) / 1000; |
4686 | line_size = sprite_width * pixel_size; | 4695 | line_size = sprite_width * pixel_size; |
4687 | 4696 | ||
@@ -6175,7 +6184,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) | |||
6175 | int i; | 6184 | int i; |
6176 | 6185 | ||
6177 | /* The clocks have to be on to load the palette. */ | 6186 | /* The clocks have to be on to load the palette. */ |
6178 | if (!crtc->enabled) | 6187 | if (!crtc->enabled || !intel_crtc->active) |
6179 | return; | 6188 | return; |
6180 | 6189 | ||
6181 | /* use legacy palette for Ironlake */ | 6190 | /* use legacy palette for Ironlake */ |
@@ -6561,7 +6570,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev, | |||
6561 | mode_cmd.height = mode->vdisplay; | 6570 | mode_cmd.height = mode->vdisplay; |
6562 | mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width, | 6571 | mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width, |
6563 | bpp); | 6572 | bpp); |
6564 | mode_cmd.pixel_format = 0; | 6573 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth); |
6565 | 6574 | ||
6566 | return intel_framebuffer_create(dev, &mode_cmd, obj); | 6575 | return intel_framebuffer_create(dev, &mode_cmd, obj); |
6567 | } | 6576 | } |
@@ -8185,7 +8194,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) | |||
8185 | 8194 | ||
8186 | if (intel_enable_rc6(dev_priv->dev)) | 8195 | if (intel_enable_rc6(dev_priv->dev)) |
8187 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | | 8196 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | |
8188 | (IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0; | 8197 | ((IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0); |
8189 | 8198 | ||
8190 | I915_WRITE(GEN6_RC_CONTROL, | 8199 | I915_WRITE(GEN6_RC_CONTROL, |
8191 | rc6_mask | | 8200 | rc6_mask | |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 1ab842c6032e..536191540b03 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -301,7 +301,7 @@ static int init_ring_common(struct intel_ring_buffer *ring) | |||
301 | 301 | ||
302 | I915_WRITE_CTL(ring, | 302 | I915_WRITE_CTL(ring, |
303 | ((ring->size - PAGE_SIZE) & RING_NR_PAGES) | 303 | ((ring->size - PAGE_SIZE) & RING_NR_PAGES) |
304 | | RING_REPORT_64K | RING_VALID); | 304 | | RING_VALID); |
305 | 305 | ||
306 | /* If the head is still not zero, the ring is dead */ | 306 | /* If the head is still not zero, the ring is dead */ |
307 | if ((I915_READ_CTL(ring) & RING_VALID) == 0 || | 307 | if ((I915_READ_CTL(ring) & RING_VALID) == 0 || |
@@ -1132,18 +1132,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n) | |||
1132 | struct drm_device *dev = ring->dev; | 1132 | struct drm_device *dev = ring->dev; |
1133 | struct drm_i915_private *dev_priv = dev->dev_private; | 1133 | struct drm_i915_private *dev_priv = dev->dev_private; |
1134 | unsigned long end; | 1134 | unsigned long end; |
1135 | u32 head; | ||
1136 | |||
1137 | /* If the reported head position has wrapped or hasn't advanced, | ||
1138 | * fallback to the slow and accurate path. | ||
1139 | */ | ||
1140 | head = intel_read_status_page(ring, 4); | ||
1141 | if (head > ring->head) { | ||
1142 | ring->head = head; | ||
1143 | ring->space = ring_space(ring); | ||
1144 | if (ring->space >= n) | ||
1145 | return 0; | ||
1146 | } | ||
1147 | 1135 | ||
1148 | trace_i915_ring_wait_begin(ring); | 1136 | trace_i915_ring_wait_begin(ring); |
1149 | if (drm_core_check_feature(dev, DRIVER_GEM)) | 1137 | if (drm_core_check_feature(dev, DRIVER_GEM)) |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 38ce5d0427e3..387fcc9f03ef 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -1304,6 +1304,7 @@ static int r600_check_texture_resource(struct radeon_cs_parser *p, u32 idx, | |||
1304 | h0 = G_038004_TEX_HEIGHT(word1) + 1; | 1304 | h0 = G_038004_TEX_HEIGHT(word1) + 1; |
1305 | d0 = G_038004_TEX_DEPTH(word1); | 1305 | d0 = G_038004_TEX_DEPTH(word1); |
1306 | nfaces = 1; | 1306 | nfaces = 1; |
1307 | array = 0; | ||
1307 | switch (G_038000_DIM(word0)) { | 1308 | switch (G_038000_DIM(word0)) { |
1308 | case V_038000_SQ_TEX_DIM_1D: | 1309 | case V_038000_SQ_TEX_DIM_1D: |
1309 | case V_038000_SQ_TEX_DIM_2D: | 1310 | case V_038000_SQ_TEX_DIM_2D: |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index e7cb3ab09243..8b3d8ed52ff6 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -1117,13 +1117,23 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
1117 | (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { | 1117 | (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { |
1118 | struct drm_display_mode *mode; | 1118 | struct drm_display_mode *mode; |
1119 | 1119 | ||
1120 | if (!radeon_dig_connector->edp_on) | 1120 | if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { |
1121 | atombios_set_edp_panel_power(connector, | 1121 | if (!radeon_dig_connector->edp_on) |
1122 | ATOM_TRANSMITTER_ACTION_POWER_ON); | 1122 | atombios_set_edp_panel_power(connector, |
1123 | ret = radeon_ddc_get_modes(radeon_connector); | 1123 | ATOM_TRANSMITTER_ACTION_POWER_ON); |
1124 | if (!radeon_dig_connector->edp_on) | 1124 | ret = radeon_ddc_get_modes(radeon_connector); |
1125 | atombios_set_edp_panel_power(connector, | 1125 | if (!radeon_dig_connector->edp_on) |
1126 | ATOM_TRANSMITTER_ACTION_POWER_OFF); | 1126 | atombios_set_edp_panel_power(connector, |
1127 | ATOM_TRANSMITTER_ACTION_POWER_OFF); | ||
1128 | } else { | ||
1129 | /* need to setup ddc on the bridge */ | ||
1130 | if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != | ||
1131 | ENCODER_OBJECT_ID_NONE) { | ||
1132 | if (encoder) | ||
1133 | radeon_atom_ext_encoder_setup_ddc(encoder); | ||
1134 | } | ||
1135 | ret = radeon_ddc_get_modes(radeon_connector); | ||
1136 | } | ||
1127 | 1137 | ||
1128 | if (ret > 0) { | 1138 | if (ret > 0) { |
1129 | if (encoder) { | 1139 | if (encoder) { |
@@ -1134,7 +1144,6 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
1134 | return ret; | 1144 | return ret; |
1135 | } | 1145 | } |
1136 | 1146 | ||
1137 | encoder = radeon_best_single_encoder(connector); | ||
1138 | if (!encoder) | 1147 | if (!encoder) |
1139 | return 0; | 1148 | return 0; |
1140 | 1149 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 010dad8b66ae..c58a036233fb 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -597,13 +597,13 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev, | |||
597 | if (bo_va == NULL) | 597 | if (bo_va == NULL) |
598 | return 0; | 598 | return 0; |
599 | 599 | ||
600 | list_del(&bo_va->bo_list); | ||
601 | mutex_lock(&vm->mutex); | 600 | mutex_lock(&vm->mutex); |
602 | radeon_mutex_lock(&rdev->cs_mutex); | 601 | radeon_mutex_lock(&rdev->cs_mutex); |
603 | radeon_vm_bo_update_pte(rdev, vm, bo, NULL); | 602 | radeon_vm_bo_update_pte(rdev, vm, bo, NULL); |
604 | radeon_mutex_unlock(&rdev->cs_mutex); | 603 | radeon_mutex_unlock(&rdev->cs_mutex); |
605 | list_del(&bo_va->vm_list); | 604 | list_del(&bo_va->vm_list); |
606 | mutex_unlock(&vm->mutex); | 605 | mutex_unlock(&vm->mutex); |
606 | list_del(&bo_va->bo_list); | ||
607 | 607 | ||
608 | kfree(bo_va); | 608 | kfree(bo_va); |
609 | return 0; | 609 | return 0; |
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 6bab2001ef3b..6aa5a9fad879 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -178,6 +178,16 @@ static inline void f75375_write16(struct i2c_client *client, u8 reg, | |||
178 | i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); | 178 | i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); |
179 | } | 179 | } |
180 | 180 | ||
181 | static void f75375_write_pwm(struct i2c_client *client, int nr) | ||
182 | { | ||
183 | struct f75375_data *data = i2c_get_clientdata(client); | ||
184 | if (data->kind == f75387) | ||
185 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->pwm[nr]); | ||
186 | else | ||
187 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
188 | data->pwm[nr]); | ||
189 | } | ||
190 | |||
181 | static struct f75375_data *f75375_update_device(struct device *dev) | 191 | static struct f75375_data *f75375_update_device(struct device *dev) |
182 | { | 192 | { |
183 | struct i2c_client *client = to_i2c_client(dev); | 193 | struct i2c_client *client = to_i2c_client(dev); |
@@ -254,6 +264,36 @@ static inline u16 rpm_to_reg(int rpm) | |||
254 | return 1500000 / rpm; | 264 | return 1500000 / rpm; |
255 | } | 265 | } |
256 | 266 | ||
267 | static bool duty_mode_enabled(u8 pwm_enable) | ||
268 | { | ||
269 | switch (pwm_enable) { | ||
270 | case 0: /* Manual, duty mode (full speed) */ | ||
271 | case 1: /* Manual, duty mode */ | ||
272 | case 4: /* Auto, duty mode */ | ||
273 | return true; | ||
274 | case 2: /* Auto, speed mode */ | ||
275 | case 3: /* Manual, speed mode */ | ||
276 | return false; | ||
277 | default: | ||
278 | BUG(); | ||
279 | } | ||
280 | } | ||
281 | |||
282 | static bool auto_mode_enabled(u8 pwm_enable) | ||
283 | { | ||
284 | switch (pwm_enable) { | ||
285 | case 0: /* Manual, duty mode (full speed) */ | ||
286 | case 1: /* Manual, duty mode */ | ||
287 | case 3: /* Manual, speed mode */ | ||
288 | return false; | ||
289 | case 2: /* Auto, speed mode */ | ||
290 | case 4: /* Auto, duty mode */ | ||
291 | return true; | ||
292 | default: | ||
293 | BUG(); | ||
294 | } | ||
295 | } | ||
296 | |||
257 | static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, | 297 | static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, |
258 | const char *buf, size_t count) | 298 | const char *buf, size_t count) |
259 | { | 299 | { |
@@ -287,6 +327,11 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *attr, | |||
287 | if (err < 0) | 327 | if (err < 0) |
288 | return err; | 328 | return err; |
289 | 329 | ||
330 | if (auto_mode_enabled(data->pwm_enable[nr])) | ||
331 | return -EINVAL; | ||
332 | if (data->kind == f75387 && duty_mode_enabled(data->pwm_enable[nr])) | ||
333 | return -EINVAL; | ||
334 | |||
290 | mutex_lock(&data->update_lock); | 335 | mutex_lock(&data->update_lock); |
291 | data->fan_target[nr] = rpm_to_reg(val); | 336 | data->fan_target[nr] = rpm_to_reg(val); |
292 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]); | 337 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]); |
@@ -307,9 +352,13 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, | |||
307 | if (err < 0) | 352 | if (err < 0) |
308 | return err; | 353 | return err; |
309 | 354 | ||
355 | if (auto_mode_enabled(data->pwm_enable[nr]) || | ||
356 | !duty_mode_enabled(data->pwm_enable[nr])) | ||
357 | return -EINVAL; | ||
358 | |||
310 | mutex_lock(&data->update_lock); | 359 | mutex_lock(&data->update_lock); |
311 | data->pwm[nr] = SENSORS_LIMIT(val, 0, 255); | 360 | data->pwm[nr] = SENSORS_LIMIT(val, 0, 255); |
312 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), data->pwm[nr]); | 361 | f75375_write_pwm(client, nr); |
313 | mutex_unlock(&data->update_lock); | 362 | mutex_unlock(&data->update_lock); |
314 | return count; | 363 | return count; |
315 | } | 364 | } |
@@ -327,11 +376,15 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
327 | struct f75375_data *data = i2c_get_clientdata(client); | 376 | struct f75375_data *data = i2c_get_clientdata(client); |
328 | u8 fanmode; | 377 | u8 fanmode; |
329 | 378 | ||
330 | if (val < 0 || val > 3) | 379 | if (val < 0 || val > 4) |
331 | return -EINVAL; | 380 | return -EINVAL; |
332 | 381 | ||
333 | fanmode = f75375_read8(client, F75375_REG_FAN_TIMER); | 382 | fanmode = f75375_read8(client, F75375_REG_FAN_TIMER); |
334 | if (data->kind == f75387) { | 383 | if (data->kind == f75387) { |
384 | /* For now, deny dangerous toggling of duty mode */ | ||
385 | if (duty_mode_enabled(data->pwm_enable[nr]) != | ||
386 | duty_mode_enabled(val)) | ||
387 | return -EOPNOTSUPP; | ||
335 | /* clear each fanX_mode bit before setting them properly */ | 388 | /* clear each fanX_mode bit before setting them properly */ |
336 | fanmode &= ~(1 << F75387_FAN_DUTY_MODE(nr)); | 389 | fanmode &= ~(1 << F75387_FAN_DUTY_MODE(nr)); |
337 | fanmode &= ~(1 << F75387_FAN_MANU_MODE(nr)); | 390 | fanmode &= ~(1 << F75387_FAN_MANU_MODE(nr)); |
@@ -345,12 +398,14 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
345 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); | 398 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); |
346 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | 399 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); |
347 | break; | 400 | break; |
348 | case 2: /* AUTOMATIC*/ | 401 | case 2: /* Automatic, speed mode */ |
349 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | ||
350 | break; | 402 | break; |
351 | case 3: /* fan speed */ | 403 | case 3: /* fan speed */ |
352 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); | 404 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); |
353 | break; | 405 | break; |
406 | case 4: /* Automatic, pwm */ | ||
407 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | ||
408 | break; | ||
354 | } | 409 | } |
355 | } else { | 410 | } else { |
356 | /* clear each fanX_mode bit before setting them properly */ | 411 | /* clear each fanX_mode bit before setting them properly */ |
@@ -368,14 +423,15 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
368 | break; | 423 | break; |
369 | case 3: /* fan speed */ | 424 | case 3: /* fan speed */ |
370 | break; | 425 | break; |
426 | case 4: /* Automatic pwm */ | ||
427 | return -EINVAL; | ||
371 | } | 428 | } |
372 | } | 429 | } |
373 | 430 | ||
374 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); | 431 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); |
375 | data->pwm_enable[nr] = val; | 432 | data->pwm_enable[nr] = val; |
376 | if (val == 0) | 433 | if (val == 0) |
377 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | 434 | f75375_write_pwm(client, nr); |
378 | data->pwm[nr]); | ||
379 | return 0; | 435 | return 0; |
380 | } | 436 | } |
381 | 437 | ||
@@ -726,14 +782,17 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, | |||
726 | 782 | ||
727 | manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1); | 783 | manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1); |
728 | duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1); | 784 | duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1); |
729 | if (manu && duty) | 785 | if (!manu && duty) |
730 | /* speed */ | 786 | /* auto, pwm */ |
787 | data->pwm_enable[nr] = 4; | ||
788 | else if (manu && !duty) | ||
789 | /* manual, speed */ | ||
731 | data->pwm_enable[nr] = 3; | 790 | data->pwm_enable[nr] = 3; |
732 | else if (!manu && duty) | 791 | else if (!manu && !duty) |
733 | /* automatic */ | 792 | /* automatic, speed */ |
734 | data->pwm_enable[nr] = 2; | 793 | data->pwm_enable[nr] = 2; |
735 | else | 794 | else |
736 | /* manual */ | 795 | /* manual, pwm */ |
737 | data->pwm_enable[nr] = 1; | 796 | data->pwm_enable[nr] = 1; |
738 | } else { | 797 | } else { |
739 | if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr)))) | 798 | if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr)))) |
@@ -758,9 +817,11 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, | |||
758 | set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]); | 817 | set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]); |
759 | set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]); | 818 | set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]); |
760 | for (nr = 0; nr < 2; nr++) { | 819 | for (nr = 0; nr < 2; nr++) { |
820 | if (auto_mode_enabled(f75375s_pdata->pwm_enable[nr]) || | ||
821 | !duty_mode_enabled(f75375s_pdata->pwm_enable[nr])) | ||
822 | continue; | ||
761 | data->pwm[nr] = SENSORS_LIMIT(f75375s_pdata->pwm[nr], 0, 255); | 823 | data->pwm[nr] = SENSORS_LIMIT(f75375s_pdata->pwm[nr], 0, 255); |
762 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | 824 | f75375_write_pwm(client, nr); |
763 | data->pwm[nr]); | ||
764 | } | 825 | } |
765 | 826 | ||
766 | } | 827 | } |
@@ -787,7 +848,7 @@ static int f75375_probe(struct i2c_client *client, | |||
787 | if (err) | 848 | if (err) |
788 | goto exit_free; | 849 | goto exit_free; |
789 | 850 | ||
790 | if (data->kind == f75375) { | 851 | if (data->kind != f75373) { |
791 | err = sysfs_chmod_file(&client->dev.kobj, | 852 | err = sysfs_chmod_file(&client->dev.kobj, |
792 | &sensor_dev_attr_pwm1_mode.dev_attr.attr, | 853 | &sensor_dev_attr_pwm1_mode.dev_attr.attr, |
793 | S_IRUGO | S_IWUSR); | 854 | S_IRUGO | S_IWUSR); |
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 7e78f7c87857..3d471d56bf15 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c | |||
@@ -72,6 +72,7 @@ | |||
72 | 72 | ||
73 | #define MXS_I2C_QUEUESTAT (0x70) | 73 | #define MXS_I2C_QUEUESTAT (0x70) |
74 | #define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000 | 74 | #define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000 |
75 | #define MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK 0x0000001F | ||
75 | 76 | ||
76 | #define MXS_I2C_QUEUECMD (0x80) | 77 | #define MXS_I2C_QUEUECMD (0x80) |
77 | 78 | ||
@@ -219,14 +220,14 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
219 | int ret; | 220 | int ret; |
220 | int flags; | 221 | int flags; |
221 | 222 | ||
222 | init_completion(&i2c->cmd_complete); | ||
223 | |||
224 | dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n", | 223 | dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n", |
225 | msg->addr, msg->len, msg->flags, stop); | 224 | msg->addr, msg->len, msg->flags, stop); |
226 | 225 | ||
227 | if (msg->len == 0) | 226 | if (msg->len == 0) |
228 | return -EINVAL; | 227 | return -EINVAL; |
229 | 228 | ||
229 | init_completion(&i2c->cmd_complete); | ||
230 | |||
230 | flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; | 231 | flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; |
231 | 232 | ||
232 | if (msg->flags & I2C_M_RD) | 233 | if (msg->flags & I2C_M_RD) |
@@ -286,6 +287,7 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) | |||
286 | { | 287 | { |
287 | struct mxs_i2c_dev *i2c = dev_id; | 288 | struct mxs_i2c_dev *i2c = dev_id; |
288 | u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK; | 289 | u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK; |
290 | bool is_last_cmd; | ||
289 | 291 | ||
290 | if (!stat) | 292 | if (!stat) |
291 | return IRQ_NONE; | 293 | return IRQ_NONE; |
@@ -300,9 +302,14 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) | |||
300 | else | 302 | else |
301 | i2c->cmd_err = 0; | 303 | i2c->cmd_err = 0; |
302 | 304 | ||
303 | complete(&i2c->cmd_complete); | 305 | is_last_cmd = (readl(i2c->regs + MXS_I2C_QUEUESTAT) & |
306 | MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK) == 0; | ||
307 | |||
308 | if (is_last_cmd || i2c->cmd_err) | ||
309 | complete(&i2c->cmd_complete); | ||
304 | 310 | ||
305 | writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR); | 311 | writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR); |
312 | |||
306 | return IRQ_HANDLED; | 313 | return IRQ_HANDLED; |
307 | } | 314 | } |
308 | 315 | ||
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c index 288da5c1499d..103dbd92e256 100644 --- a/drivers/iommu/omap-iommu-debug.c +++ b/drivers/iommu/omap-iommu-debug.c | |||
@@ -44,7 +44,8 @@ static ssize_t debug_read_ver(struct file *file, char __user *userbuf, | |||
44 | static ssize_t debug_read_regs(struct file *file, char __user *userbuf, | 44 | static ssize_t debug_read_regs(struct file *file, char __user *userbuf, |
45 | size_t count, loff_t *ppos) | 45 | size_t count, loff_t *ppos) |
46 | { | 46 | { |
47 | struct omap_iommu *obj = file->private_data; | 47 | struct device *dev = file->private_data; |
48 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
48 | char *p, *buf; | 49 | char *p, *buf; |
49 | ssize_t bytes; | 50 | ssize_t bytes; |
50 | 51 | ||
@@ -67,7 +68,8 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf, | |||
67 | static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, | 68 | static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, |
68 | size_t count, loff_t *ppos) | 69 | size_t count, loff_t *ppos) |
69 | { | 70 | { |
70 | struct omap_iommu *obj = file->private_data; | 71 | struct device *dev = file->private_data; |
72 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
71 | char *p, *buf; | 73 | char *p, *buf; |
72 | ssize_t bytes, rest; | 74 | ssize_t bytes, rest; |
73 | 75 | ||
@@ -97,7 +99,8 @@ static ssize_t debug_write_pagetable(struct file *file, | |||
97 | struct iotlb_entry e; | 99 | struct iotlb_entry e; |
98 | struct cr_regs cr; | 100 | struct cr_regs cr; |
99 | int err; | 101 | int err; |
100 | struct omap_iommu *obj = file->private_data; | 102 | struct device *dev = file->private_data; |
103 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
101 | char buf[MAXCOLUMN], *p = buf; | 104 | char buf[MAXCOLUMN], *p = buf; |
102 | 105 | ||
103 | count = min(count, sizeof(buf)); | 106 | count = min(count, sizeof(buf)); |
@@ -184,7 +187,8 @@ out: | |||
184 | static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, | 187 | static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, |
185 | size_t count, loff_t *ppos) | 188 | size_t count, loff_t *ppos) |
186 | { | 189 | { |
187 | struct omap_iommu *obj = file->private_data; | 190 | struct device *dev = file->private_data; |
191 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
188 | char *p, *buf; | 192 | char *p, *buf; |
189 | size_t bytes; | 193 | size_t bytes; |
190 | 194 | ||
@@ -212,7 +216,8 @@ static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, | |||
212 | static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, | 216 | static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, |
213 | size_t count, loff_t *ppos) | 217 | size_t count, loff_t *ppos) |
214 | { | 218 | { |
215 | struct omap_iommu *obj = file->private_data; | 219 | struct device *dev = file->private_data; |
220 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
216 | char *p, *buf; | 221 | char *p, *buf; |
217 | struct iovm_struct *tmp; | 222 | struct iovm_struct *tmp; |
218 | int uninitialized_var(i); | 223 | int uninitialized_var(i); |
@@ -254,7 +259,7 @@ static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, | |||
254 | static ssize_t debug_read_mem(struct file *file, char __user *userbuf, | 259 | static ssize_t debug_read_mem(struct file *file, char __user *userbuf, |
255 | size_t count, loff_t *ppos) | 260 | size_t count, loff_t *ppos) |
256 | { | 261 | { |
257 | struct omap_iommu *obj = file->private_data; | 262 | struct device *dev = file->private_data; |
258 | char *p, *buf; | 263 | char *p, *buf; |
259 | struct iovm_struct *area; | 264 | struct iovm_struct *area; |
260 | ssize_t bytes; | 265 | ssize_t bytes; |
@@ -268,8 +273,8 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, | |||
268 | 273 | ||
269 | mutex_lock(&iommu_debug_lock); | 274 | mutex_lock(&iommu_debug_lock); |
270 | 275 | ||
271 | area = omap_find_iovm_area(obj, (u32)ppos); | 276 | area = omap_find_iovm_area(dev, (u32)ppos); |
272 | if (IS_ERR(area)) { | 277 | if (!area) { |
273 | bytes = -EINVAL; | 278 | bytes = -EINVAL; |
274 | goto err_out; | 279 | goto err_out; |
275 | } | 280 | } |
@@ -287,7 +292,7 @@ err_out: | |||
287 | static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, | 292 | static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, |
288 | size_t count, loff_t *ppos) | 293 | size_t count, loff_t *ppos) |
289 | { | 294 | { |
290 | struct omap_iommu *obj = file->private_data; | 295 | struct device *dev = file->private_data; |
291 | struct iovm_struct *area; | 296 | struct iovm_struct *area; |
292 | char *p, *buf; | 297 | char *p, *buf; |
293 | 298 | ||
@@ -305,8 +310,8 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, | |||
305 | goto err_out; | 310 | goto err_out; |
306 | } | 311 | } |
307 | 312 | ||
308 | area = omap_find_iovm_area(obj, (u32)ppos); | 313 | area = omap_find_iovm_area(dev, (u32)ppos); |
309 | if (IS_ERR(area)) { | 314 | if (!area) { |
310 | count = -EINVAL; | 315 | count = -EINVAL; |
311 | goto err_out; | 316 | goto err_out; |
312 | } | 317 | } |
@@ -350,7 +355,7 @@ DEBUG_FOPS(mem); | |||
350 | { \ | 355 | { \ |
351 | struct dentry *dent; \ | 356 | struct dentry *dent; \ |
352 | dent = debugfs_create_file(#attr, mode, parent, \ | 357 | dent = debugfs_create_file(#attr, mode, parent, \ |
353 | obj, &debug_##attr##_fops); \ | 358 | dev, &debug_##attr##_fops); \ |
354 | if (!dent) \ | 359 | if (!dent) \ |
355 | return -ENOMEM; \ | 360 | return -ENOMEM; \ |
356 | } | 361 | } |
@@ -362,20 +367,29 @@ static int iommu_debug_register(struct device *dev, void *data) | |||
362 | { | 367 | { |
363 | struct platform_device *pdev = to_platform_device(dev); | 368 | struct platform_device *pdev = to_platform_device(dev); |
364 | struct omap_iommu *obj = platform_get_drvdata(pdev); | 369 | struct omap_iommu *obj = platform_get_drvdata(pdev); |
370 | struct omap_iommu_arch_data *arch_data; | ||
365 | struct dentry *d, *parent; | 371 | struct dentry *d, *parent; |
366 | 372 | ||
367 | if (!obj || !obj->dev) | 373 | if (!obj || !obj->dev) |
368 | return -EINVAL; | 374 | return -EINVAL; |
369 | 375 | ||
376 | arch_data = kzalloc(sizeof(*arch_data), GFP_KERNEL); | ||
377 | if (!arch_data) | ||
378 | return -ENOMEM; | ||
379 | |||
380 | arch_data->iommu_dev = obj; | ||
381 | |||
382 | dev->archdata.iommu = arch_data; | ||
383 | |||
370 | d = debugfs_create_dir(obj->name, iommu_debug_root); | 384 | d = debugfs_create_dir(obj->name, iommu_debug_root); |
371 | if (!d) | 385 | if (!d) |
372 | return -ENOMEM; | 386 | goto nomem; |
373 | parent = d; | 387 | parent = d; |
374 | 388 | ||
375 | d = debugfs_create_u8("nr_tlb_entries", 400, parent, | 389 | d = debugfs_create_u8("nr_tlb_entries", 400, parent, |
376 | (u8 *)&obj->nr_tlb_entries); | 390 | (u8 *)&obj->nr_tlb_entries); |
377 | if (!d) | 391 | if (!d) |
378 | return -ENOMEM; | 392 | goto nomem; |
379 | 393 | ||
380 | DEBUG_ADD_FILE_RO(ver); | 394 | DEBUG_ADD_FILE_RO(ver); |
381 | DEBUG_ADD_FILE_RO(regs); | 395 | DEBUG_ADD_FILE_RO(regs); |
@@ -385,6 +399,22 @@ static int iommu_debug_register(struct device *dev, void *data) | |||
385 | DEBUG_ADD_FILE(mem); | 399 | DEBUG_ADD_FILE(mem); |
386 | 400 | ||
387 | return 0; | 401 | return 0; |
402 | |||
403 | nomem: | ||
404 | kfree(arch_data); | ||
405 | return -ENOMEM; | ||
406 | } | ||
407 | |||
408 | static int iommu_debug_unregister(struct device *dev, void *data) | ||
409 | { | ||
410 | if (!dev->archdata.iommu) | ||
411 | return 0; | ||
412 | |||
413 | kfree(dev->archdata.iommu); | ||
414 | |||
415 | dev->archdata.iommu = NULL; | ||
416 | |||
417 | return 0; | ||
388 | } | 418 | } |
389 | 419 | ||
390 | static int __init iommu_debug_init(void) | 420 | static int __init iommu_debug_init(void) |
@@ -411,6 +441,7 @@ module_init(iommu_debug_init) | |||
411 | static void __exit iommu_debugfs_exit(void) | 441 | static void __exit iommu_debugfs_exit(void) |
412 | { | 442 | { |
413 | debugfs_remove_recursive(iommu_debug_root); | 443 | debugfs_remove_recursive(iommu_debug_root); |
444 | omap_foreach_iommu_device(NULL, iommu_debug_unregister); | ||
414 | } | 445 | } |
415 | module_exit(iommu_debugfs_exit) | 446 | module_exit(iommu_debugfs_exit) |
416 | 447 | ||
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index d8edd979d01b..6899dcd02dfa 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -1223,7 +1223,8 @@ static int __init omap_iommu_init(void) | |||
1223 | 1223 | ||
1224 | return platform_driver_register(&omap_iommu_driver); | 1224 | return platform_driver_register(&omap_iommu_driver); |
1225 | } | 1225 | } |
1226 | module_init(omap_iommu_init); | 1226 | /* must be ready before omap3isp is probed */ |
1227 | subsys_initcall(omap_iommu_init); | ||
1227 | 1228 | ||
1228 | static void __exit omap_iommu_exit(void) | 1229 | static void __exit omap_iommu_exit(void) |
1229 | { | 1230 | { |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 04a3f1b756a8..192b0d118df4 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c | |||
@@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val) | |||
95 | spin_unlock_irqrestore(&priv->cmdreg_lock, flags); | 95 | spin_unlock_irqrestore(&priv->cmdreg_lock, flags); |
96 | } | 96 | } |
97 | 97 | ||
98 | static int sja1000_is_absent(struct sja1000_priv *priv) | ||
99 | { | ||
100 | return (priv->read_reg(priv, REG_MOD) == 0xFF); | ||
101 | } | ||
102 | |||
98 | static int sja1000_probe_chip(struct net_device *dev) | 103 | static int sja1000_probe_chip(struct net_device *dev) |
99 | { | 104 | { |
100 | struct sja1000_priv *priv = netdev_priv(dev); | 105 | struct sja1000_priv *priv = netdev_priv(dev); |
101 | 106 | ||
102 | if (priv->reg_base && (priv->read_reg(priv, 0) == 0xFF)) { | 107 | if (priv->reg_base && sja1000_is_absent(priv)) { |
103 | printk(KERN_INFO "%s: probing @0x%lX failed\n", | 108 | printk(KERN_INFO "%s: probing @0x%lX failed\n", |
104 | DRV_NAME, dev->base_addr); | 109 | DRV_NAME, dev->base_addr); |
105 | return 0; | 110 | return 0; |
@@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | |||
493 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { | 498 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { |
494 | n++; | 499 | n++; |
495 | status = priv->read_reg(priv, REG_SR); | 500 | status = priv->read_reg(priv, REG_SR); |
501 | /* check for absent controller due to hw unplug */ | ||
502 | if (status == 0xFF && sja1000_is_absent(priv)) | ||
503 | return IRQ_NONE; | ||
496 | 504 | ||
497 | if (isrc & IRQ_WUI) | 505 | if (isrc & IRQ_WUI) |
498 | dev_warn(dev->dev.parent, "wakeup interrupt\n"); | 506 | dev_warn(dev->dev.parent, "wakeup interrupt\n"); |
@@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | |||
509 | while (status & SR_RBS) { | 517 | while (status & SR_RBS) { |
510 | sja1000_rx(dev); | 518 | sja1000_rx(dev); |
511 | status = priv->read_reg(priv, REG_SR); | 519 | status = priv->read_reg(priv, REG_SR); |
520 | /* check for absent controller */ | ||
521 | if (status == 0xFF && sja1000_is_absent(priv)) | ||
522 | return IRQ_NONE; | ||
512 | } | 523 | } |
513 | } | 524 | } |
514 | if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) { | 525 | if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) { |
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index b8591246eb4c..1ff3c6df35a2 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -2244,10 +2244,6 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb, | |||
2244 | dev_info(&adapter->pdev->dev, "tx locked\n"); | 2244 | dev_info(&adapter->pdev->dev, "tx locked\n"); |
2245 | return NETDEV_TX_LOCKED; | 2245 | return NETDEV_TX_LOCKED; |
2246 | } | 2246 | } |
2247 | if (skb->mark == 0x01) | ||
2248 | type = atl1c_trans_high; | ||
2249 | else | ||
2250 | type = atl1c_trans_normal; | ||
2251 | 2247 | ||
2252 | if (atl1c_tpd_avail(adapter, type) < tpd_req) { | 2248 | if (atl1c_tpd_avail(adapter, type) < tpd_req) { |
2253 | /* no enough descriptor, just stop queue */ | 2249 | /* no enough descriptor, just stop queue */ |
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 3fb66d09ece5..cab87456a34a 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c | |||
@@ -2339,7 +2339,7 @@ static inline int __init b44_pci_init(void) | |||
2339 | return err; | 2339 | return err; |
2340 | } | 2340 | } |
2341 | 2341 | ||
2342 | static inline void __exit b44_pci_exit(void) | 2342 | static inline void b44_pci_exit(void) |
2343 | { | 2343 | { |
2344 | #ifdef CONFIG_B44_PCI | 2344 | #ifdef CONFIG_B44_PCI |
2345 | ssb_pcihost_unregister(&b44_pci_driver); | 2345 | ssb_pcihost_unregister(&b44_pci_driver); |
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index dd3a0a232ea0..818a573669e6 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -3584,7 +3584,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, | |||
3584 | fl6.flowi6_oif = dst_addr->sin6_scope_id; | 3584 | fl6.flowi6_oif = dst_addr->sin6_scope_id; |
3585 | 3585 | ||
3586 | *dst = ip6_route_output(&init_net, NULL, &fl6); | 3586 | *dst = ip6_route_output(&init_net, NULL, &fl6); |
3587 | if (*dst) | 3587 | if ((*dst)->error) { |
3588 | dst_release(*dst); | ||
3589 | *dst = NULL; | ||
3590 | return -ENETUNREACH; | ||
3591 | } else | ||
3588 | return 0; | 3592 | return 0; |
3589 | #endif | 3593 | #endif |
3590 | 3594 | ||
diff --git a/drivers/net/ethernet/cisco/enic/cq_enet_desc.h b/drivers/net/ethernet/cisco/enic/cq_enet_desc.h index c2c0680a1146..ac37cacc6136 100644 --- a/drivers/net/ethernet/cisco/enic/cq_enet_desc.h +++ b/drivers/net/ethernet/cisco/enic/cq_enet_desc.h | |||
@@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc, | |||
157 | CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0; | 157 | CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0; |
158 | *fcoe_enc_error = (desc->flags & | 158 | *fcoe_enc_error = (desc->flags & |
159 | CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0; | 159 | CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0; |
160 | *fcoe_eof = (u8)((desc->checksum_fcoe >> | 160 | *fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >> |
161 | CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) & | 161 | CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) & |
162 | CQ_ENET_RQ_DESC_FCOE_EOF_MASK); | 162 | CQ_ENET_RQ_DESC_FCOE_EOF_MASK); |
163 | *checksum = 0; | 163 | *checksum = 0; |
diff --git a/drivers/net/ethernet/cisco/enic/enic_pp.c b/drivers/net/ethernet/cisco/enic/enic_pp.c index 22bf03a1829e..c347b6236f8f 100644 --- a/drivers/net/ethernet/cisco/enic/enic_pp.c +++ b/drivers/net/ethernet/cisco/enic/enic_pp.c | |||
@@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf) | |||
72 | struct enic_port_profile *pp; | 72 | struct enic_port_profile *pp; |
73 | struct vic_provinfo *vp; | 73 | struct vic_provinfo *vp; |
74 | const u8 oui[3] = VIC_PROVINFO_CISCO_OUI; | 74 | const u8 oui[3] = VIC_PROVINFO_CISCO_OUI; |
75 | const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX); | 75 | const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX); |
76 | char uuid_str[38]; | 76 | char uuid_str[38]; |
77 | char client_mac_str[18]; | 77 | char client_mac_str[18]; |
78 | u8 *client_mac; | 78 | u8 *client_mac; |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 27d651a80f3f..55cbf65512c3 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu) | |||
2328 | ((new_mtu) < IPV6_MIN_MTU)) | 2328 | ((new_mtu) < IPV6_MIN_MTU)) |
2329 | return -EINVAL; | 2329 | return -EINVAL; |
2330 | 2330 | ||
2331 | if (new_mtu > 4000) { | ||
2332 | jme->reg_rxcs &= ~RXCS_FIFOTHNP; | ||
2333 | jme->reg_rxcs |= RXCS_FIFOTHNP_64QW; | ||
2334 | jme_restart_rx_engine(jme); | ||
2335 | } else { | ||
2336 | jme->reg_rxcs &= ~RXCS_FIFOTHNP; | ||
2337 | jme->reg_rxcs |= RXCS_FIFOTHNP_128QW; | ||
2338 | jme_restart_rx_engine(jme); | ||
2339 | } | ||
2340 | 2331 | ||
2341 | netdev->mtu = new_mtu; | 2332 | netdev->mtu = new_mtu; |
2342 | netdev_update_features(netdev); | 2333 | netdev_update_features(netdev); |
2343 | 2334 | ||
2335 | jme_restart_rx_engine(jme); | ||
2344 | jme_reset_link(jme); | 2336 | jme_reset_link(jme); |
2345 | 2337 | ||
2346 | return 0; | 2338 | return 0; |
diff --git a/drivers/net/ethernet/jme.h b/drivers/net/ethernet/jme.h index 4304072bd3c5..3efc897c9913 100644 --- a/drivers/net/ethernet/jme.h +++ b/drivers/net/ethernet/jme.h | |||
@@ -730,7 +730,7 @@ enum jme_rxcs_values { | |||
730 | RXCS_RETRYCNT_60 = 0x00000F00, | 730 | RXCS_RETRYCNT_60 = 0x00000F00, |
731 | 731 | ||
732 | RXCS_DEFAULT = RXCS_FIFOTHTP_128T | | 732 | RXCS_DEFAULT = RXCS_FIFOTHTP_128T | |
733 | RXCS_FIFOTHNP_128QW | | 733 | RXCS_FIFOTHNP_16QW | |
734 | RXCS_DMAREQSZ_128B | | 734 | RXCS_DMAREQSZ_128B | |
735 | RXCS_RETRYGAP_256ns | | 735 | RXCS_RETRYGAP_256ns | |
736 | RXCS_RETRYCNT_32, | 736 | RXCS_RETRYCNT_32, |
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 8fa41f3082cf..9129ace02560 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c | |||
@@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector) | |||
1036 | struct mlx4_priv *priv = mlx4_priv(dev); | 1036 | struct mlx4_priv *priv = mlx4_priv(dev); |
1037 | int vec = 0, err = 0, i; | 1037 | int vec = 0, err = 0, i; |
1038 | 1038 | ||
1039 | spin_lock(&priv->msix_ctl.pool_lock); | 1039 | mutex_lock(&priv->msix_ctl.pool_lock); |
1040 | for (i = 0; !vec && i < dev->caps.comp_pool; i++) { | 1040 | for (i = 0; !vec && i < dev->caps.comp_pool; i++) { |
1041 | if (~priv->msix_ctl.pool_bm & 1ULL << i) { | 1041 | if (~priv->msix_ctl.pool_bm & 1ULL << i) { |
1042 | priv->msix_ctl.pool_bm |= 1ULL << i; | 1042 | priv->msix_ctl.pool_bm |= 1ULL << i; |
@@ -1058,7 +1058,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector) | |||
1058 | eq_set_ci(&priv->eq_table.eq[vec], 1); | 1058 | eq_set_ci(&priv->eq_table.eq[vec], 1); |
1059 | } | 1059 | } |
1060 | } | 1060 | } |
1061 | spin_unlock(&priv->msix_ctl.pool_lock); | 1061 | mutex_unlock(&priv->msix_ctl.pool_lock); |
1062 | 1062 | ||
1063 | if (vec) { | 1063 | if (vec) { |
1064 | *vector = vec; | 1064 | *vector = vec; |
@@ -1079,13 +1079,13 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec) | |||
1079 | if (likely(i >= 0)) { | 1079 | if (likely(i >= 0)) { |
1080 | /*sanity check , making sure were not trying to free irq's | 1080 | /*sanity check , making sure were not trying to free irq's |
1081 | Belonging to a legacy EQ*/ | 1081 | Belonging to a legacy EQ*/ |
1082 | spin_lock(&priv->msix_ctl.pool_lock); | 1082 | mutex_lock(&priv->msix_ctl.pool_lock); |
1083 | if (priv->msix_ctl.pool_bm & 1ULL << i) { | 1083 | if (priv->msix_ctl.pool_bm & 1ULL << i) { |
1084 | free_irq(priv->eq_table.eq[vec].irq, | 1084 | free_irq(priv->eq_table.eq[vec].irq, |
1085 | &priv->eq_table.eq[vec]); | 1085 | &priv->eq_table.eq[vec]); |
1086 | priv->msix_ctl.pool_bm &= ~(1ULL << i); | 1086 | priv->msix_ctl.pool_bm &= ~(1ULL << i); |
1087 | } | 1087 | } |
1088 | spin_unlock(&priv->msix_ctl.pool_lock); | 1088 | mutex_unlock(&priv->msix_ctl.pool_lock); |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | } | 1091 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 678558b502fc..d498f049c74e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -531,15 +531,14 @@ int mlx4_change_port_types(struct mlx4_dev *dev, | |||
531 | for (port = 0; port < dev->caps.num_ports; port++) { | 531 | for (port = 0; port < dev->caps.num_ports; port++) { |
532 | /* Change the port type only if the new type is different | 532 | /* Change the port type only if the new type is different |
533 | * from the current, and not set to Auto */ | 533 | * from the current, and not set to Auto */ |
534 | if (port_types[port] != dev->caps.port_type[port + 1]) { | 534 | if (port_types[port] != dev->caps.port_type[port + 1]) |
535 | change = 1; | 535 | change = 1; |
536 | dev->caps.port_type[port + 1] = port_types[port]; | ||
537 | } | ||
538 | } | 536 | } |
539 | if (change) { | 537 | if (change) { |
540 | mlx4_unregister_device(dev); | 538 | mlx4_unregister_device(dev); |
541 | for (port = 1; port <= dev->caps.num_ports; port++) { | 539 | for (port = 1; port <= dev->caps.num_ports; port++) { |
542 | mlx4_CLOSE_PORT(dev, port); | 540 | mlx4_CLOSE_PORT(dev, port); |
541 | dev->caps.port_type[port] = port_types[port - 1]; | ||
543 | err = mlx4_SET_PORT(dev, port); | 542 | err = mlx4_SET_PORT(dev, port); |
544 | if (err) { | 543 | if (err) { |
545 | mlx4_err(dev, "Failed to set port %d, " | 544 | mlx4_err(dev, "Failed to set port %d, " |
@@ -986,6 +985,9 @@ static int map_bf_area(struct mlx4_dev *dev) | |||
986 | resource_size_t bf_len; | 985 | resource_size_t bf_len; |
987 | int err = 0; | 986 | int err = 0; |
988 | 987 | ||
988 | if (!dev->caps.bf_reg_size) | ||
989 | return -ENXIO; | ||
990 | |||
989 | bf_start = pci_resource_start(dev->pdev, 2) + | 991 | bf_start = pci_resource_start(dev->pdev, 2) + |
990 | (dev->caps.num_uars << PAGE_SHIFT); | 992 | (dev->caps.num_uars << PAGE_SHIFT); |
991 | bf_len = pci_resource_len(dev->pdev, 2) - | 993 | bf_len = pci_resource_len(dev->pdev, 2) - |
@@ -1825,7 +1827,7 @@ slave_start: | |||
1825 | goto err_master_mfunc; | 1827 | goto err_master_mfunc; |
1826 | 1828 | ||
1827 | priv->msix_ctl.pool_bm = 0; | 1829 | priv->msix_ctl.pool_bm = 0; |
1828 | spin_lock_init(&priv->msix_ctl.pool_lock); | 1830 | mutex_init(&priv->msix_ctl.pool_lock); |
1829 | 1831 | ||
1830 | mlx4_enable_msi_x(dev); | 1832 | mlx4_enable_msi_x(dev); |
1831 | if ((mlx4_is_mfunc(dev)) && | 1833 | if ((mlx4_is_mfunc(dev)) && |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index c92269f8c057..28f8251561f4 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h | |||
@@ -697,7 +697,7 @@ struct mlx4_sense { | |||
697 | 697 | ||
698 | struct mlx4_msix_ctl { | 698 | struct mlx4_msix_ctl { |
699 | u64 pool_bm; | 699 | u64 pool_bm; |
700 | spinlock_t pool_lock; | 700 | struct mutex pool_lock; |
701 | }; | 701 | }; |
702 | 702 | ||
703 | struct mlx4_steer { | 703 | struct mlx4_steer { |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index 231176fcd2ba..2784bc706f1e 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -1545,7 +1545,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev) | |||
1545 | 1545 | ||
1546 | netdev->irq = platform_get_irq(pdev, 0); | 1546 | netdev->irq = platform_get_irq(pdev, 0); |
1547 | 1547 | ||
1548 | if (netdev->irq < 0) { | 1548 | if ((int)netdev->irq < 0) { |
1549 | err = netdev->irq; | 1549 | err = netdev->irq; |
1550 | goto err_get_irq; | 1550 | goto err_get_irq; |
1551 | } | 1551 | } |
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c index aca349861767..fc52fca74193 100644 --- a/drivers/net/ethernet/sfc/rx.c +++ b/drivers/net/ethernet/sfc/rx.c | |||
@@ -156,11 +156,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue) | |||
156 | if (unlikely(!skb)) | 156 | if (unlikely(!skb)) |
157 | return -ENOMEM; | 157 | return -ENOMEM; |
158 | 158 | ||
159 | /* Adjust the SKB for padding and checksum */ | 159 | /* Adjust the SKB for padding */ |
160 | skb_reserve(skb, NET_IP_ALIGN); | 160 | skb_reserve(skb, NET_IP_ALIGN); |
161 | rx_buf->len = skb_len - NET_IP_ALIGN; | 161 | rx_buf->len = skb_len - NET_IP_ALIGN; |
162 | rx_buf->is_page = false; | 162 | rx_buf->is_page = false; |
163 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
164 | 163 | ||
165 | rx_buf->dma_addr = pci_map_single(efx->pci_dev, | 164 | rx_buf->dma_addr = pci_map_single(efx->pci_dev, |
166 | skb->data, rx_buf->len, | 165 | skb->data, rx_buf->len, |
@@ -496,6 +495,7 @@ static void efx_rx_packet_gro(struct efx_channel *channel, | |||
496 | 495 | ||
497 | EFX_BUG_ON_PARANOID(!checksummed); | 496 | EFX_BUG_ON_PARANOID(!checksummed); |
498 | rx_buf->u.skb = NULL; | 497 | rx_buf->u.skb = NULL; |
498 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
499 | 499 | ||
500 | gro_result = napi_gro_receive(napi, skb); | 500 | gro_result = napi_gro_receive(napi, skb); |
501 | } | 501 | } |
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 4fa0bcb25dfc..4b2f54565f64 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c | |||
@@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status) | |||
1009 | int ret; | 1009 | int ret; |
1010 | 1010 | ||
1011 | /* free and bail if we are shutting down */ | 1011 | /* free and bail if we are shutting down */ |
1012 | if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { | 1012 | if (unlikely(!netif_running(ndev))) { |
1013 | dev_kfree_skb_any(skb); | 1013 | dev_kfree_skb_any(skb); |
1014 | return; | 1014 | return; |
1015 | } | 1015 | } |
@@ -1038,7 +1038,9 @@ static void emac_rx_handler(void *token, int len, int status) | |||
1038 | recycle: | 1038 | recycle: |
1039 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, | 1039 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, |
1040 | skb_tailroom(skb), GFP_KERNEL); | 1040 | skb_tailroom(skb), GFP_KERNEL); |
1041 | if (WARN_ON(ret < 0)) | 1041 | |
1042 | WARN_ON(ret == -ENOMEM); | ||
1043 | if (unlikely(ret < 0)) | ||
1042 | dev_kfree_skb_any(skb); | 1044 | dev_kfree_skb_any(skb); |
1043 | } | 1045 | } |
1044 | 1046 | ||
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index c81f136ae670..0856e1b7a849 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c | |||
@@ -30,16 +30,16 @@ | |||
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
32 | 32 | ||
33 | MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IC1001 PHY drivers"); | 33 | MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IP101G/IC1001 PHY drivers"); |
34 | MODULE_AUTHOR("Michael Barkowski"); | 34 | MODULE_AUTHOR("Michael Barkowski"); |
35 | MODULE_LICENSE("GPL"); | 35 | MODULE_LICENSE("GPL"); |
36 | 36 | ||
37 | /* IP101A/IP1001 */ | 37 | /* IP101A/G - IP1001 */ |
38 | #define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */ | 38 | #define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */ |
39 | #define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */ | 39 | #define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */ |
40 | #define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */ | 40 | #define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */ |
41 | #define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ | 41 | #define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ |
42 | #define IP101A_APS_ON 2 /* IP101A APS Mode bit */ | 42 | #define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */ |
43 | 43 | ||
44 | static int ip175c_config_init(struct phy_device *phydev) | 44 | static int ip175c_config_init(struct phy_device *phydev) |
45 | { | 45 | { |
@@ -98,20 +98,24 @@ static int ip175c_config_init(struct phy_device *phydev) | |||
98 | 98 | ||
99 | static int ip1xx_reset(struct phy_device *phydev) | 99 | static int ip1xx_reset(struct phy_device *phydev) |
100 | { | 100 | { |
101 | int err, bmcr; | 101 | int bmcr; |
102 | 102 | ||
103 | /* Software Reset PHY */ | 103 | /* Software Reset PHY */ |
104 | bmcr = phy_read(phydev, MII_BMCR); | 104 | bmcr = phy_read(phydev, MII_BMCR); |
105 | if (bmcr < 0) | ||
106 | return bmcr; | ||
105 | bmcr |= BMCR_RESET; | 107 | bmcr |= BMCR_RESET; |
106 | err = phy_write(phydev, MII_BMCR, bmcr); | 108 | bmcr = phy_write(phydev, MII_BMCR, bmcr); |
107 | if (err < 0) | 109 | if (bmcr < 0) |
108 | return err; | 110 | return bmcr; |
109 | 111 | ||
110 | do { | 112 | do { |
111 | bmcr = phy_read(phydev, MII_BMCR); | 113 | bmcr = phy_read(phydev, MII_BMCR); |
114 | if (bmcr < 0) | ||
115 | return bmcr; | ||
112 | } while (bmcr & BMCR_RESET); | 116 | } while (bmcr & BMCR_RESET); |
113 | 117 | ||
114 | return err; | 118 | return 0; |
115 | } | 119 | } |
116 | 120 | ||
117 | static int ip1001_config_init(struct phy_device *phydev) | 121 | static int ip1001_config_init(struct phy_device *phydev) |
@@ -124,7 +128,10 @@ static int ip1001_config_init(struct phy_device *phydev) | |||
124 | 128 | ||
125 | /* Enable Auto Power Saving mode */ | 129 | /* Enable Auto Power Saving mode */ |
126 | c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2); | 130 | c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2); |
131 | if (c < 0) | ||
132 | return c; | ||
127 | c |= IP1001_APS_ON; | 133 | c |= IP1001_APS_ON; |
134 | c = phy_write(phydev, IP1001_SPEC_CTRL_STATUS_2, c); | ||
128 | if (c < 0) | 135 | if (c < 0) |
129 | return c; | 136 | return c; |
130 | 137 | ||
@@ -132,14 +139,19 @@ static int ip1001_config_init(struct phy_device *phydev) | |||
132 | /* Additional delay (2ns) used to adjust RX clock phase | 139 | /* Additional delay (2ns) used to adjust RX clock phase |
133 | * at RGMII interface */ | 140 | * at RGMII interface */ |
134 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); | 141 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); |
142 | if (c < 0) | ||
143 | return c; | ||
144 | |||
135 | c |= IP1001_PHASE_SEL_MASK; | 145 | c |= IP1001_PHASE_SEL_MASK; |
136 | c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); | 146 | c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); |
147 | if (c < 0) | ||
148 | return c; | ||
137 | } | 149 | } |
138 | 150 | ||
139 | return c; | 151 | return 0; |
140 | } | 152 | } |
141 | 153 | ||
142 | static int ip101a_config_init(struct phy_device *phydev) | 154 | static int ip101a_g_config_init(struct phy_device *phydev) |
143 | { | 155 | { |
144 | int c; | 156 | int c; |
145 | 157 | ||
@@ -149,7 +161,7 @@ static int ip101a_config_init(struct phy_device *phydev) | |||
149 | 161 | ||
150 | /* Enable Auto Power Saving mode */ | 162 | /* Enable Auto Power Saving mode */ |
151 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); | 163 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); |
152 | c |= IP101A_APS_ON; | 164 | c |= IP101A_G_APS_ON; |
153 | return c; | 165 | return c; |
154 | } | 166 | } |
155 | 167 | ||
@@ -191,6 +203,7 @@ static struct phy_driver ip1001_driver = { | |||
191 | .phy_id_mask = 0x0ffffff0, | 203 | .phy_id_mask = 0x0ffffff0, |
192 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | | 204 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | |
193 | SUPPORTED_Asym_Pause, | 205 | SUPPORTED_Asym_Pause, |
206 | .flags = PHY_HAS_INTERRUPT, | ||
194 | .config_init = &ip1001_config_init, | 207 | .config_init = &ip1001_config_init, |
195 | .config_aneg = &genphy_config_aneg, | 208 | .config_aneg = &genphy_config_aneg, |
196 | .read_status = &genphy_read_status, | 209 | .read_status = &genphy_read_status, |
@@ -199,13 +212,14 @@ static struct phy_driver ip1001_driver = { | |||
199 | .driver = { .owner = THIS_MODULE,}, | 212 | .driver = { .owner = THIS_MODULE,}, |
200 | }; | 213 | }; |
201 | 214 | ||
202 | static struct phy_driver ip101a_driver = { | 215 | static struct phy_driver ip101a_g_driver = { |
203 | .phy_id = 0x02430c54, | 216 | .phy_id = 0x02430c54, |
204 | .name = "ICPlus IP101A", | 217 | .name = "ICPlus IP101A/G", |
205 | .phy_id_mask = 0x0ffffff0, | 218 | .phy_id_mask = 0x0ffffff0, |
206 | .features = PHY_BASIC_FEATURES | SUPPORTED_Pause | | 219 | .features = PHY_BASIC_FEATURES | SUPPORTED_Pause | |
207 | SUPPORTED_Asym_Pause, | 220 | SUPPORTED_Asym_Pause, |
208 | .config_init = &ip101a_config_init, | 221 | .flags = PHY_HAS_INTERRUPT, |
222 | .config_init = &ip101a_g_config_init, | ||
209 | .config_aneg = &genphy_config_aneg, | 223 | .config_aneg = &genphy_config_aneg, |
210 | .read_status = &genphy_read_status, | 224 | .read_status = &genphy_read_status, |
211 | .suspend = genphy_suspend, | 225 | .suspend = genphy_suspend, |
@@ -221,7 +235,7 @@ static int __init icplus_init(void) | |||
221 | if (ret < 0) | 235 | if (ret < 0) |
222 | return -ENODEV; | 236 | return -ENODEV; |
223 | 237 | ||
224 | ret = phy_driver_register(&ip101a_driver); | 238 | ret = phy_driver_register(&ip101a_g_driver); |
225 | if (ret < 0) | 239 | if (ret < 0) |
226 | return -ENODEV; | 240 | return -ENODEV; |
227 | 241 | ||
@@ -231,7 +245,7 @@ static int __init icplus_init(void) | |||
231 | static void __exit icplus_exit(void) | 245 | static void __exit icplus_exit(void) |
232 | { | 246 | { |
233 | phy_driver_unregister(&ip1001_driver); | 247 | phy_driver_unregister(&ip1001_driver); |
234 | phy_driver_unregister(&ip101a_driver); | 248 | phy_driver_unregister(&ip101a_g_driver); |
235 | phy_driver_unregister(&ip175c_driver); | 249 | phy_driver_unregister(&ip175c_driver); |
236 | } | 250 | } |
237 | 251 | ||
@@ -241,6 +255,7 @@ module_exit(icplus_exit); | |||
241 | static struct mdio_device_id __maybe_unused icplus_tbl[] = { | 255 | static struct mdio_device_id __maybe_unused icplus_tbl[] = { |
242 | { 0x02430d80, 0x0ffffff0 }, | 256 | { 0x02430d80, 0x0ffffff0 }, |
243 | { 0x02430d90, 0x0ffffff0 }, | 257 | { 0x02430d90, 0x0ffffff0 }, |
258 | { 0x02430c54, 0x0ffffff0 }, | ||
244 | { } | 259 | { } |
245 | }; | 260 | }; |
246 | 261 | ||
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index edfa15d2e795..486b4048850d 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -2024,14 +2024,22 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
2024 | continue; | 2024 | continue; |
2025 | } | 2025 | } |
2026 | if (PPP_MP_CB(p)->sequence != seq) { | 2026 | if (PPP_MP_CB(p)->sequence != seq) { |
2027 | u32 oldseq; | ||
2027 | /* Fragment `seq' is missing. If it is after | 2028 | /* Fragment `seq' is missing. If it is after |
2028 | minseq, it might arrive later, so stop here. */ | 2029 | minseq, it might arrive later, so stop here. */ |
2029 | if (seq_after(seq, minseq)) | 2030 | if (seq_after(seq, minseq)) |
2030 | break; | 2031 | break; |
2031 | /* Fragment `seq' is lost, keep going. */ | 2032 | /* Fragment `seq' is lost, keep going. */ |
2032 | lost = 1; | 2033 | lost = 1; |
2034 | oldseq = seq; | ||
2033 | seq = seq_before(minseq, PPP_MP_CB(p)->sequence)? | 2035 | seq = seq_before(minseq, PPP_MP_CB(p)->sequence)? |
2034 | minseq + 1: PPP_MP_CB(p)->sequence; | 2036 | minseq + 1: PPP_MP_CB(p)->sequence; |
2037 | |||
2038 | if (ppp->debug & 1) | ||
2039 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
2040 | "lost frag %u..%u\n", | ||
2041 | oldseq, seq-1); | ||
2042 | |||
2035 | goto again; | 2043 | goto again; |
2036 | } | 2044 | } |
2037 | 2045 | ||
@@ -2076,6 +2084,10 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
2076 | struct sk_buff *tmp2; | 2084 | struct sk_buff *tmp2; |
2077 | 2085 | ||
2078 | skb_queue_reverse_walk_from_safe(list, p, tmp2) { | 2086 | skb_queue_reverse_walk_from_safe(list, p, tmp2) { |
2087 | if (ppp->debug & 1) | ||
2088 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
2089 | "discarding frag %u\n", | ||
2090 | PPP_MP_CB(p)->sequence); | ||
2079 | __skb_unlink(p, list); | 2091 | __skb_unlink(p, list); |
2080 | kfree_skb(p); | 2092 | kfree_skb(p); |
2081 | } | 2093 | } |
@@ -2091,6 +2103,17 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
2091 | /* If we have discarded any fragments, | 2103 | /* If we have discarded any fragments, |
2092 | signal a receive error. */ | 2104 | signal a receive error. */ |
2093 | if (PPP_MP_CB(head)->sequence != ppp->nextseq) { | 2105 | if (PPP_MP_CB(head)->sequence != ppp->nextseq) { |
2106 | skb_queue_walk_safe(list, p, tmp) { | ||
2107 | if (p == head) | ||
2108 | break; | ||
2109 | if (ppp->debug & 1) | ||
2110 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
2111 | "discarding frag %u\n", | ||
2112 | PPP_MP_CB(p)->sequence); | ||
2113 | __skb_unlink(p, list); | ||
2114 | kfree_skb(p); | ||
2115 | } | ||
2116 | |||
2094 | if (ppp->debug & 1) | 2117 | if (ppp->debug & 1) |
2095 | netdev_printk(KERN_DEBUG, ppp->dev, | 2118 | netdev_printk(KERN_DEBUG, ppp->dev, |
2096 | " missed pkts %u..%u\n", | 2119 | " missed pkts %u..%u\n", |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 41a61efc331e..90a30026a931 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -573,6 +573,13 @@ static const struct usb_device_id products [] = { | |||
573 | .driver_info = 0, | 573 | .driver_info = 0, |
574 | }, | 574 | }, |
575 | 575 | ||
576 | /* Logitech Harmony 900 - uses the pseudo-MDLM (BLAN) driver */ | ||
577 | { | ||
578 | USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0xc11f, USB_CLASS_COMM, | ||
579 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
580 | .driver_info = 0, | ||
581 | }, | ||
582 | |||
576 | /* | 583 | /* |
577 | * WHITELIST!!! | 584 | * WHITELIST!!! |
578 | * | 585 | * |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 304fe78ff60e..e1324b4a0f66 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -1632,7 +1632,7 @@ static int hso_get_count(struct tty_struct *tty, | |||
1632 | struct hso_serial *serial = get_serial_by_tty(tty); | 1632 | struct hso_serial *serial = get_serial_by_tty(tty); |
1633 | struct hso_tiocmget *tiocmget = serial->tiocmget; | 1633 | struct hso_tiocmget *tiocmget = serial->tiocmget; |
1634 | 1634 | ||
1635 | memset(&icount, 0, sizeof(struct serial_icounter_struct)); | 1635 | memset(icount, 0, sizeof(struct serial_icounter_struct)); |
1636 | 1636 | ||
1637 | if (!tiocmget) | 1637 | if (!tiocmget) |
1638 | return -ENOENT; | 1638 | return -ENOENT; |
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index f701d4127087..c3197ce0e2ad 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
@@ -316,6 +316,11 @@ static const struct usb_device_id products [] = { | |||
316 | ZAURUS_MASTER_INTERFACE, | 316 | ZAURUS_MASTER_INTERFACE, |
317 | .driver_info = ZAURUS_PXA_INFO, | 317 | .driver_info = ZAURUS_PXA_INFO, |
318 | }, { | 318 | }, { |
319 | /* C-750/C-760/C-860/SL-C3000 PDA in MDLM mode */ | ||
320 | USB_DEVICE_AND_INTERFACE_INFO(0x04DD, 0x9031, USB_CLASS_COMM, | ||
321 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
322 | .driver_info = (unsigned long) &bogus_mdlm_info, | ||
323 | }, { | ||
319 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | 324 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO |
320 | | USB_DEVICE_ID_MATCH_DEVICE, | 325 | | USB_DEVICE_ID_MATCH_DEVICE, |
321 | .idVendor = 0x04DD, | 326 | .idVendor = 0x04DD, |
@@ -349,6 +354,13 @@ static const struct usb_device_id products [] = { | |||
349 | ZAURUS_MASTER_INTERFACE, | 354 | ZAURUS_MASTER_INTERFACE, |
350 | .driver_info = OLYMPUS_MXL_INFO, | 355 | .driver_info = OLYMPUS_MXL_INFO, |
351 | }, | 356 | }, |
357 | |||
358 | /* Logitech Harmony 900 - uses the pseudo-MDLM (BLAN) driver */ | ||
359 | { | ||
360 | USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0xc11f, USB_CLASS_COMM, | ||
361 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
362 | .driver_info = (unsigned long) &bogus_mdlm_info, | ||
363 | }, | ||
352 | { }, // END | 364 | { }, // END |
353 | }; | 365 | }; |
354 | MODULE_DEVICE_TABLE(usb, products); | 366 | MODULE_DEVICE_TABLE(usb, products); |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index de7fc345148a..3dcd3857a36c 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -843,8 +843,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
843 | /* for simplicity, don't copy L4 headers */ | 843 | /* for simplicity, don't copy L4 headers */ |
844 | ctx->l4_hdr_size = 0; | 844 | ctx->l4_hdr_size = 0; |
845 | } | 845 | } |
846 | ctx->copy_size = ctx->eth_ip_hdr_size + | 846 | ctx->copy_size = min(ctx->eth_ip_hdr_size + |
847 | ctx->l4_hdr_size; | 847 | ctx->l4_hdr_size, skb->len); |
848 | } else { | 848 | } else { |
849 | ctx->eth_ip_hdr_size = 0; | 849 | ctx->eth_ip_hdr_size = 0; |
850 | ctx->l4_hdr_size = 0; | 850 | ctx->l4_hdr_size = 0; |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 635b592ad961..a427a16bb739 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1346,7 +1346,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
1346 | fc = hdr->frame_control; | 1346 | fc = hdr->frame_control; |
1347 | for (i = 0; i < sc->hw->max_rates; i++) { | 1347 | for (i = 0; i < sc->hw->max_rates; i++) { |
1348 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; | 1348 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; |
1349 | if (!rate->count) | 1349 | if (rate->idx < 0 || !rate->count) |
1350 | break; | 1350 | break; |
1351 | 1351 | ||
1352 | final_ts_idx = i; | 1352 | final_ts_idx = i; |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index c3b6c4652cd6..5b2972b43b0e 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -841,7 +841,12 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
841 | ret = mwifiex_set_rf_channel(priv, channel, | 841 | ret = mwifiex_set_rf_channel(priv, channel, |
842 | priv->adapter->channel_type); | 842 | priv->adapter->channel_type); |
843 | 843 | ||
844 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); /* Disable keys */ | 844 | /* As this is new association, clear locally stored |
845 | * keys and security related flags */ | ||
846 | priv->sec_info.wpa_enabled = false; | ||
847 | priv->sec_info.wpa2_enabled = false; | ||
848 | priv->wep_key_curr_index = 0; | ||
849 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); | ||
845 | 850 | ||
846 | if (mode == NL80211_IFTYPE_ADHOC) { | 851 | if (mode == NL80211_IFTYPE_ADHOC) { |
847 | /* "privacy" is set only for ad-hoc mode */ | 852 | /* "privacy" is set only for ad-hoc mode */ |
@@ -886,6 +891,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
886 | dev_dbg(priv->adapter->dev, | 891 | dev_dbg(priv->adapter->dev, |
887 | "info: setting wep encryption" | 892 | "info: setting wep encryption" |
888 | " with key len %d\n", sme->key_len); | 893 | " with key len %d\n", sme->key_len); |
894 | priv->wep_key_curr_index = sme->key_idx; | ||
889 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, | 895 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, |
890 | sme->key_idx, 0); | 896 | sme->key_idx, 0); |
891 | } | 897 | } |
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h index a9c46cc2db37..8c33491b21fe 100644 --- a/drivers/parisc/iommu-helpers.h +++ b/drivers/parisc/iommu-helpers.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/prefetch.h> | ||
2 | |||
1 | /** | 3 | /** |
2 | * iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir. | 4 | * iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir. |
3 | * @ioc: The I/O Controller. | 5 | * @ioc: The I/O Controller. |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index a87e2728b2c3..64d433ec4fc6 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -328,21 +328,15 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) | |||
328 | goto err1; | 328 | goto err1; |
329 | } | 329 | } |
330 | 330 | ||
331 | if (ret) { | 331 | pxa2xx_configure_sockets(&dev->dev); |
332 | while (--i >= 0) | 332 | dev_set_drvdata(&dev->dev, sinfo); |
333 | soc_pcmcia_remove_one(&sinfo->skt[i]); | ||
334 | kfree(sinfo); | ||
335 | clk_put(clk); | ||
336 | } else { | ||
337 | pxa2xx_configure_sockets(&dev->dev); | ||
338 | dev_set_drvdata(&dev->dev, sinfo); | ||
339 | } | ||
340 | 333 | ||
341 | return 0; | 334 | return 0; |
342 | 335 | ||
343 | err1: | 336 | err1: |
344 | while (--i >= 0) | 337 | while (--i >= 0) |
345 | soc_pcmcia_remove_one(&sinfo->skt[i]); | 338 | soc_pcmcia_remove_one(&sinfo->skt[i]); |
339 | clk_put(clk); | ||
346 | kfree(sinfo); | 340 | kfree(sinfo); |
347 | err0: | 341 | err0: |
348 | return ret; | 342 | return ret; |
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index df33530cec4a..28b81ae4cf7f 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -196,7 +196,7 @@ static const unsigned int LDO12_suspend_table[] = { | |||
196 | }; | 196 | }; |
197 | 197 | ||
198 | static const unsigned int LDO13_table[] = { | 198 | static const unsigned int LDO13_table[] = { |
199 | 1300000, 1800000, 2000000, 2500000, 2800000, 3000000, 0, 0, | 199 | 1200000, 1300000, 1800000, 2000000, 2500000, 2800000, 3000000, 0, |
200 | }; | 200 | }; |
201 | 201 | ||
202 | static const unsigned int LDO13_suspend_table[] = { | 202 | static const unsigned int LDO13_suspend_table[] = { |
@@ -389,10 +389,10 @@ static struct pm8607_regulator_info pm8607_regulator_info[] = { | |||
389 | PM8607_LDO( 7, LDO7, 0, 3, SUPPLIES_EN12, 1), | 389 | PM8607_LDO( 7, LDO7, 0, 3, SUPPLIES_EN12, 1), |
390 | PM8607_LDO( 8, LDO8, 0, 3, SUPPLIES_EN12, 2), | 390 | PM8607_LDO( 8, LDO8, 0, 3, SUPPLIES_EN12, 2), |
391 | PM8607_LDO( 9, LDO9, 0, 3, SUPPLIES_EN12, 3), | 391 | PM8607_LDO( 9, LDO9, 0, 3, SUPPLIES_EN12, 3), |
392 | PM8607_LDO(10, LDO10, 0, 3, SUPPLIES_EN12, 4), | 392 | PM8607_LDO(10, LDO10, 0, 4, SUPPLIES_EN12, 4), |
393 | PM8607_LDO(12, LDO12, 0, 4, SUPPLIES_EN12, 5), | 393 | PM8607_LDO(12, LDO12, 0, 4, SUPPLIES_EN12, 5), |
394 | PM8607_LDO(13, VIBRATOR_SET, 1, 3, VIBRATOR_SET, 0), | 394 | PM8607_LDO(13, VIBRATOR_SET, 1, 3, VIBRATOR_SET, 0), |
395 | PM8607_LDO(14, LDO14, 0, 4, SUPPLIES_EN12, 6), | 395 | PM8607_LDO(14, LDO14, 0, 3, SUPPLIES_EN12, 6), |
396 | }; | 396 | }; |
397 | 397 | ||
398 | static int __devinit pm8607_regulator_probe(struct platform_device *pdev) | 398 | static int __devinit pm8607_regulator_probe(struct platform_device *pdev) |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 70880be26015..2617b1ed4709 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -18,12 +18,12 @@ | |||
18 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 18 | #include <linux/hdreg.h> /* HDIO_GETGEO */ |
19 | #include <linux/bio.h> | 19 | #include <linux/bio.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/compat.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | 23 | ||
23 | #include <asm/debug.h> | 24 | #include <asm/debug.h> |
24 | #include <asm/idals.h> | 25 | #include <asm/idals.h> |
25 | #include <asm/ebcdic.h> | 26 | #include <asm/ebcdic.h> |
26 | #include <asm/compat.h> | ||
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/cio.h> | 29 | #include <asm/cio.h> |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index f1a2016829fc..792c69e78fe2 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #define KMSG_COMPONENT "dasd" | 13 | #define KMSG_COMPONENT "dasd" |
14 | 14 | ||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/compat.h> | ||
16 | #include <linux/major.h> | 17 | #include <linux/major.h> |
17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
18 | #include <linux/blkpg.h> | 19 | #include <linux/blkpg.h> |
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index e71298158f9e..911704571b9c 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/console.h> | 11 | #include <linux/console.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/compat.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/list.h> | 16 | #include <linux/list.h> |
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 75bde6a8b7dc..89c03e6b1c0c 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/compat.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/miscdevice.h> | 18 | #include <linux/miscdevice.h> |
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 0c87b0fc7714..8f9a1a384496 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/compat.h> | ||
11 | #include <linux/device.h> | 12 | #include <linux/device.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/uaccess.h> | 14 | #include <linux/uaccess.h> |
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index 303dde09d294..fab2c2592a97 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #define KMSG_COMPONENT "zfcp" | 11 | #define KMSG_COMPONENT "zfcp" |
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/compat.h> | ||
14 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/miscdevice.h> | 17 | #include <linux/miscdevice.h> |
diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c index b31a8e3841d7..d4ed9eb52657 100644 --- a/drivers/scsi/osd/osd_uld.c +++ b/drivers/scsi/osd/osd_uld.c | |||
@@ -69,10 +69,10 @@ | |||
69 | #ifndef SCSI_OSD_MAJOR | 69 | #ifndef SCSI_OSD_MAJOR |
70 | # define SCSI_OSD_MAJOR 260 | 70 | # define SCSI_OSD_MAJOR 260 |
71 | #endif | 71 | #endif |
72 | #define SCSI_OSD_MAX_MINOR 64 | 72 | #define SCSI_OSD_MAX_MINOR MINORMASK |
73 | 73 | ||
74 | static const char osd_name[] = "osd"; | 74 | static const char osd_name[] = "osd"; |
75 | static const char *osd_version_string = "open-osd 0.2.0"; | 75 | static const char *osd_version_string = "open-osd 0.2.1"; |
76 | 76 | ||
77 | MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>"); | 77 | MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>"); |
78 | MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko"); | 78 | MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko"); |
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig index 74d29b552901..408a9927be92 100644 --- a/drivers/video/omap2/displays/Kconfig +++ b/drivers/video/omap2/displays/Kconfig | |||
@@ -12,7 +12,7 @@ config PANEL_GENERIC_DPI | |||
12 | 12 | ||
13 | config PANEL_DVI | 13 | config PANEL_DVI |
14 | tristate "DVI output" | 14 | tristate "DVI output" |
15 | depends on OMAP2_DSS_DPI | 15 | depends on OMAP2_DSS_DPI && I2C |
16 | help | 16 | help |
17 | Driver for external monitors, connected via DVI. The driver uses i2c | 17 | Driver for external monitors, connected via DVI. The driver uses i2c |
18 | to read EDID information from the monitor. | 18 | to read EDID information from the monitor. |
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 052dc874cd3d..87b3e25294cf 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c | |||
@@ -1276,6 +1276,9 @@ int dss_ovl_enable(struct omap_overlay *ovl) | |||
1276 | 1276 | ||
1277 | spin_unlock_irqrestore(&data_lock, flags); | 1277 | spin_unlock_irqrestore(&data_lock, flags); |
1278 | 1278 | ||
1279 | /* wait for overlay to be enabled */ | ||
1280 | wait_pending_extra_info_updates(); | ||
1281 | |||
1279 | mutex_unlock(&apply_lock); | 1282 | mutex_unlock(&apply_lock); |
1280 | 1283 | ||
1281 | return 0; | 1284 | return 0; |
@@ -1313,6 +1316,9 @@ int dss_ovl_disable(struct omap_overlay *ovl) | |||
1313 | 1316 | ||
1314 | spin_unlock_irqrestore(&data_lock, flags); | 1317 | spin_unlock_irqrestore(&data_lock, flags); |
1315 | 1318 | ||
1319 | /* wait for the overlay to be disabled */ | ||
1320 | wait_pending_extra_info_updates(); | ||
1321 | |||
1316 | mutex_unlock(&apply_lock); | 1322 | mutex_unlock(&apply_lock); |
1317 | 1323 | ||
1318 | return 0; | 1324 | return 0; |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index d7aa3b056529..a36b934b2db4 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -165,9 +165,25 @@ static int hdmi_runtime_get(void) | |||
165 | 165 | ||
166 | DSSDBG("hdmi_runtime_get\n"); | 166 | DSSDBG("hdmi_runtime_get\n"); |
167 | 167 | ||
168 | /* | ||
169 | * HACK: Add dss_runtime_get() to ensure DSS clock domain is enabled. | ||
170 | * This should be removed later. | ||
171 | */ | ||
172 | r = dss_runtime_get(); | ||
173 | if (r < 0) | ||
174 | goto err_get_dss; | ||
175 | |||
168 | r = pm_runtime_get_sync(&hdmi.pdev->dev); | 176 | r = pm_runtime_get_sync(&hdmi.pdev->dev); |
169 | WARN_ON(r < 0); | 177 | WARN_ON(r < 0); |
170 | return r < 0 ? r : 0; | 178 | if (r < 0) |
179 | goto err_get_hdmi; | ||
180 | |||
181 | return 0; | ||
182 | |||
183 | err_get_hdmi: | ||
184 | dss_runtime_put(); | ||
185 | err_get_dss: | ||
186 | return r; | ||
171 | } | 187 | } |
172 | 188 | ||
173 | static void hdmi_runtime_put(void) | 189 | static void hdmi_runtime_put(void) |
@@ -178,6 +194,12 @@ static void hdmi_runtime_put(void) | |||
178 | 194 | ||
179 | r = pm_runtime_put_sync(&hdmi.pdev->dev); | 195 | r = pm_runtime_put_sync(&hdmi.pdev->dev); |
180 | WARN_ON(r < 0); | 196 | WARN_ON(r < 0); |
197 | |||
198 | /* | ||
199 | * HACK: This is added to complement the dss_runtime_get() call in | ||
200 | * hdmi_runtime_get(). This should be removed later. | ||
201 | */ | ||
202 | dss_runtime_put(); | ||
181 | } | 203 | } |
182 | 204 | ||
183 | int hdmi_init_display(struct omap_dss_device *dssdev) | 205 | int hdmi_init_display(struct omap_dss_device *dssdev) |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 2d72334ca3da..6847a478b459 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | |||
@@ -479,14 +479,7 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, | |||
479 | 479 | ||
480 | bool ti_hdmi_4xxx_detect(struct hdmi_ip_data *ip_data) | 480 | bool ti_hdmi_4xxx_detect(struct hdmi_ip_data *ip_data) |
481 | { | 481 | { |
482 | int r; | 482 | return gpio_get_value(ip_data->hpd_gpio); |
483 | |||
484 | void __iomem *base = hdmi_core_sys_base(ip_data); | ||
485 | |||
486 | /* HPD */ | ||
487 | r = REG_GET(base, HDMI_CORE_SYS_SYS_STAT, 1, 1); | ||
488 | |||
489 | return r == 1; | ||
490 | } | 483 | } |
491 | 484 | ||
492 | static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, | 485 | static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, |
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index d5aaca9cfa7e..8497727d66de 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
@@ -1810,7 +1810,11 @@ static void hw_init(void) | |||
1810 | break; | 1810 | break; |
1811 | } | 1811 | } |
1812 | 1812 | ||
1813 | /* magic required on VX900 for correct modesetting on IGA1 */ | ||
1814 | via_write_reg_mask(VIACR, 0x45, 0x00, 0x01); | ||
1815 | |||
1813 | /* probably this should go to the scaling code one day */ | 1816 | /* probably this should go to the scaling code one day */ |
1817 | via_write_reg_mask(VIACR, 0xFD, 0, 0x80); /* VX900 hw scale on IGA2 */ | ||
1814 | viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters)); | 1818 | viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters)); |
1815 | 1819 | ||
1816 | /* Fill VPIT Parameters */ | 1820 | /* Fill VPIT Parameters */ |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95aeedf198f8..958e5129c601 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -367,29 +367,45 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev) | |||
367 | #ifdef CONFIG_PM | 367 | #ifdef CONFIG_PM |
368 | static int virtballoon_freeze(struct virtio_device *vdev) | 368 | static int virtballoon_freeze(struct virtio_device *vdev) |
369 | { | 369 | { |
370 | struct virtio_balloon *vb = vdev->priv; | ||
371 | |||
370 | /* | 372 | /* |
371 | * The kthread is already frozen by the PM core before this | 373 | * The kthread is already frozen by the PM core before this |
372 | * function is called. | 374 | * function is called. |
373 | */ | 375 | */ |
374 | 376 | ||
377 | while (vb->num_pages) | ||
378 | leak_balloon(vb, vb->num_pages); | ||
379 | update_balloon_size(vb); | ||
380 | |||
375 | /* Ensure we don't get any more requests from the host */ | 381 | /* Ensure we don't get any more requests from the host */ |
376 | vdev->config->reset(vdev); | 382 | vdev->config->reset(vdev); |
377 | vdev->config->del_vqs(vdev); | 383 | vdev->config->del_vqs(vdev); |
378 | return 0; | 384 | return 0; |
379 | } | 385 | } |
380 | 386 | ||
387 | static int restore_common(struct virtio_device *vdev) | ||
388 | { | ||
389 | struct virtio_balloon *vb = vdev->priv; | ||
390 | int ret; | ||
391 | |||
392 | ret = init_vqs(vdev->priv); | ||
393 | if (ret) | ||
394 | return ret; | ||
395 | |||
396 | fill_balloon(vb, towards_target(vb)); | ||
397 | update_balloon_size(vb); | ||
398 | return 0; | ||
399 | } | ||
400 | |||
381 | static int virtballoon_thaw(struct virtio_device *vdev) | 401 | static int virtballoon_thaw(struct virtio_device *vdev) |
382 | { | 402 | { |
383 | return init_vqs(vdev->priv); | 403 | return restore_common(vdev); |
384 | } | 404 | } |
385 | 405 | ||
386 | static int virtballoon_restore(struct virtio_device *vdev) | 406 | static int virtballoon_restore(struct virtio_device *vdev) |
387 | { | 407 | { |
388 | struct virtio_balloon *vb = vdev->priv; | 408 | struct virtio_balloon *vb = vdev->priv; |
389 | struct page *page, *page2; | ||
390 | |||
391 | /* We're starting from a clean slate */ | ||
392 | vb->num_pages = 0; | ||
393 | 409 | ||
394 | /* | 410 | /* |
395 | * If a request wasn't complete at the time of freezing, this | 411 | * If a request wasn't complete at the time of freezing, this |
@@ -397,12 +413,7 @@ static int virtballoon_restore(struct virtio_device *vdev) | |||
397 | */ | 413 | */ |
398 | vb->need_stats_update = 0; | 414 | vb->need_stats_update = 0; |
399 | 415 | ||
400 | /* We don't have these pages in the balloon anymore! */ | 416 | return restore_common(vdev); |
401 | list_for_each_entry_safe(page, page2, &vb->pages, lru) { | ||
402 | list_del(&page->lru); | ||
403 | totalram_pages++; | ||
404 | } | ||
405 | return init_vqs(vdev->priv); | ||
406 | } | 417 | } |
407 | #endif | 418 | #endif |
408 | 419 | ||
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 877b107f77a7..df9e8f0e327d 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -1098,7 +1098,7 @@ config BOOKE_WDT_DEFAULT_TIMEOUT | |||
1098 | For Freescale Book-E processors, this is a number between 0 and 63. | 1098 | For Freescale Book-E processors, this is a number between 0 and 63. |
1099 | For other Book-E processors, this is a number between 0 and 3. | 1099 | For other Book-E processors, this is a number between 0 and 3. |
1100 | 1100 | ||
1101 | The value can be overidden by the wdt_period command-line parameter. | 1101 | The value can be overridden by the wdt_period command-line parameter. |
1102 | 1102 | ||
1103 | # PPC64 Architecture | 1103 | # PPC64 Architecture |
1104 | 1104 | ||
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 337265b47305..7c0fdfca2646 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -198,9 +198,13 @@ static long booke_wdt_ioctl(struct file *file, | |||
198 | booke_wdt_period = tmp; | 198 | booke_wdt_period = tmp; |
199 | #endif | 199 | #endif |
200 | booke_wdt_set(); | 200 | booke_wdt_set(); |
201 | return 0; | 201 | /* Fall */ |
202 | case WDIOC_GETTIMEOUT: | 202 | case WDIOC_GETTIMEOUT: |
203 | #ifdef CONFIG_FSL_BOOKE | ||
204 | return put_user(period_to_sec(booke_wdt_period), p); | ||
205 | #else | ||
203 | return put_user(booke_wdt_period, p); | 206 | return put_user(booke_wdt_period, p); |
207 | #endif | ||
204 | default: | 208 | default: |
205 | return -ENOTTY; | 209 | return -ENOTTY; |
206 | } | 210 | } |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 8464ea1c36a1..3c166d3f4e55 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -231,7 +231,7 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
231 | 231 | ||
232 | cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; | 232 | cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; |
233 | 233 | ||
234 | set_memory_x((unsigned long)bios32_entrypoint, (2 * PAGE_SIZE)); | 234 | set_memory_x((unsigned long)bios32_map, 2); |
235 | asminline_call(&cmn_regs, bios32_entrypoint); | 235 | asminline_call(&cmn_regs, bios32_entrypoint); |
236 | 236 | ||
237 | if (cmn_regs.u1.ral != 0) { | 237 | if (cmn_regs.u1.ral != 0) { |
@@ -250,7 +250,8 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
250 | cru_rom_addr = | 250 | cru_rom_addr = |
251 | ioremap(cru_physical_address, cru_length); | 251 | ioremap(cru_physical_address, cru_length); |
252 | if (cru_rom_addr) { | 252 | if (cru_rom_addr) { |
253 | set_memory_x((unsigned long)cru_rom_addr, cru_length); | 253 | set_memory_x((unsigned long)cru_rom_addr & PAGE_MASK, |
254 | (cru_length + PAGE_SIZE - 1) >> PAGE_SHIFT); | ||
254 | retval = 0; | 255 | retval = 0; |
255 | } | 256 | } |
256 | } | 257 | } |
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index 8e210aafdfd0..dfae030a7ef2 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c | |||
@@ -264,7 +264,7 @@ static int __devinit pnx4008_wdt_probe(struct platform_device *pdev) | |||
264 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 264 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
265 | if (wdt_mem == NULL) { | 265 | if (wdt_mem == NULL) { |
266 | printk(KERN_INFO MODULE_NAME | 266 | printk(KERN_INFO MODULE_NAME |
267 | "failed to get memory region resouce\n"); | 267 | "failed to get memory region resource\n"); |
268 | return -ENOENT; | 268 | return -ENOENT; |
269 | } | 269 | } |
270 | 270 | ||
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 4bc3744e14e4..404172f02c9b 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -312,18 +312,26 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
312 | dev = &pdev->dev; | 312 | dev = &pdev->dev; |
313 | wdt_dev = &pdev->dev; | 313 | wdt_dev = &pdev->dev; |
314 | 314 | ||
315 | /* get the memory region for the watchdog timer */ | ||
316 | |||
317 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 315 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
318 | if (wdt_mem == NULL) { | 316 | if (wdt_mem == NULL) { |
319 | dev_err(dev, "no memory resource specified\n"); | 317 | dev_err(dev, "no memory resource specified\n"); |
320 | return -ENOENT; | 318 | return -ENOENT; |
321 | } | 319 | } |
322 | 320 | ||
321 | wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
322 | if (wdt_irq == NULL) { | ||
323 | dev_err(dev, "no irq resource specified\n"); | ||
324 | ret = -ENOENT; | ||
325 | goto err; | ||
326 | } | ||
327 | |||
328 | /* get the memory region for the watchdog timer */ | ||
329 | |||
323 | size = resource_size(wdt_mem); | 330 | size = resource_size(wdt_mem); |
324 | if (!request_mem_region(wdt_mem->start, size, pdev->name)) { | 331 | if (!request_mem_region(wdt_mem->start, size, pdev->name)) { |
325 | dev_err(dev, "failed to get memory region\n"); | 332 | dev_err(dev, "failed to get memory region\n"); |
326 | return -EBUSY; | 333 | ret = -EBUSY; |
334 | goto err; | ||
327 | } | 335 | } |
328 | 336 | ||
329 | wdt_base = ioremap(wdt_mem->start, size); | 337 | wdt_base = ioremap(wdt_mem->start, size); |
@@ -335,29 +343,17 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
335 | 343 | ||
336 | DBG("probe: mapped wdt_base=%p\n", wdt_base); | 344 | DBG("probe: mapped wdt_base=%p\n", wdt_base); |
337 | 345 | ||
338 | wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
339 | if (wdt_irq == NULL) { | ||
340 | dev_err(dev, "no irq resource specified\n"); | ||
341 | ret = -ENOENT; | ||
342 | goto err_map; | ||
343 | } | ||
344 | |||
345 | ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev); | ||
346 | if (ret != 0) { | ||
347 | dev_err(dev, "failed to install irq (%d)\n", ret); | ||
348 | goto err_map; | ||
349 | } | ||
350 | |||
351 | wdt_clock = clk_get(&pdev->dev, "watchdog"); | 346 | wdt_clock = clk_get(&pdev->dev, "watchdog"); |
352 | if (IS_ERR(wdt_clock)) { | 347 | if (IS_ERR(wdt_clock)) { |
353 | dev_err(dev, "failed to find watchdog clock source\n"); | 348 | dev_err(dev, "failed to find watchdog clock source\n"); |
354 | ret = PTR_ERR(wdt_clock); | 349 | ret = PTR_ERR(wdt_clock); |
355 | goto err_irq; | 350 | goto err_map; |
356 | } | 351 | } |
357 | 352 | ||
358 | clk_enable(wdt_clock); | 353 | clk_enable(wdt_clock); |
359 | 354 | ||
360 | if (s3c2410wdt_cpufreq_register() < 0) { | 355 | ret = s3c2410wdt_cpufreq_register(); |
356 | if (ret < 0) { | ||
361 | printk(KERN_ERR PFX "failed to register cpufreq\n"); | 357 | printk(KERN_ERR PFX "failed to register cpufreq\n"); |
362 | goto err_clk; | 358 | goto err_clk; |
363 | } | 359 | } |
@@ -378,12 +374,18 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
378 | "cannot start\n"); | 374 | "cannot start\n"); |
379 | } | 375 | } |
380 | 376 | ||
377 | ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev); | ||
378 | if (ret != 0) { | ||
379 | dev_err(dev, "failed to install irq (%d)\n", ret); | ||
380 | goto err_cpufreq; | ||
381 | } | ||
382 | |||
381 | watchdog_set_nowayout(&s3c2410_wdd, nowayout); | 383 | watchdog_set_nowayout(&s3c2410_wdd, nowayout); |
382 | 384 | ||
383 | ret = watchdog_register_device(&s3c2410_wdd); | 385 | ret = watchdog_register_device(&s3c2410_wdd); |
384 | if (ret) { | 386 | if (ret) { |
385 | dev_err(dev, "cannot register watchdog (%d)\n", ret); | 387 | dev_err(dev, "cannot register watchdog (%d)\n", ret); |
386 | goto err_cpufreq; | 388 | goto err_irq; |
387 | } | 389 | } |
388 | 390 | ||
389 | if (tmr_atboot && started == 0) { | 391 | if (tmr_atboot && started == 0) { |
@@ -408,23 +410,26 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
408 | 410 | ||
409 | return 0; | 411 | return 0; |
410 | 412 | ||
413 | err_irq: | ||
414 | free_irq(wdt_irq->start, pdev); | ||
415 | |||
411 | err_cpufreq: | 416 | err_cpufreq: |
412 | s3c2410wdt_cpufreq_deregister(); | 417 | s3c2410wdt_cpufreq_deregister(); |
413 | 418 | ||
414 | err_clk: | 419 | err_clk: |
415 | clk_disable(wdt_clock); | 420 | clk_disable(wdt_clock); |
416 | clk_put(wdt_clock); | 421 | clk_put(wdt_clock); |
417 | 422 | wdt_clock = NULL; | |
418 | err_irq: | ||
419 | free_irq(wdt_irq->start, pdev); | ||
420 | 423 | ||
421 | err_map: | 424 | err_map: |
422 | iounmap(wdt_base); | 425 | iounmap(wdt_base); |
423 | 426 | ||
424 | err_req: | 427 | err_req: |
425 | release_mem_region(wdt_mem->start, size); | 428 | release_mem_region(wdt_mem->start, size); |
426 | wdt_mem = NULL; | ||
427 | 429 | ||
430 | err: | ||
431 | wdt_irq = NULL; | ||
432 | wdt_mem = NULL; | ||
428 | return ret; | 433 | return ret; |
429 | } | 434 | } |
430 | 435 | ||
@@ -432,18 +437,18 @@ static int __devexit s3c2410wdt_remove(struct platform_device *dev) | |||
432 | { | 437 | { |
433 | watchdog_unregister_device(&s3c2410_wdd); | 438 | watchdog_unregister_device(&s3c2410_wdd); |
434 | 439 | ||
440 | free_irq(wdt_irq->start, dev); | ||
441 | |||
435 | s3c2410wdt_cpufreq_deregister(); | 442 | s3c2410wdt_cpufreq_deregister(); |
436 | 443 | ||
437 | clk_disable(wdt_clock); | 444 | clk_disable(wdt_clock); |
438 | clk_put(wdt_clock); | 445 | clk_put(wdt_clock); |
439 | wdt_clock = NULL; | 446 | wdt_clock = NULL; |
440 | 447 | ||
441 | free_irq(wdt_irq->start, dev); | ||
442 | wdt_irq = NULL; | ||
443 | |||
444 | iounmap(wdt_base); | 448 | iounmap(wdt_base); |
445 | 449 | ||
446 | release_mem_region(wdt_mem->start, resource_size(wdt_mem)); | 450 | release_mem_region(wdt_mem->start, resource_size(wdt_mem)); |
451 | wdt_irq = NULL; | ||
447 | wdt_mem = NULL; | 452 | wdt_mem = NULL; |
448 | return 0; | 453 | return 0; |
449 | } | 454 | } |