Merge tag 'linux-can-next-for-4.1-20150401' of git://git.kernel.org/pub/scm/linux...
authorDavid S. Miller <davem@davemloft.net>
Wed, 1 Apr 2015 17:58:06 +0000 (13:58 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Apr 2015 17:58:06 +0000 (13:58 -0400)
Marc Kleine-Budde says:

====================
pull-request: can-next 2015-04-01

this is a pull request of 5 patches for net-next/master.

There are two patches for the ems_usb driver by Gerhard Uttenthaler and
me, which fix sparse endianess warnings. Oliver Hartkopp adds two
patches to improve and extend the CAN-ID filter handling on RAW CAN
sockets. The last patch is by me, it silences an uninitialized variable
warning in the peak_usb driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_serial.c
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h
drivers/net/ethernet/broadcom/genet/bcmmii.c
drivers/net/phy/at803x.c

index 27bbc56de15fa37497676f8b389cdc17eced09a0..9da06537237ff220a16b3c5831c728d809d91bb1 100644 (file)
@@ -70,7 +70,6 @@ struct ser_device {
        struct tty_struct *tty;
        bool tx_started;
        unsigned long state;
-       char *tty_name;
 #ifdef CONFIG_DEBUG_FS
        struct dentry *debugfs_tty_dir;
        struct debugfs_blob_wrapper tx_blob;
index f7855a61e7ad89a2398faa0bf25b5a068bac553e..6043734ea613bdae8d1a8c0abe7f14719e3a8cbd 100644 (file)
@@ -1734,6 +1734,9 @@ static int init_umac(struct bcmgenet_priv *priv)
        } else if (priv->ext_phy) {
                int0_enable |= UMAC_IRQ_LINK_EVENT;
        } else if (priv->phy_interface == PHY_INTERFACE_MODE_MOCA) {
+               if (priv->hw_params->flags & GENET_HAS_MOCA_LINK_DET)
+                       int0_enable |= UMAC_IRQ_LINK_EVENT;
+
                reg = bcmgenet_bp_mc_get(priv);
                reg |= BIT(priv->hw_params->bp_in_en_shift);
 
@@ -2926,7 +2929,8 @@ static struct bcmgenet_hw_params bcmgenet_hw_params[] = {
                .rdma_offset = 0x10000,
                .tdma_offset = 0x11000,
                .words_per_bd = 2,
-               .flags = GENET_HAS_EXT | GENET_HAS_MDIO_INTR,
+               .flags = GENET_HAS_EXT | GENET_HAS_MDIO_INTR |
+                        GENET_HAS_MOCA_LINK_DET,
        },
        [GENET_V4] = {
                .tx_queues = 4,
@@ -2944,7 +2948,8 @@ static struct bcmgenet_hw_params bcmgenet_hw_params[] = {
                .rdma_offset = 0x2000,
                .tdma_offset = 0x4000,
                .words_per_bd = 3,
-               .flags = GENET_HAS_40BITS | GENET_HAS_EXT | GENET_HAS_MDIO_INTR,
+               .flags = GENET_HAS_40BITS | GENET_HAS_EXT |
+                        GENET_HAS_MDIO_INTR | GENET_HAS_MOCA_LINK_DET,
        },
 };
 
index ddaa40cb0f21d16ac553ee1402cb13f75eaebb16..6f2887a5e0be693d625b6328349a2ad3b66d19ba 100644 (file)
@@ -508,6 +508,7 @@ enum bcmgenet_version {
 #define GENET_HAS_40BITS       (1 << 0)
 #define GENET_HAS_EXT          (1 << 1)
 #define GENET_HAS_MDIO_INTR    (1 << 2)
+#define GENET_HAS_MOCA_LINK_DET        (1 << 3)
 
 /* BCMGENET hardware parameters, keep this structure nicely aligned
  * since it is going to be used in hot paths
index 6d3b66a103cced846f6fc21b3ce288671a5a2e0d..e7651b3c6c5767f7609115ef0430c13aac8d17a9 100644 (file)
@@ -462,6 +462,15 @@ static int bcmgenet_mii_of_init(struct bcmgenet_priv *priv)
        return 0;
 }
 
+static int bcmgenet_fixed_phy_link_update(struct net_device *dev,
+                                         struct fixed_phy_status *status)
+{
+       if (dev && dev->phydev && status)
+               status->link = dev->phydev->link;
+
+       return 0;
+}
+
 static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
 {
        struct device *kdev = &priv->pdev->dev;
@@ -513,6 +522,13 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
                        dev_err(kdev, "failed to register fixed PHY device\n");
                        return -ENODEV;
                }
+
+               if (priv->hw_params->flags & GENET_HAS_MOCA_LINK_DET) {
+                       ret = fixed_phy_set_link_update(
+                               phydev, bcmgenet_fixed_phy_link_update);
+                       if (!ret)
+                               phydev->link = 0;
+               }
        }
 
        priv->phydev = phydev;
index f80e19ac67041a0e75778761373ec3ce2a982d95..fabf11d32d276d9ac6ef6ac50ccd24609a48f90f 100644 (file)
@@ -192,16 +192,17 @@ static int at803x_probe(struct phy_device *phydev)
 {
        struct device *dev = &phydev->dev;
        struct at803x_priv *priv;
+       struct gpio_desc *gpiod_reset;
 
        priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
        if (!priv)
                return -ENOMEM;
 
-       priv->gpiod_reset = devm_gpiod_get(dev, "reset");
-       if (IS_ERR(priv->gpiod_reset))
-               priv->gpiod_reset = NULL;
-       else
-               gpiod_direction_output(priv->gpiod_reset, 1);
+       gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
+       if (IS_ERR(gpiod_reset))
+               return PTR_ERR(gpiod_reset);
+
+       priv->gpiod_reset = gpiod_reset;
 
        phydev->priv = priv;
 
This page took 0.030208 seconds and 5 git commands to generate.