mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Rename mlx5_fwdump_addr to more neutral mlx5_tool_addr in mlx5core.
Submitted by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies
This commit is contained in:
parent
20a63539d6
commit
b255ca093a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347287
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 20, 2018
|
||||
.Dd May 7, 2019
|
||||
.Dt mlx5io 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -55,10 +55,10 @@ far, or existing dump cleared with the
|
||||
.Dv MLX5_FWDUMP_RESET
|
||||
command for the specified device.
|
||||
The argument for the command should point to the
|
||||
.Vt struct mlx5_fwdump_addr
|
||||
.Vt struct mlx5_tool_addr
|
||||
structure, containing the PCIe bus address of the device.
|
||||
.Bd -literal
|
||||
struct mlx5_fwdump_addr {
|
||||
struct mlx5_tool_addr {
|
||||
uint32_t domain;
|
||||
uint8_t bus;
|
||||
uint8_t slot;
|
||||
@ -69,7 +69,7 @@ struct mlx5_fwdump_addr {
|
||||
Clear the stored firmware dump, preparing the kernel buffer for
|
||||
the next dump.
|
||||
The argument for the command should point to the
|
||||
.Vt struct mlx5_fwdump_addr
|
||||
.Vt struct mlx5_tool_addr
|
||||
structure, containing the PCIe bus address of the device.
|
||||
.It Dv MLX5_FWDUMP_GET
|
||||
Fetch the stored firmware dump into the user memory.
|
||||
@ -88,7 +88,7 @@ in the
|
||||
field.
|
||||
.Bd -literal
|
||||
struct mlx5_fwdump_get {
|
||||
struct mlx5_fwdump_addr devaddr;
|
||||
struct mlx5_tool_addr devaddr;
|
||||
struct mlx5_fwdump_reg *buf;
|
||||
size_t reg_cnt;
|
||||
size_t reg_filled; /* out */
|
||||
|
@ -170,7 +170,7 @@ mlx5_fwdump_clean(struct mlx5_core_dev *mdev)
|
||||
}
|
||||
|
||||
static int
|
||||
mlx5_dbsf_to_core(const struct mlx5_fwdump_addr *devaddr,
|
||||
mlx5_dbsf_to_core(const struct mlx5_tool_addr *devaddr,
|
||||
struct mlx5_core_dev **mdev)
|
||||
{
|
||||
device_t dev;
|
||||
@ -231,7 +231,7 @@ mlx5_fwdump_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
|
||||
{
|
||||
struct mlx5_core_dev *mdev;
|
||||
struct mlx5_fwdump_get *fwg;
|
||||
struct mlx5_fwdump_addr *devaddr;
|
||||
struct mlx5_tool_addr *devaddr;
|
||||
struct mlx5_dump_data *dd;
|
||||
int error;
|
||||
|
||||
@ -254,7 +254,7 @@ mlx5_fwdump_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
|
||||
error = EBADF;
|
||||
break;
|
||||
}
|
||||
devaddr = (struct mlx5_fwdump_addr *)data;
|
||||
devaddr = (struct mlx5_tool_addr *)data;
|
||||
error = mlx5_dbsf_to_core(devaddr, &mdev);
|
||||
if (error != 0)
|
||||
break;
|
||||
@ -269,7 +269,7 @@ mlx5_fwdump_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
|
||||
error = EBADF;
|
||||
break;
|
||||
}
|
||||
devaddr = (struct mlx5_fwdump_addr *)data;
|
||||
devaddr = (struct mlx5_tool_addr *)data;
|
||||
error = mlx5_dbsf_to_core(devaddr, &mdev);
|
||||
if (error != 0)
|
||||
break;
|
||||
|
@ -35,7 +35,7 @@ struct mlx5_fwdump_reg {
|
||||
uint32_t val;
|
||||
};
|
||||
|
||||
struct mlx5_fwdump_addr {
|
||||
struct mlx5_tool_addr {
|
||||
uint32_t domain;
|
||||
uint8_t bus;
|
||||
uint8_t slot;
|
||||
@ -43,15 +43,15 @@ struct mlx5_fwdump_addr {
|
||||
};
|
||||
|
||||
struct mlx5_fwdump_get {
|
||||
struct mlx5_fwdump_addr devaddr;
|
||||
struct mlx5_tool_addr devaddr;
|
||||
struct mlx5_fwdump_reg *buf;
|
||||
size_t reg_cnt;
|
||||
size_t reg_filled; /* out */
|
||||
};
|
||||
|
||||
#define MLX5_FWDUMP_GET _IOWR('m', 1, struct mlx5_fwdump_get)
|
||||
#define MLX5_FWDUMP_RESET _IOW('m', 2, struct mlx5_fwdump_addr)
|
||||
#define MLX5_FWDUMP_FORCE _IOW('m', 3, struct mlx5_fwdump_addr)
|
||||
#define MLX5_FWDUMP_RESET _IOW('m', 2, struct mlx5_tool_addr)
|
||||
#define MLX5_FWDUMP_FORCE _IOW('m', 3, struct mlx5_tool_addr)
|
||||
|
||||
#ifndef _KERNEL
|
||||
#define MLX5_DEV_PATH _PATH_DEV"mlx5ctl"
|
||||
|
@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
/* stolen from pciconf.c: parsesel() */
|
||||
static int
|
||||
parse_pci_addr(const char *addrstr, struct mlx5_fwdump_addr *addr)
|
||||
parse_pci_addr(const char *addrstr, struct mlx5_tool_addr *addr)
|
||||
{
|
||||
char *eppos;
|
||||
unsigned long selarr[4];
|
||||
@ -73,7 +73,7 @@ parse_pci_addr(const char *addrstr, struct mlx5_fwdump_addr *addr)
|
||||
}
|
||||
|
||||
static int
|
||||
mlx5tool_save_dump(int ctldev, const struct mlx5_fwdump_addr *addr,
|
||||
mlx5tool_save_dump(int ctldev, const struct mlx5_tool_addr *addr,
|
||||
const char *dumpname)
|
||||
{
|
||||
struct mlx5_fwdump_get fdg;
|
||||
@ -123,7 +123,7 @@ mlx5tool_save_dump(int ctldev, const struct mlx5_fwdump_addr *addr,
|
||||
}
|
||||
|
||||
static int
|
||||
mlx5tool_dump_reset(int ctldev, const struct mlx5_fwdump_addr *addr)
|
||||
mlx5tool_dump_reset(int ctldev, const struct mlx5_tool_addr *addr)
|
||||
{
|
||||
|
||||
if (ioctl(ctldev, MLX5_FWDUMP_RESET, addr) == -1) {
|
||||
@ -134,7 +134,7 @@ mlx5tool_dump_reset(int ctldev, const struct mlx5_fwdump_addr *addr)
|
||||
}
|
||||
|
||||
static int
|
||||
mlx5tool_dump_force(int ctldev, const struct mlx5_fwdump_addr *addr)
|
||||
mlx5tool_dump_force(int ctldev, const struct mlx5_tool_addr *addr)
|
||||
{
|
||||
|
||||
if (ioctl(ctldev, MLX5_FWDUMP_FORCE, addr) == -1) {
|
||||
@ -166,7 +166,7 @@ enum mlx5_action {
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct mlx5_fwdump_addr addr;
|
||||
struct mlx5_tool_addr addr;
|
||||
char *dumpname;
|
||||
char *addrstr;
|
||||
int c, ctldev, res;
|
||||
|
Loading…
Reference in New Issue
Block a user