Skip to content

Commit

Permalink
Update the version and change log
Browse files Browse the repository at this point in the history
Signed-off-by: Liming Sun <[email protected]>
  • Loading branch information
lsun100 committed Apr 14, 2020
1 parent fce4871 commit 257a860
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 20 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2019 Mellanox Technologies. All Rights Reserved.
#

AC_INIT([rshim], [2.0.2])
AC_INIT([rshim], [2.0.3])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_LANG(C)
Expand Down
19 changes: 19 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
rshim (2.0.3-1) UNRELEASED; urgency=low

* Enable pci device during probing
* Map the pci resource0 file instead of /dev/mem
* Add copyright header in bootstrap.sh
* Add 'Requires' tag check in the rpm .spec for kernel-modules-extra
* Fix the 'rshim --version' output

-- Liming Sun <[email protected]> Tue, 14 Apr 2020 16:40:25 -0400

rshim (2.0.2-1) UNRELEASED; urgency=low

* Remove unnecessary dependency in .spec and use make_build
* Add package build for debian/ubuntu
* Fix some format in the man page
* Add check for syslog headers

-- Liming Sun <[email protected]> Thu, 09 Apr 2020 12:17:15 -0400

rshim (2.0.1-1) UNRELEASED; urgency=low

* Initial release.
Expand Down
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 8.0.0), autotools-dev, bzip2, libpci-dev, libusb-1.
Package: rshim
Architecture: any
Homepage: https://github.com/Mellanox/rshim-user-space
Description: rshim driver for Mellanox BlueField SoC
This is the user-space driver to access the BlueField SoC via the rshim
interface. It provides ways to push boot stream, debug the target or login
via the virtual console or network interface.
Description: driver for Mellanox BlueField SoC
This is the user-space driver to access the BlueField SoC via the rshim
interface. It provides ways to push boot stream, debug the target or
login via the virtual console or network interface.
7 changes: 7 additions & 0 deletions rhel/rshim.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ via the virtual console or network interface.
%{_mandir}/man8/rshim.8.gz

%changelog
* Tue Apr 14 2020 Liming Sun <[email protected]> - 2.0.3-1
- Enable pci device during probing
- Map the pci resource0 file instead of /dev/mem
- Add copyright header in bootstrap.sh
- Add 'Requires' tag check in the rpm .spec for kernel-modules-extra
- Fix the 'rshim --version' output

* Thu Apr 09 2020 Liming Sun <[email protected]> - 2.0.2-1
- Remove unnecessary dependency in .spec and use make_build
- Add package build for debian/ubuntu
Expand Down
7 changes: 7 additions & 0 deletions rshim.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ tar -axf %{SOURCE0} -C %{name}-%{version} --strip-components 1
%{_mandir}/man8/rshim.8.gz

%changelog
* Tue Apr 14 2020 Liming Sun <[email protected]> - 2.0.3-1
- Enable pci device during probing
- Map the pci resource0 file instead of /dev/mem
- Add copyright header in bootstrap.sh
- Add 'Requires' tag check in the rpm .spec for kernel-modules-extra
- Fix the 'rshim --version' output

* Thu Apr 09 2020 Liming Sun <[email protected]> - 2.0.2-1
- Remove unnecessary dependency in .spec and use make_build
- Add package build for debian/ubuntu
Expand Down
1 change: 1 addition & 0 deletions src/rshim.c
Original file line number Diff line number Diff line change
Expand Up @@ -2309,6 +2309,7 @@ int main(int argc, char *argv[])
{ "help", no_argument, NULL, 'h' },
{ "index", required_argument, NULL, 'i' },
{ "log-level", required_argument, NULL, 'l' },
{ "version", no_argument, NULL, 'v' },
{ NULL, 0, NULL, 0 }
};
int c;
Expand Down
2 changes: 1 addition & 1 deletion src/rshim.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static inline void rshim_usb_poll(void)
#ifdef HAVE_RSHIM_PCIE
int rshim_pcie_init(void);
int rshim_pcie_lf_init(void);
void rshim_pcie_enable(void *dev);
int rshim_pcie_enable(void *dev);
#else
static inline int rshim_pcie_init(void)
{
Expand Down
32 changes: 18 additions & 14 deletions src/rshim_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static int rshim_pcie_probe(struct pci_dev *pci_dev)
goto rshim_map_failed;
}
if (pci_dev->size[0] < PCI_RSHIM_WINDOW_SIZE) {
RSHIM_ERR("BAR[0] size 0x%x too small\n", pci_dev->size[0]);
RSHIM_ERR("BAR[0] size 0x%x too small\n", (int)pci_dev->size[0]);
goto rshim_map_failed;
}

Expand Down Expand Up @@ -440,21 +440,25 @@ static int rshim_pcie_probe(struct pci_dev *pci_dev)
return ret;
}

void rshim_pcie_enable(void *dev)
int rshim_pcie_enable(void *dev)
{
#ifdef __linux__
char name[256];
int fd;
struct pci_dev *pci_dev = (struct pci_dev *)dev;

snprintf(name, sizeof(name), "%s/%04x:%02x:%02x.%1u/enable",
SYS_BUS_PCI, pci_dev->domain, pci_dev->bus,
pci_dev->dev, pci_dev->func);
fd = open( name, O_RDWR | O_CLOEXEC);
if (fd == -1)
return;
write( fd, "1", 1 );
close(fd);
struct pci_dev *pci_dev = (struct pci_dev *)dev;
char name[256];
int fd, rc;

snprintf(name, sizeof(name), "%s/%04x:%02x:%02x.%1u/enable",
SYS_BUS_PCI, pci_dev->domain, pci_dev->bus,
pci_dev->dev, pci_dev->func);
fd = open(name, O_RDWR | O_CLOEXEC);
if (fd == -1)
return -errno;

if (write(fd, "1", 1) < 0)
rc = -errno;

close(fd);
return rc;
#endif
}

Expand Down

0 comments on commit 257a860

Please sign in to comment.