Commit 6c09b484 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'DPAA-FMan-driver-fixes'



Florinel Iordache says:

====================
DPAA FMan driver fixes

Here are several fixes for the DPAA FMan driver.

v2 changes:
* corrected patch 4 by removing the line added by mistake
* used longer fixes tags with the first 12 characters of the SHA-1 ID

v3 changes:
* remove the empty line inserted after fixes tag
====================

Acked-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f2e0b29a 3207f715
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1398,8 +1398,7 @@ static void enable_time_stamp(struct fman *fman)
{
	struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs;
	u16 fm_clk_freq = fman->state->fm_clk_freq;
	u32 tmp, intgr, ts_freq;
	u64 frac;
	u32 tmp, intgr, ts_freq, frac;

	ts_freq = (u32)(1 << fman->state->count1_micro_bit);
	/* configure timestamp so that bit 8 will count 1 microsecond
+2 −2
Original line number Diff line number Diff line
@@ -1200,7 +1200,7 @@ int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr)
		list_for_each(pos,
			      &dtsec->multicast_addr_hash->lsts[bucket]) {
			hash_entry = ETH_HASH_ENTRY_OBJ(pos);
			if (hash_entry->addr == addr) {
			if (hash_entry && hash_entry->addr == addr) {
				list_del_init(&hash_entry->node);
				kfree(hash_entry);
				break;
@@ -1213,7 +1213,7 @@ int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr)
		list_for_each(pos,
			      &dtsec->unicast_addr_hash->lsts[bucket]) {
			hash_entry = ETH_HASH_ENTRY_OBJ(pos);
			if (hash_entry->addr == addr) {
			if (hash_entry && hash_entry->addr == addr) {
				list_del_init(&hash_entry->node);
				kfree(hash_entry);
				break;
+1 −1
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ static inline struct eth_hash_t *alloc_hash_table(u16 size)
	struct eth_hash_t *hash;

	/* Allocate address hash table */
	hash = kmalloc_array(size, sizeof(struct eth_hash_t *), GFP_KERNEL);
	hash = kmalloc(sizeof(*hash), GFP_KERNEL);
	if (!hash)
		return NULL;

+1 −2
Original line number Diff line number Diff line
@@ -852,7 +852,6 @@ int memac_set_tx_pause_frames(struct fman_mac *memac, u8 priority,

	tmp = ioread32be(&regs->command_config);
	tmp &= ~CMD_CFG_PFC_MODE;
	priority = 0;

	iowrite32be(tmp, &regs->command_config);

@@ -982,7 +981,7 @@ int memac_del_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr)

	list_for_each(pos, &memac->multicast_addr_hash->lsts[hash]) {
		hash_entry = ETH_HASH_ENTRY_OBJ(pos);
		if (hash_entry->addr == addr) {
		if (hash_entry && hash_entry->addr == addr) {
			list_del_init(&hash_entry->node);
			kfree(hash_entry);
			break;
+8 −1
Original line number Diff line number Diff line
@@ -1767,6 +1767,7 @@ static int fman_port_probe(struct platform_device *of_dev)
	struct fman_port *port;
	struct fman *fman;
	struct device_node *fm_node, *port_node;
	struct platform_device *fm_pdev;
	struct resource res;
	struct resource *dev_res;
	u32 val;
@@ -1791,8 +1792,14 @@ static int fman_port_probe(struct platform_device *of_dev)
		goto return_err;
	}

	fman = dev_get_drvdata(&of_find_device_by_node(fm_node)->dev);
	fm_pdev = of_find_device_by_node(fm_node);
	of_node_put(fm_node);
	if (!fm_pdev) {
		err = -EINVAL;
		goto return_err;
	}

	fman = dev_get_drvdata(&fm_pdev->dev);
	if (!fman) {
		err = -EINVAL;
		goto return_err;
Loading