Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rshim for openSUSE:Factory checked in at 2021-01-26 14:46:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rshim (Old) and /work/SRC/openSUSE:Factory/.rshim.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rshim" Tue Jan 26 14:46:36 2021 rev:5 rq:866648 version:2.0.5.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rshim/rshim.changes 2020-11-23 10:48:00.898453714 +0100 +++ /work/SRC/openSUSE:Factory/.rshim.new.28504/rshim.changes 2021-01-26 14:50:02.723701785 +0100 @@ -1,0 +2,8 @@ +Mon Jan 25 14:35:50 UTC 2021 - Matthias Brugger <mbrug...@suse.com> + +- fix _service file +- update to 2.0.5.8.3 + * fix various issues + * add workaround for Bluefield-2 REV-0 + +------------------------------------------------------------------- Old: ---- rshim-2.0.55.1.tar New: ---- rshim-2.0.5.8.3.tar ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rshim.spec ++++++ --- /var/tmp/diff_new_pack.2asBjV/_old 2021-01-26 14:50:03.287702554 +0100 +++ /var/tmp/diff_new_pack.2asBjV/_new 2021-01-26 14:50:03.287702554 +0100 @@ -18,7 +18,7 @@ Name: rshim -Version: 2.0.55.1 +Version: 2.0.5.8.3 Release: 0 Summary: User-space driver for Mellanox BlueField SoC License: GPL-2.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.2asBjV/_old 2021-01-26 14:50:03.327702609 +0100 +++ /var/tmp/diff_new_pack.2asBjV/_new 2021-01-26 14:50:03.327702609 +0100 @@ -6,7 +6,8 @@ <param name="scm">git</param> <param name="url">https://github.com/Mellanox/rshim-user-space.git</param> <param name="filename">rshim</param> - <param name="versionrewrite-pattern">rshim(.*)</param> + <param name="versionrewrite-pattern">rshim-(.*)-(.*)</param> + <param name="versionrewrite-replacement">\1.\2</param> <param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@</param> </service> <service mode="disabled" name="set_version" /> ++++++ rshim-2.0.55.1.tar -> rshim-2.0.5.8.3.tar ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/debian/changelog new/rshim-2.0.5.8.3/debian/changelog --- old/rshim-2.0.55.1/debian/changelog 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/debian/changelog 2021-01-23 01:33:56.000000000 +0100 @@ -1,3 +1,26 @@ +rshim (2.0.5-8) UNRELEASED; urgency=low + + * Don't allow any register access when DROP_MODE is set + * Avoid potential race in rshim_fifo_read + + -- Liming Sun <limi...@nvidia.com> Fri, 11 Dec 2020 15:10:23 -0400 + +rshim (2.0.5-7) UNRELEASED; urgency=low + + * Fix potential dead-lock when calling rshim_access_check + * Ignore rshim access checking when global drop mode is enabled + * Fix some secure boot related issue + + -- Liming Sun <limi...@nvidia.com> Wed, 09 Dec 2020 08:58:43 -0400 + +rshim (2.0.5-6) UNRELEASED; urgency=low + + * Add some default configuration in rshim.conf + * Change the debug level of Rshim byte access widget timeout + * Add bfb-install script + + -- Liming Sun <limi...@nvidia.com> Wed, 02 Dec 2020 08:20:23 -0400 + rshim (2.0.5-5) UNRELEASED; urgency=low * Check rshim accessibility when re-enabling it diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/etc/rshim.conf new/rshim-2.0.5.8.3/etc/rshim.conf --- old/rshim-2.0.55.1/etc/rshim.conf 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/etc/rshim.conf 2021-01-23 01:33:56.000000000 +0100 @@ -3,6 +3,13 @@ # # +# Default configuration for a rshim device +# +#DISPLAY_LEVEL 0 +#BOOT_TIMEOUT 100 +#DROP_MODE 0 + +# # Static mapping of rshim name and device. # Uncomment the 'rshim<N>' line to configure the mapping. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/rhel/rshim.spec.in new/rshim-2.0.5.8.3/rhel/rshim.spec.in --- old/rshim-2.0.55.1/rhel/rshim.spec.in 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/rhel/rshim.spec.in 2021-01-23 01:33:56.000000000 +0100 @@ -4,7 +4,7 @@ Name: rshim Version: @VERSION@ -Release: 5%{?dist} +Release: 8%{?dist} Summary: User-space driver for Mellanox BlueField SoC License: GPLv2 @@ -54,6 +54,20 @@ %{_mandir}/man8/rshim.8.gz %changelog +* Fri Dec 11 2020 Liming Sun <limi...@nvidia.com> - 2.0.5-8 +- Don't allow any register access when DROP_MODE is set +- Avoid potential race in rshim_fifo_read + +* Wed Dec 09 2020 Liming Sun <limi...@nvidia.com> - 2.0.5-7 +- Fix potential dead-lock when calling rshim_access_check +- Ignore rshim access checking when global drop mode is enabled +- Fix some secure boot related issue + +* Wed Dec 02 2020 Liming Sun <limi...@nvidia.com> - 2.0.5-6 +- Add some default configuration in rshim.conf +- Change the debug level of Rshim byte access widget timeout +- Add bfb-install script + * Thu Oct 29 2020 Liming Sun <l...@mellanox.com> - 2.0.5-5 - Check rshim accessibility when re-enabling it - Enable console output during boot stream pushing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/rshim.spec.in new/rshim-2.0.5.8.3/rshim.spec.in --- old/rshim-2.0.55.1/rshim.spec.in 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/rshim.spec.in 2021-01-23 01:33:56.000000000 +0100 @@ -4,7 +4,7 @@ Name: rshim Version: @VERSION@ -Release: 5%{?dist} +Release: 8%{?dist} Summary: User-space driver for Mellanox BlueField SoC License: GPLv2 @@ -95,6 +95,20 @@ %{_mandir}/man8/bfb-install.8.gz %changelog +* Fri Dec 11 2020 Liming Sun <limi...@nvidia.com> - 2.0.5-8 +- Don't allow any register access when DROP_MODE is set +- Avoid potential race in rshim_fifo_read + +* Wed Dec 09 2020 Liming Sun <limi...@nvidia.com> - 2.0.5-7 +- Fix potential dead-lock when calling rshim_access_check +- Ignore rshim access checking when global drop mode is enabled +- Fix some secure boot related issue + +* Wed Dec 02 2020 Liming Sun <limi...@nvidia.com> - 2.0.5-6 +- Add some default configuration in rshim.conf +- Change the debug level of Rshim byte access widget timeout +- Add bfb-install script + * Thu Oct 29 2020 Liming Sun <l...@mellanox.com> - 2.0.5-5 - Check rshim accessibility when re-enabling it - Enable console output during boot stream pushing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/scripts/bfb-install new/rshim-2.0.5.8.3/scripts/bfb-install --- old/rshim-2.0.55.1/scripts/bfb-install 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/scripts/bfb-install 2021-01-23 01:33:56.000000000 +0100 @@ -29,7 +29,7 @@ usage () { - echo "syntax: bfb_install --bfb|-b <BFBFILE> [--config|-c <bf.cfg>] \\" + echo "syntax: bfb-install --bfb|-b <BFBFILE> [--config|-c <bf.cfg>] \\" echo " [--rootfs|-f <rootfs.tar.xz>] --rshim|-r <rshimN> [--help|-h]" } @@ -38,7 +38,7 @@ rootfs= rshim= -options=`getopt -n bfb_install -o b:c:f:r:h \ +options=`getopt -n bfb-install -o b:c:f:r:h \ -l help,bfb:,config:,rootfs:,rshim: -- "$@"` eval set -- $options while [ "$1" != -- ]; do @@ -100,7 +100,12 @@ # Push the boot stream. echo "Pushing bfb${cfg:+ + cfg}${rootfs:+ + rootfs}" -sh -c "cat ${bfb} ${cfg:+$cfg} ${rootfs:+${rootfs}} ${pv:+| ${pv}} > ${rshim}/boot" +sh -c "cat ${bfb} ${cfg:+$cfg} ${rootfs:+${rootfs}} ${pv:+| ${pv} | cat -} > ${rshim}/boot" +RETVAL=$? +if [ $RETVAL -ne 0 ]; then + echo "Failed to push BFB" + exit +fi # Print the rshim log. echo "Collecting BlueField booting status. Press Ctrl+C to stop???" @@ -109,6 +114,11 @@ while true; do last_len=${#last} cur=$(echo 'DISPLAY_LEVEL 2' > ${rshim}/misc && cat ${rshim}/misc | sed -n '/^ INFO/,$p') + RETVAL=$? + if [ $RETVAL -ne 0 ]; then + echo "Failed to read ${rshim}/misc" + exit + fi cur_len=${#cur} sleep 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/src/rshim.c new/rshim-2.0.5.8.3/src/rshim.c --- old/rshim-2.0.55.1/src/rshim.c 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/src/rshim.c 2021-01-23 01:33:56.000000000 +0100 @@ -175,12 +175,16 @@ /* Default configuration file. */ char *rshim_cfg_file = "/etc/rshim.conf"; +static int rshim_display_level = 0; +static int rshim_boot_timeout = 100; +int rshim_drop_mode = -1; /* Array of devices and device names. */ rshim_backend_t *rshim_devs[RSHIM_MAX_DEV]; char *rshim_dev_names[RSHIM_MAX_DEV]; char *rshim_blocked_dev_names[RSHIM_MAX_DEV]; +bool rshim_no_net = false; int rshim_log_level = LOG_NOTICE; bool rshim_daemon_mode = true; volatile bool rshim_run = true; @@ -331,13 +335,7 @@ size_addr = RSH_TM_HOST_TO_TILE_STS; size_mask = RSH_TM_HOST_TO_TILE_STS__COUNT_MASK; data_addr = RSH_TM_HOST_TO_TILE_DATA; - rc = bd->read_rshim(bd, RSHIM_CHANNEL, RSH_TM_HOST_TO_TILE_CTL, ®); - if (rc < 0) { - RSHIM_ERR("read_rshim error %d\n", rc); - return rc; - } - max_size = (reg >> RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_SHIFT) & - RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_RMASK; + max_size = RSH_TM_FIFO_SIZE; break; case RSH_DEV_TYPE_BOOT: @@ -481,7 +479,7 @@ */ rc = pthread_cond_timedwait(&bd->boot_complete_cond, &bd->mutex, &ts); if (rc) { - RSHIM_ERR("Failed to detect re-probe, continues anyway.\n"); + RSHIM_DBG("Failed to detect re-probe, continues anyway.\n"); bd->is_booting = 0; return 0; } @@ -506,7 +504,7 @@ if (count != resp_count) return 0; } - RSHIM_ERR("Rshim byte access widget timeout\n"); + RSHIM_DBG("Rshim byte access widget timeout\n"); return -1; } @@ -642,6 +640,12 @@ pthread_mutex_lock(&bd->mutex); + if (bd->drop_mode) { + RSHIM_INFO("rshim is in drop mode\n"); + pthread_mutex_unlock(&bd->mutex); + return -EINVAL; + } + if (bd->is_boot_open) { RSHIM_INFO("can't boot, boot file already open\n"); pthread_mutex_unlock(&bd->mutex); @@ -653,7 +657,7 @@ return -ENODEV; } - RSHIM_INFO("begin booting\n"); + RSHIM_INFO("rshim%d: boot open\n", bd->index); bd->is_booting = 1; bd->boot_rem_cnt = 0; @@ -783,7 +787,7 @@ time(&tm); if (difftime(tm, bd->boot_write_time) > bd->boot_timeout) { rc = -ETIMEDOUT; - RSHIM_INFO("boot timeout\n"); + RSHIM_INFO("rshim%d: boot timeout\n", bd->index); } else { rc = -EINTR; } @@ -838,6 +842,7 @@ rshim_work_signal(bd); pthread_mutex_unlock(&bd->mutex); + RSHIM_INFO("rshim%d: boot close\n", bd->index); rshim_deref(bd); } @@ -865,13 +870,7 @@ int ret, max_size, avail; /* Get FIFO max size. */ - ret = bd->read_rshim(bd, RSHIM_CHANNEL, RSH_TM_HOST_TO_TILE_CTL, &word); - if (ret) { - RSHIM_ERR("read_rshim error %d\n", ret); - return ret; - } - max_size = (word >> RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_SHIFT) & - RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_RMASK; + max_size = RSH_TM_FIFO_SIZE; /* Calculate available size. */ ret = bd->read_rshim(bd, RSHIM_CHANNEL, RSH_TM_HOST_TO_TILE_STS, &word); @@ -1245,7 +1244,6 @@ readsize = MIN(count, (size_t)read_cnt(bd, chan)); pass1 = MIN(readsize, (size_t)read_cnt_to_end(bd, chan)); pass2 = readsize - pass1; - pthread_mutex_unlock(&bd->ringlock); RSHIM_DBG("fifo_read: readsize %zd, head %d, tail %d\n", readsize, bd->read_fifo[chan].head, @@ -1255,7 +1253,6 @@ if (pass2) memcpy(buffer + pass1, bd->read_fifo[chan].data, pass2); - pthread_mutex_lock(&bd->ringlock); read_consume_bytes(bd, chan, readsize); /* Check if there is any more incoming data. */ @@ -1490,6 +1487,10 @@ if (write_full(bd, chan)) { RSHIM_DBG("fifo_write: fifo full\n"); + /* Try to send more data. */ + pthread_mutex_lock(&bd->ringlock); + rshim_fifo_output(bd); + pthread_mutex_unlock(&bd->ringlock); if (nonblock) { pthread_mutex_unlock(&bd->mutex); RSHIM_DBG("fifo_write: returning %zd/EAGAIN\n", wr_cnt); @@ -1572,8 +1573,8 @@ pthread_cond_broadcast(&bd->boot_write_complete_cond); } - if (bd->net_fd < 0 && (rshim_timer_ticks - bd->net_init_time) < - RSHIM_NET_INIT_DELAY) { + if (!rshim_no_net && bd->net_fd < 0 && + (rshim_timer_ticks - bd->net_init_time) < RSHIM_NET_INIT_DELAY) { rc = rshim_net_init(bd); if (!rc) { bd->is_net_open = 1; @@ -2110,7 +2111,7 @@ int rshim_access_check(rshim_backend_t *bd) { rshim_backend_t *other_bd; - uint64_t value; + uint64_t value = 0; int i, rc; /* @@ -2120,15 +2121,21 @@ * rshim device. */ for (i = 0; i < 10; i++) { - rc = bd->read_rshim(bd, RSHIM_CHANNEL, RSH_TM_HOST_TO_TILE_CTL, &value); - if (!rc && value) + rc = bd->read_rshim(bd, RSHIM_CHANNEL, RSH_FABRIC_DIM, &value); + if (!rc && value && value != 0xbad00acce55) break; usleep(100000); } + if (value == 0xbad00acce55) { + RSHIM_ERR("Unable to read from rshim\n"); + return -ETIMEDOUT; + } rshim_boot_workaround_check(bd); - if (bd->ver_id == RSHIM_BLUEFIELD_2 && rshim_is_livefish(bd)) { + /* BLUEFIELD_2 REV0 workaround. */ + if (bd->ver_id == RSHIM_BLUEFIELD_2 && bd->rev_id == BLUEFIELD_REV0 && + rshim_is_livefish(bd)) { if (rshim_bf2_a0_wa(bd) != 0) { /* * If the workaround fails it is likely because the mesh is already @@ -2254,7 +2261,10 @@ bd->net_notify_fd[0] = -1; bd->net_notify_fd[1] = -1; bd->registered = 1; - bd->boot_timeout = 100; + bd->boot_timeout = rshim_boot_timeout; + bd->display_level = rshim_display_level; + if (rshim_drop_mode >= 0) + bd->drop_mode = rshim_drop_mode; /* Start the keepalive timer. */ bd->last_keepalive = rshim_timer_ticks; @@ -2590,7 +2600,7 @@ static int rshim_load_cfg(void) { - char rshim_name[32] = "", dev_name[64] = ""; + char key[32] = "", value[64] = ""; char *buf = NULL; size_t n = 0; FILE *file; @@ -2601,20 +2611,31 @@ return -ENOENT; while (getline(&buf, &n, file) != -1) { - if (sscanf(buf, "%31s%63s", rshim_name, dev_name) != 2) + if (sscanf(buf, "%31s%63s", key, value) != 2) continue; - if (strncmp(rshim_name, "rshim", 5) && strcmp(rshim_name, "none")) + if (!strcmp(key, "DISPLAY_LEVEL")) { + rshim_display_level = atoi(value); + continue; + } else if (!strcmp(key, "BOOT_TIMEOUT")) { + rshim_boot_timeout = atoi(value); continue; + } else if (!strcmp(key, "DROP_MODE")) { + rshim_drop_mode = atoi(value); + continue; + } - if (strncmp(dev_name, "usb-", 4) && strncmp(dev_name, "pcie-", 5)) + if (strncmp(key, "rshim", 5) && strcmp(key, "none")) + continue; + + if (strncmp(value, "usb-", 4) && strncmp(value, "pcie-", 5)) continue; /* Blocked devices. */ - if (!strcmp(rshim_name, "none")) { + if (!strcmp(key, "none")) { for (index = 0; index < RSHIM_MAX_DEV; index++) { if (!rshim_blocked_dev_names[index]) { - rshim_blocked_dev_names[index] = strdup(dev_name); + rshim_blocked_dev_names[index] = strdup(value); break; } } @@ -2622,12 +2643,12 @@ } /* Static mapping of rshim device to index. */ - index = atoi(rshim_name + 5); + index = atoi(key + 5); if (index < 0 || index >= RSHIM_MAX_DEV) continue; if (rshim_dev_names[index]) free(rshim_dev_names[index]); - rshim_dev_names[index] = strdup(dev_name); + rshim_dev_names[index] = strdup(value); } if (buf) @@ -2690,12 +2711,13 @@ printf(" -i, --index use device path /dev/rshim<i>/\n"); printf(" -l, --log-level log level"); printf("(0:none, 1:error, 2:warning, 3:notice, 4:debug)\n"); + printf(" -n, --nonet no network interface\n"); printf(" -v, --version version\n"); } int main(int argc, char *argv[]) { - static const char short_options[] = "b:d:fhi:l:v"; + static const char short_options[] = "b:d:fhi:l:nv"; static struct option long_options[] = { { "backend", required_argument, NULL, 'b' }, { "device", required_argument, NULL, 'd' }, @@ -2703,6 +2725,7 @@ { "help", no_argument, NULL, 'h' }, { "index", required_argument, NULL, 'i' }, { "log-level", required_argument, NULL, 'l' }, + { "nonet", no_argument, NULL, 'n' }, { "version", no_argument, NULL, 'v' }, { NULL, 0, NULL, 0 } }; @@ -2739,6 +2762,9 @@ else if (rshim_log_level >= 4) rshim_log_level = LOG_DEBUG; break; + case 'n': + rshim_no_net = true; + break; case 'v': #if defined(PACKAGE_NAME) && defined(VERSION) printf(PACKAGE_NAME " " VERSION "\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/src/rshim.h new/rshim-2.0.5.8.3/src/rshim.h --- old/rshim-2.0.55.1/src/rshim.h 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/src/rshim.h 2021-01-23 01:33:56.000000000 +0100 @@ -39,8 +39,7 @@ /* Global variables. */ extern int rshim_log_level; extern bool rshim_daemon_mode; -extern int rshim_skip_boot_reset; -extern int rshim_boot_timeout; +extern int rshim_drop_mode; #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) @@ -158,6 +157,7 @@ #define RSH_CHANNEL_BASE(chan) (RSH_BASE_ADDR | (chan << 16)) #define RSH_BOOT_FIFO_SIZE 512 +#define RSH_TM_FIFO_SIZE 256 /* Retry time in seconds. */ #define RSHIM_LOCK_RETRY_TIME 2 @@ -204,6 +204,10 @@ #define RSHIM_BLUEFIELD_1 1 #define RSHIM_BLUEFIELD_2 2 +/* Bluefield Revision ID. */ +#define BLUEFIELD_REV0 0 +#define BLUEFIELD_REV1 1 + /* RShim backend. */ typedef struct rshim_backend rshim_backend_t; struct rshim_backend { @@ -532,13 +536,6 @@ int rshim_fuse_got_peer_signal(void); #endif -/* Allowed registers in drop mode. */ -static inline bool rshim_drop_mode_access(int addr) -{ - return (addr == RSH_BOOT_CONTROL || addr == RSH_RESET_CONTROL || - addr == RSH_BOOT_FIFO_DATA || addr == RSH_BOOT_FIFO_COUNT); -} - /* * Get/Set the OPN string from the YU boot record, which means setting * the value only persists during warm resets. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/src/rshim_fuse.c new/rshim-2.0.5.8.3/src/rshim_fuse.c --- old/rshim-2.0.55.1/src/rshim_fuse.c 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/src/rshim_fuse.c 2021-01-23 01:33:56.000000000 +0100 @@ -828,6 +828,7 @@ } else if (strcmp(key, "DROP_MODE") == 0) { if (sscanf(p, "%d", &value) != 1) goto invalid; + pthread_mutex_lock(&bd->mutex); old_value = (int)bd->drop_mode; bd->drop_mode = !!value; if (bd->drop_mode) @@ -836,17 +837,20 @@ if (bd->enable_device(bd, true)) bd->drop_mode = 1; } + pthread_mutex_unlock(&bd->mutex); /* * Check if another endpoint driver has already attached to the * same rshim device before enabling it. */ if (old_value && !bd->drop_mode) { + rshim_lock(); pthread_mutex_lock(&bd->mutex); if (rshim_access_check(bd)) { RSHIM_WARN("rshim %s is not accessible\n", bd->dev_name); bd->drop_mode = old_value; } pthread_mutex_unlock(&bd->mutex); + rshim_unlock(); } } else if (strcmp(key, "BOOT_MODE") == 0) { if (sscanf(p, "%x", &value) != 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/src/rshim_pcie.c new/rshim-2.0.5.8.3/src/rshim_pcie.c --- old/rshim-2.0.55.1/src/rshim_pcie.c 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/src/rshim_pcie.c 2021-01-23 01:33:56.000000000 +0100 @@ -262,7 +262,7 @@ if (!bd->has_rshim || !bd->has_tm) return -ENODEV; - if (bd->drop_mode && !rshim_drop_mode_access(addr)) { + if (bd->drop_mode) { *result = 0; return 0; } @@ -288,7 +288,7 @@ if (!bd->has_rshim || !bd->has_tm) return -ENODEV; - if (bd->drop_mode && !rshim_drop_mode_access(addr)) + if (bd->drop_mode) return 0; /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/src/rshim_pcie_lf.c new/rshim-2.0.5.8.3/src/rshim_pcie_lf.c --- old/rshim-2.0.55.1/src/rshim_pcie_lf.c 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/src/rshim_pcie_lf.c 2021-01-23 01:33:56.000000000 +0100 @@ -431,7 +431,7 @@ if (!bd->has_rshim || !bd->has_tm) return -ENODEV; - if (bd->drop_mode && !rshim_drop_mode_access(addr)) { + if (bd->drop_mode) { *result = 0; return 0; } @@ -455,7 +455,7 @@ if (!bd->has_rshim || !bd->has_tm) return -ENODEV; - if (bd->drop_mode && !rshim_drop_mode_access(addr)) + if (bd->drop_mode) return 0; /* @@ -572,8 +572,9 @@ /* Notify that the device is attached */ ret = rshim_notify(bd, RSH_EVENT_ATTACH, 0); - /* Enable drop mode by default for livefish. */ - bd->drop_mode = 1; + /* Enable drop mode for livefish by default if not configured. */ + if (rshim_drop_mode < 0) + bd->drop_mode = 1; pthread_mutex_unlock(&bd->mutex); if (ret) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rshim-2.0.55.1/src/rshim_regs.h new/rshim-2.0.5.8.3/src/rshim_regs.h --- old/rshim-2.0.55.1/src/rshim_regs.h 2020-11-18 14:22:20.000000000 +0100 +++ new/rshim-2.0.5.8.3/src/rshim_regs.h 2021-01-23 01:33:56.000000000 +0100 @@ -69,24 +69,6 @@ #define RSH_SCRATCHPAD 0x20 -#define RSH_TM_HOST_TO_TILE_CTL 0xa30 -#define RSH_TM_HOST_TO_TILE_CTL__LENGTH 0x0001 -#define RSH_TM_HOST_TO_TILE_CTL__LWM_SHIFT 0 -#define RSH_TM_HOST_TO_TILE_CTL__LWM_WIDTH 8 -#define RSH_TM_HOST_TO_TILE_CTL__LWM_RESET_VAL 128 -#define RSH_TM_HOST_TO_TILE_CTL__LWM_RMASK 0xff -#define RSH_TM_HOST_TO_TILE_CTL__LWM_MASK 0xff -#define RSH_TM_HOST_TO_TILE_CTL__HWM_SHIFT 8 -#define RSH_TM_HOST_TO_TILE_CTL__HWM_WIDTH 8 -#define RSH_TM_HOST_TO_TILE_CTL__HWM_RESET_VAL 128 -#define RSH_TM_HOST_TO_TILE_CTL__HWM_RMASK 0xff -#define RSH_TM_HOST_TO_TILE_CTL__HWM_MASK 0xff00 -#define RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_SHIFT 32 -#define RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_WIDTH 9 -#define RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_RESET_VAL 256 -#define RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_RMASK 0x1ff -#define RSH_TM_HOST_TO_TILE_CTL__MAX_ENTRIES_MASK _64bit(0x1ff00000000) - #define RSH_TM_HOST_TO_TILE_STS 0xa28 #define RSH_TM_HOST_TO_TILE_STS__LENGTH 0x0001 #define RSH_TM_HOST_TO_TILE_STS__COUNT_SHIFT 0 @@ -191,5 +173,7 @@ #define RSH_DEVICE_MSTR_PRIV_LVL 0x0550 #define RSH_DEVICE_MSTR_PRIV_LVL__MEM_ACC_LVL_SHIFT 48 +#define RSH_FABRIC_DIM 0x0110 + #endif /* !defined(__DOXYGEN__) */ #endif /* !defined(__RSHIM_REGS_H__) */