Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155852
b: refs/heads/master
c: 513a239
h: refs/heads/master
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Jul 21, 2009
1 parent 17b2e13 commit 98ae0a7
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 584 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de72e5de062e48a992d6cafe2291a82fe498d641
refs/heads/master: 513a2396d8e8327aff1ce50bea3fb4f16ff3455b
4 changes: 2 additions & 2 deletions trunk/Documentation/connector/cn_test.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* cn_test.c
*
* 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
* 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru>
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -194,5 +194,5 @@ module_init(cn_test_init);
module_exit(cn_test_fini);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>");
MODULE_DESCRIPTION("Connector's test module");
2 changes: 1 addition & 1 deletion trunk/Documentation/connector/ucon.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ucon.c
*
* Copyright (c) 2004+ Evgeniy Polyakov <zbr@ioremap.net>
* Copyright (c) 2004+ Evgeniy Polyakov <johnpol@2ka.mipt.ru>
*
*
* This program is free software; you can redistribute it and/or modify
Expand Down
7 changes: 0 additions & 7 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1569,13 +1569,6 @@ S: Supported
F: fs/configfs/
F: include/linux/configfs.h

CONNECTOR
P: Evgeniy Polyakov
M: zbr@ioremap.net
L: netdev@vger.kernel.org
S: Maintained
F: drivers/connector/

CONTROL GROUPS (CGROUPS)
P: Paul Menage
M: menage@google.com
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/connector/cn_queue.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* cn_queue.c
*
* 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
* 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru>
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/connector/connector.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* connector.c
*
* 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
* 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru>
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -33,7 +33,7 @@
#include <net/sock.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>");
MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector.");

static u32 cn_idx = CN_IDX_CONNECTOR;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,6 @@ config KS8842
config KS8851
tristate "Micrel KS8851 SPI"
depends on SPI
select MII
help
SPI driver for Micrel KS8851 SPI attached network chip.

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
struct be_queue_info *rxq = &adapter->rx_obj.q;
struct be_rx_page_info *page_info;
u16 rxq_idx, i, num_rcvd, j;
u32 pktsize, hdr_len, curr_frag_len, size;
u32 pktsize, hdr_len, curr_frag_len;
u8 *start;

rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp);
Expand Down Expand Up @@ -708,13 +708,12 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
}

/* More frags present for this completion */
size = pktsize;
pktsize -= curr_frag_len; /* account for above copied frag */
for (i = 1, j = 0; i < num_rcvd; i++) {
size -= curr_frag_len;
index_inc(&rxq_idx, rxq->len);
page_info = get_rx_page_info(adapter, rxq_idx);

curr_frag_len = min(size, rx_frag_size);
curr_frag_len = min(pktsize, rx_frag_size);

/* Coalesce all frags from the same physical page in one slot */
if (page_info->page_offset == 0) {
Expand All @@ -732,6 +731,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
skb_shinfo(skb)->frags[j].size += curr_frag_len;
skb->len += curr_frag_len;
skb->data_len += curr_frag_len;
pktsize -= curr_frag_len;

memset(page_info, 0, sizeof(*page_info));
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/bnx2x_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -4212,14 +4212,13 @@ static void bnx2x_turn_off_sf(struct bnx2x *bp, u8 port)
u8 bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
u8 *version, u16 len)
{
struct bnx2x *bp;
struct bnx2x *bp = params->bp;
u32 ext_phy_type = 0;
u32 spirom_ver = 0;
u8 status = 0 ;

if (version == NULL || params == NULL)
return -EINVAL;
bp = params->bp;

spirom_ver = REG_RD(bp, params->shmem_base +
offsetof(struct shmem_region,
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,16 +754,17 @@ static int fs_init_phy(struct net_device *dev)
fep->oldlink = 0;
fep->oldspeed = 0;
fep->oldduplex = -1;

phydev = of_phy_connect(dev, fep->fpi->phy_node, &fs_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
if (!phydev) {
phydev = of_phy_connect_fixed_link(dev, &fs_adjust_link,
PHY_INTERFACE_MODE_MII);
if(fep->fpi->phy_node)
phydev = of_phy_connect(dev, fep->fpi->phy_node,
&fs_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
else {
printk("No phy bus ID specified in BSP code\n");
return -EINVAL;
}
if (!phydev) {
dev_err(&dev->dev, "Could not attach to PHY\n");
return -ENODEV;
if (IS_ERR(phydev)) {
printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
return PTR_ERR(phydev);
}

fep->phydev = phydev;
Expand Down Expand Up @@ -1004,7 +1005,6 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
goto out_free_fpi;
}

SET_NETDEV_DEV(ndev, &ofdev->dev);
dev_set_drvdata(&ofdev->dev, ndev);

fep = netdev_priv(ndev);
Expand Down
24 changes: 16 additions & 8 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ static int gfar_of_init(struct net_device *dev)
priv->device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET;

priv->phy_node = of_parse_phandle(np, "phy-handle", 0);
if (!priv->phy_node) {
u32 *fixed_link;

fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
if (!fixed_link) {
err = -ENODEV;
goto err_out;
}
}

/* Find the TBI PHY. If it's not there, we don't support SGMII */
priv->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
Expand Down Expand Up @@ -650,14 +659,13 @@ static int init_phy(struct net_device *dev)

interface = gfar_get_interface(dev);

priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0,
interface);
if (!priv->phydev)
priv->phydev = of_phy_connect_fixed_link(dev, &adjust_link,
interface);
if (!priv->phydev) {
dev_err(&dev->dev, "could not attach to PHY\n");
return -ENODEV;
if (priv->phy_node) {
priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link,
0, interface);
if (!priv->phydev) {
dev_err(&dev->dev, "error: Could not attach to PHY\n");
return -ENODEV;
}
}

if (interface == PHY_INTERFACE_MODE_SGMII)
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/net/ibm_newemac/rgmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,12 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)
void rgmii_detach(struct of_device *ofdev, int input)
{
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
struct rgmii_regs __iomem *p;

BUG_ON(!dev || dev->users == 0);
p = dev->base;
struct rgmii_regs __iomem *p = dev->base;

mutex_lock(&dev->lock);

BUG_ON(!dev || dev->users == 0);

RGMII_DBG(dev, "detach(%d)" NL, input);

/* Disable this input */
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/jazzsonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ static int __init jazz_sonic_probe(struct platform_device *pdev)
lp = netdev_priv(dev);
lp->device = &pdev->dev;
SET_NETDEV_DEV(dev, &pdev->dev);
platform_set_drvdata(pdev, dev);

netdev_boot_setup_check(dev);

Expand Down
15 changes: 7 additions & 8 deletions trunk/drivers/net/macsonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static const struct net_device_ops macsonic_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};

static int __devinit macsonic_init(struct net_device *dev)
static int __init macsonic_init(struct net_device *dev)
{
struct sonic_local* lp = netdev_priv(dev);

Expand Down Expand Up @@ -223,7 +223,7 @@ static int __devinit macsonic_init(struct net_device *dev)
return 0;
}

static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
{
struct sonic_local *lp = netdev_priv(dev);
const int prom_addr = ONBOARD_SONIC_PROM_BASE;
Expand Down Expand Up @@ -288,7 +288,7 @@ static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
} else return 0;
}

static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
static int __init mac_onboard_sonic_probe(struct net_device *dev)
{
/* Bwahahaha */
static int once_is_more_than_enough;
Expand Down Expand Up @@ -409,7 +409,7 @@ static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}

static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
unsigned long prom_addr,
int id)
{
Expand All @@ -424,7 +424,7 @@ static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
return 0;
}

static int __devinit macsonic_ident(struct nubus_dev *ndev)
static int __init macsonic_ident(struct nubus_dev *ndev)
{
if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
Expand All @@ -449,7 +449,7 @@ static int __devinit macsonic_ident(struct nubus_dev *ndev)
return -1;
}

static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
static int __init mac_nubus_sonic_probe(struct net_device *dev)
{
static int slots;
struct nubus_dev* ndev = NULL;
Expand Down Expand Up @@ -562,7 +562,7 @@ static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}

static int __devinit mac_sonic_probe(struct platform_device *pdev)
static int __init mac_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
Expand All @@ -575,7 +575,6 @@ static int __devinit mac_sonic_probe(struct platform_device *pdev)
lp = netdev_priv(dev);
lp->device = &pdev->dev;
SET_NETDEV_DEV(dev, &pdev->dev);
platform_set_drvdata(pdev, dev);

/* This will catch fatal stuff like -ENOMEM as well as success */
err = mac_onboard_sonic_probe(dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/mlx4/en_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int mlx4_en_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
cmd->autoneg = AUTONEG_DISABLE;
cmd->supported = SUPPORTED_10000baseT_Full;
cmd->advertising = ADVERTISED_1000baseT_Full;
cmd->advertising = SUPPORTED_10000baseT_Full;
if (netif_carrier_ok(dev)) {
cmd->speed = SPEED_10000;
cmd->duplex = DUPLEX_FULL;
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,12 @@ static int sky2_down(struct net_device *dev)
if (netif_msg_ifdown(sky2))
printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);

/* Disable port IRQ */
imask = sky2_read32(hw, B0_IMSK);
imask &= ~portirq_msk[port];
sky2_write32(hw, B0_IMSK, imask);
sky2_read32(hw, B0_IMSK);

/* Force flow control off */
sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);

Expand Down Expand Up @@ -1857,6 +1863,8 @@ static int sky2_down(struct net_device *dev)

sky2_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), RB_RST_SET);

sky2_rx_stop(sky2);

sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);

Expand All @@ -1866,14 +1874,6 @@ static int sky2_down(struct net_device *dev)
sky2_write32(hw, STAT_ISR_TIMER_CNT, 0);
sky2_read8(hw, STAT_ISR_TIMER_CTRL);

sky2_rx_stop(sky2);

/* Disable port IRQ */
imask = sky2_read32(hw, B0_IMSK);
imask &= ~portirq_msk[port];
sky2_write32(hw, B0_IMSK, imask);
sky2_read32(hw, B0_IMSK);

synchronize_irq(hw->pdev->irq);
napi_synchronize(&hw->napi);

Expand Down
23 changes: 16 additions & 7 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,13 +1590,13 @@ static int init_phy(struct net_device *dev)
priv->oldspeed = 0;
priv->oldduplex = -1;

if (!ug_info->phy_node)
return 0;

phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0,
priv->phy_interface);
if (!phydev)
phydev = of_phy_connect_fixed_link(dev, &adjust_link,
priv->phy_interface);
if (!phydev) {
dev_err(&dev->dev, "Could not attach to PHY\n");
printk("%s: Could not attach to PHY\n", dev->name);
return -ENODEV;
}

Expand Down Expand Up @@ -3608,7 +3608,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
struct ucc_geth_private *ugeth = NULL;
struct ucc_geth_info *ug_info;
struct resource res;
struct device_node *phy;
int err, ucc_num, max_speed = 0;
const u32 *fixed_link;
const unsigned int *prop;
const char *sprop;
const void *mac_addr;
Expand Down Expand Up @@ -3706,8 +3708,15 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma

ug_info->uf_info.regs = res.start;
ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);

ug_info->phy_node = of_parse_phandle(np, "phy-handle", 0);
fixed_link = of_get_property(np, "fixed-link", NULL);
if (fixed_link) {
phy = NULL;
} else {
phy = of_parse_phandle(np, "phy-handle", 0);
if (phy == NULL)
return -ENODEV;
}
ug_info->phy_node = phy;

/* Find the TBI PHY node. If it's not there, we don't support SGMII */
ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
Expand All @@ -3716,7 +3725,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
prop = of_get_property(np, "phy-connection-type", NULL);
if (!prop) {
/* handle interface property present in old trees */
prop = of_get_property(ug_info->phy_node, "interface", NULL);
prop = of_get_property(phy, "interface", NULL);
if (prop != NULL) {
phy_interface = enet_to_phy_interface[*prop];
max_speed = enet_to_speed[*prop];
Expand Down
Loading

0 comments on commit 98ae0a7

Please sign in to comment.