diff options
author | Federico Vaga <federico.vaga@cern.ch> | 2017-07-18 09:33:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 17:24:21 +0300 |
commit | 2071a3e94abd34d65bd40f1ff845f9cea300dfa6 (patch) | |
tree | 7b115bbaf53ff854af74bc6b907bdd39688adc28 /drivers/fmc/fmc-dump.c | |
parent | 9f757f415210a7c85e2784e4a1733ea78b2e4e88 (diff) | |
download | linux-2071a3e94abd34d65bd40f1ff845f9cea300dfa6.tar.xz |
drivers/fmc: The only way to dump the SDB is from debugfs
Driver should not call fmc_sdb_dump() anymore. (actually they can but the
operation is not supported, so it will print an error message)
Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Tested-by: Pat Riehecky <riehecky@fnal.gov>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fmc/fmc-dump.c')
-rw-r--r-- | drivers/fmc/fmc-dump.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/fmc/fmc-dump.c b/drivers/fmc/fmc-dump.c index c91afd6388f6..cd1df475b254 100644 --- a/drivers/fmc/fmc-dump.c +++ b/drivers/fmc/fmc-dump.c @@ -15,8 +15,6 @@ static int fmc_must_dump_eeprom; module_param_named(dump_eeprom, fmc_must_dump_eeprom, int, 0644); -static int fmc_must_dump_sdb; -module_param_named(dump_sdb, fmc_must_dump_sdb, int, 0644); #define LINELEN 16 @@ -59,42 +57,3 @@ void fmc_dump_eeprom(const struct fmc_device *fmc) for (i = 0; i < fmc->eeprom_len; i += LINELEN, line += LINELEN) prev = dump_line(i, line, prev); } - -void fmc_dump_sdb(const struct fmc_device *fmc) -{ - const uint8_t *line, *prev; - int i, len; - - if (!fmc->sdb) - return; - if (!fmc_must_dump_sdb) - return; - - /* If the argument is not-zero, do simple dump (== show) */ - if (fmc_must_dump_sdb > 0) - fmc_show_sdb_tree(fmc); - - if (fmc_must_dump_sdb == 1) - return; - - /* If bigger than 1, dump it seriously, to help debugging */ - - /* - * Here we should really use libsdbfs (which is designed to - * work in kernel space as well) , but it doesn't support - * directories yet, and it requires better intergration (it - * should be used instead of fmc-specific code). - * - * So, lazily, just dump the top-level array - */ - pr_info("FMC: %s (%s), slot %i, device %s\n", dev_name(fmc->hwdev), - fmc->carrier_name, fmc->slot_id, dev_name(&fmc->dev)); - pr_info("FMC: poor dump of sdb first level:\n"); - - len = fmc->sdb->len * sizeof(union sdb_record); - line = (void *)fmc->sdb->record; - prev = NULL; - for (i = 0; i < len; i += LINELEN, line += LINELEN) - prev = dump_line(i, line, prev); - return; -} |