diff options
Diffstat (limited to 'kernel/drivers/net/ethernet/altera')
4 files changed, 5 insertions, 6 deletions
diff --git a/kernel/drivers/net/ethernet/altera/altera_sgdma.c b/kernel/drivers/net/ethernet/altera/altera_sgdma.c index 580553d42..88ef67a99 100644 --- a/kernel/drivers/net/ethernet/altera/altera_sgdma.c +++ b/kernel/drivers/net/ethernet/altera/altera_sgdma.c @@ -71,8 +71,6 @@ int sgdma_initialize(struct altera_tse_private *priv) SGDMA_CTRLREG_INTEN | SGDMA_CTRLREG_ILASTD; - priv->sgdmadesclen = sizeof(struct sgdma_descrip); - INIT_LIST_HEAD(&priv->txlisthd); INIT_LIST_HEAD(&priv->rxlisthd); @@ -254,7 +252,7 @@ u32 sgdma_rx_status(struct altera_tse_private *priv) unsigned int pktstatus = 0; dma_sync_single_for_cpu(priv->device, priv->rxdescphys, - priv->sgdmadesclen, + SGDMA_DESC_LEN, DMA_FROM_DEVICE); pktlength = csrrd16(desc, sgdma_descroffs(bytes_xferred)); @@ -374,7 +372,7 @@ static int sgdma_async_read(struct altera_tse_private *priv) dma_sync_single_for_device(priv->device, priv->rxdescphys, - priv->sgdmadesclen, + SGDMA_DESC_LEN, DMA_TO_DEVICE); csrwr32(lower_32_bits(sgdma_rxphysaddr(priv, cdesc)), @@ -402,7 +400,7 @@ static int sgdma_async_write(struct altera_tse_private *priv, csrwr32(0x1f, priv->tx_dma_csr, sgdma_csroffs(status)); dma_sync_single_for_device(priv->device, priv->txdescphys, - priv->sgdmadesclen, DMA_TO_DEVICE); + SGDMA_DESC_LEN, DMA_TO_DEVICE); csrwr32(lower_32_bits(sgdma_txphysaddr(priv, desc)), priv->tx_dma_csr, diff --git a/kernel/drivers/net/ethernet/altera/altera_sgdmahw.h b/kernel/drivers/net/ethernet/altera/altera_sgdmahw.h index 85bc33b21..bbd52f023 100644 --- a/kernel/drivers/net/ethernet/altera/altera_sgdmahw.h +++ b/kernel/drivers/net/ethernet/altera/altera_sgdmahw.h @@ -50,6 +50,7 @@ struct sgdma_descrip { u8 control; } __packed; +#define SGDMA_DESC_LEN sizeof(struct sgdma_descrip) #define SGDMA_STATUS_ERR BIT(0) #define SGDMA_STATUS_LENGTH_ERR BIT(1) diff --git a/kernel/drivers/net/ethernet/altera/altera_tse.h b/kernel/drivers/net/ethernet/altera/altera_tse.h index 2adb24d45..103c30ddd 100644 --- a/kernel/drivers/net/ethernet/altera/altera_tse.h +++ b/kernel/drivers/net/ethernet/altera/altera_tse.h @@ -458,7 +458,6 @@ struct altera_tse_private { u32 rxctrlreg; dma_addr_t rxdescphys; dma_addr_t txdescphys; - size_t sgdmadesclen; struct list_head txlisthd; struct list_head rxlisthd; diff --git a/kernel/drivers/net/ethernet/altera/altera_tse_main.c b/kernel/drivers/net/ethernet/altera/altera_tse_main.c index 8207877d6..fe644823c 100644 --- a/kernel/drivers/net/ethernet/altera/altera_tse_main.c +++ b/kernel/drivers/net/ethernet/altera/altera_tse_main.c @@ -1517,6 +1517,7 @@ static int altera_tse_probe(struct platform_device *pdev) spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->rxdma_irq_lock); + netif_carrier_off(ndev); ret = register_netdev(ndev); if (ret) { dev_err(&pdev->dev, "failed to register TSE net device\n"); |