u32 is ALWAYS 32 bit!!! u32* is, as all pointers are, 64 bits. For numerics, it's "long" that modifies its length! (32 on i386 and 64 on amd64, alpha and itanium).
Taken from alpha's <asm/types.h> typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long u64; These are standard sizes for unix on 64bit systems. If the compiler code is issuing different sizes, there is a problem in its includes (like asm/types.h). A quick prog that printfs some sizeofs could shed light on the subject. Once again, be careful with eventual chunks of code inside #ifdef X86 that may assume long to be 32bit. /* PedroT */ The method used to transmit mail messages across the Internet, SMTP, is not reliable, so anyone can send a mail pretending to be someone else. Current mail spreading virus and worms use this to attempt to make it look like its messages are from a trustworthy source. Only in the presence of a valid digitally signed message can someone assume the source was not forged and the content has not been tampered with. Help making internet mail more secure by adopting and recommending digital signatures in mail messages. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Stezenbach Sent: terÃa-feira, 10 de Fevereiro de 2004 12:17 To: [EMAIL PROTECTED] Subject: [linux-dvb] Re: AMD64 and DVB Max Nickel wrote: > > this is on my amd64 system. ... > av7110_fw_query error > DVB: AV711-887054330(0) - firm cb20a006, rtsl ffffffff, vid a96da005, app ffffffff I guess the firmware is not loaded correctly. Please revert av7110.c to the state from CVS (or from 1.1.0), and apply the patch below: (u32 is 64 bit on amd64, but AFAIK uint32_t should always be 32bit according to ISO C99) Index: drivers/media/dvb/ttpci/av7110.c =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/av7110.c,v retrieving revision 1.111 diff -u -p -r1.111 av7110.c --- drivers/media/dvb/ttpci/av7110.c 31 Jan 2004 11:31:35 -0000 1.111 +++ drivers/media/dvb/ttpci/av7110.c 10 Feb 2004 12:01:55 -0000 @@ -1249,7 +1249,7 @@ static int master_xfer(struct dvb_i2c_bu static int check_firmware(struct av7110* av7110) { - u32 crc = 0, len = 0; + uint32_t crc = 0, len = 0; unsigned char *ptr; /* check for firmware magic */ @@ -1262,9 +1262,9 @@ static int check_firmware(struct av7110* ptr += 4; /* check dpram file */ - crc = ntohl(*(u32*) ptr); + crc = ntohl(*(uint32_t*) ptr); ptr += 4; - len = ntohl(*(u32*) ptr); + len = ntohl(*(uint32_t*) ptr); ptr += 4; if (len >= 512) { printk("dvb-ttpci: dpram file is way to big.\n"); @@ -1279,9 +1279,9 @@ static int check_firmware(struct av7110* ptr += len; /* check root file */ - crc = ntohl(*(u32*) ptr); + crc = ntohl(*(uint32_t*) ptr); ptr += 4; - len = ntohl(*(u32*) ptr); + len = ntohl(*(uint32_t*) ptr); ptr += 4; if (len <= 200000 || len >= 300000 || If that doesn't fix it (because uint32_t is 64bit...) we need to do some more work. If it doesn't work, can you run the following program and post its output: ----- #include <stdio.h> #include <stdint.h> int main() { printf("%u\n", sizeof(uint32_t)); return 0; } ----- Johannes -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
smime.p7s
Description: S/MIME cryptographic signature