* [PATCH 1/4] stmmac: remove two useless initialisation
@ 2012-05-23 6:36 Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 2/4] stmmac: fix driver's doc when run kernel-doc script Giuseppe CAVALLARO
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Giuseppe CAVALLARO @ 2012-05-23 6:36 UTC (permalink / raw)
To: netdev; +Cc: Giuseppe Cavallaro
This patch removes two useful initialisation in the
stmmac_rx and stmmac_tx function.
In the former, count var was already reset and in the
stmmac_tx we only need to increment the dirty pointer
w/o setting the entry var.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7096633..0caae72 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -677,7 +677,7 @@ static void stmmac_tx(struct stmmac_priv *priv)
priv->hw->desc->release_tx_desc(p);
- entry = (++priv->dirty_tx) % txsize;
+ priv->dirty_tx++;
}
if (unlikely(netif_queue_stopped(priv->dev) &&
stmmac_tx_avail(priv) > STMMAC_TX_THRESH(priv))) {
@@ -1307,7 +1307,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
display_ring(priv->dma_rx, rxsize);
}
#endif
- count = 0;
while (!priv->hw->desc->get_rx_owner(p)) {
int status;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] stmmac: fix driver's doc when run kernel-doc script
2012-05-23 6:36 [PATCH 1/4] stmmac: remove two useless initialisation Giuseppe CAVALLARO
@ 2012-05-23 6:36 ` Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 3/4] stmmac: fix driver Kconfig when built as module Giuseppe CAVALLARO
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Giuseppe CAVALLARO @ 2012-05-23 6:36 UTC (permalink / raw)
To: netdev; +Cc: Giuseppe Cavallaro
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 0caae72..18ed878 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -833,8 +833,9 @@ static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv)
/**
* stmmac_selec_desc_mode
- * @dev : device pointer
- * Description: select the Enhanced/Alternate or Normal descriptors */
+ * @priv : private structure
+ * Description: select the Enhanced/Alternate or Normal descriptors
+ */
static void stmmac_selec_desc_mode(struct stmmac_priv *priv)
{
if (priv->plat->enh_desc) {
@@ -1860,6 +1861,8 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
/**
* stmmac_dvr_probe
* @device: device pointer
+ * @plat_dat: platform data pointer
+ * @addr: iobase memory address
* Description: this is the main probe function used to
* call the alloc_etherdev, allocate the priv structure.
*/
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] stmmac: fix driver Kconfig when built as module
2012-05-23 6:36 [PATCH 1/4] stmmac: remove two useless initialisation Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 2/4] stmmac: fix driver's doc when run kernel-doc script Giuseppe CAVALLARO
@ 2012-05-23 6:36 ` Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 4/4] stmmac: update driver's doc Giuseppe CAVALLARO
2012-05-23 6:42 ` [PATCH 1/4] stmmac: remove two useless initialisation David Miller
3 siblings, 0 replies; 6+ messages in thread
From: Giuseppe CAVALLARO @ 2012-05-23 6:36 UTC (permalink / raw)
To: netdev; +Cc: Giuseppe Cavallaro, Rayagond Kokatanur
This patches fixes the driver when built as dyn module.
In fact the platform part cannot be built and the probe fails
(thanks to Bob Liu that reported this bug).
The patch also makes the selection of Platform and PCI parts
mutually exclusive.
Reported-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
---
drivers/net/ethernet/stmicro/stmmac/Kconfig | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index 0364283..3318b32 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -12,10 +12,12 @@ config STMMAC_ETH
if STMMAC_ETH
+choice
+ prompt "STMMAC bus support"
+
config STMMAC_PLATFORM
- tristate "STMMAC platform bus support"
+ bool "Platform bus support"
depends on STMMAC_ETH
- default y
---help---
This selects the platform specific bus support for
the stmmac device driver. This is the driver used
@@ -26,7 +28,7 @@ config STMMAC_PLATFORM
If unsure, say N.
config STMMAC_PCI
- tristate "STMMAC support on PCI bus (EXPERIMENTAL)"
+ bool "PCI bus support (EXPERIMENTAL)"
depends on STMMAC_ETH && PCI && EXPERIMENTAL
---help---
This is to select the Synopsys DWMAC available on PCI devices,
@@ -36,6 +38,7 @@ config STMMAC_PCI
D1215994A VIRTEX FPGA board.
If unsure, say N.
+endchoice
config STMMAC_DEBUG_FS
bool "Enable monitoring via sysFS "
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] stmmac: update driver's doc
2012-05-23 6:36 [PATCH 1/4] stmmac: remove two useless initialisation Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 2/4] stmmac: fix driver's doc when run kernel-doc script Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 3/4] stmmac: fix driver Kconfig when built as module Giuseppe CAVALLARO
@ 2012-05-23 6:36 ` Giuseppe CAVALLARO
2012-05-23 6:42 ` [PATCH 1/4] stmmac: remove two useless initialisation David Miller
3 siblings, 0 replies; 6+ messages in thread
From: Giuseppe CAVALLARO @ 2012-05-23 6:36 UTC (permalink / raw)
To: netdev; +Cc: Giuseppe Cavallaro
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
Documentation/networking/stmmac.txt | 44 +++++++++++++++++++---------------
1 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index ab1e8d7..5cb9a19 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -10,8 +10,8 @@ Currently this network device driver is for all STM embedded MAC/GMAC
(i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000
FF1152AMT0221 D1215994A VIRTEX FPGA board.
-DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether MAC 10/100
-Universal version 4.0 have been used for developing this driver.
+DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether
+MAC 10/100 Universal version 4.0 have been used for developing this driver.
This driver supports both the platform bus and PCI.
@@ -54,27 +54,27 @@ net_device structure enabling the scatter/gather feature.
When one or more packets are received, an interrupt happens. The interrupts
are not queued so the driver has to scan all the descriptors in the ring during
the receive process.
-This is based on NAPI so the interrupt handler signals only if there is work to be
-done, and it exits.
+This is based on NAPI so the interrupt handler signals only if there is work
+to be done, and it exits.
Then the poll method will be scheduled at some future point.
The incoming packets are stored, by the DMA, in a list of pre-allocated socket
buffers in order to avoid the memcpy (Zero-copy).
4.3) Timer-Driver Interrupt
-Instead of having the device that asynchronously notifies the frame receptions, the
-driver configures a timer to generate an interrupt at regular intervals.
-Based on the granularity of the timer, the frames that are received by the device
-will experience different levels of latency. Some NICs have dedicated timer
-device to perform this task. STMMAC can use either the RTC device or the TMU
-channel 2 on STLinux platforms.
+Instead of having the device that asynchronously notifies the frame receptions,
+the driver configures a timer to generate an interrupt at regular intervals.
+Based on the granularity of the timer, the frames that are received by the
+device will experience different levels of latency. Some NICs have dedicated
+timer device to perform this task. STMMAC can use either the RTC device or the
+TMU channel 2 on STLinux platforms.
The timers frequency can be passed to the driver as parameter; when change it,
take care of both hardware capability and network stability/performance impact.
-Several performance tests on STM platforms showed this optimisation allows to spare
-the CPU while having the maximum throughput.
+Several performance tests on STM platforms showed this optimisation allows to
+spare the CPU while having the maximum throughput.
4.4) WOL
-Wake up on Lan feature through Magic and Unicast frames are supported for the GMAC
-core.
+Wake up on Lan feature through Magic and Unicast frames are supported for the
+GMAC core.
4.5) DMA descriptors
Driver handles both normal and enhanced descriptors. The latter has been only
@@ -106,7 +106,8 @@ Several driver's information can be passed through the platform
These are included in the include/linux/stmmac.h header file
and detailed below as well:
- struct plat_stmmacenet_data {
+struct plat_stmmacenet_data {
+ char *phy_bus_name;
int bus_id;
int phy_addr;
int interface;
@@ -124,19 +125,24 @@ and detailed below as well:
void (*bus_setup)(void __iomem *ioaddr);
int (*init)(struct platform_device *pdev);
void (*exit)(struct platform_device *pdev);
+ void *custom_cfg;
+ void *custom_data;
void *bsp_priv;
};
Where:
+ o phy_bus_name: phy bus name to attach to the stmmac.
o bus_id: bus identifier.
o phy_addr: the physical address can be passed from the platform.
If it is set to -1 the driver will automatically
detect it at run-time by probing all the 32 addresses.
o interface: PHY device's interface.
o mdio_bus_data: specific platform fields for the MDIO bus.
- o pbl: the Programmable Burst Length is maximum number of beats to
+ o dma_cfg: internal DMA parameters
+ o pbl: the Programmable Burst Length is maximum number of beats to
be transferred in one DMA transaction.
GMAC also enables the 4xPBL by default.
+ o fixed_burst/mixed_burst/burst_len
o clk_csr: fixed CSR Clock range selection.
o has_gmac: uses the GMAC core.
o enh_desc: if sets the MAC will use the enhanced descriptor structure.
@@ -160,8 +166,9 @@ Where:
this is sometime necessary on some platforms (e.g. ST boxes)
where the HW needs to have set some PIO lines or system cfg
registers.
- o custom_cfg: this is a custom configuration that can be passed while
- initialising the resources.
+ o custom_cfg/custom_data: this is a custom configuration that can be passed
+ while initialising the resources.
+ o bsp_priv: another private poiter.
For MDIO bus The we have:
@@ -180,7 +187,6 @@ Where:
o irqs: list of IRQs, one per PHY.
o probed_phy_irq: if irqs is NULL, use this for probed PHY.
-
For DMA engine we have the following internal fields that should be
tuned according to the HW capabilities.
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] stmmac: remove two useless initialisation
2012-05-23 6:36 [PATCH 1/4] stmmac: remove two useless initialisation Giuseppe CAVALLARO
` (2 preceding siblings ...)
2012-05-23 6:36 ` [PATCH 4/4] stmmac: update driver's doc Giuseppe CAVALLARO
@ 2012-05-23 6:42 ` David Miller
2012-05-23 7:38 ` Giuseppe CAVALLARO
3 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2012-05-23 6:42 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev
You really need to post your patches properly.
In particular, you need to indicate, either in an initial "[PATCH 0/N]"
posting, or in the subject lines of that patch, exactly what tree
you are targetting.
And if this is meant for net-next, I told you specifically that net-next
is not open right now and you need to submit this later when I make
the announcement here that it is open.
We are in the middle of the merge window, and therefore you should only
be submitting bug fixes against the 'net' tree.
It is extremely irritating that, when I go out of my way to make
announcements here on this list, multiple times, about what kind of
patches are appropriate and what kinds are not, and yet people still
do not listen and they still submit any old crap they feel like
submitting.
People need to stop this, now.
Pay attention to the development state, and follow the rules,
otherwise you'll royally piss me off and I'll ignore your patches
completely.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] stmmac: remove two useless initialisation
2012-05-23 6:42 ` [PATCH 1/4] stmmac: remove two useless initialisation David Miller
@ 2012-05-23 7:38 ` Giuseppe CAVALLARO
0 siblings, 0 replies; 6+ messages in thread
From: Giuseppe CAVALLARO @ 2012-05-23 7:38 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On 5/23/2012 8:42 AM, David Miller wrote:
>
> You really need to post your patches properly.
>
> In particular, you need to indicate, either in an initial "[PATCH 0/N]"
> posting, or in the subject lines of that patch, exactly what tree
> you are targetting.
>
> And if this is meant for net-next, I told you specifically that net-next
> is not open right now and you need to submit this later when I make
> the announcement here that it is open.
>
> We are in the middle of the merge window, and therefore you should only
> be submitting bug fixes against the 'net' tree.
Previous ones were for net-next and in fact in the subject I indeed used:
[net-next X/N] stmmac: ....
After your comment I re-sent them for net.git (pls see my previous email
where I clarified that).
I have always posted all my patches for net-next adding its suffix in
the subject.
For all the patches for net.git I've never added the suffix but I'll do
that.
I agree with you that the suffix should be added and I had understood
(and always used and fixed in my subjectprefix) that these were the
format of the patches in this mailing list
[PATCH] ... =>>> for net.git
[PATCH net-next] =>>> for net-next.git
So I'll use starting from now:
[PATCH (net.git)] =>>> for net.git
[PATCH (net-next)] =>>> for net-next.git
> It is extremely irritating that, when I go out of my way to make
> announcements here on this list, multiple times, about what kind of
> patches are appropriate and what kinds are not, and yet people still
> do not listen and they still submit any old crap they feel like
> submitting.
>
> People need to stop this, now.
>
> Pay attention to the development state, and follow the rules,
> otherwise you'll royally piss me off and I'll ignore your patches
> completely.
>
> Thanks.
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-23 7:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-23 6:36 [PATCH 1/4] stmmac: remove two useless initialisation Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 2/4] stmmac: fix driver's doc when run kernel-doc script Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 3/4] stmmac: fix driver Kconfig when built as module Giuseppe CAVALLARO
2012-05-23 6:36 ` [PATCH 4/4] stmmac: update driver's doc Giuseppe CAVALLARO
2012-05-23 6:42 ` [PATCH 1/4] stmmac: remove two useless initialisation David Miller
2012-05-23 7:38 ` Giuseppe CAVALLARO
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).