Altera TSE: Misc driver updates
Subsystems (3)
cover Altera TSE: Misc driver updates
This series adds a version number to the driver's get regs routine invoked by ethool, corrects an issue detected by the kbuild test robot, and addresses a couple of minor typo errors.
Please apply this series.
Thank you
Vince
Vince Bridgers (3):
Altera TSE: Set version number by driver's get regs Altera TSE: Correct typecast issue detected by kbuild test robot Altera TSE: Correct two typos in original submission
drivers/net/ethernet/altera/altera_sgdma.c | 16 +++++++--------- drivers/net/ethernet/altera/altera_tse_ethtool.c | 8 ++++++++ 2 files changed, 15 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/3 Altera TSE: Set version number by driver's get regs
Set the version number returned by the driver's get regs routine invoked by ethtool so formatting can be dependent on the version number returned, and any interesting formatted output can check the version number for specific types of register data returned.
--- drivers/net/ethernet/altera/altera_tse_ethtool.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/altera/altera_tse_ethtool.c +8 -0
@@ -181,6 +181,14 @@ static void tse_get_regs(struct net_device *dev, struct ethtool_regs *regs,u32 *tse_mac_regs = (u32 *)priv->mac_dev;u32 *buf = regbuf; +/* Set version to a known value, so ethtool knows +* how to do any special formatting of this data. +* This version number will need to change if and +* when this register table is changed. +*/ + + regs->version =1 ; +for (i =0 ; i <TSE_NUM_REGS ; i++) buf[i] =ioread32 (&tse_mac_regs[i]); }
Signature · 1 line
1.7.9.5
Re: [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs
From: Vince Bridgers <[email protected]>
Date: Thu, 20 Mar 2014 20:43:15 -0500
Quoted 6 lines
Set the version number returned by the driver's get regs routine invoked by ethtool so formatting can be dependent on the version number returned, and any interesting formatted output can check the version number for specific types of register data returned.
Signed-off-by Vince Bridgers <[email protected]>
Applied.
PATCH 2/3 Altera TSE: Correct typecast issue detected by kbuild test robot
In reply to Vince BridgersThis patch addresses a portable pointer arithmetic issue in the original submission found by the kbuild test robot.
config: make ARCH=i386 allyesconfig
altera_sgdma.c: In function 'sgdma_txphysaddr':
Quoted 2 lines
Quoted 2 lines
altera_sgdma.c:393:33: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
^Quoted 2 lines
Quoted 2 lines
altera_sgdma.c:394:5: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
(dma_addr_t)priv->tx_dma_desc);
^ altera_sgdma.c: In function 'sgdma_rxphysaddr':
Quoted 2 lines
Quoted 2 lines
altera_sgdma.c:403:33: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
^Quoted 2 lines
Quoted 2 lines
altera_sgdma.c:404:5: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
(dma_addr_t)priv->rx_dma_desc);
^--- drivers/net/ethernet/altera/altera_sgdma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/net/ethernet/altera/altera_sgdma.c +4 -6
@@ -390,9 +390,8 @@ sgdma_txphysaddr(struct altera_tse_private *priv, struct sgdma_descrip *desc) {dma_addr_t paddr = priv->txdescmem_busaddr; -dma_addr_t offs = (dma_addr_t)((dma_addr_t )desc - - (dma_addr_t )priv->tx_dma_desc); -return paddr + offs; +uintptr_t offs = (uintptr_t )desc - (uintptr_t )priv->tx_dma_desc; +return (dma_addr_t)((uintptr_t )paddr + offs); } static dma_addr_t
@@ -400,9 +399,8 @@ sgdma_rxphysaddr(struct altera_tse_private *priv, struct sgdma_descrip *desc) {dma_addr_t paddr = priv->rxdescmem_busaddr; -dma_addr_t offs = (dma_addr_t)((dma_addr_t )desc - - (dma_addr_t )priv->rx_dma_desc); -return paddr + offs; +uintptr_t offs = (uintptr_t )desc - (uintptr_t )priv->rx_dma_desc; +return (dma_addr_t)((uintptr_t )paddr + offs); }#define list_remove_head (list, entry, type, member) \
Signature · 1 line
1.7.9.5
Re: [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot
From: Vince Bridgers <[email protected]>
Date: Thu, 20 Mar 2014 20:43:16 -0500
Quoted 4 lines
This patch addresses a portable pointer arithmetic issue in the original submission found by the kbuild test robot.
config: make ARCH=i386 allyesconfig
...
Quoted 2 lines
Reported-by kbuild test robot <[email protected]>Signed-off-by Vince Bridgers <[email protected]>
Applied.
PATCH 3/3 Altera TSE: Correct two typos in original submission
In reply to Vince BridgersThis patch addresses two typos in the original driver submission. One derived from a cut & paste error, and another is a misspelling.
--- drivers/net/ethernet/altera/altera_sgdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/altera/altera_sgdma.c +3 -3
@@ -84,8 +84,8 @@ int sgdma_initialize(struct altera_tse_private *priv)return -EINVAL ; } - priv->txdescphys =dma_map_single (priv->device, priv->rx_dma_desc, - priv->rxdescmem,DMA_TO_DEVICE ); + priv->txdescphys =dma_map_single (priv->device, priv->tx_dma_desc, + priv->txdescmem,DMA_TO_DEVICE );if (dma_mapping_error (priv->device, priv->txdescphys)) {sgdma_uninitialize (priv);
@@ -340,7 +340,7 @@ static int sgdma_async_read(struct altera_tse_private *priv)/* clear control and status */ iowrite32 (0 , &csr->control); -/* If statuc available, clear those bits */ +/* If status available, clear those bits */ if (sts &0xf )iowrite32 (0xf , &csr->status);
Signature · 1 line
1.7.9.5
Re: [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission
From: Vince Bridgers <[email protected]>
Date: Thu, 20 Mar 2014 20:43:17 -0500
Quoted 4 lines
This patch addresses two typos in the original driver submission. One derived from a cut & paste error, and another is a misspelling.
Signed-off-by Vince Bridgers <[email protected]>
Applied.