- 16 May, 2013 1 commit
-
-
Alessandro Rubini authored
After correctly allocating the the manufacturer or device name, and correctly copying the not-null-terminated string from ipmi-fru, I put the termination '\0' at string[len + 1] . If you build a recent kernel under slob (which is the default), it may fail miserably at unexpected places. For example, if your string is 15 bytes, I allocated 16 but wrote to the 17th. slob has 16-byte alloc areas, and so I was corrupting the next area. This never happened with slab (which I prefer and run) because the smalles allocation chunk there is 32 bytes -- I would experience the same with a 31-long manufacturer or device name. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 15 May, 2013 6 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Conflicts: doc/fmc-bus.in
-
Alessandro Rubini authored
This is only exposed by building for older kernels, as currently err.h is pulled in by other headers I use, it seems Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The example files and configuration matches what is current in the fdelay driver, to be released soon after this very package. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 26 Apr, 2013 1 commit
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 17 Apr, 2013 5 commits
-
-
Alessandro Rubini authored
This allows easy access to the eeprom of each mezzanine. For example I see one at /sys/bus/fmc/devices/FmcDelay1ns4cha-f001/eeprom (fakedev with a fine-delay eeprom image). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The device is freed while its same work queue is running. I don't know if this is safe, but definitely using a static work queue is. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
My previous code for device management was wrong, because I didn't understand the allocation. This fixes the thing, by properly using the release function. This change however requires that all fmc devices are allocated separately (not as an array) and are not freed by the registering entity. So this introduces an incompatible change in the prototype for register_n and unregister_n -- which is noted at build time, but also an incompatible change in how a device must be allocated/freed by the carrier that registers a single device. This change is not introducing a build error, but I hope the only external users by now are the SPEC and the SVEC. fmc-fakedev is fixed by this same commit. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The fmc devices are now children of their own device. This is what we had with fmc-fakedev and 1 mezzanine using a custom eeprom: tha lead to custom names): spusa.root# ls -l /sys/bus/fmc/devices/ FmcDelay1ns4cha-f001 -> ../../../devices/fmc/FmcDelay1ns4cha-f001/ And this is what we have now: spusa.root# ls -l /sys/bus/fmc/devices/ FmcDelay1ns4cha-f001 -> ../../../devices/fake-fmc-carrier/FmcDelay1ns4cha-f001/ Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 09 Apr, 2013 5 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This reshaping of messages make a much better output for multi-mezzanine carriers. For example we now have this of a 4-slot fmc-fakedev: fake-fmc-carrier: mezzanine 0 Manufacturer: CERN Product name: FmcDelay1ns4cha fake-fmc-carrier: mezzanine 1 Manufacturer: fake-vendor Product name: fake-design-for-testing fake-fmc-carrier: mezzanine 2 Manufacturer: fake-vendor Product name: fake-design-for-testing fake-fmc-carrier: mezzanine 3 EEPROM has no FRU information Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
If there is no mezzanine_name, the core now silently use "fmc-<devid>" as a name. This warning was confusing, as every mezzanine with invalid eeprom won't have a predefined name. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
fmc-fakedev fakes removal and re-plugging when the eepromo is overwritten. Thus, fmc-write-eeprom would match again and again, rewriting every two seconds, forever. By offsering ops->validate, the carrier prevents further matches. To only write the first time, you can use the following, since identifiers in fakedev start from 0xf001 ("fool"). insmod fmc-write-eeprom busid=0xf001 The Identifier is increased avery time, so a 4-slot instance will have identifiers 0xf001-0xf004 the first time and 0xf005-0xf008 the next one. This merhod allows fmc-write-eeprom to not match the busid Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 23 Mar, 2013 1 commit
-
-
Alessandro Rubini authored
fru-dump includes local headers, where recent commit changed fru_alloc to correctly receive size_t. fru-dump has it's own local implementation, which was still receiving an "int" argument. Thus build failed in 64-bit (and I wonder why my compiler doesn't even warn in 32 bits. But reported and fix suggested by Michel Vincent, in private email. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 20 Mar, 2013 1 commit
-
-
Alessandro Rubini authored
Building for a 64-bit kernel, I found a few warnings, related to printk format strings. I'm thus using %zi and %ti for size_t and ptrdiff_t, resp. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 21 Feb, 2013 6 commits
-
-
Alessandro Rubini authored
This needless zeroing was used to fix the misbehaving fakedev, but that is now fixed. (again, thanks Emilio for noting). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This changes a while how stuff happens in fmc-fakedev, according to comments by Emilio Cota who noted how I got it badly hacked and not really stable. This now mallocs and uses dev->release as it should. It also fills the new fields of fmc_device that are mandated by the current version of the core (carrier_data, nr_slots, eeprom_addr). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Fixed a few subtle bugs, as yet unexposed by real use, according to review by Emilio Cota. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Change suggested by David Cobas Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Various changes to documentation in and outside the code. Most of them are the result of a review by Emilio Cota and Samuel Iglesias (thanks!) Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 07 Feb, 2013 3 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 24 Jan, 2013 10 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Dumoing SDB is very primitive by now, I'm sorry. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is the library that we really should use for SDB access. Houwever, it still misses subdirectory support, so it is not actually used at this point (even after the commits that build it). I'm hopeful for the future, but only after the upcoming release. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Additionally, this adds some checks that were missing. A device without device_id is now refused, instead of receiving a sequential number. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 15 Jan, 2013 1 commit
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-