* [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups
@ 2014-04-21 16:09 Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 1/4] net: ethoc: remove ethoc_config Florian Fainelli
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Florian Fainelli @ 2014-04-21 16:09 UTC (permalink / raw)
To: netdev
Cc: davem, bh74.an, ks.giri, siva.kallam, peppe.cavallaro, jcmvbkbc,
Florian Fainelli
Hi David,
This patch series removes a bunch of useless ndo_set_config in non
PCMCIA Ethernet drivers.
Florian Fainelli (4):
net: ethoc: remove ethoc_config
net: cpmac: remove cpmac_config
net: sxgbe: remove sxgbe_config
stmmac: remove stmmac_config
drivers/net/ethernet/ethoc.c | 6 ----
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 35 -----------------------
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 --------------
drivers/net/ethernet/ti/cpmac.c | 14 ---------
4 files changed, 77 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/4] net: ethoc: remove ethoc_config
2014-04-21 16:09 [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups Florian Fainelli
@ 2014-04-21 16:09 ` Florian Fainelli
2014-04-21 17:43 ` Max Filippov
2014-04-21 16:09 ` [PATCH net-next 2/4] net: cpmac: remove cpmac_config Florian Fainelli
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2014-04-21 16:09 UTC (permalink / raw)
To: netdev
Cc: davem, bh74.an, ks.giri, siva.kallam, peppe.cavallaro, jcmvbkbc,
Florian Fainelli
ethoc_config() returns -ENOSYS and does not implement anything useful,
let's remove it such that net/core/dev_ioctl.c::dev_ifsioc can return
something meaningful like -EOPNOTSUPP.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/ethoc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index 8b70ca7e342b..f3658bdb64cc 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -769,11 +769,6 @@ static int ethoc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return phy_mii_ioctl(phy, ifr, cmd);
}
-static int ethoc_config(struct net_device *dev, struct ifmap *map)
-{
- return -ENOSYS;
-}
-
static void ethoc_do_set_mac_address(struct net_device *dev)
{
struct ethoc *priv = netdev_priv(dev);
@@ -995,7 +990,6 @@ static const struct net_device_ops ethoc_netdev_ops = {
.ndo_open = ethoc_open,
.ndo_stop = ethoc_stop,
.ndo_do_ioctl = ethoc_ioctl,
- .ndo_set_config = ethoc_config,
.ndo_set_mac_address = ethoc_set_mac_address,
.ndo_set_rx_mode = ethoc_set_multicast_list,
.ndo_change_mtu = ethoc_change_mtu,
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/4] net: cpmac: remove cpmac_config
2014-04-21 16:09 [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 1/4] net: ethoc: remove ethoc_config Florian Fainelli
@ 2014-04-21 16:09 ` Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 3/4] net: sxgbe: remove sxgbe_config Florian Fainelli
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2014-04-21 16:09 UTC (permalink / raw)
To: netdev
Cc: davem, bh74.an, ks.giri, siva.kallam, peppe.cavallaro, jcmvbkbc,
Florian Fainelli
cpmac_config() refuses changing the base address parameter, and ignores
all other parameters, which means that it is pretty useless as it is, so
let's remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/ti/cpmac.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 73f74f369437..7399a52f7c26 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -313,19 +313,6 @@ static int mii_irqs[PHY_MAX_ADDR] = { PHY_POLL, };
static struct mii_bus *cpmac_mii;
-static int cpmac_config(struct net_device *dev, struct ifmap *map)
-{
- if (dev->flags & IFF_UP)
- return -EBUSY;
-
- /* Don't allow changing the I/O address */
- if (map->base_addr != dev->base_addr)
- return -EOPNOTSUPP;
-
- /* ignore other fields */
- return 0;
-}
-
static void cpmac_set_multicast_list(struct net_device *dev)
{
struct netdev_hw_addr *ha;
@@ -1100,7 +1087,6 @@ static const struct net_device_ops cpmac_netdev_ops = {
.ndo_tx_timeout = cpmac_tx_timeout,
.ndo_set_rx_mode = cpmac_set_multicast_list,
.ndo_do_ioctl = cpmac_ioctl,
- .ndo_set_config = cpmac_config,
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 3/4] net: sxgbe: remove sxgbe_config
2014-04-21 16:09 [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 1/4] net: ethoc: remove ethoc_config Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 2/4] net: cpmac: remove cpmac_config Florian Fainelli
@ 2014-04-21 16:09 ` Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 4/4] stmmac: remove stmmac_config Florian Fainelli
2014-04-21 18:59 ` [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2014-04-21 16:09 UTC (permalink / raw)
To: netdev
Cc: davem, bh74.an, ks.giri, siva.kallam, peppe.cavallaro, jcmvbkbc,
Florian Fainelli
sxgbe_config() denies changing the base address and interrupt, and
ignores all other 'struct ifmap' members, which means that it is useless
as is, so let's remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 35 -------------------------
1 file changed, 35 deletions(-)
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
index 5091692ad659..137f366ec7e4 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
@@ -1909,40 +1909,6 @@ static void sxgbe_set_rx_mode(struct net_device *dev)
readl(ioaddr + SXGBE_HASH_LOW));
}
-/**
- * sxgbe_config - entry point for changing configuration mode passed on by
- * ifconfig
- * @dev : pointer to the device structure
- * @map : pointer to the device mapping structure
- * Description:
- * This function is a driver entry point which gets called by the kernel
- * whenever some device configuration is changed.
- * Return value:
- * This function returns 0 if success and appropriate error otherwise.
- */
-static int sxgbe_config(struct net_device *dev, struct ifmap *map)
-{
- struct sxgbe_priv_data *priv = netdev_priv(dev);
-
- /* Can't act on a running interface */
- if (dev->flags & IFF_UP)
- return -EBUSY;
-
- /* Don't allow changing the I/O address */
- if (map->base_addr != (unsigned long)priv->ioaddr) {
- netdev_warn(dev, "can't change I/O address\n");
- return -EOPNOTSUPP;
- }
-
- /* Don't allow changing the IRQ */
- if (map->irq != priv->irq) {
- netdev_warn(dev, "not change IRQ number %d\n", priv->irq);
- return -EOPNOTSUPP;
- }
-
- return 0;
-}
-
#ifdef CONFIG_NET_POLL_CONTROLLER
/**
* sxgbe_poll_controller - entry point for polling receive by device
@@ -2004,7 +1970,6 @@ static const struct net_device_ops sxgbe_netdev_ops = {
.ndo_set_rx_mode = sxgbe_set_rx_mode,
.ndo_tx_timeout = sxgbe_tx_timeout,
.ndo_do_ioctl = sxgbe_ioctl,
- .ndo_set_config = sxgbe_config,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = sxgbe_poll_controller,
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 4/4] stmmac: remove stmmac_config
2014-04-21 16:09 [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups Florian Fainelli
` (2 preceding siblings ...)
2014-04-21 16:09 ` [PATCH net-next 3/4] net: sxgbe: remove sxgbe_config Florian Fainelli
@ 2014-04-21 16:09 ` Florian Fainelli
2014-04-21 18:59 ` [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2014-04-21 16:09 UTC (permalink / raw)
To: netdev
Cc: davem, bh74.an, ks.giri, siva.kallam, peppe.cavallaro, jcmvbkbc,
Florian Fainelli
stmmac_config() denies changing the base address and interrupt
parameters, and ignores any other settings from the ifmap parameters,
thus making stmmac_config() useless, remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index d940034acdd4..93cf4f63f426 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2214,27 +2214,6 @@ static void stmmac_tx_timeout(struct net_device *dev)
stmmac_tx_err(priv);
}
-/* Configuration changes (passed on by ifconfig) */
-static int stmmac_config(struct net_device *dev, struct ifmap *map)
-{
- if (dev->flags & IFF_UP) /* can't act on a running interface */
- return -EBUSY;
-
- /* Don't allow changing the I/O address */
- if (map->base_addr != dev->base_addr) {
- pr_warn("%s: can't change I/O address\n", dev->name);
- return -EOPNOTSUPP;
- }
-
- /* Don't allow changing the IRQ */
- if (map->irq != dev->irq) {
- pr_warn("%s: not change IRQ number %d\n", dev->name, dev->irq);
- return -EOPNOTSUPP;
- }
-
- return 0;
-}
-
/**
* stmmac_set_rx_mode - entry point for multicast addressing
* @dev : pointer to the device structure
@@ -2600,7 +2579,6 @@ static const struct net_device_ops stmmac_netdev_ops = {
.ndo_set_rx_mode = stmmac_set_rx_mode,
.ndo_tx_timeout = stmmac_tx_timeout,
.ndo_do_ioctl = stmmac_ioctl,
- .ndo_set_config = stmmac_config,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = stmmac_poll_controller,
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/4] net: ethoc: remove ethoc_config
2014-04-21 16:09 ` [PATCH net-next 1/4] net: ethoc: remove ethoc_config Florian Fainelli
@ 2014-04-21 17:43 ` Max Filippov
0 siblings, 0 replies; 7+ messages in thread
From: Max Filippov @ 2014-04-21 17:43 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, David S. Miller, bh74.an, ks.giri, siva.kallam,
peppe.cavallaro
On Mon, Apr 21, 2014 at 8:09 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> ethoc_config() returns -ENOSYS and does not implement anything useful,
> let's remove it such that net/core/dev_ioctl.c::dev_ifsioc can return
> something meaningful like -EOPNOTSUPP.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/ethernet/ethoc.c | 6 ------
> 1 file changed, 6 deletions(-)
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups
2014-04-21 16:09 [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups Florian Fainelli
` (3 preceding siblings ...)
2014-04-21 16:09 ` [PATCH net-next 4/4] stmmac: remove stmmac_config Florian Fainelli
@ 2014-04-21 18:59 ` David Miller
4 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-04-21 18:59 UTC (permalink / raw)
To: f.fainelli
Cc: netdev, bh74.an, ks.giri, siva.kallam, peppe.cavallaro, jcmvbkbc
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 21 Apr 2014 09:09:18 -0700
> This patch series removes a bunch of useless ndo_set_config in non
> PCMCIA Ethernet drivers.
Series applied, thanks Florian.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-21 19:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-21 16:09 [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 1/4] net: ethoc: remove ethoc_config Florian Fainelli
2014-04-21 17:43 ` Max Filippov
2014-04-21 16:09 ` [PATCH net-next 2/4] net: cpmac: remove cpmac_config Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 3/4] net: sxgbe: remove sxgbe_config Florian Fainelli
2014-04-21 16:09 ` [PATCH net-next 4/4] stmmac: remove stmmac_config Florian Fainelli
2014-04-21 18:59 ` [PATCH net-next 0/4] net: ndo_set_config/ifmap cleanups 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).