Skip to content
This repository has been archived by the owner on Apr 22, 2018. It is now read-only.

Commit

Permalink
src/dev_io/dev_io_core.c: comment out print_info as not all devices ork
Browse files Browse the repository at this point in the history
The current implementation of the devio_print_info () only works
for PCIe and other MMAP'able devices, not ethernet ones.

This is reference by github issue #98
  • Loading branch information
lerwys committed Jun 14, 2015
1 parent 6a189c5 commit f935d95
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/dev_io/dev_io_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,20 +272,22 @@ devio_err_e devio_destroy (devio_t **self_p)
}


static int __devio_read_llio_block (struct sdbfs *fs, int offset, void *buf,
static int _devio_read_llio_block (struct sdbfs *fs, int offset, void *buf,
int count)
{
return llio_read_block (((devio_t *)fs->drvdata)->llio, BAR4_ADDR | (offset), count,
(uint32_t *) buf);
return llio_read_block (((devio_t *)fs->drvdata)->llio,
BAR4_ADDR | (offset), count, (uint32_t *) buf);
}

#define SDB_ADDRESS 0x00300000UL

/* Read specific information about the device. Typically,
* this is stored in the SDB structure inside the device */
devio_err_e devio_print_info (devio_t *self)
{
devio_err_e err = DEVIO_SUCCESS;
/* FIXME: Only valid for PCIe devices */
#if 0
/* FIXME: Hardcoded non-default SDB address */
#define SDB_ADDRESS 0x00300000UL
/* The sdb filesystem itself */
struct sdbfs bpm_fpga_sdb = {
.name = "fpga-area",
Expand All @@ -294,7 +296,7 @@ devio_err_e devio_print_info (devio_t *self)
.entrypoint = SDB_ADDRESS,
.data = 0,
.flags = 0,
.read = __devio_read_llio_block
.read = _devio_read_llio_block
};
struct sdb_device *d;
int new = 1;
Expand Down Expand Up @@ -322,6 +324,7 @@ devio_err_e devio_print_info (devio_t *self)

sdbfs_dev_destroy(&bpm_fpga_sdb);
err_sdbfs_create:
#endif
return err;
}

Expand Down

0 comments on commit f935d95

Please # to comment.