* [PATCH net-next 0/3] Altera TSE: Misc driver updates
@ 2014-03-21 1:43 Vince Bridgers
2014-03-21 1:43 ` [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs Vince Bridgers
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Vince Bridgers @ 2014-03-21 1:43 UTC (permalink / raw)
To: netdev; +Cc: vbridgers2013
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(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs
2014-03-21 1:43 [PATCH net-next 0/3] Altera TSE: Misc driver updates Vince Bridgers
@ 2014-03-21 1:43 ` Vince Bridgers
2014-03-21 19:36 ` David Miller
2014-03-21 1:43 ` [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot Vince Bridgers
2014-03-21 1:43 ` [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission Vince Bridgers
2 siblings, 1 reply; 7+ messages in thread
From: Vince Bridgers @ 2014-03-21 1:43 UTC (permalink / raw)
To: netdev; +Cc: vbridgers2013
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 <vbridgers2013@gmail.com>
---
drivers/net/ethernet/altera/altera_tse_ethtool.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/altera/altera_tse_ethtool.c b/drivers/net/ethernet/altera/altera_tse_ethtool.c
index 63ac5f4..319ca74 100644
--- a/drivers/net/ethernet/altera/altera_tse_ethtool.c
+++ b/drivers/net/ethernet/altera/altera_tse_ethtool.c
@@ -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]);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot
2014-03-21 1:43 [PATCH net-next 0/3] Altera TSE: Misc driver updates Vince Bridgers
2014-03-21 1:43 ` [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs Vince Bridgers
@ 2014-03-21 1:43 ` Vince Bridgers
2014-03-21 19:37 ` David Miller
2014-03-21 1:43 ` [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission Vince Bridgers
2 siblings, 1 reply; 7+ messages in thread
From: Vince Bridgers @ 2014-03-21 1:43 UTC (permalink / raw)
To: netdev; +Cc: vbridgers2013
This 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':
>> 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 -
^
>> 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':
>> 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 -
^
>> 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);
^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
---
drivers/net/ethernet/altera/altera_sgdma.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/altera/altera_sgdma.c b/drivers/net/ethernet/altera/altera_sgdma.c
index cbeee07..ebc4840 100644
--- a/drivers/net/ethernet/altera/altera_sgdma.c
+++ b/drivers/net/ethernet/altera/altera_sgdma.c
@@ -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) \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission
2014-03-21 1:43 [PATCH net-next 0/3] Altera TSE: Misc driver updates Vince Bridgers
2014-03-21 1:43 ` [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs Vince Bridgers
2014-03-21 1:43 ` [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot Vince Bridgers
@ 2014-03-21 1:43 ` Vince Bridgers
2014-03-21 19:37 ` David Miller
2 siblings, 1 reply; 7+ messages in thread
From: Vince Bridgers @ 2014-03-21 1:43 UTC (permalink / raw)
To: netdev; +Cc: vbridgers2013
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 <vbridgers2013@gmail.com>
---
drivers/net/ethernet/altera/altera_sgdma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/altera/altera_sgdma.c b/drivers/net/ethernet/altera/altera_sgdma.c
index ebc4840..0ee9663 100644
--- a/drivers/net/ethernet/altera/altera_sgdma.c
+++ b/drivers/net/ethernet/altera/altera_sgdma.c
@@ -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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs
2014-03-21 1:43 ` [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs Vince Bridgers
@ 2014-03-21 19:36 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-03-21 19:36 UTC (permalink / raw)
To: vbridgers2013; +Cc: netdev
From: Vince Bridgers <vbridgers2013@gmail.com>
Date: Thu, 20 Mar 2014 20:43:15 -0500
> 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 <vbridgers2013@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot
2014-03-21 1:43 ` [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot Vince Bridgers
@ 2014-03-21 19:37 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-03-21 19:37 UTC (permalink / raw)
To: vbridgers2013; +Cc: netdev
From: Vince Bridgers <vbridgers2013@gmail.com>
Date: Thu, 20 Mar 2014 20:43:16 -0500
> This patch addresses a portable pointer arithmetic issue in the
> original submission found by the kbuild test robot.
>
> config: make ARCH=i386 allyesconfig
...
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission
2014-03-21 1:43 ` [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission Vince Bridgers
@ 2014-03-21 19:37 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-03-21 19:37 UTC (permalink / raw)
To: vbridgers2013; +Cc: netdev
From: Vince Bridgers <vbridgers2013@gmail.com>
Date: Thu, 20 Mar 2014 20:43:17 -0500
> 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 <vbridgers2013@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-21 19:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-21 1:43 [PATCH net-next 0/3] Altera TSE: Misc driver updates Vince Bridgers
2014-03-21 1:43 ` [PATCH net-next 1/3] Altera TSE: Set version number by driver's get regs Vince Bridgers
2014-03-21 19:36 ` David Miller
2014-03-21 1:43 ` [PATCH net-next 2/3] Altera TSE: Correct typecast issue detected by kbuild test robot Vince Bridgers
2014-03-21 19:37 ` David Miller
2014-03-21 1:43 ` [PATCH net-next 3/3] Altera TSE: Correct two typos in original submission Vince Bridgers
2014-03-21 19:37 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.