lynxis / iwleeprom

Automatically exported from code.google.com/p/iwleeprom
2 stars 1 forks source link

64-bit issues? #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to modify the eeprom of an Intel 5100AGN miniPCIe card to work in 
my HP laptop. However, I am failing at the first step: getting a eeprom dump of 
the card.

I am building iwleeprom on an Intel Atom D510MO board, and I know the minipcie 
connection is good, since I'm using it normally for a Broadcom decoder and 
that's working fine.

System is Arch Linux, 64 bit:
Linux brain 3.2.9-1-ARCH #1 SMP PREEMPT Thu Mar 1 09:31:13 CET 2012 x86_64 
GNU/Linux
# gcc --version
gcc (GCC) 4.7.0 20120505 (prerelease)

After checking out revision 37, I see some warnings:

# make
gcc -Wall -O2 -o iwleeprom iwleeprom.c
iwleeprom.c:109:3: warning: data definition has no type or storage class 
[enabled by default]
iwleeprom.c:109:3: warning: type defaults to 'int' in declaration of 'nodev' 
[-Wimplicit-int]
iwleeprom.c:110:3: warning: type defaults to 'int' in declaration of 
'preserve_mac' [-Wimplicit-int]
iwleeprom.c:111:3: warning: type defaults to 'int' in declaration of 
'preserve_calib' [-Wimplicit-int]
iwleeprom.c: In function 'init_dump':
iwleeprom.c:251:2: warning: format '%Ld' expects argument of type 'long long 
int', but argument 3 has type 'size_t' [-Wformat]

Seems OK after building:

# ./iwleeprom
Supported devices detected: 
  [1] 0000:02:00.0 [RW] WiFi Link 5100 (8086:4232, 8086:1321)
Select device [1-1] (or 0 to quit): 1
Using device 0000:02:00.0 [RW] WiFi Link 5100 
No file names given or patch option selected!
No EEPROM actions will be performed, just write-enable test

But trying to dump fails and results in a zero-byte file:

# ./iwleeprom -D 1 -d 0000:02:00.0  -o eeprom.bin
debug level: 1
Using device 0000:02:00.0 [RW] WiFi Link 5100 
address: f0200000
Saving dump with byte order: LITTLE ENDIAN

Read not complete! Timeout at 0000x

# ./iwleeprom -D 1 -d 0000:02:00.0  -p               
debug level: 1
Using device 0000:02:00.0 [RW] WiFi Link 5100 
address: f0200000
Patching card EEPROM...
-> Changing subdev ID

Read not complete! Timeout at 0020x

Original issue reported on code.google.com by hal...@gmail.com on 27 May 2012 at 7:09

GoogleCodeExporter commented 9 years ago
Try to increase delay in eeprom_read16(). It works for me after replacing 
usleep(50) with usleep(10000)

Original comment by koct9i on 24 Jul 2012 at 8:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@koct9i  THANK YOU !!!  it worked for me, i was able to dump the eeprom :)

Original comment by jfnori...@gmail.com on 1 Feb 2014 at 8:02

GoogleCodeExporter commented 9 years ago
The compile-time warnings are due to a couple of typos in the code. Please 
apply the attached patch to resolve them.

Original comment by david.w...@gatech.edu on 21 Nov 2014 at 6:05

Attachments: