diff options
Diffstat (limited to 'drivers')
97 files changed, 663 insertions, 591 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/block/nvme.c b/drivers/block/nvme.c index c1dc4d86c221..1f3c1a7d132a 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c | |||
@@ -41,6 +41,8 @@ | |||
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | #include <linux/version.h> | 42 | #include <linux/version.h> |
43 | 43 | ||
44 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
45 | |||
44 | #define NVME_Q_DEPTH 1024 | 46 | #define NVME_Q_DEPTH 1024 |
45 | #define SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) | 47 | #define SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) |
46 | #define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) | 48 | #define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) |
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index 7dbc4a83c45c..78a666d1e5f5 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | config CPU_IDLE | 2 | config CPU_IDLE |
3 | bool "CPU idle PM support" | 3 | bool "CPU idle PM support" |
4 | default ACPI | 4 | default y if ACPI || PPC_PSERIES |
5 | help | 5 | help |
6 | CPU idle is a generic framework for supporting software-controlled | 6 | CPU idle is a generic framework for supporting software-controlled |
7 | idle processor power management. It includes modular cross-platform | 7 | idle processor power management. It includes modular cross-platform |
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c index aa08497a075a..73f55e2008c2 100644 --- a/drivers/edac/i3200_edac.c +++ b/drivers/edac/i3200_edac.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include "edac_core.h" | 16 | #include "edac_core.h" |
17 | 17 | ||
18 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
19 | |||
18 | #define I3200_REVISION "1.1" | 20 | #define I3200_REVISION "1.1" |
19 | 21 | ||
20 | #define EDAC_MOD_STR "i3200_edac" | 22 | #define EDAC_MOD_STR "i3200_edac" |
@@ -101,19 +103,6 @@ struct i3200_priv { | |||
101 | 103 | ||
102 | static int nr_channels; | 104 | static int nr_channels; |
103 | 105 | ||
104 | #ifndef readq | ||
105 | static inline __u64 readq(const volatile void __iomem *addr) | ||
106 | { | ||
107 | const volatile u32 __iomem *p = addr; | ||
108 | u32 low, high; | ||
109 | |||
110 | low = readl(p); | ||
111 | high = readl(p + 1); | ||
112 | |||
113 | return low + ((u64)high << 32); | ||
114 | } | ||
115 | #endif | ||
116 | |||
117 | static int how_many_channels(struct pci_dev *pdev) | 106 | static int how_many_channels(struct pci_dev *pdev) |
118 | { | 107 | { |
119 | unsigned char capid0_8b; /* 8th byte of CAPID0 */ | 108 | unsigned char capid0_8b; /* 8th byte of CAPID0 */ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c index 661a03571d0c..d08a55896d50 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_core.c +++ b/drivers/gpu/drm/exynos/exynos_drm_core.c | |||
@@ -193,6 +193,9 @@ int exynos_drm_subdrv_register(struct exynos_drm_subdrv *subdrv) | |||
193 | return err; | 193 | return err; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* setup possible_clones. */ | ||
197 | exynos_drm_encoder_setup(drm_dev); | ||
198 | |||
196 | /* | 199 | /* |
197 | * if any specific driver such as fimd or hdmi driver called | 200 | * if any specific driver such as fimd or hdmi driver called |
198 | * exynos_drm_subdrv_register() later than drm_load(), | 201 | * exynos_drm_subdrv_register() later than drm_load(), |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index e3861ac49295..de818831a511 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c | |||
@@ -307,9 +307,6 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, | |||
307 | */ | 307 | */ |
308 | event->pipe = exynos_crtc->pipe; | 308 | event->pipe = exynos_crtc->pipe; |
309 | 309 | ||
310 | list_add_tail(&event->base.link, | ||
311 | &dev_priv->pageflip_event_list); | ||
312 | |||
313 | ret = drm_vblank_get(dev, exynos_crtc->pipe); | 310 | ret = drm_vblank_get(dev, exynos_crtc->pipe); |
314 | if (ret) { | 311 | if (ret) { |
315 | DRM_DEBUG("failed to acquire vblank counter\n"); | 312 | DRM_DEBUG("failed to acquire vblank counter\n"); |
@@ -318,6 +315,9 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, | |||
318 | goto out; | 315 | goto out; |
319 | } | 316 | } |
320 | 317 | ||
318 | list_add_tail(&event->base.link, | ||
319 | &dev_priv->pageflip_event_list); | ||
320 | |||
321 | crtc->fb = fb; | 321 | crtc->fb = fb; |
322 | ret = exynos_drm_crtc_update(crtc); | 322 | ret = exynos_drm_crtc_update(crtc); |
323 | if (ret) { | 323 | if (ret) { |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 35889ca255e9..58820ebd3558 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include "exynos_drm_drv.h" | 34 | #include "exynos_drm_drv.h" |
35 | #include "exynos_drm_crtc.h" | 35 | #include "exynos_drm_crtc.h" |
36 | #include "exynos_drm_encoder.h" | ||
36 | #include "exynos_drm_fbdev.h" | 37 | #include "exynos_drm_fbdev.h" |
37 | #include "exynos_drm_fb.h" | 38 | #include "exynos_drm_fb.h" |
38 | #include "exynos_drm_gem.h" | 39 | #include "exynos_drm_gem.h" |
@@ -99,6 +100,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) | |||
99 | if (ret) | 100 | if (ret) |
100 | goto err_vblank; | 101 | goto err_vblank; |
101 | 102 | ||
103 | /* setup possible_clones. */ | ||
104 | exynos_drm_encoder_setup(dev); | ||
105 | |||
102 | /* | 106 | /* |
103 | * create and configure fb helper and also exynos specific | 107 | * create and configure fb helper and also exynos specific |
104 | * fbdev object. | 108 | * fbdev object. |
@@ -141,16 +145,21 @@ static int exynos_drm_unload(struct drm_device *dev) | |||
141 | } | 145 | } |
142 | 146 | ||
143 | static void exynos_drm_preclose(struct drm_device *dev, | 147 | static void exynos_drm_preclose(struct drm_device *dev, |
144 | struct drm_file *file_priv) | 148 | struct drm_file *file) |
145 | { | 149 | { |
146 | struct exynos_drm_private *dev_priv = dev->dev_private; | 150 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
147 | 151 | ||
148 | /* | 152 | } |
149 | * drm framework frees all events at release time, | 153 | |
150 | * so private event list should be cleared. | 154 | static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) |
151 | */ | 155 | { |
152 | if (!list_empty(&dev_priv->pageflip_event_list)) | 156 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
153 | INIT_LIST_HEAD(&dev_priv->pageflip_event_list); | 157 | |
158 | if (!file->driver_priv) | ||
159 | return; | ||
160 | |||
161 | kfree(file->driver_priv); | ||
162 | file->driver_priv = NULL; | ||
154 | } | 163 | } |
155 | 164 | ||
156 | static void exynos_drm_lastclose(struct drm_device *dev) | 165 | static void exynos_drm_lastclose(struct drm_device *dev) |
@@ -195,6 +204,7 @@ static struct drm_driver exynos_drm_driver = { | |||
195 | .unload = exynos_drm_unload, | 204 | .unload = exynos_drm_unload, |
196 | .preclose = exynos_drm_preclose, | 205 | .preclose = exynos_drm_preclose, |
197 | .lastclose = exynos_drm_lastclose, | 206 | .lastclose = exynos_drm_lastclose, |
207 | .postclose = exynos_drm_postclose, | ||
198 | .get_vblank_counter = drm_vblank_count, | 208 | .get_vblank_counter = drm_vblank_count, |
199 | .enable_vblank = exynos_drm_crtc_enable_vblank, | 209 | .enable_vblank = exynos_drm_crtc_enable_vblank, |
200 | .disable_vblank = exynos_drm_crtc_disable_vblank, | 210 | .disable_vblank = exynos_drm_crtc_disable_vblank, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 86b93dde219a..ef4754f1519b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c | |||
@@ -195,6 +195,40 @@ static struct drm_encoder_funcs exynos_encoder_funcs = { | |||
195 | .destroy = exynos_drm_encoder_destroy, | 195 | .destroy = exynos_drm_encoder_destroy, |
196 | }; | 196 | }; |
197 | 197 | ||
198 | static unsigned int exynos_drm_encoder_clones(struct drm_encoder *encoder) | ||
199 | { | ||
200 | struct drm_encoder *clone; | ||
201 | struct drm_device *dev = encoder->dev; | ||
202 | struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder); | ||
203 | struct exynos_drm_display_ops *display_ops = | ||
204 | exynos_encoder->manager->display_ops; | ||
205 | unsigned int clone_mask = 0; | ||
206 | int cnt = 0; | ||
207 | |||
208 | list_for_each_entry(clone, &dev->mode_config.encoder_list, head) { | ||
209 | switch (display_ops->type) { | ||
210 | case EXYNOS_DISPLAY_TYPE_LCD: | ||
211 | case EXYNOS_DISPLAY_TYPE_HDMI: | ||
212 | clone_mask |= (1 << (cnt++)); | ||
213 | break; | ||
214 | default: | ||
215 | continue; | ||
216 | } | ||
217 | } | ||
218 | |||
219 | return clone_mask; | ||
220 | } | ||
221 | |||
222 | void exynos_drm_encoder_setup(struct drm_device *dev) | ||
223 | { | ||
224 | struct drm_encoder *encoder; | ||
225 | |||
226 | DRM_DEBUG_KMS("%s\n", __FILE__); | ||
227 | |||
228 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) | ||
229 | encoder->possible_clones = exynos_drm_encoder_clones(encoder); | ||
230 | } | ||
231 | |||
198 | struct drm_encoder * | 232 | struct drm_encoder * |
199 | exynos_drm_encoder_create(struct drm_device *dev, | 233 | exynos_drm_encoder_create(struct drm_device *dev, |
200 | struct exynos_drm_manager *manager, | 234 | struct exynos_drm_manager *manager, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.h b/drivers/gpu/drm/exynos/exynos_drm_encoder.h index 97b087a51cb6..eb7d2316847e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.h +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.h | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | struct exynos_drm_manager; | 31 | struct exynos_drm_manager; |
32 | 32 | ||
33 | void exynos_drm_encoder_setup(struct drm_device *dev); | ||
33 | struct drm_encoder *exynos_drm_encoder_create(struct drm_device *dev, | 34 | struct drm_encoder *exynos_drm_encoder_create(struct drm_device *dev, |
34 | struct exynos_drm_manager *mgr, | 35 | struct exynos_drm_manager *mgr, |
35 | unsigned int possible_crtcs); | 36 | unsigned int possible_crtcs); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index d7ae29d2f3d6..3508700e529b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
@@ -195,66 +195,6 @@ out: | |||
195 | return ret; | 195 | return ret; |
196 | } | 196 | } |
197 | 197 | ||
198 | static bool | ||
199 | exynos_drm_fbdev_is_samefb(struct drm_framebuffer *fb, | ||
200 | struct drm_fb_helper_surface_size *sizes) | ||
201 | { | ||
202 | if (fb->width != sizes->surface_width) | ||
203 | return false; | ||
204 | if (fb->height != sizes->surface_height) | ||
205 | return false; | ||
206 | if (fb->bits_per_pixel != sizes->surface_bpp) | ||
207 | return false; | ||
208 | if (fb->depth != sizes->surface_depth) | ||
209 | return false; | ||
210 | |||
211 | return true; | ||
212 | } | ||
213 | |||
214 | static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper, | ||
215 | struct drm_fb_helper_surface_size *sizes) | ||
216 | { | ||
217 | struct drm_device *dev = helper->dev; | ||
218 | struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); | ||
219 | struct exynos_drm_gem_obj *exynos_gem_obj; | ||
220 | struct drm_framebuffer *fb = helper->fb; | ||
221 | struct drm_mode_fb_cmd2 mode_cmd = { 0 }; | ||
222 | unsigned long size; | ||
223 | |||
224 | DRM_DEBUG_KMS("%s\n", __FILE__); | ||
225 | |||
226 | if (exynos_drm_fbdev_is_samefb(fb, sizes)) | ||
227 | return 0; | ||
228 | |||
229 | mode_cmd.width = sizes->surface_width; | ||
230 | mode_cmd.height = sizes->surface_height; | ||
231 | mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); | ||
232 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, | ||
233 | sizes->surface_depth); | ||
234 | |||
235 | if (exynos_fbdev->exynos_gem_obj) | ||
236 | exynos_drm_gem_destroy(exynos_fbdev->exynos_gem_obj); | ||
237 | |||
238 | if (fb->funcs->destroy) | ||
239 | fb->funcs->destroy(fb); | ||
240 | |||
241 | size = mode_cmd.pitches[0] * mode_cmd.height; | ||
242 | exynos_gem_obj = exynos_drm_gem_create(dev, size); | ||
243 | if (IS_ERR(exynos_gem_obj)) | ||
244 | return PTR_ERR(exynos_gem_obj); | ||
245 | |||
246 | exynos_fbdev->exynos_gem_obj = exynos_gem_obj; | ||
247 | |||
248 | helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd, | ||
249 | &exynos_gem_obj->base); | ||
250 | if (IS_ERR_OR_NULL(helper->fb)) { | ||
251 | DRM_ERROR("failed to create drm framebuffer.\n"); | ||
252 | return PTR_ERR(helper->fb); | ||
253 | } | ||
254 | |||
255 | return exynos_drm_fbdev_update(helper, helper->fb); | ||
256 | } | ||
257 | |||
258 | static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, | 198 | static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, |
259 | struct drm_fb_helper_surface_size *sizes) | 199 | struct drm_fb_helper_surface_size *sizes) |
260 | { | 200 | { |
@@ -262,6 +202,10 @@ static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, | |||
262 | 202 | ||
263 | DRM_DEBUG_KMS("%s\n", __FILE__); | 203 | DRM_DEBUG_KMS("%s\n", __FILE__); |
264 | 204 | ||
205 | /* | ||
206 | * with !helper->fb, it means that this funcion is called first time | ||
207 | * and after that, the helper->fb would be used as clone mode. | ||
208 | */ | ||
265 | if (!helper->fb) { | 209 | if (!helper->fb) { |
266 | ret = exynos_drm_fbdev_create(helper, sizes); | 210 | ret = exynos_drm_fbdev_create(helper, sizes); |
267 | if (ret < 0) { | 211 | if (ret < 0) { |
@@ -274,12 +218,6 @@ static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, | |||
274 | * because register_framebuffer() should be called. | 218 | * because register_framebuffer() should be called. |
275 | */ | 219 | */ |
276 | ret = 1; | 220 | ret = 1; |
277 | } else { | ||
278 | ret = exynos_drm_fbdev_recreate(helper, sizes); | ||
279 | if (ret < 0) { | ||
280 | DRM_ERROR("failed to reconfigure fbdev\n"); | ||
281 | return ret; | ||
282 | } | ||
283 | } | 221 | } |
284 | 222 | ||
285 | return ret; | 223 | return ret; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index b6a737d196ae..0dbb32bb18a3 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -604,7 +604,12 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc) | |||
604 | } | 604 | } |
605 | 605 | ||
606 | if (is_checked) { | 606 | if (is_checked) { |
607 | drm_vblank_put(drm_dev, crtc); | 607 | /* |
608 | * call drm_vblank_put only in case that drm_vblank_get was | ||
609 | * called. | ||
610 | */ | ||
611 | if (atomic_read(&drm_dev->vblank_refcount[crtc]) > 0) | ||
612 | drm_vblank_put(drm_dev, crtc); | ||
608 | 613 | ||
609 | /* | 614 | /* |
610 | * don't off vblank if vblank_disable_allowed is 1, | 615 | * don't off vblank if vblank_disable_allowed is 1, |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index ac24cff39775..93846e810e38 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -712,7 +712,12 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) | |||
712 | } | 712 | } |
713 | 713 | ||
714 | if (is_checked) | 714 | if (is_checked) |
715 | drm_vblank_put(drm_dev, crtc); | 715 | /* |
716 | * call drm_vblank_put only in case that drm_vblank_get was | ||
717 | * called. | ||
718 | */ | ||
719 | if (atomic_read(&drm_dev->vblank_refcount[crtc]) > 0) | ||
720 | drm_vblank_put(drm_dev, crtc); | ||
716 | 721 | ||
717 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); | 722 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); |
718 | } | 723 | } |
@@ -779,15 +784,15 @@ static void mixer_win_reset(struct mixer_context *ctx) | |||
779 | mixer_reg_writemask(res, MXR_STATUS, MXR_STATUS_16_BURST, | 784 | mixer_reg_writemask(res, MXR_STATUS, MXR_STATUS_16_BURST, |
780 | MXR_STATUS_BURST_MASK); | 785 | MXR_STATUS_BURST_MASK); |
781 | 786 | ||
782 | /* setting default layer priority: layer1 > video > layer0 | 787 | /* setting default layer priority: layer1 > layer0 > video |
783 | * because typical usage scenario would be | 788 | * because typical usage scenario would be |
789 | * layer1 - OSD | ||
784 | * layer0 - framebuffer | 790 | * layer0 - framebuffer |
785 | * video - video overlay | 791 | * video - video overlay |
786 | * layer1 - OSD | ||
787 | */ | 792 | */ |
788 | val = MXR_LAYER_CFG_GRP0_VAL(1); | 793 | val = MXR_LAYER_CFG_GRP1_VAL(3); |
789 | val |= MXR_LAYER_CFG_VP_VAL(2); | 794 | val |= MXR_LAYER_CFG_GRP0_VAL(2); |
790 | val |= MXR_LAYER_CFG_GRP1_VAL(3); | 795 | val |= MXR_LAYER_CFG_VP_VAL(1); |
791 | mixer_reg_write(res, MXR_LAYER_CFG, val); | 796 | mixer_reg_write(res, MXR_LAYER_CFG, val); |
792 | 797 | ||
793 | /* setting background color */ | 798 | /* setting background color */ |
@@ -1044,7 +1049,7 @@ static int mixer_remove(struct platform_device *pdev) | |||
1044 | platform_get_drvdata(pdev); | 1049 | platform_get_drvdata(pdev); |
1045 | struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx; | 1050 | struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx; |
1046 | 1051 | ||
1047 | dev_info(dev, "remove sucessful\n"); | 1052 | dev_info(dev, "remove successful\n"); |
1048 | 1053 | ||
1049 | mixer_resource_poweroff(ctx); | 1054 | mixer_resource_poweroff(ctx); |
1050 | mixer_resources_cleanup(ctx); | 1055 | mixer_resources_cleanup(ctx); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c3afb783cb9d..03c53fcf8653 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -3028,6 +3028,20 @@ | |||
3028 | #define DISP_TILE_SURFACE_SWIZZLING (1<<13) | 3028 | #define DISP_TILE_SURFACE_SWIZZLING (1<<13) |
3029 | #define DISP_FBC_WM_DIS (1<<15) | 3029 | #define DISP_FBC_WM_DIS (1<<15) |
3030 | 3030 | ||
3031 | /* GEN7 chicken */ | ||
3032 | #define GEN7_COMMON_SLICE_CHICKEN1 0x7010 | ||
3033 | # define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC ((1<<10) | (1<<26)) | ||
3034 | |||
3035 | #define GEN7_L3CNTLREG1 0xB01C | ||
3036 | #define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C4FFF8C | ||
3037 | |||
3038 | #define GEN7_L3_CHICKEN_MODE_REGISTER 0xB030 | ||
3039 | #define GEN7_WA_L3_CHICKEN_MODE 0x20000000 | ||
3040 | |||
3041 | /* WaCatErrorRejectionIssue */ | ||
3042 | #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 | ||
3043 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) | ||
3044 | |||
3031 | /* PCH */ | 3045 | /* PCH */ |
3032 | 3046 | ||
3033 | /* south display engine interrupt */ | 3047 | /* south display engine interrupt */ |
@@ -3618,6 +3632,7 @@ | |||
3618 | #define GT_FIFO_NUM_RESERVED_ENTRIES 20 | 3632 | #define GT_FIFO_NUM_RESERVED_ENTRIES 20 |
3619 | 3633 | ||
3620 | #define GEN6_UCGCTL2 0x9404 | 3634 | #define GEN6_UCGCTL2 0x9404 |
3635 | # define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13) | ||
3621 | # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) | 3636 | # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) |
3622 | # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11) | 3637 | # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11) |
3623 | 3638 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 00fbff5ddd81..f425b23e3803 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -8184,8 +8184,8 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) | |||
8184 | I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */ | 8184 | I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */ |
8185 | 8185 | ||
8186 | if (intel_enable_rc6(dev_priv->dev)) | 8186 | if (intel_enable_rc6(dev_priv->dev)) |
8187 | rc6_mask = GEN6_RC_CTL_RC6p_ENABLE | | 8187 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | |
8188 | GEN6_RC_CTL_RC6_ENABLE; | 8188 | (IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0; |
8189 | 8189 | ||
8190 | I915_WRITE(GEN6_RC_CONTROL, | 8190 | I915_WRITE(GEN6_RC_CONTROL, |
8191 | rc6_mask | | 8191 | rc6_mask | |
@@ -8463,12 +8463,32 @@ static void ivybridge_init_clock_gating(struct drm_device *dev) | |||
8463 | I915_WRITE(WM2_LP_ILK, 0); | 8463 | I915_WRITE(WM2_LP_ILK, 0); |
8464 | I915_WRITE(WM1_LP_ILK, 0); | 8464 | I915_WRITE(WM1_LP_ILK, 0); |
8465 | 8465 | ||
8466 | /* According to the spec, bit 13 (RCZUNIT) must be set on IVB. | ||
8467 | * This implements the WaDisableRCZUnitClockGating workaround. | ||
8468 | */ | ||
8469 | I915_WRITE(GEN6_UCGCTL2, GEN6_RCZUNIT_CLOCK_GATE_DISABLE); | ||
8470 | |||
8466 | I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE); | 8471 | I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE); |
8467 | 8472 | ||
8468 | I915_WRITE(IVB_CHICKEN3, | 8473 | I915_WRITE(IVB_CHICKEN3, |
8469 | CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE | | 8474 | CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE | |
8470 | CHICKEN3_DGMG_DONE_FIX_DISABLE); | 8475 | CHICKEN3_DGMG_DONE_FIX_DISABLE); |
8471 | 8476 | ||
8477 | /* Apply the WaDisableRHWOOptimizationForRenderHang workaround. */ | ||
8478 | I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1, | ||
8479 | GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC); | ||
8480 | |||
8481 | /* WaApplyL3ControlAndL3ChickenMode requires those two on Ivy Bridge */ | ||
8482 | I915_WRITE(GEN7_L3CNTLREG1, | ||
8483 | GEN7_WA_FOR_GEN7_L3_CONTROL); | ||
8484 | I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER, | ||
8485 | GEN7_WA_L3_CHICKEN_MODE); | ||
8486 | |||
8487 | /* This is required by WaCatErrorRejectionIssue */ | ||
8488 | I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG, | ||
8489 | I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) | | ||
8490 | GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB); | ||
8491 | |||
8472 | for_each_pipe(pipe) { | 8492 | for_each_pipe(pipe) { |
8473 | I915_WRITE(DSPCNTR(pipe), | 8493 | I915_WRITE(DSPCNTR(pipe), |
8474 | I915_READ(DSPCNTR(pipe)) | | 8494 | I915_READ(DSPCNTR(pipe)) | |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 9be353b894cc..f58254a3fb01 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -3223,6 +3223,7 @@ int evergreen_resume(struct radeon_device *rdev) | |||
3223 | r = evergreen_startup(rdev); | 3223 | r = evergreen_startup(rdev); |
3224 | if (r) { | 3224 | if (r) { |
3225 | DRM_ERROR("evergreen startup failed on resume\n"); | 3225 | DRM_ERROR("evergreen startup failed on resume\n"); |
3226 | rdev->accel_working = false; | ||
3226 | return r; | 3227 | return r; |
3227 | } | 3228 | } |
3228 | 3229 | ||
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index db09065e68fd..2509c505acb8 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1547,6 +1547,7 @@ int cayman_resume(struct radeon_device *rdev) | |||
1547 | r = cayman_startup(rdev); | 1547 | r = cayman_startup(rdev); |
1548 | if (r) { | 1548 | if (r) { |
1549 | DRM_ERROR("cayman startup failed on resume\n"); | 1549 | DRM_ERROR("cayman startup failed on resume\n"); |
1550 | rdev->accel_working = false; | ||
1550 | return r; | 1551 | return r; |
1551 | } | 1552 | } |
1552 | return r; | 1553 | return r; |
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 18cd84fae99c..333cde9d4e7b 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -3928,6 +3928,8 @@ static int r100_startup(struct radeon_device *rdev) | |||
3928 | 3928 | ||
3929 | int r100_resume(struct radeon_device *rdev) | 3929 | int r100_resume(struct radeon_device *rdev) |
3930 | { | 3930 | { |
3931 | int r; | ||
3932 | |||
3931 | /* Make sur GART are not working */ | 3933 | /* Make sur GART are not working */ |
3932 | if (rdev->flags & RADEON_IS_PCI) | 3934 | if (rdev->flags & RADEON_IS_PCI) |
3933 | r100_pci_gart_disable(rdev); | 3935 | r100_pci_gart_disable(rdev); |
@@ -3947,7 +3949,11 @@ int r100_resume(struct radeon_device *rdev) | |||
3947 | radeon_surface_init(rdev); | 3949 | radeon_surface_init(rdev); |
3948 | 3950 | ||
3949 | rdev->accel_working = true; | 3951 | rdev->accel_working = true; |
3950 | return r100_startup(rdev); | 3952 | r = r100_startup(rdev); |
3953 | if (r) { | ||
3954 | rdev->accel_working = false; | ||
3955 | } | ||
3956 | return r; | ||
3951 | } | 3957 | } |
3952 | 3958 | ||
3953 | int r100_suspend(struct radeon_device *rdev) | 3959 | int r100_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 3fc0d29a5f39..6829638cca40 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -1431,6 +1431,8 @@ static int r300_startup(struct radeon_device *rdev) | |||
1431 | 1431 | ||
1432 | int r300_resume(struct radeon_device *rdev) | 1432 | int r300_resume(struct radeon_device *rdev) |
1433 | { | 1433 | { |
1434 | int r; | ||
1435 | |||
1434 | /* Make sur GART are not working */ | 1436 | /* Make sur GART are not working */ |
1435 | if (rdev->flags & RADEON_IS_PCIE) | 1437 | if (rdev->flags & RADEON_IS_PCIE) |
1436 | rv370_pcie_gart_disable(rdev); | 1438 | rv370_pcie_gart_disable(rdev); |
@@ -1452,7 +1454,11 @@ int r300_resume(struct radeon_device *rdev) | |||
1452 | radeon_surface_init(rdev); | 1454 | radeon_surface_init(rdev); |
1453 | 1455 | ||
1454 | rdev->accel_working = true; | 1456 | rdev->accel_working = true; |
1455 | return r300_startup(rdev); | 1457 | r = r300_startup(rdev); |
1458 | if (r) { | ||
1459 | rdev->accel_working = false; | ||
1460 | } | ||
1461 | return r; | ||
1456 | } | 1462 | } |
1457 | 1463 | ||
1458 | int r300_suspend(struct radeon_device *rdev) | 1464 | int r300_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index 666e28fe509c..b14323053bad 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c | |||
@@ -291,6 +291,8 @@ static int r420_startup(struct radeon_device *rdev) | |||
291 | 291 | ||
292 | int r420_resume(struct radeon_device *rdev) | 292 | int r420_resume(struct radeon_device *rdev) |
293 | { | 293 | { |
294 | int r; | ||
295 | |||
294 | /* Make sur GART are not working */ | 296 | /* Make sur GART are not working */ |
295 | if (rdev->flags & RADEON_IS_PCIE) | 297 | if (rdev->flags & RADEON_IS_PCIE) |
296 | rv370_pcie_gart_disable(rdev); | 298 | rv370_pcie_gart_disable(rdev); |
@@ -316,7 +318,11 @@ int r420_resume(struct radeon_device *rdev) | |||
316 | radeon_surface_init(rdev); | 318 | radeon_surface_init(rdev); |
317 | 319 | ||
318 | rdev->accel_working = true; | 320 | rdev->accel_working = true; |
319 | return r420_startup(rdev); | 321 | r = r420_startup(rdev); |
322 | if (r) { | ||
323 | rdev->accel_working = false; | ||
324 | } | ||
325 | return r; | ||
320 | } | 326 | } |
321 | 327 | ||
322 | int r420_suspend(struct radeon_device *rdev) | 328 | int r420_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c index 4ae1615e752f..25084e824dbc 100644 --- a/drivers/gpu/drm/radeon/r520.c +++ b/drivers/gpu/drm/radeon/r520.c | |||
@@ -218,6 +218,8 @@ static int r520_startup(struct radeon_device *rdev) | |||
218 | 218 | ||
219 | int r520_resume(struct radeon_device *rdev) | 219 | int r520_resume(struct radeon_device *rdev) |
220 | { | 220 | { |
221 | int r; | ||
222 | |||
221 | /* Make sur GART are not working */ | 223 | /* Make sur GART are not working */ |
222 | if (rdev->flags & RADEON_IS_PCIE) | 224 | if (rdev->flags & RADEON_IS_PCIE) |
223 | rv370_pcie_gart_disable(rdev); | 225 | rv370_pcie_gart_disable(rdev); |
@@ -237,7 +239,11 @@ int r520_resume(struct radeon_device *rdev) | |||
237 | radeon_surface_init(rdev); | 239 | radeon_surface_init(rdev); |
238 | 240 | ||
239 | rdev->accel_working = true; | 241 | rdev->accel_working = true; |
240 | return r520_startup(rdev); | 242 | r = r520_startup(rdev); |
243 | if (r) { | ||
244 | rdev->accel_working = false; | ||
245 | } | ||
246 | return r; | ||
241 | } | 247 | } |
242 | 248 | ||
243 | int r520_init(struct radeon_device *rdev) | 249 | int r520_init(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 4f08e5e6ee9d..fbcd84803b60 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -2529,6 +2529,7 @@ int r600_resume(struct radeon_device *rdev) | |||
2529 | r = r600_startup(rdev); | 2529 | r = r600_startup(rdev); |
2530 | if (r) { | 2530 | if (r) { |
2531 | DRM_ERROR("r600 startup failed on resume\n"); | 2531 | DRM_ERROR("r600 startup failed on resume\n"); |
2532 | rdev->accel_working = false; | ||
2532 | return r; | 2533 | return r; |
2533 | } | 2534 | } |
2534 | 2535 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 9e72daeeddc6..1f53ae74ada1 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -3020,6 +3020,9 @@ radeon_atombios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on) | |||
3020 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 3020 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
3021 | uint32_t bios_2_scratch; | 3021 | uint32_t bios_2_scratch; |
3022 | 3022 | ||
3023 | if (ASIC_IS_DCE4(rdev)) | ||
3024 | return; | ||
3025 | |||
3023 | if (rdev->family >= CHIP_R600) | 3026 | if (rdev->family >= CHIP_R600) |
3024 | bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH); | 3027 | bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH); |
3025 | else | 3028 | else |
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 435a3d970ab8..e64bec488ed8 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -453,6 +453,10 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
453 | int r; | 453 | int r; |
454 | 454 | ||
455 | radeon_mutex_lock(&rdev->cs_mutex); | 455 | radeon_mutex_lock(&rdev->cs_mutex); |
456 | if (!rdev->accel_working) { | ||
457 | radeon_mutex_unlock(&rdev->cs_mutex); | ||
458 | return -EBUSY; | ||
459 | } | ||
456 | /* initialize parser */ | 460 | /* initialize parser */ |
457 | memset(&parser, 0, sizeof(struct radeon_cs_parser)); | 461 | memset(&parser, 0, sizeof(struct radeon_cs_parser)); |
458 | parser.filp = filp; | 462 | parser.filp = filp; |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 30a4c5014c8b..92c9ea4751fb 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
@@ -500,8 +500,11 @@ static char radeon_debugfs_ib_names[RADEON_IB_POOL_SIZE][32]; | |||
500 | int radeon_debugfs_ring_init(struct radeon_device *rdev) | 500 | int radeon_debugfs_ring_init(struct radeon_device *rdev) |
501 | { | 501 | { |
502 | #if defined(CONFIG_DEBUG_FS) | 502 | #if defined(CONFIG_DEBUG_FS) |
503 | return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, | 503 | if (rdev->family >= CHIP_CAYMAN) |
504 | ARRAY_SIZE(radeon_debugfs_ring_info_list)); | 504 | return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, |
505 | ARRAY_SIZE(radeon_debugfs_ring_info_list)); | ||
506 | else | ||
507 | return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, 1); | ||
505 | #else | 508 | #else |
506 | return 0; | 509 | return 0; |
507 | #endif | 510 | #endif |
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index b0ce84a20a68..866a05be75f2 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c | |||
@@ -442,6 +442,8 @@ static int rs400_startup(struct radeon_device *rdev) | |||
442 | 442 | ||
443 | int rs400_resume(struct radeon_device *rdev) | 443 | int rs400_resume(struct radeon_device *rdev) |
444 | { | 444 | { |
445 | int r; | ||
446 | |||
445 | /* Make sur GART are not working */ | 447 | /* Make sur GART are not working */ |
446 | rs400_gart_disable(rdev); | 448 | rs400_gart_disable(rdev); |
447 | /* Resume clock before doing reset */ | 449 | /* Resume clock before doing reset */ |
@@ -462,7 +464,11 @@ int rs400_resume(struct radeon_device *rdev) | |||
462 | radeon_surface_init(rdev); | 464 | radeon_surface_init(rdev); |
463 | 465 | ||
464 | rdev->accel_working = true; | 466 | rdev->accel_working = true; |
465 | return rs400_startup(rdev); | 467 | r = rs400_startup(rdev); |
468 | if (r) { | ||
469 | rdev->accel_working = false; | ||
470 | } | ||
471 | return r; | ||
466 | } | 472 | } |
467 | 473 | ||
468 | int rs400_suspend(struct radeon_device *rdev) | 474 | int rs400_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index c05865e5521f..4fc700684dcd 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c | |||
@@ -876,6 +876,8 @@ static int rs600_startup(struct radeon_device *rdev) | |||
876 | 876 | ||
877 | int rs600_resume(struct radeon_device *rdev) | 877 | int rs600_resume(struct radeon_device *rdev) |
878 | { | 878 | { |
879 | int r; | ||
880 | |||
879 | /* Make sur GART are not working */ | 881 | /* Make sur GART are not working */ |
880 | rs600_gart_disable(rdev); | 882 | rs600_gart_disable(rdev); |
881 | /* Resume clock before doing reset */ | 883 | /* Resume clock before doing reset */ |
@@ -894,7 +896,11 @@ int rs600_resume(struct radeon_device *rdev) | |||
894 | radeon_surface_init(rdev); | 896 | radeon_surface_init(rdev); |
895 | 897 | ||
896 | rdev->accel_working = true; | 898 | rdev->accel_working = true; |
897 | return rs600_startup(rdev); | 899 | r = rs600_startup(rdev); |
900 | if (r) { | ||
901 | rdev->accel_working = false; | ||
902 | } | ||
903 | return r; | ||
898 | } | 904 | } |
899 | 905 | ||
900 | int rs600_suspend(struct radeon_device *rdev) | 906 | int rs600_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index 4f24a0fa8c82..f68dff2fadcb 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c | |||
@@ -659,6 +659,8 @@ static int rs690_startup(struct radeon_device *rdev) | |||
659 | 659 | ||
660 | int rs690_resume(struct radeon_device *rdev) | 660 | int rs690_resume(struct radeon_device *rdev) |
661 | { | 661 | { |
662 | int r; | ||
663 | |||
662 | /* Make sur GART are not working */ | 664 | /* Make sur GART are not working */ |
663 | rs400_gart_disable(rdev); | 665 | rs400_gart_disable(rdev); |
664 | /* Resume clock before doing reset */ | 666 | /* Resume clock before doing reset */ |
@@ -677,7 +679,11 @@ int rs690_resume(struct radeon_device *rdev) | |||
677 | radeon_surface_init(rdev); | 679 | radeon_surface_init(rdev); |
678 | 680 | ||
679 | rdev->accel_working = true; | 681 | rdev->accel_working = true; |
680 | return rs690_startup(rdev); | 682 | r = rs690_startup(rdev); |
683 | if (r) { | ||
684 | rdev->accel_working = false; | ||
685 | } | ||
686 | return r; | ||
681 | } | 687 | } |
682 | 688 | ||
683 | int rs690_suspend(struct radeon_device *rdev) | 689 | int rs690_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c index 880637fd1946..959bf4483bea 100644 --- a/drivers/gpu/drm/radeon/rv515.c +++ b/drivers/gpu/drm/radeon/rv515.c | |||
@@ -424,6 +424,8 @@ static int rv515_startup(struct radeon_device *rdev) | |||
424 | 424 | ||
425 | int rv515_resume(struct radeon_device *rdev) | 425 | int rv515_resume(struct radeon_device *rdev) |
426 | { | 426 | { |
427 | int r; | ||
428 | |||
427 | /* Make sur GART are not working */ | 429 | /* Make sur GART are not working */ |
428 | if (rdev->flags & RADEON_IS_PCIE) | 430 | if (rdev->flags & RADEON_IS_PCIE) |
429 | rv370_pcie_gart_disable(rdev); | 431 | rv370_pcie_gart_disable(rdev); |
@@ -443,7 +445,11 @@ int rv515_resume(struct radeon_device *rdev) | |||
443 | radeon_surface_init(rdev); | 445 | radeon_surface_init(rdev); |
444 | 446 | ||
445 | rdev->accel_working = true; | 447 | rdev->accel_working = true; |
446 | return rv515_startup(rdev); | 448 | r = rv515_startup(rdev); |
449 | if (r) { | ||
450 | rdev->accel_working = false; | ||
451 | } | ||
452 | return r; | ||
447 | } | 453 | } |
448 | 454 | ||
449 | int rv515_suspend(struct radeon_device *rdev) | 455 | int rv515_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index a1668b659ddd..c049c0c51841 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -1139,6 +1139,7 @@ int rv770_resume(struct radeon_device *rdev) | |||
1139 | r = rv770_startup(rdev); | 1139 | r = rv770_startup(rdev); |
1140 | if (r) { | 1140 | if (r) { |
1141 | DRM_ERROR("r600 startup failed on resume\n"); | 1141 | DRM_ERROR("r600 startup failed on resume\n"); |
1142 | rdev->accel_working = false; | ||
1142 | return r; | 1143 | return r; |
1143 | } | 1144 | } |
1144 | 1145 | ||
diff --git a/drivers/hwmon/ads1015.c b/drivers/hwmon/ads1015.c index eedca3cf9968..dd87ae96c262 100644 --- a/drivers/hwmon/ads1015.c +++ b/drivers/hwmon/ads1015.c | |||
@@ -271,7 +271,7 @@ static int ads1015_probe(struct i2c_client *client, | |||
271 | continue; | 271 | continue; |
272 | err = device_create_file(&client->dev, &ads1015_in[k].dev_attr); | 272 | err = device_create_file(&client->dev, &ads1015_in[k].dev_attr); |
273 | if (err) | 273 | if (err) |
274 | goto exit_free; | 274 | goto exit_remove; |
275 | } | 275 | } |
276 | 276 | ||
277 | data->hwmon_dev = hwmon_device_register(&client->dev); | 277 | data->hwmon_dev = hwmon_device_register(&client->dev); |
@@ -285,7 +285,6 @@ static int ads1015_probe(struct i2c_client *client, | |||
285 | exit_remove: | 285 | exit_remove: |
286 | for (k = 0; k < ADS1015_CHANNELS; ++k) | 286 | for (k = 0; k < ADS1015_CHANNELS; ++k) |
287 | device_remove_file(&client->dev, &ads1015_in[k].dev_attr); | 287 | device_remove_file(&client->dev, &ads1015_in[k].dev_attr); |
288 | exit_free: | ||
289 | kfree(data); | 288 | kfree(data); |
290 | exit: | 289 | exit: |
291 | return err; | 290 | return err; |
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index f609b5727ba9..6bab2001ef3b 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -340,8 +340,6 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
340 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); | 340 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); |
341 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | 341 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); |
342 | data->pwm[nr] = 255; | 342 | data->pwm[nr] = 255; |
343 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
344 | data->pwm[nr]); | ||
345 | break; | 343 | break; |
346 | case 1: /* PWM */ | 344 | case 1: /* PWM */ |
347 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); | 345 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); |
@@ -361,8 +359,6 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
361 | case 0: /* full speed */ | 359 | case 0: /* full speed */ |
362 | fanmode |= (3 << FAN_CTRL_MODE(nr)); | 360 | fanmode |= (3 << FAN_CTRL_MODE(nr)); |
363 | data->pwm[nr] = 255; | 361 | data->pwm[nr] = 255; |
364 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
365 | data->pwm[nr]); | ||
366 | break; | 362 | break; |
367 | case 1: /* PWM */ | 363 | case 1: /* PWM */ |
368 | fanmode |= (3 << FAN_CTRL_MODE(nr)); | 364 | fanmode |= (3 << FAN_CTRL_MODE(nr)); |
@@ -377,6 +373,9 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
377 | 373 | ||
378 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); | 374 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); |
379 | data->pwm_enable[nr] = val; | 375 | data->pwm_enable[nr] = val; |
376 | if (val == 0) | ||
377 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
378 | data->pwm[nr]); | ||
380 | return 0; | 379 | return 0; |
381 | } | 380 | } |
382 | 381 | ||
diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c index e10a092c603c..a6760bacd915 100644 --- a/drivers/hwmon/max6639.c +++ b/drivers/hwmon/max6639.c | |||
@@ -72,8 +72,8 @@ static unsigned short normal_i2c[] = { 0x2c, 0x2e, 0x2f, I2C_CLIENT_END }; | |||
72 | 72 | ||
73 | static const int rpm_ranges[] = { 2000, 4000, 8000, 16000 }; | 73 | static const int rpm_ranges[] = { 2000, 4000, 8000, 16000 }; |
74 | 74 | ||
75 | #define FAN_FROM_REG(val, div, rpm_range) ((val) == 0 ? -1 : \ | 75 | #define FAN_FROM_REG(val, rpm_range) ((val) == 0 || (val) == 255 ? \ |
76 | (val) == 255 ? 0 : (rpm_ranges[rpm_range] * 30) / ((div + 1) * (val))) | 76 | 0 : (rpm_ranges[rpm_range] * 30) / (val)) |
77 | #define TEMP_LIMIT_TO_REG(val) SENSORS_LIMIT((val) / 1000, 0, 255) | 77 | #define TEMP_LIMIT_TO_REG(val) SENSORS_LIMIT((val) / 1000, 0, 255) |
78 | 78 | ||
79 | /* | 79 | /* |
@@ -333,7 +333,7 @@ static ssize_t show_fan_input(struct device *dev, | |||
333 | return PTR_ERR(data); | 333 | return PTR_ERR(data); |
334 | 334 | ||
335 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], | 335 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], |
336 | data->ppr, data->rpm_range)); | 336 | data->rpm_range)); |
337 | } | 337 | } |
338 | 338 | ||
339 | static ssize_t show_alarm(struct device *dev, | 339 | static ssize_t show_alarm(struct device *dev, |
@@ -429,9 +429,9 @@ static int max6639_init_client(struct i2c_client *client) | |||
429 | struct max6639_data *data = i2c_get_clientdata(client); | 429 | struct max6639_data *data = i2c_get_clientdata(client); |
430 | struct max6639_platform_data *max6639_info = | 430 | struct max6639_platform_data *max6639_info = |
431 | client->dev.platform_data; | 431 | client->dev.platform_data; |
432 | int i = 0; | 432 | int i; |
433 | int rpm_range = 1; /* default: 4000 RPM */ | 433 | int rpm_range = 1; /* default: 4000 RPM */ |
434 | int err = 0; | 434 | int err; |
435 | 435 | ||
436 | /* Reset chip to default values, see below for GCONFIG setup */ | 436 | /* Reset chip to default values, see below for GCONFIG setup */ |
437 | err = i2c_smbus_write_byte_data(client, MAX6639_REG_GCONFIG, | 437 | err = i2c_smbus_write_byte_data(client, MAX6639_REG_GCONFIG, |
@@ -446,11 +446,6 @@ static int max6639_init_client(struct i2c_client *client) | |||
446 | else | 446 | else |
447 | data->ppr = 2; | 447 | data->ppr = 2; |
448 | data->ppr -= 1; | 448 | data->ppr -= 1; |
449 | err = i2c_smbus_write_byte_data(client, | ||
450 | MAX6639_REG_FAN_PPR(i), | ||
451 | data->ppr << 5); | ||
452 | if (err) | ||
453 | goto exit; | ||
454 | 449 | ||
455 | if (max6639_info) | 450 | if (max6639_info) |
456 | rpm_range = rpm_range_to_reg(max6639_info->rpm_range); | 451 | rpm_range = rpm_range_to_reg(max6639_info->rpm_range); |
@@ -458,6 +453,13 @@ static int max6639_init_client(struct i2c_client *client) | |||
458 | 453 | ||
459 | for (i = 0; i < 2; i++) { | 454 | for (i = 0; i < 2; i++) { |
460 | 455 | ||
456 | /* Set Fan pulse per revolution */ | ||
457 | err = i2c_smbus_write_byte_data(client, | ||
458 | MAX6639_REG_FAN_PPR(i), | ||
459 | data->ppr << 6); | ||
460 | if (err) | ||
461 | goto exit; | ||
462 | |||
461 | /* Fans config PWM, RPM */ | 463 | /* Fans config PWM, RPM */ |
462 | err = i2c_smbus_write_byte_data(client, | 464 | err = i2c_smbus_write_byte_data(client, |
463 | MAX6639_REG_FAN_CONFIG1(i), | 465 | MAX6639_REG_FAN_CONFIG1(i), |
diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index beaf5a8d9c45..9b97a5b3cf3d 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c | |||
@@ -82,7 +82,7 @@ static int max34440_write_word_data(struct i2c_client *client, int page, | |||
82 | case PMBUS_VIRT_RESET_TEMP_HISTORY: | 82 | case PMBUS_VIRT_RESET_TEMP_HISTORY: |
83 | ret = pmbus_write_word_data(client, page, | 83 | ret = pmbus_write_word_data(client, page, |
84 | MAX34440_MFR_TEMPERATURE_PEAK, | 84 | MAX34440_MFR_TEMPERATURE_PEAK, |
85 | 0xffff); | 85 | 0x8000); |
86 | break; | 86 | break; |
87 | default: | 87 | default: |
88 | ret = -ENODATA; | 88 | ret = -ENODATA; |
diff --git a/drivers/media/radio/wl128x/Kconfig b/drivers/media/radio/wl128x/Kconfig index 86b28579f0c7..ea1e6545df36 100644 --- a/drivers/media/radio/wl128x/Kconfig +++ b/drivers/media/radio/wl128x/Kconfig | |||
@@ -4,8 +4,8 @@ | |||
4 | menu "Texas Instruments WL128x FM driver (ST based)" | 4 | menu "Texas Instruments WL128x FM driver (ST based)" |
5 | config RADIO_WL128X | 5 | config RADIO_WL128X |
6 | tristate "Texas Instruments WL128x FM Radio" | 6 | tristate "Texas Instruments WL128x FM Radio" |
7 | depends on VIDEO_V4L2 && RFKILL | 7 | depends on VIDEO_V4L2 && RFKILL && GPIOLIB |
8 | select TI_ST if NET && GPIOLIB | 8 | select TI_ST if NET |
9 | help | 9 | help |
10 | Choose Y here if you have this FM radio chip. | 10 | Choose Y here if you have this FM radio chip. |
11 | 11 | ||
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 3aeb29a7ce11..7f26fdf2e54e 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>" | 47 | #define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>" |
48 | #define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" | 48 | #define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" |
49 | #define MOD_NAME "imon" | 49 | #define MOD_NAME "imon" |
50 | #define MOD_VERSION "0.9.3" | 50 | #define MOD_VERSION "0.9.4" |
51 | 51 | ||
52 | #define DISPLAY_MINOR_BASE 144 | 52 | #define DISPLAY_MINOR_BASE 144 |
53 | #define DEVICE_NAME "lcd%d" | 53 | #define DEVICE_NAME "lcd%d" |
@@ -1658,9 +1658,17 @@ static void usb_rx_callback_intf0(struct urb *urb) | |||
1658 | return; | 1658 | return; |
1659 | 1659 | ||
1660 | ictx = (struct imon_context *)urb->context; | 1660 | ictx = (struct imon_context *)urb->context; |
1661 | if (!ictx || !ictx->dev_present_intf0) | 1661 | if (!ictx) |
1662 | return; | 1662 | return; |
1663 | 1663 | ||
1664 | /* | ||
1665 | * if we get a callback before we're done configuring the hardware, we | ||
1666 | * can't yet process the data, as there's nowhere to send it, but we | ||
1667 | * still need to submit a new rx URB to avoid wedging the hardware | ||
1668 | */ | ||
1669 | if (!ictx->dev_present_intf0) | ||
1670 | goto out; | ||
1671 | |||
1664 | switch (urb->status) { | 1672 | switch (urb->status) { |
1665 | case -ENOENT: /* usbcore unlink successful! */ | 1673 | case -ENOENT: /* usbcore unlink successful! */ |
1666 | return; | 1674 | return; |
@@ -1678,6 +1686,7 @@ static void usb_rx_callback_intf0(struct urb *urb) | |||
1678 | break; | 1686 | break; |
1679 | } | 1687 | } |
1680 | 1688 | ||
1689 | out: | ||
1681 | usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); | 1690 | usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); |
1682 | } | 1691 | } |
1683 | 1692 | ||
@@ -1690,9 +1699,17 @@ static void usb_rx_callback_intf1(struct urb *urb) | |||
1690 | return; | 1699 | return; |
1691 | 1700 | ||
1692 | ictx = (struct imon_context *)urb->context; | 1701 | ictx = (struct imon_context *)urb->context; |
1693 | if (!ictx || !ictx->dev_present_intf1) | 1702 | if (!ictx) |
1694 | return; | 1703 | return; |
1695 | 1704 | ||
1705 | /* | ||
1706 | * if we get a callback before we're done configuring the hardware, we | ||
1707 | * can't yet process the data, as there's nowhere to send it, but we | ||
1708 | * still need to submit a new rx URB to avoid wedging the hardware | ||
1709 | */ | ||
1710 | if (!ictx->dev_present_intf1) | ||
1711 | goto out; | ||
1712 | |||
1696 | switch (urb->status) { | 1713 | switch (urb->status) { |
1697 | case -ENOENT: /* usbcore unlink successful! */ | 1714 | case -ENOENT: /* usbcore unlink successful! */ |
1698 | return; | 1715 | return; |
@@ -1710,6 +1727,7 @@ static void usb_rx_callback_intf1(struct urb *urb) | |||
1710 | break; | 1727 | break; |
1711 | } | 1728 | } |
1712 | 1729 | ||
1730 | out: | ||
1713 | usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); | 1731 | usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); |
1714 | } | 1732 | } |
1715 | 1733 | ||
@@ -2242,7 +2260,7 @@ find_endpoint_failed: | |||
2242 | mutex_unlock(&ictx->lock); | 2260 | mutex_unlock(&ictx->lock); |
2243 | usb_free_urb(rx_urb); | 2261 | usb_free_urb(rx_urb); |
2244 | rx_urb_alloc_failed: | 2262 | rx_urb_alloc_failed: |
2245 | dev_err(ictx->dev, "unable to initialize intf0, err %d\n", ret); | 2263 | dev_err(ictx->dev, "unable to initialize intf1, err %d\n", ret); |
2246 | 2264 | ||
2247 | return NULL; | 2265 | return NULL; |
2248 | } | 2266 | } |
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c index e5eb56a5b618..6510110f53d0 100644 --- a/drivers/media/video/hdpvr/hdpvr-core.c +++ b/drivers/media/video/hdpvr/hdpvr-core.c | |||
@@ -154,10 +154,20 @@ static int device_authorization(struct hdpvr_device *dev) | |||
154 | } | 154 | } |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | dev->fw_ver = dev->usbc_buf[1]; | ||
158 | |||
157 | v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", | 159 | v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", |
158 | dev->usbc_buf[1], &dev->usbc_buf[2]); | 160 | dev->fw_ver, &dev->usbc_buf[2]); |
161 | |||
162 | if (dev->fw_ver > 0x15) { | ||
163 | dev->options.brightness = 0x80; | ||
164 | dev->options.contrast = 0x40; | ||
165 | dev->options.hue = 0xf; | ||
166 | dev->options.saturation = 0x40; | ||
167 | dev->options.sharpness = 0x80; | ||
168 | } | ||
159 | 169 | ||
160 | switch (dev->usbc_buf[1]) { | 170 | switch (dev->fw_ver) { |
161 | case HDPVR_FIRMWARE_VERSION: | 171 | case HDPVR_FIRMWARE_VERSION: |
162 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; | 172 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; |
163 | break; | 173 | break; |
@@ -169,7 +179,7 @@ static int device_authorization(struct hdpvr_device *dev) | |||
169 | default: | 179 | default: |
170 | v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might" | 180 | v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might" |
171 | " not work.\n"); | 181 | " not work.\n"); |
172 | if (dev->usbc_buf[1] >= HDPVR_FIRMWARE_VERSION_AC3) | 182 | if (dev->fw_ver >= HDPVR_FIRMWARE_VERSION_AC3) |
173 | dev->flags |= HDPVR_FLAG_AC3_CAP; | 183 | dev->flags |= HDPVR_FLAG_AC3_CAP; |
174 | else | 184 | else |
175 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; | 185 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; |
@@ -270,6 +280,8 @@ static const struct hdpvr_options hdpvr_default_options = { | |||
270 | .bitrate_mode = HDPVR_CONSTANT, | 280 | .bitrate_mode = HDPVR_CONSTANT, |
271 | .gop_mode = HDPVR_SIMPLE_IDR_GOP, | 281 | .gop_mode = HDPVR_SIMPLE_IDR_GOP, |
272 | .audio_codec = V4L2_MPEG_AUDIO_ENCODING_AAC, | 282 | .audio_codec = V4L2_MPEG_AUDIO_ENCODING_AAC, |
283 | /* original picture controls for firmware version <= 0x15 */ | ||
284 | /* updated in device_authorization() for newer firmware */ | ||
273 | .brightness = 0x86, | 285 | .brightness = 0x86, |
274 | .contrast = 0x80, | 286 | .contrast = 0x80, |
275 | .hue = 0x80, | 287 | .hue = 0x80, |
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index 087f7c08cb85..11ffe9cc1780 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c | |||
@@ -283,12 +283,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev) | |||
283 | 283 | ||
284 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); | 284 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); |
285 | 285 | ||
286 | dev->status = STATUS_STREAMING; | ||
287 | |||
286 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); | 288 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); |
287 | queue_work(dev->workqueue, &dev->worker); | 289 | queue_work(dev->workqueue, &dev->worker); |
288 | 290 | ||
289 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, | 291 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, |
290 | "streaming started\n"); | 292 | "streaming started\n"); |
291 | dev->status = STATUS_STREAMING; | ||
292 | 293 | ||
293 | return 0; | 294 | return 0; |
294 | } | 295 | } |
@@ -722,21 +723,39 @@ static const s32 supported_v4l2_ctrls[] = { | |||
722 | }; | 723 | }; |
723 | 724 | ||
724 | static int fill_queryctrl(struct hdpvr_options *opt, struct v4l2_queryctrl *qc, | 725 | static int fill_queryctrl(struct hdpvr_options *opt, struct v4l2_queryctrl *qc, |
725 | int ac3) | 726 | int ac3, int fw_ver) |
726 | { | 727 | { |
727 | int err; | 728 | int err; |
728 | 729 | ||
730 | if (fw_ver > 0x15) { | ||
731 | switch (qc->id) { | ||
732 | case V4L2_CID_BRIGHTNESS: | ||
733 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
734 | case V4L2_CID_CONTRAST: | ||
735 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x40); | ||
736 | case V4L2_CID_SATURATION: | ||
737 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x40); | ||
738 | case V4L2_CID_HUE: | ||
739 | return v4l2_ctrl_query_fill(qc, 0x0, 0x1e, 1, 0xf); | ||
740 | case V4L2_CID_SHARPNESS: | ||
741 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
742 | } | ||
743 | } else { | ||
744 | switch (qc->id) { | ||
745 | case V4L2_CID_BRIGHTNESS: | ||
746 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x86); | ||
747 | case V4L2_CID_CONTRAST: | ||
748 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
749 | case V4L2_CID_SATURATION: | ||
750 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
751 | case V4L2_CID_HUE: | ||
752 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
753 | case V4L2_CID_SHARPNESS: | ||
754 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
755 | } | ||
756 | } | ||
757 | |||
729 | switch (qc->id) { | 758 | switch (qc->id) { |
730 | case V4L2_CID_BRIGHTNESS: | ||
731 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x86); | ||
732 | case V4L2_CID_CONTRAST: | ||
733 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
734 | case V4L2_CID_SATURATION: | ||
735 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
736 | case V4L2_CID_HUE: | ||
737 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
738 | case V4L2_CID_SHARPNESS: | ||
739 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
740 | case V4L2_CID_MPEG_AUDIO_ENCODING: | 759 | case V4L2_CID_MPEG_AUDIO_ENCODING: |
741 | return v4l2_ctrl_query_fill( | 760 | return v4l2_ctrl_query_fill( |
742 | qc, V4L2_MPEG_AUDIO_ENCODING_AAC, | 761 | qc, V4L2_MPEG_AUDIO_ENCODING_AAC, |
@@ -794,7 +813,8 @@ static int vidioc_queryctrl(struct file *file, void *private_data, | |||
794 | 813 | ||
795 | if (qc->id == supported_v4l2_ctrls[i]) | 814 | if (qc->id == supported_v4l2_ctrls[i]) |
796 | return fill_queryctrl(&dev->options, qc, | 815 | return fill_queryctrl(&dev->options, qc, |
797 | dev->flags & HDPVR_FLAG_AC3_CAP); | 816 | dev->flags & HDPVR_FLAG_AC3_CAP, |
817 | dev->fw_ver); | ||
798 | 818 | ||
799 | if (qc->id < supported_v4l2_ctrls[i]) | 819 | if (qc->id < supported_v4l2_ctrls[i]) |
800 | break; | 820 | break; |
diff --git a/drivers/media/video/hdpvr/hdpvr.h b/drivers/media/video/hdpvr/hdpvr.h index d6439db1d18b..fea3c6926997 100644 --- a/drivers/media/video/hdpvr/hdpvr.h +++ b/drivers/media/video/hdpvr/hdpvr.h | |||
@@ -113,6 +113,7 @@ struct hdpvr_device { | |||
113 | /* usb control transfer buffer and lock */ | 113 | /* usb control transfer buffer and lock */ |
114 | struct mutex usbc_mutex; | 114 | struct mutex usbc_mutex; |
115 | u8 *usbc_buf; | 115 | u8 *usbc_buf; |
116 | u8 fw_ver; | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | static inline struct hdpvr_device *to_hdpvr_dev(struct v4l2_device *v4l2_dev) | 119 | static inline struct hdpvr_device *to_hdpvr_dev(struct v4l2_device *v4l2_dev) |
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c index a74a79701d34..eaabc27f0fa2 100644 --- a/drivers/media/video/omap3isp/ispccdc.c +++ b/drivers/media/video/omap3isp/ispccdc.c | |||
@@ -1407,7 +1407,7 @@ static int __ccdc_handle_stopping(struct isp_ccdc_device *ccdc, u32 event) | |||
1407 | static void ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc) | 1407 | static void ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc) |
1408 | { | 1408 | { |
1409 | struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); | 1409 | struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); |
1410 | struct video_device *vdev = &ccdc->subdev.devnode; | 1410 | struct video_device *vdev = ccdc->subdev.devnode; |
1411 | struct v4l2_event event; | 1411 | struct v4l2_event event; |
1412 | 1412 | ||
1413 | memset(&event, 0, sizeof(event)); | 1413 | memset(&event, 0, sizeof(event)); |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index ebbcfcafe29b..5e10472371ed 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; |
@@ -492,6 +497,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | |||
492 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { | 497 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { |
493 | n++; | 498 | n++; |
494 | status = priv->read_reg(priv, REG_SR); | 499 | status = priv->read_reg(priv, REG_SR); |
500 | /* check for absent controller due to hw unplug */ | ||
501 | if (status == 0xFF && sja1000_is_absent(priv)) | ||
502 | return IRQ_NONE; | ||
495 | 503 | ||
496 | if (isrc & IRQ_WUI) | 504 | if (isrc & IRQ_WUI) |
497 | netdev_warn(dev, "wakeup interrupt\n"); | 505 | netdev_warn(dev, "wakeup interrupt\n"); |
@@ -508,6 +516,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | |||
508 | while (status & SR_RBS) { | 516 | while (status & SR_RBS) { |
509 | sja1000_rx(dev); | 517 | sja1000_rx(dev); |
510 | status = priv->read_reg(priv, REG_SR); | 518 | status = priv->read_reg(priv, REG_SR); |
519 | /* check for absent controller */ | ||
520 | if (status == 0xFF && sja1000_is_absent(priv)) | ||
521 | return IRQ_NONE; | ||
511 | } | 522 | } |
512 | } | 523 | } |
513 | if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) { | 524 | 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 ccdf1f6e2f9f..0f21a9b4cdd4 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -2245,10 +2245,6 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb, | |||
2245 | dev_info(&adapter->pdev->dev, "tx locked\n"); | 2245 | dev_info(&adapter->pdev->dev, "tx locked\n"); |
2246 | return NETDEV_TX_LOCKED; | 2246 | return NETDEV_TX_LOCKED; |
2247 | } | 2247 | } |
2248 | if (skb->mark == 0x01) | ||
2249 | type = atl1c_trans_high; | ||
2250 | else | ||
2251 | type = atl1c_trans_normal; | ||
2252 | 2248 | ||
2253 | if (atl1c_tpd_avail(adapter, type) < tpd_req) { | 2249 | if (atl1c_tpd_avail(adapter, type) < tpd_req) { |
2254 | /* no enough descriptor, just stop queue */ | 2250 | /* no enough descriptor, just stop queue */ |
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 66f53c797e3a..46b8b7d81633 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c | |||
@@ -2338,7 +2338,7 @@ static inline int __init b44_pci_init(void) | |||
2338 | return err; | 2338 | return err; |
2339 | } | 2339 | } |
2340 | 2340 | ||
2341 | static inline void __exit b44_pci_exit(void) | 2341 | static inline void b44_pci_exit(void) |
2342 | { | 2342 | { |
2343 | #ifdef CONFIG_B44_PCI | 2343 | #ifdef CONFIG_B44_PCI |
2344 | ssb_pcihost_unregister(&b44_pci_driver); | 2344 | ssb_pcihost_unregister(&b44_pci_driver); |
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index df429959abdd..7b65716b8734 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -3616,7 +3616,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, | |||
3616 | fl6.flowi6_oif = dst_addr->sin6_scope_id; | 3616 | fl6.flowi6_oif = dst_addr->sin6_scope_id; |
3617 | 3617 | ||
3618 | *dst = ip6_route_output(&init_net, NULL, &fl6); | 3618 | *dst = ip6_route_output(&init_net, NULL, &fl6); |
3619 | if (*dst) | 3619 | if ((*dst)->error) { |
3620 | dst_release(*dst); | ||
3621 | *dst = NULL; | ||
3622 | return -ENETUNREACH; | ||
3623 | } else | ||
3620 | return 0; | 3624 | return 0; |
3621 | #endif | 3625 | #endif |
3622 | 3626 | ||
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 c758674643ce..dafea1ecb7b1 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 1b86d0b45f3c..4ea6580d3ae8 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/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 8a21e10952ea..9ea7cabcaf3c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
@@ -685,7 +685,7 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave, | |||
685 | return err; | 685 | return err; |
686 | } | 686 | } |
687 | 687 | ||
688 | static int mlx4_QUERY_PORT(struct mlx4_dev *dev, void *ptr, u8 port) | 688 | int mlx4_QUERY_PORT(struct mlx4_dev *dev, void *ptr, u8 port) |
689 | { | 689 | { |
690 | struct mlx4_cmd_mailbox *outbox = ptr; | 690 | struct mlx4_cmd_mailbox *outbox = ptr; |
691 | 691 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 0809b7c3905c..5f15014713bc 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) - |
@@ -1823,7 +1825,7 @@ slave_start: | |||
1823 | goto err_master_mfunc; | 1825 | goto err_master_mfunc; |
1824 | 1826 | ||
1825 | priv->msix_ctl.pool_bm = 0; | 1827 | priv->msix_ctl.pool_bm = 0; |
1826 | spin_lock_init(&priv->msix_ctl.pool_lock); | 1828 | mutex_init(&priv->msix_ctl.pool_lock); |
1827 | 1829 | ||
1828 | mlx4_enable_msi_x(dev); | 1830 | mlx4_enable_msi_x(dev); |
1829 | if ((mlx4_is_mfunc(dev)) && | 1831 | if ((mlx4_is_mfunc(dev)) && |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index 276c7f72bd83..5da51b99dbb8 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/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index 8deeef98280c..25a80d71fb2a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c | |||
@@ -304,7 +304,7 @@ static int mlx4_HW2SW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox | |||
304 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED); | 304 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED); |
305 | } | 305 | } |
306 | 306 | ||
307 | static int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align, | 307 | int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align, |
308 | u32 *base_mridx) | 308 | u32 *base_mridx) |
309 | { | 309 | { |
310 | struct mlx4_priv *priv = mlx4_priv(dev); | 310 | struct mlx4_priv *priv = mlx4_priv(dev); |
@@ -320,14 +320,14 @@ static int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align, | |||
320 | } | 320 | } |
321 | EXPORT_SYMBOL_GPL(mlx4_mr_reserve_range); | 321 | EXPORT_SYMBOL_GPL(mlx4_mr_reserve_range); |
322 | 322 | ||
323 | static void mlx4_mr_release_range(struct mlx4_dev *dev, u32 base_mridx, int cnt) | 323 | void mlx4_mr_release_range(struct mlx4_dev *dev, u32 base_mridx, int cnt) |
324 | { | 324 | { |
325 | struct mlx4_priv *priv = mlx4_priv(dev); | 325 | struct mlx4_priv *priv = mlx4_priv(dev); |
326 | mlx4_bitmap_free_range(&priv->mr_table.mpt_bitmap, base_mridx, cnt); | 326 | mlx4_bitmap_free_range(&priv->mr_table.mpt_bitmap, base_mridx, cnt); |
327 | } | 327 | } |
328 | EXPORT_SYMBOL_GPL(mlx4_mr_release_range); | 328 | EXPORT_SYMBOL_GPL(mlx4_mr_release_range); |
329 | 329 | ||
330 | static int mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd, | 330 | int mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd, |
331 | u64 iova, u64 size, u32 access, int npages, | 331 | u64 iova, u64 size, u32 access, int npages, |
332 | int page_shift, struct mlx4_mr *mr) | 332 | int page_shift, struct mlx4_mr *mr) |
333 | { | 333 | { |
@@ -457,7 +457,7 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, | |||
457 | } | 457 | } |
458 | EXPORT_SYMBOL_GPL(mlx4_mr_alloc); | 458 | EXPORT_SYMBOL_GPL(mlx4_mr_alloc); |
459 | 459 | ||
460 | static void mlx4_mr_free_reserved(struct mlx4_dev *dev, struct mlx4_mr *mr) | 460 | void mlx4_mr_free_reserved(struct mlx4_dev *dev, struct mlx4_mr *mr) |
461 | { | 461 | { |
462 | int err; | 462 | int err; |
463 | 463 | ||
@@ -852,7 +852,7 @@ err_free: | |||
852 | } | 852 | } |
853 | EXPORT_SYMBOL_GPL(mlx4_fmr_alloc); | 853 | EXPORT_SYMBOL_GPL(mlx4_fmr_alloc); |
854 | 854 | ||
855 | static int mlx4_fmr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, | 855 | int mlx4_fmr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, |
856 | u32 pd, u32 access, int max_pages, | 856 | u32 pd, u32 access, int max_pages, |
857 | int max_maps, u8 page_shift, struct mlx4_fmr *fmr) | 857 | int max_maps, u8 page_shift, struct mlx4_fmr *fmr) |
858 | { | 858 | { |
@@ -954,7 +954,7 @@ int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr) | |||
954 | } | 954 | } |
955 | EXPORT_SYMBOL_GPL(mlx4_fmr_free); | 955 | EXPORT_SYMBOL_GPL(mlx4_fmr_free); |
956 | 956 | ||
957 | static int mlx4_fmr_free_reserved(struct mlx4_dev *dev, struct mlx4_fmr *fmr) | 957 | int mlx4_fmr_free_reserved(struct mlx4_dev *dev, struct mlx4_fmr *fmr) |
958 | { | 958 | { |
959 | if (fmr->maps) | 959 | if (fmr->maps) |
960 | return -EBUSY; | 960 | return -EBUSY; |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index 10d57983df05..b8104d9f4081 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -1544,7 +1544,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev) | |||
1544 | 1544 | ||
1545 | netdev->irq = platform_get_irq(pdev, 0); | 1545 | netdev->irq = platform_get_irq(pdev, 0); |
1546 | 1546 | ||
1547 | if (netdev->irq < 0) { | 1547 | if ((int)netdev->irq < 0) { |
1548 | err = netdev->irq; | 1548 | err = netdev->irq; |
1549 | goto err_get_irq; | 1549 | goto err_get_irq; |
1550 | } | 1550 | } |
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c index 506d24669956..1ba290d0c21c 100644 --- a/drivers/net/ethernet/sfc/rx.c +++ b/drivers/net/ethernet/sfc/rx.c | |||
@@ -155,11 +155,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue) | |||
155 | if (unlikely(!skb)) | 155 | if (unlikely(!skb)) |
156 | return -ENOMEM; | 156 | return -ENOMEM; |
157 | 157 | ||
158 | /* Adjust the SKB for padding and checksum */ | 158 | /* Adjust the SKB for padding */ |
159 | skb_reserve(skb, NET_IP_ALIGN); | 159 | skb_reserve(skb, NET_IP_ALIGN); |
160 | rx_buf->len = skb_len - NET_IP_ALIGN; | 160 | rx_buf->len = skb_len - NET_IP_ALIGN; |
161 | rx_buf->flags = 0; | 161 | rx_buf->flags = 0; |
162 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
163 | 162 | ||
164 | rx_buf->dma_addr = pci_map_single(efx->pci_dev, | 163 | rx_buf->dma_addr = pci_map_single(efx->pci_dev, |
165 | skb->data, rx_buf->len, | 164 | 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(!(rx_buf->flags & EFX_RX_PKT_CSUMMED)); | 496 | EFX_BUG_ON_PARANOID(!(rx_buf->flags & EFX_RX_PKT_CSUMMED)); |
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 6d74cb7aaae8..174a3348f676 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c | |||
@@ -1008,7 +1008,7 @@ static void emac_rx_handler(void *token, int len, int status) | |||
1008 | int ret; | 1008 | int ret; |
1009 | 1009 | ||
1010 | /* free and bail if we are shutting down */ | 1010 | /* free and bail if we are shutting down */ |
1011 | if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { | 1011 | if (unlikely(!netif_running(ndev))) { |
1012 | dev_kfree_skb_any(skb); | 1012 | dev_kfree_skb_any(skb); |
1013 | return; | 1013 | return; |
1014 | } | 1014 | } |
@@ -1037,7 +1037,9 @@ static void emac_rx_handler(void *token, int len, int status) | |||
1037 | recycle: | 1037 | recycle: |
1038 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, | 1038 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, |
1039 | skb_tailroom(skb), GFP_KERNEL); | 1039 | skb_tailroom(skb), GFP_KERNEL); |
1040 | if (WARN_ON(ret < 0)) | 1040 | |
1041 | WARN_ON(ret == -ENOMEM); | ||
1042 | if (unlikely(ret < 0)) | ||
1041 | dev_kfree_skb_any(skb); | 1043 | dev_kfree_skb_any(skb); |
1042 | } | 1044 | } |
1043 | 1045 | ||
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 93a86397af36..6d4d2ebb0a8a 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 e1562e8acba5..adf527e27583 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -837,8 +837,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
837 | /* for simplicity, don't copy L4 headers */ | 837 | /* for simplicity, don't copy L4 headers */ |
838 | ctx->l4_hdr_size = 0; | 838 | ctx->l4_hdr_size = 0; |
839 | } | 839 | } |
840 | ctx->copy_size = ctx->eth_ip_hdr_size + | 840 | ctx->copy_size = min(ctx->eth_ip_hdr_size + |
841 | ctx->l4_hdr_size; | 841 | ctx->l4_hdr_size, skb->len); |
842 | } else { | 842 | } else { |
843 | ctx->eth_ip_hdr_size = 0; | 843 | ctx->eth_ip_hdr_size = 0; |
844 | ctx->l4_hdr_size = 0; | 844 | ctx->l4_hdr_size = 0; |
diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 42a7d603c870..7481146a5b47 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <asm/bios_ebda.h> | 34 | #include <asm/bios_ebda.h> |
35 | 35 | ||
36 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
37 | |||
36 | static bool force; | 38 | static bool force; |
37 | module_param(force, bool, 0); | 39 | module_param(force, bool, 0); |
38 | MODULE_PARM_DESC(force, "Force driver load, ignore DMI data"); | 40 | MODULE_PARM_DESC(force, "Force driver load, ignore DMI data"); |
@@ -83,19 +85,6 @@ static void __iomem *rtl_cmd_addr; | |||
83 | static u8 rtl_cmd_type; | 85 | static u8 rtl_cmd_type; |
84 | static u8 rtl_cmd_width; | 86 | static u8 rtl_cmd_width; |
85 | 87 | ||
86 | #ifndef readq | ||
87 | static inline __u64 readq(const volatile void __iomem *addr) | ||
88 | { | ||
89 | const volatile u32 __iomem *p = addr; | ||
90 | u32 low, high; | ||
91 | |||
92 | low = readl(p); | ||
93 | high = readl(p + 1); | ||
94 | |||
95 | return low + ((u64)high << 32); | ||
96 | } | ||
97 | #endif | ||
98 | |||
99 | static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len) | 88 | static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len) |
100 | { | 89 | { |
101 | if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO) | 90 | if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO) |
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c index 809a3ae943c6..88a98cff5a44 100644 --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c | |||
@@ -77,6 +77,8 @@ | |||
77 | #include <asm/processor.h> | 77 | #include <asm/processor.h> |
78 | #include "intel_ips.h" | 78 | #include "intel_ips.h" |
79 | 79 | ||
80 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
81 | |||
80 | #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 | 82 | #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 |
81 | 83 | ||
82 | /* | 84 | /* |
@@ -344,19 +346,6 @@ struct ips_driver { | |||
344 | static bool | 346 | static bool |
345 | ips_gpu_turbo_enabled(struct ips_driver *ips); | 347 | ips_gpu_turbo_enabled(struct ips_driver *ips); |
346 | 348 | ||
347 | #ifndef readq | ||
348 | static inline __u64 readq(const volatile void __iomem *addr) | ||
349 | { | ||
350 | const volatile u32 __iomem *p = addr; | ||
351 | u32 low, high; | ||
352 | |||
353 | low = readl(p); | ||
354 | high = readl(p + 1); | ||
355 | |||
356 | return low + ((u64)high << 32); | ||
357 | } | ||
358 | #endif | ||
359 | |||
360 | /** | 349 | /** |
361 | * ips_cpu_busy - is CPU busy? | 350 | * ips_cpu_busy - is CPU busy? |
362 | * @ips: IPS driver struct | 351 | * @ips: IPS driver struct |
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 934458ad55e5..e71a50d4b221 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -87,6 +87,7 @@ struct raw3215_info { | |||
87 | struct tty_struct *tty; /* pointer to tty structure if present */ | 87 | struct tty_struct *tty; /* pointer to tty structure if present */ |
88 | struct raw3215_req *queued_read; /* pointer to queued read requests */ | 88 | struct raw3215_req *queued_read; /* pointer to queued read requests */ |
89 | struct raw3215_req *queued_write;/* pointer to queued write requests */ | 89 | struct raw3215_req *queued_write;/* pointer to queued write requests */ |
90 | struct tasklet_struct tlet; /* tasklet to invoke tty_wakeup */ | ||
90 | wait_queue_head_t empty_wait; /* wait queue for flushing */ | 91 | wait_queue_head_t empty_wait; /* wait queue for flushing */ |
91 | struct timer_list timer; /* timer for delayed output */ | 92 | struct timer_list timer; /* timer for delayed output */ |
92 | int line_pos; /* position on the line (for tabs) */ | 93 | int line_pos; /* position on the line (for tabs) */ |
@@ -334,19 +335,23 @@ static inline void raw3215_try_io(struct raw3215_info *raw) | |||
334 | } | 335 | } |
335 | 336 | ||
336 | /* | 337 | /* |
338 | * Call tty_wakeup from tasklet context | ||
339 | */ | ||
340 | static void raw3215_wakeup(unsigned long data) | ||
341 | { | ||
342 | struct raw3215_info *raw = (struct raw3215_info *) data; | ||
343 | tty_wakeup(raw->tty); | ||
344 | } | ||
345 | |||
346 | /* | ||
337 | * Try to start the next IO and wake up processes waiting on the tty. | 347 | * Try to start the next IO and wake up processes waiting on the tty. |
338 | */ | 348 | */ |
339 | static void raw3215_next_io(struct raw3215_info *raw) | 349 | static void raw3215_next_io(struct raw3215_info *raw) |
340 | { | 350 | { |
341 | struct tty_struct *tty; | ||
342 | |||
343 | raw3215_mk_write_req(raw); | 351 | raw3215_mk_write_req(raw); |
344 | raw3215_try_io(raw); | 352 | raw3215_try_io(raw); |
345 | tty = raw->tty; | 353 | if (raw->tty && RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE) |
346 | if (tty != NULL && | 354 | tasklet_schedule(&raw->tlet); |
347 | RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE) { | ||
348 | tty_wakeup(tty); | ||
349 | } | ||
350 | } | 355 | } |
351 | 356 | ||
352 | /* | 357 | /* |
@@ -682,6 +687,7 @@ static int raw3215_probe (struct ccw_device *cdev) | |||
682 | return -ENOMEM; | 687 | return -ENOMEM; |
683 | } | 688 | } |
684 | init_waitqueue_head(&raw->empty_wait); | 689 | init_waitqueue_head(&raw->empty_wait); |
690 | tasklet_init(&raw->tlet, raw3215_wakeup, (unsigned long) raw); | ||
685 | 691 | ||
686 | dev_set_drvdata(&cdev->dev, raw); | 692 | dev_set_drvdata(&cdev->dev, raw); |
687 | cdev->handler = raw3215_irq; | 693 | cdev->handler = raw3215_irq; |
@@ -901,6 +907,7 @@ static int __init con3215_init(void) | |||
901 | 907 | ||
902 | raw->flags |= RAW3215_FIXED; | 908 | raw->flags |= RAW3215_FIXED; |
903 | init_waitqueue_head(&raw->empty_wait); | 909 | init_waitqueue_head(&raw->empty_wait); |
910 | tasklet_init(&raw->tlet, raw3215_wakeup, (unsigned long) raw); | ||
904 | 911 | ||
905 | /* Request the console irq */ | 912 | /* Request the console irq */ |
906 | if (raw3215_startup(raw) != 0) { | 913 | if (raw3215_startup(raw) != 0) { |
@@ -966,6 +973,7 @@ static void tty3215_close(struct tty_struct *tty, struct file * filp) | |||
966 | tty->closing = 1; | 973 | tty->closing = 1; |
967 | /* Shutdown the terminal */ | 974 | /* Shutdown the terminal */ |
968 | raw3215_shutdown(raw); | 975 | raw3215_shutdown(raw); |
976 | tasklet_kill(&raw->tlet); | ||
969 | tty->closing = 0; | 977 | tty->closing = 0; |
970 | raw->tty = NULL; | 978 | raw->tty = NULL; |
971 | } | 979 | } |
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 53a31c753cb1..20c4557f5abd 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c | |||
@@ -364,10 +364,7 @@ static void release_controller(struct kref *kref) | |||
364 | struct rdac_controller *ctlr; | 364 | struct rdac_controller *ctlr; |
365 | ctlr = container_of(kref, struct rdac_controller, kref); | 365 | ctlr = container_of(kref, struct rdac_controller, kref); |
366 | 366 | ||
367 | flush_workqueue(kmpath_rdacd); | ||
368 | spin_lock(&list_lock); | ||
369 | list_del(&ctlr->node); | 367 | list_del(&ctlr->node); |
370 | spin_unlock(&list_lock); | ||
371 | kfree(ctlr); | 368 | kfree(ctlr); |
372 | } | 369 | } |
373 | 370 | ||
@@ -376,20 +373,17 @@ static struct rdac_controller *get_controller(int index, char *array_name, | |||
376 | { | 373 | { |
377 | struct rdac_controller *ctlr, *tmp; | 374 | struct rdac_controller *ctlr, *tmp; |
378 | 375 | ||
379 | spin_lock(&list_lock); | ||
380 | |||
381 | list_for_each_entry(tmp, &ctlr_list, node) { | 376 | list_for_each_entry(tmp, &ctlr_list, node) { |
382 | if ((memcmp(tmp->array_id, array_id, UNIQUE_ID_LEN) == 0) && | 377 | if ((memcmp(tmp->array_id, array_id, UNIQUE_ID_LEN) == 0) && |
383 | (tmp->index == index) && | 378 | (tmp->index == index) && |
384 | (tmp->host == sdev->host)) { | 379 | (tmp->host == sdev->host)) { |
385 | kref_get(&tmp->kref); | 380 | kref_get(&tmp->kref); |
386 | spin_unlock(&list_lock); | ||
387 | return tmp; | 381 | return tmp; |
388 | } | 382 | } |
389 | } | 383 | } |
390 | ctlr = kmalloc(sizeof(*ctlr), GFP_ATOMIC); | 384 | ctlr = kmalloc(sizeof(*ctlr), GFP_ATOMIC); |
391 | if (!ctlr) | 385 | if (!ctlr) |
392 | goto done; | 386 | return NULL; |
393 | 387 | ||
394 | /* initialize fields of controller */ | 388 | /* initialize fields of controller */ |
395 | memcpy(ctlr->array_id, array_id, UNIQUE_ID_LEN); | 389 | memcpy(ctlr->array_id, array_id, UNIQUE_ID_LEN); |
@@ -405,8 +399,7 @@ static struct rdac_controller *get_controller(int index, char *array_name, | |||
405 | INIT_WORK(&ctlr->ms_work, send_mode_select); | 399 | INIT_WORK(&ctlr->ms_work, send_mode_select); |
406 | INIT_LIST_HEAD(&ctlr->ms_head); | 400 | INIT_LIST_HEAD(&ctlr->ms_head); |
407 | list_add(&ctlr->node, &ctlr_list); | 401 | list_add(&ctlr->node, &ctlr_list); |
408 | done: | 402 | |
409 | spin_unlock(&list_lock); | ||
410 | return ctlr; | 403 | return ctlr; |
411 | } | 404 | } |
412 | 405 | ||
@@ -517,9 +510,12 @@ static int initialize_controller(struct scsi_device *sdev, | |||
517 | index = 0; | 510 | index = 0; |
518 | else | 511 | else |
519 | index = 1; | 512 | index = 1; |
513 | |||
514 | spin_lock(&list_lock); | ||
520 | h->ctlr = get_controller(index, array_name, array_id, sdev); | 515 | h->ctlr = get_controller(index, array_name, array_id, sdev); |
521 | if (!h->ctlr) | 516 | if (!h->ctlr) |
522 | err = SCSI_DH_RES_TEMP_UNAVAIL; | 517 | err = SCSI_DH_RES_TEMP_UNAVAIL; |
518 | spin_unlock(&list_lock); | ||
523 | } | 519 | } |
524 | return err; | 520 | return err; |
525 | } | 521 | } |
@@ -906,7 +902,9 @@ static int rdac_bus_attach(struct scsi_device *sdev) | |||
906 | return 0; | 902 | return 0; |
907 | 903 | ||
908 | clean_ctlr: | 904 | clean_ctlr: |
905 | spin_lock(&list_lock); | ||
909 | kref_put(&h->ctlr->kref, release_controller); | 906 | kref_put(&h->ctlr->kref, release_controller); |
907 | spin_unlock(&list_lock); | ||
910 | 908 | ||
911 | failed: | 909 | failed: |
912 | kfree(scsi_dh_data); | 910 | kfree(scsi_dh_data); |
@@ -921,14 +919,19 @@ static void rdac_bus_detach( struct scsi_device *sdev ) | |||
921 | struct rdac_dh_data *h; | 919 | struct rdac_dh_data *h; |
922 | unsigned long flags; | 920 | unsigned long flags; |
923 | 921 | ||
924 | spin_lock_irqsave(sdev->request_queue->queue_lock, flags); | ||
925 | scsi_dh_data = sdev->scsi_dh_data; | 922 | scsi_dh_data = sdev->scsi_dh_data; |
923 | h = (struct rdac_dh_data *) scsi_dh_data->buf; | ||
924 | if (h->ctlr && h->ctlr->ms_queued) | ||
925 | flush_workqueue(kmpath_rdacd); | ||
926 | |||
927 | spin_lock_irqsave(sdev->request_queue->queue_lock, flags); | ||
926 | sdev->scsi_dh_data = NULL; | 928 | sdev->scsi_dh_data = NULL; |
927 | spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); | 929 | spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); |
928 | 930 | ||
929 | h = (struct rdac_dh_data *) scsi_dh_data->buf; | 931 | spin_lock(&list_lock); |
930 | if (h->ctlr) | 932 | if (h->ctlr) |
931 | kref_put(&h->ctlr->kref, release_controller); | 933 | kref_put(&h->ctlr->kref, release_controller); |
934 | spin_unlock(&list_lock); | ||
932 | kfree(scsi_dh_data); | 935 | kfree(scsi_dh_data); |
933 | module_put(THIS_MODULE); | 936 | module_put(THIS_MODULE); |
934 | sdev_printk(KERN_NOTICE, sdev, "%s: Detached\n", RDAC_NAME); | 937 | sdev_printk(KERN_NOTICE, sdev, "%s: Detached\n", RDAC_NAME); |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 67b169b7a5be..b538f0883fd2 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -4613,11 +4613,13 @@ static int __ipr_eh_host_reset(struct scsi_cmnd * scsi_cmd) | |||
4613 | ENTER; | 4613 | ENTER; |
4614 | ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata; | 4614 | ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata; |
4615 | 4615 | ||
4616 | dev_err(&ioa_cfg->pdev->dev, | 4616 | if (!ioa_cfg->in_reset_reload) { |
4617 | "Adapter being reset as a result of error recovery.\n"); | 4617 | dev_err(&ioa_cfg->pdev->dev, |
4618 | "Adapter being reset as a result of error recovery.\n"); | ||
4618 | 4619 | ||
4619 | if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) | 4620 | if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) |
4620 | ioa_cfg->sdt_state = GET_DUMP; | 4621 | ioa_cfg->sdt_state = GET_DUMP; |
4622 | } | ||
4621 | 4623 | ||
4622 | rc = ipr_reset_reload(ioa_cfg, IPR_SHUTDOWN_ABBREV); | 4624 | rc = ipr_reset_reload(ioa_cfg, IPR_SHUTDOWN_ABBREV); |
4623 | 4625 | ||
@@ -4907,7 +4909,7 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd) | |||
4907 | struct ipr_ioa_cfg *ioa_cfg; | 4909 | struct ipr_ioa_cfg *ioa_cfg; |
4908 | struct ipr_resource_entry *res; | 4910 | struct ipr_resource_entry *res; |
4909 | struct ipr_cmd_pkt *cmd_pkt; | 4911 | struct ipr_cmd_pkt *cmd_pkt; |
4910 | u32 ioasc; | 4912 | u32 ioasc, int_reg; |
4911 | int op_found = 0; | 4913 | int op_found = 0; |
4912 | 4914 | ||
4913 | ENTER; | 4915 | ENTER; |
@@ -4920,7 +4922,17 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd) | |||
4920 | */ | 4922 | */ |
4921 | if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead) | 4923 | if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead) |
4922 | return FAILED; | 4924 | return FAILED; |
4923 | if (!res || !ipr_is_gscsi(res)) | 4925 | if (!res) |
4926 | return FAILED; | ||
4927 | |||
4928 | /* | ||
4929 | * If we are aborting a timed out op, chances are that the timeout was caused | ||
4930 | * by a still not detected EEH error. In such cases, reading a register will | ||
4931 | * trigger the EEH recovery infrastructure. | ||
4932 | */ | ||
4933 | int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); | ||
4934 | |||
4935 | if (!ipr_is_gscsi(res)) | ||
4924 | return FAILED; | 4936 | return FAILED; |
4925 | 4937 | ||
4926 | list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) { | 4938 | list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) { |
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 1a65d6514237..418391b1c361 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -1848,9 +1848,11 @@ static enum sci_status sci_oem_parameters_set(struct isci_host *ihost) | |||
1848 | if (state == SCIC_RESET || | 1848 | if (state == SCIC_RESET || |
1849 | state == SCIC_INITIALIZING || | 1849 | state == SCIC_INITIALIZING || |
1850 | state == SCIC_INITIALIZED) { | 1850 | state == SCIC_INITIALIZED) { |
1851 | u8 oem_version = pci_info->orom ? pci_info->orom->hdr.version : | ||
1852 | ISCI_ROM_VER_1_0; | ||
1851 | 1853 | ||
1852 | if (sci_oem_parameters_validate(&ihost->oem_parameters, | 1854 | if (sci_oem_parameters_validate(&ihost->oem_parameters, |
1853 | pci_info->orom->hdr.version)) | 1855 | oem_version)) |
1854 | return SCI_FAILURE_INVALID_PARAMETER_VALUE; | 1856 | return SCI_FAILURE_INVALID_PARAMETER_VALUE; |
1855 | 1857 | ||
1856 | return SCI_SUCCESS; | 1858 | return SCI_SUCCESS; |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 0b2c95583660..a78036f5e1a6 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -4548,7 +4548,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag, | |||
4548 | printk(MPT2SAS_ERR_FMT "%s: pci error recovery reset\n", | 4548 | printk(MPT2SAS_ERR_FMT "%s: pci error recovery reset\n", |
4549 | ioc->name, __func__); | 4549 | ioc->name, __func__); |
4550 | r = 0; | 4550 | r = 0; |
4551 | goto out; | 4551 | goto out_unlocked; |
4552 | } | 4552 | } |
4553 | 4553 | ||
4554 | if (mpt2sas_fwfault_debug) | 4554 | if (mpt2sas_fwfault_debug) |
@@ -4604,6 +4604,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag, | |||
4604 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | 4604 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); |
4605 | mutex_unlock(&ioc->reset_in_progress_mutex); | 4605 | mutex_unlock(&ioc->reset_in_progress_mutex); |
4606 | 4606 | ||
4607 | out_unlocked: | ||
4607 | dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: exit\n", ioc->name, | 4608 | dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: exit\n", ioc->name, |
4608 | __func__)); | 4609 | __func__)); |
4609 | return r; | 4610 | return r; |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index a2f1b3043dfb..9f41b3b4358f 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -1036,8 +1036,7 @@ qla2x00_link_state_show(struct device *dev, struct device_attribute *attr, | |||
1036 | vha->device_flags & DFLG_NO_CABLE) | 1036 | vha->device_flags & DFLG_NO_CABLE) |
1037 | len = snprintf(buf, PAGE_SIZE, "Link Down\n"); | 1037 | len = snprintf(buf, PAGE_SIZE, "Link Down\n"); |
1038 | else if (atomic_read(&vha->loop_state) != LOOP_READY || | 1038 | else if (atomic_read(&vha->loop_state) != LOOP_READY || |
1039 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | 1039 | qla2x00_reset_active(vha)) |
1040 | test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) | ||
1041 | len = snprintf(buf, PAGE_SIZE, "Unknown Link State\n"); | 1040 | len = snprintf(buf, PAGE_SIZE, "Unknown Link State\n"); |
1042 | else { | 1041 | else { |
1043 | len = snprintf(buf, PAGE_SIZE, "Link Up - "); | 1042 | len = snprintf(buf, PAGE_SIZE, "Link Up - "); |
@@ -1359,8 +1358,7 @@ qla2x00_thermal_temp_show(struct device *dev, | |||
1359 | return snprintf(buf, PAGE_SIZE, "\n"); | 1358 | return snprintf(buf, PAGE_SIZE, "\n"); |
1360 | 1359 | ||
1361 | temp = frac = 0; | 1360 | temp = frac = 0; |
1362 | if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | 1361 | if (qla2x00_reset_active(vha)) |
1363 | test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) | ||
1364 | ql_log(ql_log_warn, vha, 0x707b, | 1362 | ql_log(ql_log_warn, vha, 0x707b, |
1365 | "ISP reset active.\n"); | 1363 | "ISP reset active.\n"); |
1366 | else if (!vha->hw->flags.eeh_busy) | 1364 | else if (!vha->hw->flags.eeh_busy) |
@@ -1379,8 +1377,7 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr, | |||
1379 | int rval = QLA_FUNCTION_FAILED; | 1377 | int rval = QLA_FUNCTION_FAILED; |
1380 | uint16_t state[5]; | 1378 | uint16_t state[5]; |
1381 | 1379 | ||
1382 | if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | 1380 | if (qla2x00_reset_active(vha)) |
1383 | test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) | ||
1384 | ql_log(ql_log_warn, vha, 0x707c, | 1381 | ql_log(ql_log_warn, vha, 0x707c, |
1385 | "ISP reset active.\n"); | 1382 | "ISP reset active.\n"); |
1386 | else if (!vha->hw->flags.eeh_busy) | 1383 | else if (!vha->hw->flags.eeh_busy) |
@@ -1693,9 +1690,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost) | |||
1693 | if (IS_FWI2_CAPABLE(ha)) { | 1690 | if (IS_FWI2_CAPABLE(ha)) { |
1694 | rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma); | 1691 | rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma); |
1695 | } else if (atomic_read(&base_vha->loop_state) == LOOP_READY && | 1692 | } else if (atomic_read(&base_vha->loop_state) == LOOP_READY && |
1696 | !test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) && | 1693 | !qla2x00_reset_active(vha) && !ha->dpc_active) { |
1697 | !test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) && | ||
1698 | !ha->dpc_active) { | ||
1699 | /* Must be in a 'READY' state for statistics retrieval. */ | 1694 | /* Must be in a 'READY' state for statistics retrieval. */ |
1700 | rval = qla2x00_get_link_status(base_vha, base_vha->loop_id, | 1695 | rval = qla2x00_get_link_status(base_vha, base_vha->loop_id, |
1701 | stats, stats_dma); | 1696 | stats, stats_dma); |
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index b1d0f936bf2d..1682e2e4201d 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
@@ -108,13 +108,6 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct fc_bsg_job *bsg_job) | |||
108 | goto exit_fcp_prio_cfg; | 108 | goto exit_fcp_prio_cfg; |
109 | } | 109 | } |
110 | 110 | ||
111 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
112 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
113 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
114 | ret = -EBUSY; | ||
115 | goto exit_fcp_prio_cfg; | ||
116 | } | ||
117 | |||
118 | /* Get the sub command */ | 111 | /* Get the sub command */ |
119 | oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; | 112 | oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; |
120 | 113 | ||
@@ -646,13 +639,6 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job) | |||
646 | dma_addr_t rsp_data_dma; | 639 | dma_addr_t rsp_data_dma; |
647 | uint32_t rsp_data_len; | 640 | uint32_t rsp_data_len; |
648 | 641 | ||
649 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
650 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
651 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
652 | ql_log(ql_log_warn, vha, 0x7018, "Abort active or needed.\n"); | ||
653 | return -EBUSY; | ||
654 | } | ||
655 | |||
656 | if (!vha->flags.online) { | 642 | if (!vha->flags.online) { |
657 | ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n"); | 643 | ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n"); |
658 | return -EIO; | 644 | return -EIO; |
@@ -874,13 +860,6 @@ qla84xx_reset(struct fc_bsg_job *bsg_job) | |||
874 | int rval = 0; | 860 | int rval = 0; |
875 | uint32_t flag; | 861 | uint32_t flag; |
876 | 862 | ||
877 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
878 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
879 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
880 | ql_log(ql_log_warn, vha, 0x702e, "Abort active or needed.\n"); | ||
881 | return -EBUSY; | ||
882 | } | ||
883 | |||
884 | if (!IS_QLA84XX(ha)) { | 863 | if (!IS_QLA84XX(ha)) { |
885 | ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n"); | 864 | ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n"); |
886 | return -EINVAL; | 865 | return -EINVAL; |
@@ -922,11 +901,6 @@ qla84xx_updatefw(struct fc_bsg_job *bsg_job) | |||
922 | uint32_t flag; | 901 | uint32_t flag; |
923 | uint32_t fw_ver; | 902 | uint32_t fw_ver; |
924 | 903 | ||
925 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
926 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
927 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) | ||
928 | return -EBUSY; | ||
929 | |||
930 | if (!IS_QLA84XX(ha)) { | 904 | if (!IS_QLA84XX(ha)) { |
931 | ql_dbg(ql_dbg_user, vha, 0x7032, | 905 | ql_dbg(ql_dbg_user, vha, 0x7032, |
932 | "Not 84xx, exiting.\n"); | 906 | "Not 84xx, exiting.\n"); |
@@ -1036,14 +1010,6 @@ qla84xx_mgmt_cmd(struct fc_bsg_job *bsg_job) | |||
1036 | uint32_t data_len = 0; | 1010 | uint32_t data_len = 0; |
1037 | uint32_t dma_direction = DMA_NONE; | 1011 | uint32_t dma_direction = DMA_NONE; |
1038 | 1012 | ||
1039 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
1040 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
1041 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
1042 | ql_log(ql_log_warn, vha, 0x7039, | ||
1043 | "Abort active or needed.\n"); | ||
1044 | return -EBUSY; | ||
1045 | } | ||
1046 | |||
1047 | if (!IS_QLA84XX(ha)) { | 1013 | if (!IS_QLA84XX(ha)) { |
1048 | ql_log(ql_log_warn, vha, 0x703a, | 1014 | ql_log(ql_log_warn, vha, 0x703a, |
1049 | "Not 84xx, exiting.\n"); | 1015 | "Not 84xx, exiting.\n"); |
@@ -1246,13 +1212,6 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job) | |||
1246 | 1212 | ||
1247 | bsg_job->reply->reply_payload_rcv_len = 0; | 1213 | bsg_job->reply->reply_payload_rcv_len = 0; |
1248 | 1214 | ||
1249 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
1250 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
1251 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
1252 | ql_log(ql_log_warn, vha, 0x7045, "abort active or needed.\n"); | ||
1253 | return -EBUSY; | ||
1254 | } | ||
1255 | |||
1256 | if (!IS_IIDMA_CAPABLE(vha->hw)) { | 1215 | if (!IS_IIDMA_CAPABLE(vha->hw)) { |
1257 | ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n"); | 1216 | ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n"); |
1258 | return -EINVAL; | 1217 | return -EINVAL; |
@@ -1668,6 +1627,15 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job) | |||
1668 | vha = shost_priv(host); | 1627 | vha = shost_priv(host); |
1669 | } | 1628 | } |
1670 | 1629 | ||
1630 | if (qla2x00_reset_active(vha)) { | ||
1631 | ql_dbg(ql_dbg_user, vha, 0x709f, | ||
1632 | "BSG: ISP abort active/needed -- cmd=%d.\n", | ||
1633 | bsg_job->request->msgcode); | ||
1634 | bsg_job->reply->result = (DID_ERROR << 16); | ||
1635 | bsg_job->job_done(bsg_job); | ||
1636 | return -EBUSY; | ||
1637 | } | ||
1638 | |||
1671 | ql_dbg(ql_dbg_user, vha, 0x7000, | 1639 | ql_dbg(ql_dbg_user, vha, 0x7000, |
1672 | "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode); | 1640 | "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode); |
1673 | 1641 | ||
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 7c54624b5b13..45cbf0ba624d 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -19,7 +19,8 @@ | |||
19 | * | DPC Thread | 0x401c | | | 19 | * | DPC Thread | 0x401c | | |
20 | * | Async Events | 0x5057 | 0x5052 | | 20 | * | Async Events | 0x5057 | 0x5052 | |
21 | * | Timer Routines | 0x6011 | 0x600e,0x600f | | 21 | * | Timer Routines | 0x6011 | 0x600e,0x600f | |
22 | * | User Space Interactions | 0x709e | | | 22 | * | User Space Interactions | 0x709e | 0x7018,0x702e | |
23 | * | | | 0x7039,0x7045 | | ||
23 | * | Task Management | 0x803c | 0x8025-0x8026 | | 24 | * | Task Management | 0x803c | 0x8025-0x8026 | |
24 | * | | | 0x800b,0x8039 | | 25 | * | | | 0x800b,0x8039 | |
25 | * | AER/EEH | 0x900f | | | 26 | * | AER/EEH | 0x900f | | |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index a6a4eebce4a8..af1003f9de1e 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -44,6 +44,7 @@ | |||
44 | * ISP2100 HBAs. | 44 | * ISP2100 HBAs. |
45 | */ | 45 | */ |
46 | #define MAILBOX_REGISTER_COUNT_2100 8 | 46 | #define MAILBOX_REGISTER_COUNT_2100 8 |
47 | #define MAILBOX_REGISTER_COUNT_2200 24 | ||
47 | #define MAILBOX_REGISTER_COUNT 32 | 48 | #define MAILBOX_REGISTER_COUNT 32 |
48 | 49 | ||
49 | #define QLA2200A_RISC_ROM_VER 4 | 50 | #define QLA2200A_RISC_ROM_VER 4 |
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 9902834e0b74..7cc4f36cd539 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h | |||
@@ -131,3 +131,16 @@ qla2x00_hba_err_chk_enabled(srb_t *sp) | |||
131 | } | 131 | } |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | |||
135 | static inline int | ||
136 | qla2x00_reset_active(scsi_qla_host_t *vha) | ||
137 | { | ||
138 | scsi_qla_host_t *base_vha = pci_get_drvdata(vha->hw->pdev); | ||
139 | |||
140 | /* Test appropriate base-vha and vha flags. */ | ||
141 | return test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) || | ||
142 | test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || | ||
143 | test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || | ||
144 | test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
145 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | ||
146 | } | ||
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index e804585cc59c..349843ea32f6 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -2090,7 +2090,6 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha, | |||
2090 | break; | 2090 | break; |
2091 | case CT_IOCB_TYPE: | 2091 | case CT_IOCB_TYPE: |
2092 | qla24xx_els_ct_entry(vha, rsp->req, pkt, CT_IOCB_TYPE); | 2092 | qla24xx_els_ct_entry(vha, rsp->req, pkt, CT_IOCB_TYPE); |
2093 | clear_bit(MBX_INTERRUPT, &vha->hw->mbx_cmd_flags); | ||
2094 | break; | 2093 | break; |
2095 | case ELS_IOCB_TYPE: | 2094 | case ELS_IOCB_TYPE: |
2096 | qla24xx_els_ct_entry(vha, rsp->req, pkt, ELS_IOCB_TYPE); | 2095 | qla24xx_els_ct_entry(vha, rsp->req, pkt, ELS_IOCB_TYPE); |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 34344d3f8658..08f1d01bdc1c 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -342,6 +342,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
342 | 342 | ||
343 | set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | 343 | set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); |
344 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 344 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
345 | /* Allow next mbx cmd to come in. */ | ||
346 | complete(&ha->mbx_cmd_comp); | ||
345 | if (ha->isp_ops->abort_isp(vha)) { | 347 | if (ha->isp_ops->abort_isp(vha)) { |
346 | /* Failed. retry later. */ | 348 | /* Failed. retry later. */ |
347 | set_bit(ISP_ABORT_NEEDED, | 349 | set_bit(ISP_ABORT_NEEDED, |
@@ -350,6 +352,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
350 | clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | 352 | clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); |
351 | ql_dbg(ql_dbg_mbx, base_vha, 0x101f, | 353 | ql_dbg(ql_dbg_mbx, base_vha, 0x101f, |
352 | "Finished abort_isp.\n"); | 354 | "Finished abort_isp.\n"); |
355 | goto mbx_done; | ||
353 | } | 356 | } |
354 | } | 357 | } |
355 | } | 358 | } |
@@ -358,6 +361,7 @@ premature_exit: | |||
358 | /* Allow next mbx cmd to come in. */ | 361 | /* Allow next mbx cmd to come in. */ |
359 | complete(&ha->mbx_cmd_comp); | 362 | complete(&ha->mbx_cmd_comp); |
360 | 363 | ||
364 | mbx_done: | ||
361 | if (rval) { | 365 | if (rval) { |
362 | ql_dbg(ql_dbg_mbx, base_vha, 0x1020, | 366 | ql_dbg(ql_dbg_mbx, base_vha, 0x1020, |
363 | "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, cmd=%x ****.\n", | 367 | "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, cmd=%x ****.\n", |
@@ -2581,7 +2585,8 @@ qla2x00_stop_firmware(scsi_qla_host_t *vha) | |||
2581 | ql_dbg(ql_dbg_mbx, vha, 0x10a1, "Entered %s.\n", __func__); | 2585 | ql_dbg(ql_dbg_mbx, vha, 0x10a1, "Entered %s.\n", __func__); |
2582 | 2586 | ||
2583 | mcp->mb[0] = MBC_STOP_FIRMWARE; | 2587 | mcp->mb[0] = MBC_STOP_FIRMWARE; |
2584 | mcp->out_mb = MBX_0; | 2588 | mcp->mb[1] = 0; |
2589 | mcp->out_mb = MBX_1|MBX_0; | ||
2585 | mcp->in_mb = MBX_0; | 2590 | mcp->in_mb = MBX_0; |
2586 | mcp->tov = 5; | 2591 | mcp->tov = 5; |
2587 | mcp->flags = 0; | 2592 | mcp->flags = 0; |
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index 1cd46cd7ff90..270ba3130fde 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c | |||
@@ -1165,19 +1165,6 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha) | |||
1165 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); | 1165 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); |
1166 | else | 1166 | else |
1167 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); | 1167 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); |
1168 | |||
1169 | /* reset ms */ | ||
1170 | val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4); | ||
1171 | val |= (1 << 1); | ||
1172 | qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val); | ||
1173 | msleep(20); | ||
1174 | |||
1175 | /* unreset ms */ | ||
1176 | val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4); | ||
1177 | val &= ~(1 << 1); | ||
1178 | qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val); | ||
1179 | msleep(20); | ||
1180 | |||
1181 | qla82xx_rom_unlock(ha); | 1168 | qla82xx_rom_unlock(ha); |
1182 | 1169 | ||
1183 | /* Read the signature value from the flash. | 1170 | /* Read the signature value from the flash. |
@@ -3392,7 +3379,7 @@ void qla82xx_watchdog(scsi_qla_host_t *vha) | |||
3392 | QLA82XX_CRB_PEG_NET_3 + 0x3c), | 3379 | QLA82XX_CRB_PEG_NET_3 + 0x3c), |
3393 | qla82xx_rd_32(ha, | 3380 | qla82xx_rd_32(ha, |
3394 | QLA82XX_CRB_PEG_NET_4 + 0x3c)); | 3381 | QLA82XX_CRB_PEG_NET_4 + 0x3c)); |
3395 | if (LSW(MSB(halt_status)) == 0x67) | 3382 | if (((halt_status & 0x1fffff00) >> 8) == 0x67) |
3396 | ql_log(ql_log_warn, vha, 0xb052, | 3383 | ql_log(ql_log_warn, vha, 0xb052, |
3397 | "Firmware aborted with " | 3384 | "Firmware aborted with " |
3398 | "error code 0x00006700. Device is " | 3385 | "error code 0x00006700. Device is " |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 4ed1e4a96b95..036030c95339 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -625,6 +625,12 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) | |||
625 | cmd->result = DID_NO_CONNECT << 16; | 625 | cmd->result = DID_NO_CONNECT << 16; |
626 | goto qc24_fail_command; | 626 | goto qc24_fail_command; |
627 | } | 627 | } |
628 | |||
629 | if (!fcport) { | ||
630 | cmd->result = DID_NO_CONNECT << 16; | ||
631 | goto qc24_fail_command; | ||
632 | } | ||
633 | |||
628 | if (atomic_read(&fcport->state) != FCS_ONLINE) { | 634 | if (atomic_read(&fcport->state) != FCS_ONLINE) { |
629 | if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || | 635 | if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || |
630 | atomic_read(&base_vha->loop_state) == LOOP_DEAD) { | 636 | atomic_read(&base_vha->loop_state) == LOOP_DEAD) { |
@@ -877,6 +883,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
877 | 883 | ||
878 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 884 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
879 | if (ha->isp_ops->abort_command(sp)) { | 885 | if (ha->isp_ops->abort_command(sp)) { |
886 | ret = FAILED; | ||
880 | ql_dbg(ql_dbg_taskm, vha, 0x8003, | 887 | ql_dbg(ql_dbg_taskm, vha, 0x8003, |
881 | "Abort command mbx failed cmd=%p.\n", cmd); | 888 | "Abort command mbx failed cmd=%p.\n", cmd); |
882 | } else { | 889 | } else { |
@@ -1124,7 +1131,6 @@ static int | |||
1124 | qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | 1131 | qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) |
1125 | { | 1132 | { |
1126 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); | 1133 | scsi_qla_host_t *vha = shost_priv(cmd->device->host); |
1127 | fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; | ||
1128 | struct qla_hw_data *ha = vha->hw; | 1134 | struct qla_hw_data *ha = vha->hw; |
1129 | int ret = FAILED; | 1135 | int ret = FAILED; |
1130 | unsigned int id, lun; | 1136 | unsigned int id, lun; |
@@ -1133,15 +1139,6 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
1133 | id = cmd->device->id; | 1139 | id = cmd->device->id; |
1134 | lun = cmd->device->lun; | 1140 | lun = cmd->device->lun; |
1135 | 1141 | ||
1136 | if (!fcport) { | ||
1137 | return ret; | ||
1138 | } | ||
1139 | |||
1140 | ret = fc_block_scsi_eh(cmd); | ||
1141 | if (ret != 0) | ||
1142 | return ret; | ||
1143 | ret = FAILED; | ||
1144 | |||
1145 | ql_log(ql_log_info, vha, 0x8018, | 1142 | ql_log(ql_log_info, vha, 0x8018, |
1146 | "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun); | 1143 | "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun); |
1147 | 1144 | ||
@@ -2047,7 +2044,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2047 | ha->nvram_data_off = ~0; | 2044 | ha->nvram_data_off = ~0; |
2048 | ha->isp_ops = &qla2100_isp_ops; | 2045 | ha->isp_ops = &qla2100_isp_ops; |
2049 | } else if (IS_QLA2200(ha)) { | 2046 | } else if (IS_QLA2200(ha)) { |
2050 | ha->mbx_count = MAILBOX_REGISTER_COUNT; | 2047 | ha->mbx_count = MAILBOX_REGISTER_COUNT_2200; |
2051 | req_length = REQUEST_ENTRY_CNT_2200; | 2048 | req_length = REQUEST_ENTRY_CNT_2200; |
2052 | rsp_length = RESPONSE_ENTRY_CNT_2100; | 2049 | rsp_length = RESPONSE_ENTRY_CNT_2100; |
2053 | ha->max_loop_id = SNS_LAST_LOOP_ID_2100; | 2050 | ha->max_loop_id = SNS_LAST_LOOP_ID_2100; |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 23f33a6d52d7..29d780c38040 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.03.07.12-k" | 10 | #define QLA2XXX_VERSION "8.03.07.13-k" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 3 | 13 | #define QLA_DRIVER_MINOR_VER 3 |
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 78f1111158d7..65253dfbe962 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include "ql4_def.h" | 10 | #include "ql4_def.h" |
11 | #include "ql4_glbl.h" | 11 | #include "ql4_glbl.h" |
12 | 12 | ||
13 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
14 | |||
13 | #define MASK(n) DMA_BIT_MASK(n) | 15 | #define MASK(n) DMA_BIT_MASK(n) |
14 | #define MN_WIN(addr) (((addr & 0x1fc0000) >> 1) | ((addr >> 25) & 0x3ff)) | 16 | #define MN_WIN(addr) (((addr & 0x1fc0000) >> 1) | ((addr >> 25) & 0x3ff)) |
15 | #define OCM_WIN(addr) (((addr & 0x1ff0000) >> 1) | ((addr >> 25) & 0x3ff)) | 17 | #define OCM_WIN(addr) (((addr & 0x1ff0000) >> 1) | ((addr >> 25) & 0x3ff)) |
@@ -655,27 +657,6 @@ static int qla4_8xxx_pci_is_same_window(struct scsi_qla_host *ha, | |||
655 | return 0; | 657 | return 0; |
656 | } | 658 | } |
657 | 659 | ||
658 | #ifndef readq | ||
659 | static inline __u64 readq(const volatile void __iomem *addr) | ||
660 | { | ||
661 | const volatile u32 __iomem *p = addr; | ||
662 | u32 low, high; | ||
663 | |||
664 | low = readl(p); | ||
665 | high = readl(p + 1); | ||
666 | |||
667 | return low + ((u64)high << 32); | ||
668 | } | ||
669 | #endif | ||
670 | |||
671 | #ifndef writeq | ||
672 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
673 | { | ||
674 | writel(val, addr); | ||
675 | writel(val >> 32, addr+4); | ||
676 | } | ||
677 | #endif | ||
678 | |||
679 | static int qla4_8xxx_pci_mem_read_direct(struct scsi_qla_host *ha, | 660 | static int qla4_8xxx_pci_mem_read_direct(struct scsi_qla_host *ha, |
680 | u64 off, void *data, int size) | 661 | u64 off, void *data, int size) |
681 | { | 662 | { |
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index bf8bf79e6a1f..c4670642d023 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/pm_runtime.h> | 8 | #include <linux/pm_runtime.h> |
9 | #include <linux/export.h> | 9 | #include <linux/export.h> |
10 | #include <linux/async.h> | ||
10 | 11 | ||
11 | #include <scsi/scsi.h> | 12 | #include <scsi/scsi.h> |
12 | #include <scsi/scsi_device.h> | 13 | #include <scsi/scsi_device.h> |
@@ -92,6 +93,19 @@ static int scsi_bus_resume_common(struct device *dev) | |||
92 | return err; | 93 | return err; |
93 | } | 94 | } |
94 | 95 | ||
96 | static int scsi_bus_prepare(struct device *dev) | ||
97 | { | ||
98 | if (scsi_is_sdev_device(dev)) { | ||
99 | /* sd probing uses async_schedule. Wait until it finishes. */ | ||
100 | async_synchronize_full(); | ||
101 | |||
102 | } else if (scsi_is_host_device(dev)) { | ||
103 | /* Wait until async scanning is finished */ | ||
104 | scsi_complete_async_scans(); | ||
105 | } | ||
106 | return 0; | ||
107 | } | ||
108 | |||
95 | static int scsi_bus_suspend(struct device *dev) | 109 | static int scsi_bus_suspend(struct device *dev) |
96 | { | 110 | { |
97 | return scsi_bus_suspend_common(dev, PMSG_SUSPEND); | 111 | return scsi_bus_suspend_common(dev, PMSG_SUSPEND); |
@@ -110,6 +124,7 @@ static int scsi_bus_poweroff(struct device *dev) | |||
110 | #else /* CONFIG_PM_SLEEP */ | 124 | #else /* CONFIG_PM_SLEEP */ |
111 | 125 | ||
112 | #define scsi_bus_resume_common NULL | 126 | #define scsi_bus_resume_common NULL |
127 | #define scsi_bus_prepare NULL | ||
113 | #define scsi_bus_suspend NULL | 128 | #define scsi_bus_suspend NULL |
114 | #define scsi_bus_freeze NULL | 129 | #define scsi_bus_freeze NULL |
115 | #define scsi_bus_poweroff NULL | 130 | #define scsi_bus_poweroff NULL |
@@ -218,6 +233,7 @@ void scsi_autopm_put_host(struct Scsi_Host *shost) | |||
218 | #endif /* CONFIG_PM_RUNTIME */ | 233 | #endif /* CONFIG_PM_RUNTIME */ |
219 | 234 | ||
220 | const struct dev_pm_ops scsi_bus_pm_ops = { | 235 | const struct dev_pm_ops scsi_bus_pm_ops = { |
236 | .prepare = scsi_bus_prepare, | ||
221 | .suspend = scsi_bus_suspend, | 237 | .suspend = scsi_bus_suspend, |
222 | .resume = scsi_bus_resume_common, | 238 | .resume = scsi_bus_resume_common, |
223 | .freeze = scsi_bus_freeze, | 239 | .freeze = scsi_bus_freeze, |
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 68eadd1c67fd..be4fa6d179b1 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h | |||
@@ -109,6 +109,7 @@ extern void scsi_exit_procfs(void); | |||
109 | #endif /* CONFIG_PROC_FS */ | 109 | #endif /* CONFIG_PROC_FS */ |
110 | 110 | ||
111 | /* scsi_scan.c */ | 111 | /* scsi_scan.c */ |
112 | extern int scsi_complete_async_scans(void); | ||
112 | extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int, | 113 | extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int, |
113 | unsigned int, unsigned int, int); | 114 | unsigned int, unsigned int, int); |
114 | extern void scsi_forget_host(struct Scsi_Host *); | 115 | extern void scsi_forget_host(struct Scsi_Host *); |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 89da43f73c00..29c4c0480976 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -1815,6 +1815,7 @@ static void scsi_finish_async_scan(struct async_scan_data *data) | |||
1815 | } | 1815 | } |
1816 | spin_unlock(&async_scan_lock); | 1816 | spin_unlock(&async_scan_lock); |
1817 | 1817 | ||
1818 | scsi_autopm_put_host(shost); | ||
1818 | scsi_host_put(shost); | 1819 | scsi_host_put(shost); |
1819 | kfree(data); | 1820 | kfree(data); |
1820 | } | 1821 | } |
@@ -1841,7 +1842,6 @@ static int do_scan_async(void *_data) | |||
1841 | 1842 | ||
1842 | do_scsi_scan_host(shost); | 1843 | do_scsi_scan_host(shost); |
1843 | scsi_finish_async_scan(data); | 1844 | scsi_finish_async_scan(data); |
1844 | scsi_autopm_put_host(shost); | ||
1845 | return 0; | 1845 | return 0; |
1846 | } | 1846 | } |
1847 | 1847 | ||
@@ -1869,7 +1869,7 @@ void scsi_scan_host(struct Scsi_Host *shost) | |||
1869 | p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); | 1869 | p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); |
1870 | if (IS_ERR(p)) | 1870 | if (IS_ERR(p)) |
1871 | do_scan_async(data); | 1871 | do_scan_async(data); |
1872 | /* scsi_autopm_put_host(shost) is called in do_scan_async() */ | 1872 | /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */ |
1873 | } | 1873 | } |
1874 | EXPORT_SYMBOL(scsi_scan_host); | 1874 | EXPORT_SYMBOL(scsi_scan_host); |
1875 | 1875 | ||
diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c index 45fee368b092..92d314a73f69 100644 --- a/drivers/sh/clk/cpg.c +++ b/drivers/sh/clk/cpg.c | |||
@@ -190,7 +190,7 @@ static int __init sh_clk_init_parent(struct clk *clk) | |||
190 | return -EINVAL; | 190 | return -EINVAL; |
191 | } | 191 | } |
192 | 192 | ||
193 | clk->parent = clk->parent_table[val]; | 193 | clk_reparent(clk, clk->parent_table[val]); |
194 | if (!clk->parent) { | 194 | if (!clk->parent) { |
195 | pr_err("sh_clk_init_parent: unable to set parent"); | 195 | pr_err("sh_clk_init_parent: unable to set parent"); |
196 | return -EINVAL; | 196 | return -EINVAL; |
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index d136b8f4c8a7..81e2c0d9c17d 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -187,7 +187,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
187 | return -ENODEV; | 187 | return -ENODEV; |
188 | dev->current_state = PCI_D0; | 188 | dev->current_state = PCI_D0; |
189 | 189 | ||
190 | if (!dev->irq) { | 190 | /* The xHCI driver supports MSI and MSI-X, |
191 | * so don't fail if the BIOS doesn't provide a legacy IRQ. | ||
192 | */ | ||
193 | if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) { | ||
191 | dev_err(&dev->dev, | 194 | dev_err(&dev->dev, |
192 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", | 195 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", |
193 | pci_name(dev)); | 196 | pci_name(dev)); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index eb19cba34ac9..e1282328fc27 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2447,8 +2447,10 @@ int usb_add_hcd(struct usb_hcd *hcd, | |||
2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) | 2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) |
2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); | 2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); |
2449 | 2449 | ||
2450 | /* enable irqs just before we start the controller */ | 2450 | /* enable irqs just before we start the controller, |
2451 | if (usb_hcd_is_primary_hcd(hcd)) { | 2451 | * if the BIOS provides legacy PCI irqs. |
2452 | */ | ||
2453 | if (usb_hcd_is_primary_hcd(hcd) && irqnum) { | ||
2452 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); | 2454 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); |
2453 | if (retval) | 2455 | if (retval) |
2454 | goto err_request_irq; | 2456 | goto err_request_irq; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index a0613d8f9be7..265c2f675d04 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
705 | if (type == HUB_INIT3) | 705 | if (type == HUB_INIT3) |
706 | goto init3; | 706 | goto init3; |
707 | 707 | ||
708 | /* After a resume, port power should still be on. | 708 | /* The superspeed hub except for root hub has to use Hub Depth |
709 | * value as an offset into the route string to locate the bits | ||
710 | * it uses to determine the downstream port number. So hub driver | ||
711 | * should send a set hub depth request to superspeed hub after | ||
712 | * the superspeed hub is set configuration in initialization or | ||
713 | * reset procedure. | ||
714 | * | ||
715 | * After a resume, port power should still be on. | ||
709 | * For any other type of activation, turn it on. | 716 | * For any other type of activation, turn it on. |
710 | */ | 717 | */ |
711 | if (type != HUB_RESUME) { | 718 | if (type != HUB_RESUME) { |
719 | if (hdev->parent && hub_is_superspeed(hdev)) { | ||
720 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
721 | HUB_SET_DEPTH, USB_RT_HUB, | ||
722 | hdev->level - 1, 0, NULL, 0, | ||
723 | USB_CTRL_SET_TIMEOUT); | ||
724 | if (ret < 0) | ||
725 | dev_err(hub->intfdev, | ||
726 | "set hub depth failed\n"); | ||
727 | } | ||
712 | 728 | ||
713 | /* Speed up system boot by using a delayed_work for the | 729 | /* Speed up system boot by using a delayed_work for the |
714 | * hub's initial power-up delays. This is pretty awkward | 730 | * hub's initial power-up delays. This is pretty awkward |
@@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub, | |||
987 | goto fail; | 1003 | goto fail; |
988 | } | 1004 | } |
989 | 1005 | ||
990 | if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) { | ||
991 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
992 | HUB_SET_DEPTH, USB_RT_HUB, | ||
993 | hdev->level - 1, 0, NULL, 0, | ||
994 | USB_CTRL_SET_TIMEOUT); | ||
995 | |||
996 | if (ret < 0) { | ||
997 | message = "can't set hub depth"; | ||
998 | goto fail; | ||
999 | } | ||
1000 | } | ||
1001 | |||
1002 | /* Request the entire hub descriptor. | 1006 | /* Request the entire hub descriptor. |
1003 | * hub->descriptor can handle USB_MAXCHILDREN ports, | 1007 | * hub->descriptor can handle USB_MAXCHILDREN ports, |
1004 | * but the hub can/will return fewer bytes here. | 1008 | * but the hub can/will return fewer bytes here. |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index ac53a662a6a3..7732d69e49e0 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -872,7 +872,17 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | |||
872 | */ | 872 | */ |
873 | if (pdev->vendor == 0x184e) /* vendor Netlogic */ | 873 | if (pdev->vendor == 0x184e) /* vendor Netlogic */ |
874 | return; | 874 | return; |
875 | if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && | ||
876 | pdev->class != PCI_CLASS_SERIAL_USB_OHCI && | ||
877 | pdev->class != PCI_CLASS_SERIAL_USB_EHCI && | ||
878 | pdev->class != PCI_CLASS_SERIAL_USB_XHCI) | ||
879 | return; | ||
875 | 880 | ||
881 | if (pci_enable_device(pdev) < 0) { | ||
882 | dev_warn(&pdev->dev, "Can't enable PCI device, " | ||
883 | "BIOS handoff failed.\n"); | ||
884 | return; | ||
885 | } | ||
876 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) | 886 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) |
877 | quirk_usb_handoff_uhci(pdev); | 887 | quirk_usb_handoff_uhci(pdev); |
878 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) | 888 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) |
@@ -881,5 +891,6 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | |||
881 | quirk_usb_disable_ehci(pdev); | 891 | quirk_usb_disable_ehci(pdev); |
882 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) | 892 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) |
883 | quirk_usb_handoff_xhci(pdev); | 893 | quirk_usb_handoff_xhci(pdev); |
894 | pci_disable_device(pdev); | ||
884 | } | 895 | } |
885 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); | 896 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 35e257f79c7b..557b6f32db86 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -93,7 +93,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | |||
93 | */ | 93 | */ |
94 | memset(port_removable, 0, sizeof(port_removable)); | 94 | memset(port_removable, 0, sizeof(port_removable)); |
95 | for (i = 0; i < ports; i++) { | 95 | for (i = 0; i < ports; i++) { |
96 | portsc = xhci_readl(xhci, xhci->usb3_ports[i]); | 96 | portsc = xhci_readl(xhci, xhci->usb2_ports[i]); |
97 | /* If a device is removable, PORTSC reports a 0, same as in the | 97 | /* If a device is removable, PORTSC reports a 0, same as in the |
98 | * hub descriptor DeviceRemovable bits. | 98 | * hub descriptor DeviceRemovable bits. |
99 | */ | 99 | */ |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 36cbe2226a44..383fc857491c 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1126,26 +1126,42 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev, | |||
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | /* | 1128 | /* |
1129 | * Convert bInterval expressed in frames (in 1-255 range) to exponent of | 1129 | * Convert bInterval expressed in microframes (in 1-255 range) to exponent of |
1130 | * microframes, rounded down to nearest power of 2. | 1130 | * microframes, rounded down to nearest power of 2. |
1131 | */ | 1131 | */ |
1132 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | 1132 | static unsigned int xhci_microframes_to_exponent(struct usb_device *udev, |
1133 | struct usb_host_endpoint *ep) | 1133 | struct usb_host_endpoint *ep, unsigned int desc_interval, |
1134 | unsigned int min_exponent, unsigned int max_exponent) | ||
1134 | { | 1135 | { |
1135 | unsigned int interval; | 1136 | unsigned int interval; |
1136 | 1137 | ||
1137 | interval = fls(8 * ep->desc.bInterval) - 1; | 1138 | interval = fls(desc_interval) - 1; |
1138 | interval = clamp_val(interval, 3, 10); | 1139 | interval = clamp_val(interval, min_exponent, max_exponent); |
1139 | if ((1 << interval) != 8 * ep->desc.bInterval) | 1140 | if ((1 << interval) != desc_interval) |
1140 | dev_warn(&udev->dev, | 1141 | dev_warn(&udev->dev, |
1141 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", | 1142 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", |
1142 | ep->desc.bEndpointAddress, | 1143 | ep->desc.bEndpointAddress, |
1143 | 1 << interval, | 1144 | 1 << interval, |
1144 | 8 * ep->desc.bInterval); | 1145 | desc_interval); |
1145 | 1146 | ||
1146 | return interval; | 1147 | return interval; |
1147 | } | 1148 | } |
1148 | 1149 | ||
1150 | static unsigned int xhci_parse_microframe_interval(struct usb_device *udev, | ||
1151 | struct usb_host_endpoint *ep) | ||
1152 | { | ||
1153 | return xhci_microframes_to_exponent(udev, ep, | ||
1154 | ep->desc.bInterval, 0, 15); | ||
1155 | } | ||
1156 | |||
1157 | |||
1158 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | ||
1159 | struct usb_host_endpoint *ep) | ||
1160 | { | ||
1161 | return xhci_microframes_to_exponent(udev, ep, | ||
1162 | ep->desc.bInterval * 8, 3, 10); | ||
1163 | } | ||
1164 | |||
1149 | /* Return the polling or NAK interval. | 1165 | /* Return the polling or NAK interval. |
1150 | * | 1166 | * |
1151 | * The polling interval is expressed in "microframes". If xHCI's Interval field | 1167 | * The polling interval is expressed in "microframes". If xHCI's Interval field |
@@ -1164,7 +1180,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
1164 | /* Max NAK rate */ | 1180 | /* Max NAK rate */ |
1165 | if (usb_endpoint_xfer_control(&ep->desc) || | 1181 | if (usb_endpoint_xfer_control(&ep->desc) || |
1166 | usb_endpoint_xfer_bulk(&ep->desc)) { | 1182 | usb_endpoint_xfer_bulk(&ep->desc)) { |
1167 | interval = ep->desc.bInterval; | 1183 | interval = xhci_parse_microframe_interval(udev, ep); |
1168 | break; | 1184 | break; |
1169 | } | 1185 | } |
1170 | /* Fall through - SS and HS isoc/int have same decoding */ | 1186 | /* Fall through - SS and HS isoc/int have same decoding */ |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6bbe3c3a7111..c939f5fdef9e 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -352,6 +352,11 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | |||
352 | /* hcd->irq is -1, we have MSI */ | 352 | /* hcd->irq is -1, we have MSI */ |
353 | return 0; | 353 | return 0; |
354 | 354 | ||
355 | if (!pdev->irq) { | ||
356 | xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n"); | ||
357 | return -EINVAL; | ||
358 | } | ||
359 | |||
355 | /* fall back to legacy interrupt*/ | 360 | /* fall back to legacy interrupt*/ |
356 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, | 361 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, |
357 | hcd->irq_descr, hcd); | 362 | hcd->irq_descr, hcd); |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8dbf51a43c45..08a5575724cd 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -136,6 +136,8 @@ static const struct usb_device_id id_table[] = { | |||
136 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ | 136 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ |
137 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ | 137 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ |
138 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ | 138 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ |
139 | { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ | ||
140 | { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ | ||
139 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | 141 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
140 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | 142 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
141 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 143 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 39ed1f46cec0..b54afceb9611 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -788,7 +788,6 @@ static const struct usb_device_id option_ids[] = { | |||
788 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), | 788 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), |
789 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 789 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, | 790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, |
791 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, | ||
792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, | 791 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, |
793 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, | 792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, |
794 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), | 793 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), |
@@ -803,7 +802,6 @@ static const struct usb_device_id option_ids[] = { | |||
803 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, | 802 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, |
804 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), | 803 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), |
805 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 804 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
806 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ | ||
807 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, | 805 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, |
808 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, | 806 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, |
809 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, | 807 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, |
@@ -828,7 +826,6 @@ static const struct usb_device_id option_ids[] = { | |||
828 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, | 826 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, |
829 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), | 827 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), |
830 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 828 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
831 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ | ||
832 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, | 829 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, |
833 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), | 830 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), |
834 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 831 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
@@ -836,7 +833,6 @@ static const struct usb_device_id option_ids[] = { | |||
836 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, | 833 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, |
837 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), | 834 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), |
838 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 835 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
839 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | ||
840 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, | 836 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, |
841 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, | 837 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, |
842 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), | 838 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), |
@@ -846,7 +842,6 @@ static const struct usb_device_id option_ids[] = { | |||
846 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, | 842 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, |
847 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, | 843 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, |
848 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, | 844 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, |
849 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | ||
850 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, | 845 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, |
851 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, | 846 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, |
852 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, | 847 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, |
@@ -865,8 +860,6 @@ static const struct usb_device_id option_ids[] = { | |||
865 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) }, | 860 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) }, |
866 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, | 861 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, |
867 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, | 862 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, |
868 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0098, 0xff, 0xff, 0xff) }, | ||
869 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0099, 0xff, 0xff, 0xff) }, | ||
870 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), | 863 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), |
871 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 864 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
872 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, | 865 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, |
@@ -887,28 +880,18 @@ static const struct usb_device_id option_ids[] = { | |||
887 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, | 880 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, |
888 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, | 881 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, |
889 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, | 882 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, |
890 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0146, 0xff, 0xff, 0xff) }, | ||
891 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, | ||
892 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, | 883 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, |
893 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0149, 0xff, 0xff, 0xff) }, | ||
894 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0150, 0xff, 0xff, 0xff) }, | ||
895 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, | 884 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, |
896 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, | ||
897 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, | 885 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, |
898 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, | 886 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, |
899 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, | 887 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, |
900 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, | 888 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, |
901 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, | 889 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, |
902 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, | 890 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, |
903 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) }, | ||
904 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, | 891 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, |
905 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, | 892 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, |
906 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, | 893 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, |
907 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, | 894 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, |
908 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, | ||
909 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
910 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
911 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
912 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, | 895 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, |
913 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, | 896 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, |
914 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, | 897 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, |
@@ -1083,127 +1066,27 @@ static const struct usb_device_id option_ids[] = { | |||
1083 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, | 1066 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, |
1084 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, | 1067 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, |
1085 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, | 1068 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, |
1086 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff) }, | 1069 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, |
1087 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff) }, | 1070 | 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, |
1088 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1403, 0xff, 0xff, 0xff) }, | 1071 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, |
1089 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1404, 0xff, 0xff, 0xff) }, | 1072 | |
1090 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1405, 0xff, 0xff, 0xff) }, | ||
1091 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1406, 0xff, 0xff, 0xff) }, | ||
1092 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1407, 0xff, 0xff, 0xff) }, | ||
1093 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1408, 0xff, 0xff, 0xff) }, | ||
1094 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1409, 0xff, 0xff, 0xff) }, | ||
1095 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1410, 0xff, 0xff, 0xff) }, | ||
1096 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1411, 0xff, 0xff, 0xff) }, | ||
1097 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1412, 0xff, 0xff, 0xff) }, | ||
1098 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1413, 0xff, 0xff, 0xff) }, | ||
1099 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1414, 0xff, 0xff, 0xff) }, | ||
1100 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1415, 0xff, 0xff, 0xff) }, | ||
1101 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1416, 0xff, 0xff, 0xff) }, | ||
1102 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1417, 0xff, 0xff, 0xff) }, | ||
1103 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1418, 0xff, 0xff, 0xff) }, | ||
1104 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1419, 0xff, 0xff, 0xff) }, | ||
1105 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1420, 0xff, 0xff, 0xff) }, | ||
1106 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1421, 0xff, 0xff, 0xff) }, | ||
1107 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1422, 0xff, 0xff, 0xff) }, | ||
1108 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1423, 0xff, 0xff, 0xff) }, | ||
1109 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1424, 0xff, 0xff, 0xff) }, | ||
1110 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1425, 0xff, 0xff, 0xff) }, | ||
1111 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff) }, | ||
1112 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1427, 0xff, 0xff, 0xff) }, | ||
1113 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff) }, | ||
1114 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1429, 0xff, 0xff, 0xff) }, | ||
1115 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1430, 0xff, 0xff, 0xff) }, | ||
1116 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1431, 0xff, 0xff, 0xff) }, | ||
1117 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1432, 0xff, 0xff, 0xff) }, | ||
1118 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1433, 0xff, 0xff, 0xff) }, | ||
1119 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1434, 0xff, 0xff, 0xff) }, | ||
1120 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1435, 0xff, 0xff, 0xff) }, | ||
1121 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1436, 0xff, 0xff, 0xff) }, | ||
1122 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1437, 0xff, 0xff, 0xff) }, | ||
1123 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1438, 0xff, 0xff, 0xff) }, | ||
1124 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1439, 0xff, 0xff, 0xff) }, | ||
1125 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1440, 0xff, 0xff, 0xff) }, | ||
1126 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1441, 0xff, 0xff, 0xff) }, | ||
1127 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1442, 0xff, 0xff, 0xff) }, | ||
1128 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1443, 0xff, 0xff, 0xff) }, | ||
1129 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1444, 0xff, 0xff, 0xff) }, | ||
1130 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1445, 0xff, 0xff, 0xff) }, | ||
1131 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1446, 0xff, 0xff, 0xff) }, | ||
1132 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1447, 0xff, 0xff, 0xff) }, | ||
1133 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1448, 0xff, 0xff, 0xff) }, | ||
1134 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1449, 0xff, 0xff, 0xff) }, | ||
1135 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1450, 0xff, 0xff, 0xff) }, | ||
1136 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1451, 0xff, 0xff, 0xff) }, | ||
1137 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1452, 0xff, 0xff, 0xff) }, | ||
1138 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1453, 0xff, 0xff, 0xff) }, | ||
1139 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1454, 0xff, 0xff, 0xff) }, | ||
1140 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1455, 0xff, 0xff, 0xff) }, | ||
1141 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1456, 0xff, 0xff, 0xff) }, | ||
1142 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1457, 0xff, 0xff, 0xff) }, | ||
1143 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1458, 0xff, 0xff, 0xff) }, | ||
1144 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1459, 0xff, 0xff, 0xff) }, | ||
1145 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1460, 0xff, 0xff, 0xff) }, | ||
1146 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1461, 0xff, 0xff, 0xff) }, | ||
1147 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1462, 0xff, 0xff, 0xff) }, | ||
1148 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1463, 0xff, 0xff, 0xff) }, | ||
1149 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1464, 0xff, 0xff, 0xff) }, | ||
1150 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1465, 0xff, 0xff, 0xff) }, | ||
1151 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1466, 0xff, 0xff, 0xff) }, | ||
1152 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1467, 0xff, 0xff, 0xff) }, | ||
1153 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1468, 0xff, 0xff, 0xff) }, | ||
1154 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1469, 0xff, 0xff, 0xff) }, | ||
1155 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1470, 0xff, 0xff, 0xff) }, | ||
1156 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1471, 0xff, 0xff, 0xff) }, | ||
1157 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1472, 0xff, 0xff, 0xff) }, | ||
1158 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1473, 0xff, 0xff, 0xff) }, | ||
1159 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1474, 0xff, 0xff, 0xff) }, | ||
1160 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1475, 0xff, 0xff, 0xff) }, | ||
1161 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1476, 0xff, 0xff, 0xff) }, | ||
1162 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1477, 0xff, 0xff, 0xff) }, | ||
1163 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1478, 0xff, 0xff, 0xff) }, | ||
1164 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1479, 0xff, 0xff, 0xff) }, | ||
1165 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1480, 0xff, 0xff, 0xff) }, | ||
1166 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0xff, 0xff) }, | ||
1167 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1482, 0xff, 0xff, 0xff) }, | ||
1168 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1483, 0xff, 0xff, 0xff) }, | ||
1169 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1484, 0xff, 0xff, 0xff) }, | ||
1170 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1485, 0xff, 0xff, 0xff) }, | ||
1171 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1486, 0xff, 0xff, 0xff) }, | ||
1172 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1487, 0xff, 0xff, 0xff) }, | ||
1173 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1488, 0xff, 0xff, 0xff) }, | ||
1174 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1489, 0xff, 0xff, 0xff) }, | ||
1175 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1490, 0xff, 0xff, 0xff) }, | ||
1176 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1491, 0xff, 0xff, 0xff) }, | ||
1177 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1492, 0xff, 0xff, 0xff) }, | ||
1178 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1493, 0xff, 0xff, 0xff) }, | ||
1179 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1494, 0xff, 0xff, 0xff) }, | ||
1180 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1495, 0xff, 0xff, 0xff) }, | ||
1181 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1496, 0xff, 0xff, 0xff) }, | ||
1182 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1497, 0xff, 0xff, 0xff) }, | ||
1183 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1498, 0xff, 0xff, 0xff) }, | ||
1184 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1499, 0xff, 0xff, 0xff) }, | ||
1185 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1500, 0xff, 0xff, 0xff) }, | ||
1186 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1501, 0xff, 0xff, 0xff) }, | ||
1187 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1502, 0xff, 0xff, 0xff) }, | ||
1188 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1503, 0xff, 0xff, 0xff) }, | ||
1189 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1504, 0xff, 0xff, 0xff) }, | ||
1190 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1505, 0xff, 0xff, 0xff) }, | ||
1191 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1506, 0xff, 0xff, 0xff) }, | ||
1192 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1507, 0xff, 0xff, 0xff) }, | ||
1193 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1508, 0xff, 0xff, 0xff) }, | ||
1194 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1509, 0xff, 0xff, 0xff) }, | ||
1195 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1510, 0xff, 0xff, 0xff) }, | ||
1196 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ | 1073 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ |
1197 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, | 1074 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, |
1198 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | 1075 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, |
1199 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, | 1076 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, |
1200 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | 1077 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, |
1201 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, | 1078 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, |
1079 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, | ||
1202 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, | 1080 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, |
1081 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff) }, | ||
1203 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, | 1082 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, |
1204 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, | 1083 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, |
1205 | 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, | 1084 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, |
1206 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | 1085 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, |
1086 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
1087 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
1088 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
1089 | |||
1207 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | 1090 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, |
1208 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | 1091 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, |
1209 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 1092 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 8468eb769a29..75b838eff178 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -165,7 +165,7 @@ static unsigned int product_5052_count; | |||
165 | /* the array dimension is the number of default entries plus */ | 165 | /* the array dimension is the number of default entries plus */ |
166 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ | 166 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ |
167 | /* null entry */ | 167 | /* null entry */ |
168 | static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | 168 | static struct usb_device_id ti_id_table_3410[14+TI_EXTRA_VID_PID_COUNT+1] = { |
169 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | 169 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
170 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | 170 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
171 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | 171 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, |
@@ -179,6 +179,7 @@ static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | |||
179 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 179 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
180 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 180 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
181 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 181 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
182 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | 185 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { |
@@ -188,7 +189,7 @@ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | |||
188 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, | 189 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, |
189 | }; | 190 | }; |
190 | 191 | ||
191 | static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] = { | 192 | static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] = { |
192 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | 193 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
193 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | 194 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
194 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | 195 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, |
@@ -206,6 +207,7 @@ static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] | |||
206 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 207 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
207 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 208 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
208 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 209 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
210 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
209 | { } | 211 | { } |
210 | }; | 212 | }; |
211 | 213 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h index 2aac1953993b..f140f1b9d5c0 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.h +++ b/drivers/usb/serial/ti_usb_3410_5052.h | |||
@@ -49,6 +49,10 @@ | |||
49 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 | 49 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 |
50 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 | 50 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 |
51 | 51 | ||
52 | /* Abbott Diabetics vendor and product ids */ | ||
53 | #define ABBOTT_VENDOR_ID 0x1a61 | ||
54 | #define ABBOTT_PRODUCT_ID 0x3410 | ||
55 | |||
52 | /* Commands */ | 56 | /* Commands */ |
53 | #define TI_GET_VERSION 0x01 | 57 | #define TI_GET_VERSION 0x01 |
54 | #define TI_GET_PORT_STATUS 0x02 | 58 | #define TI_GET_PORT_STATUS 0x02 |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 3dd7da9fd504..db51ba16dc07 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -788,15 +788,19 @@ static void quiesce_and_remove_host(struct us_data *us) | |||
788 | struct Scsi_Host *host = us_to_host(us); | 788 | struct Scsi_Host *host = us_to_host(us); |
789 | 789 | ||
790 | /* If the device is really gone, cut short reset delays */ | 790 | /* If the device is really gone, cut short reset delays */ |
791 | if (us->pusb_dev->state == USB_STATE_NOTATTACHED) | 791 | if (us->pusb_dev->state == USB_STATE_NOTATTACHED) { |
792 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); | 792 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); |
793 | wake_up(&us->delay_wait); | ||
794 | } | ||
793 | 795 | ||
794 | /* Prevent SCSI-scanning (if it hasn't started yet) | 796 | /* Prevent SCSI scanning (if it hasn't started yet) |
795 | * and wait for the SCSI-scanning thread to stop. | 797 | * or wait for the SCSI-scanning routine to stop. |
796 | */ | 798 | */ |
797 | set_bit(US_FLIDX_DONT_SCAN, &us->dflags); | 799 | cancel_delayed_work_sync(&us->scan_dwork); |
798 | wake_up(&us->delay_wait); | 800 | |
799 | wait_for_completion(&us->scanning_done); | 801 | /* Balance autopm calls if scanning was cancelled */ |
802 | if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) | ||
803 | usb_autopm_put_interface_no_suspend(us->pusb_intf); | ||
800 | 804 | ||
801 | /* Removing the host will perform an orderly shutdown: caches | 805 | /* Removing the host will perform an orderly shutdown: caches |
802 | * synchronized, disks spun down, etc. | 806 | * synchronized, disks spun down, etc. |
@@ -823,53 +827,28 @@ static void release_everything(struct us_data *us) | |||
823 | scsi_host_put(us_to_host(us)); | 827 | scsi_host_put(us_to_host(us)); |
824 | } | 828 | } |
825 | 829 | ||
826 | /* Thread to carry out delayed SCSI-device scanning */ | 830 | /* Delayed-work routine to carry out SCSI-device scanning */ |
827 | static int usb_stor_scan_thread(void * __us) | 831 | static void usb_stor_scan_dwork(struct work_struct *work) |
828 | { | 832 | { |
829 | struct us_data *us = (struct us_data *)__us; | 833 | struct us_data *us = container_of(work, struct us_data, |
834 | scan_dwork.work); | ||
830 | struct device *dev = &us->pusb_intf->dev; | 835 | struct device *dev = &us->pusb_intf->dev; |
831 | 836 | ||
832 | dev_dbg(dev, "device found\n"); | 837 | dev_dbg(dev, "starting scan\n"); |
833 | |||
834 | set_freezable(); | ||
835 | 838 | ||
836 | /* | 839 | /* For bulk-only devices, determine the max LUN value */ |
837 | * Wait for the timeout to expire or for a disconnect | 840 | if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN)) { |
838 | * | 841 | mutex_lock(&us->dev_mutex); |
839 | * We can't freeze in this thread or we risk causing khubd to | 842 | us->max_lun = usb_stor_Bulk_max_lun(us); |
840 | * fail to freeze, but we can't be non-freezable either. Nor can | 843 | mutex_unlock(&us->dev_mutex); |
841 | * khubd freeze while waiting for scanning to complete as it may | ||
842 | * hold the device lock, causing a hang when suspending devices. | ||
843 | * So instead of using wait_event_freezable(), explicitly test | ||
844 | * for (DONT_SCAN || freezing) in interruptible wait and proceed | ||
845 | * if any of DONT_SCAN, freezing or timeout has happened. | ||
846 | */ | ||
847 | if (delay_use > 0) { | ||
848 | dev_dbg(dev, "waiting for device to settle " | ||
849 | "before scanning\n"); | ||
850 | wait_event_interruptible_timeout(us->delay_wait, | ||
851 | test_bit(US_FLIDX_DONT_SCAN, &us->dflags) || | ||
852 | freezing(current), delay_use * HZ); | ||
853 | } | 844 | } |
845 | scsi_scan_host(us_to_host(us)); | ||
846 | dev_dbg(dev, "scan complete\n"); | ||
854 | 847 | ||
855 | /* If the device is still connected, perform the scanning */ | 848 | /* Should we unbind if no devices were detected? */ |
856 | if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { | ||
857 | |||
858 | /* For bulk-only devices, determine the max LUN value */ | ||
859 | if (us->protocol == USB_PR_BULK && | ||
860 | !(us->fflags & US_FL_SINGLE_LUN)) { | ||
861 | mutex_lock(&us->dev_mutex); | ||
862 | us->max_lun = usb_stor_Bulk_max_lun(us); | ||
863 | mutex_unlock(&us->dev_mutex); | ||
864 | } | ||
865 | scsi_scan_host(us_to_host(us)); | ||
866 | dev_dbg(dev, "scan complete\n"); | ||
867 | |||
868 | /* Should we unbind if no devices were detected? */ | ||
869 | } | ||
870 | 849 | ||
871 | usb_autopm_put_interface(us->pusb_intf); | 850 | usb_autopm_put_interface(us->pusb_intf); |
872 | complete_and_exit(&us->scanning_done, 0); | 851 | clear_bit(US_FLIDX_SCAN_PENDING, &us->dflags); |
873 | } | 852 | } |
874 | 853 | ||
875 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) | 854 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) |
@@ -916,7 +895,7 @@ int usb_stor_probe1(struct us_data **pus, | |||
916 | init_completion(&us->cmnd_ready); | 895 | init_completion(&us->cmnd_ready); |
917 | init_completion(&(us->notify)); | 896 | init_completion(&(us->notify)); |
918 | init_waitqueue_head(&us->delay_wait); | 897 | init_waitqueue_head(&us->delay_wait); |
919 | init_completion(&us->scanning_done); | 898 | INIT_DELAYED_WORK(&us->scan_dwork, usb_stor_scan_dwork); |
920 | 899 | ||
921 | /* Associate the us_data structure with the USB device */ | 900 | /* Associate the us_data structure with the USB device */ |
922 | result = associate_dev(us, intf); | 901 | result = associate_dev(us, intf); |
@@ -947,7 +926,6 @@ EXPORT_SYMBOL_GPL(usb_stor_probe1); | |||
947 | /* Second part of general USB mass-storage probing */ | 926 | /* Second part of general USB mass-storage probing */ |
948 | int usb_stor_probe2(struct us_data *us) | 927 | int usb_stor_probe2(struct us_data *us) |
949 | { | 928 | { |
950 | struct task_struct *th; | ||
951 | int result; | 929 | int result; |
952 | struct device *dev = &us->pusb_intf->dev; | 930 | struct device *dev = &us->pusb_intf->dev; |
953 | 931 | ||
@@ -988,20 +966,14 @@ int usb_stor_probe2(struct us_data *us) | |||
988 | goto BadDevice; | 966 | goto BadDevice; |
989 | } | 967 | } |
990 | 968 | ||
991 | /* Start up the thread for delayed SCSI-device scanning */ | 969 | /* Submit the delayed_work for SCSI-device scanning */ |
992 | th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan"); | ||
993 | if (IS_ERR(th)) { | ||
994 | dev_warn(dev, | ||
995 | "Unable to start the device-scanning thread\n"); | ||
996 | complete(&us->scanning_done); | ||
997 | quiesce_and_remove_host(us); | ||
998 | result = PTR_ERR(th); | ||
999 | goto BadDevice; | ||
1000 | } | ||
1001 | |||
1002 | usb_autopm_get_interface_no_resume(us->pusb_intf); | 970 | usb_autopm_get_interface_no_resume(us->pusb_intf); |
1003 | wake_up_process(th); | 971 | set_bit(US_FLIDX_SCAN_PENDING, &us->dflags); |
1004 | 972 | ||
973 | if (delay_use > 0) | ||
974 | dev_dbg(dev, "waiting for device to settle before scanning\n"); | ||
975 | queue_delayed_work(system_freezable_wq, &us->scan_dwork, | ||
976 | delay_use * HZ); | ||
1005 | return 0; | 977 | return 0; |
1006 | 978 | ||
1007 | /* We come here if there are any problems */ | 979 | /* We come here if there are any problems */ |
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 7b0f2113632e..75f70f04f37b 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/blkdev.h> | 47 | #include <linux/blkdev.h> |
48 | #include <linux/completion.h> | 48 | #include <linux/completion.h> |
49 | #include <linux/mutex.h> | 49 | #include <linux/mutex.h> |
50 | #include <linux/workqueue.h> | ||
50 | #include <scsi/scsi_host.h> | 51 | #include <scsi/scsi_host.h> |
51 | 52 | ||
52 | struct us_data; | 53 | struct us_data; |
@@ -72,7 +73,7 @@ struct us_unusual_dev { | |||
72 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ | 73 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ |
73 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ | 74 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ |
74 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ | 75 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ |
75 | #define US_FLIDX_DONT_SCAN 6 /* don't scan (disconnect) */ | 76 | #define US_FLIDX_SCAN_PENDING 6 /* scanning not yet done */ |
76 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ | 77 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ |
77 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ | 78 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ |
78 | 79 | ||
@@ -147,8 +148,8 @@ struct us_data { | |||
147 | /* mutual exclusion and synchronization structures */ | 148 | /* mutual exclusion and synchronization structures */ |
148 | struct completion cmnd_ready; /* to sleep thread on */ | 149 | struct completion cmnd_ready; /* to sleep thread on */ |
149 | struct completion notify; /* thread begin/end */ | 150 | struct completion notify; /* thread begin/end */ |
150 | wait_queue_head_t delay_wait; /* wait during scan, reset */ | 151 | wait_queue_head_t delay_wait; /* wait during reset */ |
151 | struct completion scanning_done; /* wait for scan thread */ | 152 | struct delayed_work scan_dwork; /* for async scanning */ |
152 | 153 | ||
153 | /* subdriver information */ | 154 | /* subdriver information */ |
154 | void *extra; /* Any extra data */ | 155 | void *extra; /* Any extra data */ |
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index f9975100d56d..3a3fdc62c75b 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c | |||
@@ -1061,7 +1061,7 @@ static struct pvr2_board { | |||
1061 | int (*init)(void); | 1061 | int (*init)(void); |
1062 | void (*exit)(void); | 1062 | void (*exit)(void); |
1063 | char name[16]; | 1063 | char name[16]; |
1064 | } board_driver[] = { | 1064 | } board_driver[] __refdata = { |
1065 | #ifdef CONFIG_SH_DREAMCAST | 1065 | #ifdef CONFIG_SH_DREAMCAST |
1066 | { pvr2fb_dc_init, pvr2fb_dc_exit, "Sega DC PVR2" }, | 1066 | { pvr2fb_dc_init, pvr2fb_dc_exit, "Sega DC PVR2" }, |
1067 | #endif | 1067 | #endif |