diff options
author | Ming Lei <tom.leiming@gmail.com> | 2008-09-16 02:32:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:08 -0400 |
commit | a31a4055473bf0a7b2b06cb2262347200d0711e1 (patch) | |
tree | 296667c25e67acd933c55c71b85b619b5918ae5e /drivers/media/video/uvc/uvcvideo.h | |
parent | d63beb9ef004ff9587b3c466361276254d57d7a7 (diff) |
V4L/DVB:usbvideo:don't use part of buffer for USB transfer #4
The status[] is part of uvc_device structure. We can't make sure
the address of status is at a cache-line boundary in all archs,so
status[] might share a cache-line with some fields in uvc_structure.
This can lead to some cache coherence issues(http://lwn.net/Articles/2265/).
Use dynamically allocated buffer instead.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
-rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index bafe3406e305..9a6bc1aafb16 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -303,6 +303,8 @@ struct uvc_xu_control { | |||
303 | #define UVC_MAX_FRAME_SIZE (16*1024*1024) | 303 | #define UVC_MAX_FRAME_SIZE (16*1024*1024) |
304 | /* Maximum number of video buffers. */ | 304 | /* Maximum number of video buffers. */ |
305 | #define UVC_MAX_VIDEO_BUFFERS 32 | 305 | #define UVC_MAX_VIDEO_BUFFERS 32 |
306 | /* Maximum status buffer size in bytes of interrupt URB. */ | ||
307 | #define UVC_MAX_STATUS_SIZE 16 | ||
306 | 308 | ||
307 | #define UVC_CTRL_CONTROL_TIMEOUT 300 | 309 | #define UVC_CTRL_CONTROL_TIMEOUT 300 |
308 | #define UVC_CTRL_STREAMING_TIMEOUT 1000 | 310 | #define UVC_CTRL_STREAMING_TIMEOUT 1000 |
@@ -634,7 +636,7 @@ struct uvc_device { | |||
634 | /* Status Interrupt Endpoint */ | 636 | /* Status Interrupt Endpoint */ |
635 | struct usb_host_endpoint *int_ep; | 637 | struct usb_host_endpoint *int_ep; |
636 | struct urb *int_urb; | 638 | struct urb *int_urb; |
637 | __u8 status[16]; | 639 | __u8 *status; |
638 | struct input_dev *input; | 640 | struct input_dev *input; |
639 | 641 | ||
640 | /* Video Streaming interfaces */ | 642 | /* Video Streaming interfaces */ |