* [PATCH 1/5] stmmac: use mdelay on timeout of sw reset
@ 2011-11-17 7:57 Giuseppe CAVALLARO
2011-11-17 7:57 ` [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface Giuseppe CAVALLARO
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2011-11-17 7:57 UTC (permalink / raw)
To: netdev; +Cc: francesco.virlinzi, srinivas.kandagatla
From: Francesco Virlinzi <francesco.virlinzi@st.com>
This patch uses an mdelay to manage the timeout on
sw reset to be independant of cpu_clk.
Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
.../net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 3 ++-
drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
index da66ac5..4d5402a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
@@ -39,10 +39,11 @@ static int dwmac1000_dma_init(void __iomem *ioaddr, int pbl, u32 dma_tx,
/* DMA SW reset */
value |= DMA_BUS_MODE_SFT_RESET;
writel(value, ioaddr + DMA_BUS_MODE);
- limit = 15000;
+ limit = 10;
while (limit--) {
if (!(readl(ioaddr + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET))
break;
+ mdelay(10);
}
if (limit < 0)
return -EBUSY;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
index 627f656..bc17fd0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
@@ -41,10 +41,11 @@ static int dwmac100_dma_init(void __iomem *ioaddr, int pbl, u32 dma_tx,
/* DMA SW reset */
value |= DMA_BUS_MODE_SFT_RESET;
writel(value, ioaddr + DMA_BUS_MODE);
- limit = 15000;
+ limit = 10;
while (limit--) {
if (!(readl(ioaddr + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET))
break;
+ mdelay(10);
}
if (limit < 0)
return -EBUSY;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface
2011-11-17 7:57 [PATCH 1/5] stmmac: use mdelay on timeout of sw reset Giuseppe CAVALLARO
@ 2011-11-17 7:57 ` Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 7:58 ` [PATCH 3/5] stmmac: parameters auto-tuning through HW cap reg Giuseppe CAVALLARO
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2011-11-17 7:57 UTC (permalink / raw)
To: netdev; +Cc: francesco.virlinzi, srinivas.kandagatla
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
This patch fixes the way to stop the 1000Base advertising
capabilties for non GMII interfaces.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 20546bb..e079762 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -321,12 +321,10 @@ static int stmmac_init_phy(struct net_device *dev)
}
/* Stop Advertising 1000BASE Capability if interface is not GMII */
- if ((interface) && ((interface == PHY_INTERFACE_MODE_MII) ||
- (interface == PHY_INTERFACE_MODE_RMII))) {
- phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
- SUPPORTED_Asym_Pause);
- phydev->advertising = phydev->supported;
- }
+ if ((interface == PHY_INTERFACE_MODE_MII) ||
+ (interface == PHY_INTERFACE_MODE_RMII))
+ phydev->advertising &= ~(SUPPORTED_1000baseT_Half |
+ SUPPORTED_1000baseT_Full);
/*
* Broken HW is sometimes missing the pull-up resistor on the
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] stmmac: parameters auto-tuning through HW cap reg
2011-11-17 7:57 [PATCH 1/5] stmmac: use mdelay on timeout of sw reset Giuseppe CAVALLARO
2011-11-17 7:57 ` [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface Giuseppe CAVALLARO
@ 2011-11-17 7:58 ` Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 7:58 ` [PATCH 4/5] stmmac: remove spin_lock in stmmac_ioctl Giuseppe CAVALLARO
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2011-11-17 7:58 UTC (permalink / raw)
To: netdev; +Cc: francesco.virlinzi, srinivas.kandagatla, Giuseppe Cavallaro
New GMAC devices (newer than the databook 3.50a) have the
HW capability register that provides which features are actually
supported by the hardware.
On old devices many information have to be passed through the
platform, for example: enhanced descriptor structure,
TX COE etc. These are mandatory to properly configure the driver.
This remains still valid because the driver has to support old
Synopsys devices but now it's also able to override them using the
values from the HW capability register if supported.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +-
.../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 ++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 93 ++++++++++++++------
3 files changed, 72 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 9bafa6c..a140a8f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -72,7 +72,6 @@ struct stmmac_priv {
spinlock_t lock;
spinlock_t tx_lock;
int wolopts;
- int wolenabled;
int wol_irq;
#ifdef CONFIG_STMMAC_TIMER
struct stmmac_timer *tm;
@@ -80,6 +79,7 @@ struct stmmac_priv {
struct plat_stmmacenet_data *plat;
struct stmmac_counters mmc;
struct dma_features dma_cap;
+ int hw_cap_support;
};
extern int stmmac_mdio_unregister(struct net_device *ndev);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index e8eff09..0395f9e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -430,6 +430,12 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
struct stmmac_priv *priv = netdev_priv(dev);
u32 support = WAKE_MAGIC | WAKE_UCAST;
+ /* By default almost all GMAC devices support the WoL via
+ * magic frame but we can disable it if the HW capability
+ * register shows no support for pmt_magic_frame. */
+ if ((priv->hw_cap_support) && (!priv->dma_cap.pmt_magic_frame))
+ wol->wolopts &= ~WAKE_MAGIC;
+
if (!device_can_wakeup(priv->device))
return -EINVAL;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index e079762..7f3ffd3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -805,8 +805,29 @@ static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv)
return 0;
}
-/* New GMAC chips support a new register to indicate the
- * presence of the optional feature/functions.
+/**
+ * stmmac_selec_desc_mode
+ * @dev : device pointer
+ * Description: select the Enhanced/Alternate or Normal descriptors */
+static void stmmac_selec_desc_mode(struct stmmac_priv *priv)
+{
+ if (priv->plat->enh_desc) {
+ pr_info(" Enhanced/Alternate descriptors\n");
+ priv->hw->desc = &enh_desc_ops;
+ } else {
+ pr_info(" Normal descriptors\n");
+ priv->hw->desc = &ndesc_ops;
+ }
+}
+
+/**
+ * stmmac_get_hw_features
+ * @priv : private device pointer
+ * Description:
+ * new GMAC chip generations have a new register to indicate the
+ * presence of the optional feature/functions.
+ * This can be also used to override the value passed through the
+ * platform and necessary for old MAC10/100 and GMAC chips.
*/
static int stmmac_get_hw_features(struct stmmac_priv *priv)
{
@@ -827,7 +848,7 @@ static int stmmac_get_hw_features(struct stmmac_priv *priv)
(hw_cap & DMA_HW_FEAT_RWKSEL) >> 9;
priv->dma_cap.pmt_magic_frame =
(hw_cap & DMA_HW_FEAT_MGKSEL) >> 10;
- /*MMC*/
+ /* MMC */
priv->dma_cap.rmon = (hw_cap & DMA_HW_FEAT_MMCSEL) >> 11;
/* IEEE 1588-2002*/
priv->dma_cap.time_stamp =
@@ -855,8 +876,7 @@ static int stmmac_get_hw_features(struct stmmac_priv *priv)
priv->dma_cap.enh_desc =
(hw_cap & DMA_HW_FEAT_ENHDESSEL) >> 24;
- } else
- pr_debug("\tNo HW DMA feature register supported");
+ }
return hw_cap;
}
@@ -911,6 +931,44 @@ static int stmmac_open(struct net_device *dev)
goto open_error;
}
+ stmmac_get_synopsys_id(priv);
+
+ priv->hw_cap_support = stmmac_get_hw_features(priv);
+
+ if (priv->hw_cap_support) {
+ pr_info(" Support DMA HW capability register");
+
+ /* We can override some gmac/dma configuration fields: e.g.
+ * enh_desc, tx_coe (e.g. that are passed through the
+ * platform) with the values from the HW capability
+ * register (if supported).
+ */
+ priv->plat->enh_desc = priv->dma_cap.enh_desc;
+ priv->plat->tx_coe = priv->dma_cap.tx_coe;
+ priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up;
+
+ /* By default disable wol on magic frame if not supported */
+ if (!priv->dma_cap.pmt_magic_frame)
+ priv->wolopts &= ~WAKE_MAGIC;
+
+ } else
+ pr_info(" No HW DMA feature register supported");
+
+ /* Select the enhnaced/normal descriptor structures */
+ stmmac_selec_desc_mode(priv);
+
+ /* PMT module is not integrated in all the MAC devices. */
+ if (priv->plat->pmt) {
+ pr_info(" Remote wake-up capable\n");
+ device_set_wakeup_capable(priv->device, 1);
+ }
+
+ priv->rx_coe = priv->hw->mac->rx_coe(priv->ioaddr);
+ if (priv->rx_coe)
+ pr_info(" Checksum Offload Engine supported\n");
+ if (priv->plat->tx_coe)
+ pr_info(" Checksum insertion supported\n");
+
/* Create and initialize the TX/RX descriptors chains. */
priv->dma_tx_size = STMMAC_ALIGN(dma_txsize);
priv->dma_rx_size = STMMAC_ALIGN(dma_rxsize);
@@ -933,15 +991,6 @@ static int stmmac_open(struct net_device *dev)
/* Initialize the MAC Core */
priv->hw->mac->core_init(priv->ioaddr);
- stmmac_get_synopsys_id(priv);
-
- stmmac_get_hw_features(priv);
-
- priv->rx_coe = priv->hw->mac->rx_coe(priv->ioaddr);
- if (priv->rx_coe)
- pr_info("stmmac: Rx Checksum Offload Engine supported\n");
- if (priv->plat->tx_coe)
- pr_info("\tTX Checksum insertion supported\n");
netdev_update_features(dev);
/* Request the IRQ lines */
@@ -1556,7 +1605,7 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v)
struct net_device *dev = seq->private;
struct stmmac_priv *priv = netdev_priv(dev);
- if (!stmmac_get_hw_features(priv)) {
+ if (!priv->hw_cap_support) {
seq_printf(seq, "DMA HW features not supported\n");
return 0;
}
@@ -1764,12 +1813,6 @@ static int stmmac_mac_device_setup(struct net_device *dev)
if (!device)
return -ENOMEM;
- if (priv->plat->enh_desc) {
- device->desc = &enh_desc_ops;
- pr_info("\tEnhanced descriptor structure\n");
- } else
- device->desc = &ndesc_ops;
-
priv->hw = device;
priv->hw->ring = &ring_mode_ops;
@@ -1843,11 +1886,6 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
priv->ioaddr = addr;
- /* PMT module is not integrated in all the MAC devices. */
- if (plat_dat->pmt) {
- pr_info("\tPMT module supported\n");
- device_set_wakeup_capable(&pdev->dev, 1);
- }
/*
* On some platforms e.g. SPEAr the wake up irq differs from the mac irq
* The external wake up irq can be passed through the platform code
@@ -1860,7 +1898,6 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
if (priv->wol_irq == -ENXIO)
priv->wol_irq = ndev->irq;
-
platform_set_drvdata(pdev, ndev);
/* Set the I/O base addr */
@@ -1873,7 +1910,7 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
goto out_free_ndev;
}
- /* MAC HW revice detection */
+ /* MAC HW device detection */
ret = stmmac_mac_device_setup(ndev);
if (ret < 0)
goto out_plat_exit;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5] stmmac: remove spin_lock in stmmac_ioctl.
2011-11-17 7:57 [PATCH 1/5] stmmac: use mdelay on timeout of sw reset Giuseppe CAVALLARO
2011-11-17 7:57 ` [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface Giuseppe CAVALLARO
2011-11-17 7:58 ` [PATCH 3/5] stmmac: parameters auto-tuning through HW cap reg Giuseppe CAVALLARO
@ 2011-11-17 7:58 ` Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 7:58 ` [PATCH 5/5] stmmac: fix pm functions avoiding sleep on spinlock Giuseppe CAVALLARO
2011-11-17 8:13 ` [PATCH 1/5] stmmac: use mdelay on timeout of sw reset David Miller
4 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2011-11-17 7:58 UTC (permalink / raw)
To: netdev; +Cc: francesco.virlinzi, srinivas.kandagatla, Giuseppe Cavallaro
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
This patch removes un-needed spin_lock in stmmac_ioctl while reading and
writing mdio registers. While holding spin_lock the code must be
atomic, which is not true in this case as both mdiobus_read and writes
have mutex locks.
Without this patch reading mdio registers via mii-tool results in below
BUG:
mii-tool -vvv eth0"
Using SIOCGMIIPHY=0x8947
BUG: sleeping function called from invalid context at kernel/mutex.c:287
in_atomic(): 1, irqs_disabled(): 0, pid: 614, name: mii-tool
2 locks held by mii-tool/614:
#0: (rtnl_mutex){......}, at: [<c01fd80c>] dev_ioctl+0x550/0x674
#1: (&priv->lock){......}, at: [<c01b34ec>] stmmac_ioctl+0x4c/0x78
[<c002ea14>] (unwind_backtrace+0x0/0xcc) from [<c0272c38>]
(mutex_lock_nested+0x24/0x35c)
[<c0272c38>] (mutex_lock_nested+0x24/0x35c) from [<c01b237c>]
(mdiobus_read+0x44/0x70)
[<c01b237c>] (mdiobus_read+0x44/0x70) from [<c01b0c64>]
(phy_mii_ioctl+0x4c/0x138)
[<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) from [<c01b34fc>]
(stmmac_ioctl+0x5c/0x78)
[<c01b34fc>] (stmmac_ioctl+0x5c/0x78) from [<c01fcec8>]
(dev_ifsioc+0x2a4/0x2c8)
[<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) from [<c01fd81c>]
(dev_ioctl+0x560/0x674)
[<c01fd81c>] (dev_ioctl+0x560/0x674) from [<c00c36e0>]
(vfs_ioctl+0x2c/0x8c)
[<c00c36e0>] (vfs_ioctl+0x2c/0x8c) from [<c00c4130>]
(do_vfs_ioctl+0x530/0x578)
[<c00c4130>] (do_vfs_ioctl+0x530/0x578) from [<c00c41ac>]
(sys_ioctl+0x34/0x54)
[<c00c41ac>] (sys_ioctl+0x34/0x54) from [<c0028aa0>]
(ret_fast_syscall+0x0/0x2c)
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7f3ffd3..29dd87c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1536,9 +1536,7 @@ static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
if (!priv->phydev)
return -EINVAL;
- spin_lock(&priv->lock);
ret = phy_mii_ioctl(priv->phydev, rq, cmd);
- spin_unlock(&priv->lock);
return ret;
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5] stmmac: fix pm functions avoiding sleep on spinlock
2011-11-17 7:57 [PATCH 1/5] stmmac: use mdelay on timeout of sw reset Giuseppe CAVALLARO
` (2 preceding siblings ...)
2011-11-17 7:58 ` [PATCH 4/5] stmmac: remove spin_lock in stmmac_ioctl Giuseppe CAVALLARO
@ 2011-11-17 7:58 ` Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 8:13 ` [PATCH 1/5] stmmac: use mdelay on timeout of sw reset David Miller
4 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2011-11-17 7:58 UTC (permalink / raw)
To: netdev; +Cc: francesco.virlinzi, srinivas.kandagatla, Giuseppe Cavallaro
From: Francesco Virlinzi <francesco.virlinzi@st.com>
This patch fixes the pm functions to avoid the system
sleeps while a spinlock is taken.
Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 29dd87c..8ea770a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2011,12 +2011,13 @@ static int stmmac_suspend(struct device *dev)
if (!ndev || !netif_running(ndev))
return 0;
+ if (priv->phydev)
+ phy_stop(priv->phydev);
+
spin_lock(&priv->lock);
netif_device_detach(ndev);
netif_stop_queue(ndev);
- if (priv->phydev)
- phy_stop(priv->phydev);
#ifdef CONFIG_STMMAC_TIMER
priv->tm->timer_stop();
@@ -2074,12 +2075,13 @@ static int stmmac_resume(struct device *dev)
#endif
napi_enable(&priv->napi);
- if (priv->phydev)
- phy_start(priv->phydev);
-
netif_start_queue(ndev);
spin_unlock(&priv->lock);
+
+ if (priv->phydev)
+ phy_start(priv->phydev);
+
return 0;
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/5] stmmac: use mdelay on timeout of sw reset
2011-11-17 7:57 [PATCH 1/5] stmmac: use mdelay on timeout of sw reset Giuseppe CAVALLARO
` (3 preceding siblings ...)
2011-11-17 7:58 ` [PATCH 5/5] stmmac: fix pm functions avoiding sleep on spinlock Giuseppe CAVALLARO
@ 2011-11-17 8:13 ` David Miller
4 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2011-11-17 8:13 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi, srinivas.kandagatla
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 17 Nov 2011 08:57:58 +0100
> From: Francesco Virlinzi <francesco.virlinzi@st.com>
>
> This patch uses an mdelay to manage the timeout on
> sw reset to be independant of cpu_clk.
>
> Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
> Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface
2011-11-17 7:57 ` [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface Giuseppe CAVALLARO
@ 2011-11-17 8:14 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2011-11-17 8:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi, srinivas.kandagatla
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 17 Nov 2011 08:57:59 +0100
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> This patch fixes the way to stop the 1000Base advertising
> capabilties for non GMII interfaces.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/5] stmmac: parameters auto-tuning through HW cap reg
2011-11-17 7:58 ` [PATCH 3/5] stmmac: parameters auto-tuning through HW cap reg Giuseppe CAVALLARO
@ 2011-11-17 8:14 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2011-11-17 8:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi, srinivas.kandagatla
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 17 Nov 2011 08:58:00 +0100
> New GMAC devices (newer than the databook 3.50a) have the
> HW capability register that provides which features are actually
> supported by the hardware.
>
> On old devices many information have to be passed through the
> platform, for example: enhanced descriptor structure,
> TX COE etc. These are mandatory to properly configure the driver.
> This remains still valid because the driver has to support old
> Synopsys devices but now it's also able to override them using the
> values from the HW capability register if supported.
>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/5] stmmac: remove spin_lock in stmmac_ioctl.
2011-11-17 7:58 ` [PATCH 4/5] stmmac: remove spin_lock in stmmac_ioctl Giuseppe CAVALLARO
@ 2011-11-17 8:14 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2011-11-17 8:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi, srinivas.kandagatla
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 17 Nov 2011 08:58:01 +0100
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> This patch removes un-needed spin_lock in stmmac_ioctl while reading and
> writing mdio registers. While holding spin_lock the code must be
> atomic, which is not true in this case as both mdiobus_read and writes
> have mutex locks.
>
> Without this patch reading mdio registers via mii-tool results in below
> BUG:
> mii-tool -vvv eth0"
> Using SIOCGMIIPHY=0x8947
> BUG: sleeping function called from invalid context at kernel/mutex.c:287
...
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] stmmac: fix pm functions avoiding sleep on spinlock
2011-11-17 7:58 ` [PATCH 5/5] stmmac: fix pm functions avoiding sleep on spinlock Giuseppe CAVALLARO
@ 2011-11-17 8:14 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2011-11-17 8:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi, srinivas.kandagatla
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 17 Nov 2011 08:58:02 +0100
> From: Francesco Virlinzi <francesco.virlinzi@st.com>
>
> This patch fixes the pm functions to avoid the system
> sleeps while a spinlock is taken.
>
> Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-11-17 8:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 7:57 [PATCH 1/5] stmmac: use mdelay on timeout of sw reset Giuseppe CAVALLARO
2011-11-17 7:57 ` [PATCH 2/5] stmmac: fix advertising 1000Base capabilties for non GMII iface Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 7:58 ` [PATCH 3/5] stmmac: parameters auto-tuning through HW cap reg Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 7:58 ` [PATCH 4/5] stmmac: remove spin_lock in stmmac_ioctl Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 7:58 ` [PATCH 5/5] stmmac: fix pm functions avoiding sleep on spinlock Giuseppe CAVALLARO
2011-11-17 8:14 ` David Miller
2011-11-17 8:13 ` [PATCH 1/5] stmmac: use mdelay on timeout of sw reset David Miller
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).