Example #1
0
static int be_get_dump_len(struct be_adapter *adapter)
{
    u32 dump_size = 0;

    if (lancer_chip(adapter))
        dump_size = lancer_cmd_get_file_len(adapter,
                                            LANCER_FW_DUMP_FILE);
    else
        dump_size = adapter->fat_dump_len;

    return dump_size;
}
Example #2
0
static int be_read_dump_data(struct be_adapter *adapter, u32 dump_len,
                             void *buf)
{
    int status = 0;

    if (lancer_chip(adapter))
        status = lancer_cmd_read_file(adapter, LANCER_FW_DUMP_FILE,
                                      dump_len, buf);
    else
        status = be_cmd_get_fat_dump(adapter, dump_len, buf);

    return status;
}
Example #3
0
static void
be_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *buf)
{
	struct be_adapter *adapter = netdev_priv(netdev);

	if (be_physfn(adapter)) {
		memset(buf, 0, regs->len);
		if (lancer_chip(adapter))
			lancer_cmd_read_file(adapter, LANCER_FW_DUMP_FILE,
					     regs->len, buf);
		else
			be_cmd_get_regs(adapter, regs->len, buf);
	}
}
static int
be_get_reg_len(struct net_device *netdev)
{
	struct be_adapter *adapter = netdev_priv(netdev);
	u32 log_size = 0;

	if (be_physfn(adapter)) {
		if (lancer_chip(adapter))
			log_size = lancer_cmd_get_file_len(adapter,
					LANCER_FW_DUMP_FILE);
		else
			be_cmd_get_reg_len(adapter, &log_size);
	}
	return log_size;
}