diff options
author | Steven Toth <stoth@kernellabs.com> | 2010-07-31 14:13:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 05:54:54 -0400 |
commit | 12d3203e39db306f56611b3f47ba425ca6a409f9 (patch) | |
tree | 3e7eba22186a7015be6529abd2c3ee3659b0b77c /drivers/media/video/saa7164/saa7164.h | |
parent | 46eeb8dd30d3651e6ea55c2e60594206cd591d79 (diff) |
[media] saa7164: buffer crc checks and ensure we use the memcpy func
Buffer crc checks and ensure we use the correct PCIe IO memcpy func
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164.h')
-rw-r--r-- | drivers/media/video/saa7164/saa7164.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index 796d21df52b..a8a29e56b2c 100644 --- a/drivers/media/video/saa7164/saa7164.h +++ b/drivers/media/video/saa7164/saa7164.h | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/kdev_t.h> | 50 | #include <linux/kdev_t.h> |
51 | #include <linux/version.h> | 51 | #include <linux/version.h> |
52 | #include <linux/mutex.h> | 52 | #include <linux/mutex.h> |
53 | #include <linux/crc32.h> | ||
53 | 54 | ||
54 | #include <media/tuner.h> | 55 | #include <media/tuner.h> |
55 | #include <media/tveeprom.h> | 56 | #include <media/tveeprom.h> |
@@ -194,6 +195,8 @@ struct saa7164_user_buffer { | |||
194 | u8 *data; | 195 | u8 *data; |
195 | u32 pos; | 196 | u32 pos; |
196 | u32 actual_size; | 197 | u32 actual_size; |
198 | |||
199 | u32 crc; | ||
197 | }; | 200 | }; |
198 | 201 | ||
199 | struct saa7164_fw_status { | 202 | struct saa7164_fw_status { |
@@ -282,12 +285,13 @@ struct saa7164_buffer { | |||
282 | 285 | ||
283 | /* A block of page align PCI memory */ | 286 | /* A block of page align PCI memory */ |
284 | u32 pci_size; /* PCI allocation size in bytes */ | 287 | u32 pci_size; /* PCI allocation size in bytes */ |
285 | u64 *cpu; /* Virtual address */ | 288 | u64 __iomem *cpu; /* Virtual address */ |
286 | dma_addr_t dma; /* Physical address */ | 289 | dma_addr_t dma; /* Physical address */ |
290 | u32 crc; /* Checksum for the entire buffer data */ | ||
287 | 291 | ||
288 | /* A page table that splits the block into a number of entries */ | 292 | /* A page table that splits the block into a number of entries */ |
289 | u32 pt_size; /* PCI allocation size in bytes */ | 293 | u32 pt_size; /* PCI allocation size in bytes */ |
290 | u64 *pt_cpu; /* Virtual address */ | 294 | u64 __iomem *pt_cpu; /* Virtual address */ |
291 | dma_addr_t pt_dma; /* Physical address */ | 295 | dma_addr_t pt_dma; /* Physical address */ |
292 | 296 | ||
293 | /* Encoder fops */ | 297 | /* Encoder fops */ |
@@ -386,6 +390,9 @@ struct saa7164_port { | |||
386 | u32 a_cc_errors; | 390 | u32 a_cc_errors; |
387 | u8 last_v_cc; | 391 | u8 last_v_cc; |
388 | u8 last_a_cc; | 392 | u8 last_a_cc; |
393 | |||
394 | u8 *shadow_buf[8]; | ||
395 | u32 shadow_crc[8]; | ||
389 | }; | 396 | }; |
390 | 397 | ||
391 | struct saa7164_dev { | 398 | struct saa7164_dev { |
@@ -536,7 +543,6 @@ extern struct saa7164_user_buffer *saa7164_buffer_alloc_user( | |||
536 | extern void saa7164_buffer_dealloc_user(struct saa7164_user_buffer *buf); | 543 | extern void saa7164_buffer_dealloc_user(struct saa7164_user_buffer *buf); |
537 | extern int saa7164_buffer_zero_offsets(struct saa7164_port *port, int i); | 544 | extern int saa7164_buffer_zero_offsets(struct saa7164_port *port, int i); |
538 | 545 | ||
539 | |||
540 | /* ----------------------------------------------------------- */ | 546 | /* ----------------------------------------------------------- */ |
541 | /* saa7164-encoder.c */ | 547 | /* saa7164-encoder.c */ |
542 | int saa7164_encoder_register(struct saa7164_port *port); | 548 | int saa7164_encoder_register(struct saa7164_port *port); |