Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288003
b: refs/heads/master
c: ff3bc1e
h: refs/heads/master
i:
  288001: 3dfc240
  287999: bd8cb86
v: v3
  • Loading branch information
Ben Hutchings committed Feb 25, 2012
1 parent f088716 commit dca2a6d
Show file tree
Hide file tree
Showing 38 changed files with 147 additions and 289 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: 8a49ad6e89feb5015e77ce6efeb2678947117e20
refs/heads/master: ff3bc1e7527504a93710535611b2f812f3bb89bf
6 changes: 1 addition & 5 deletions trunk/drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3584,11 +3584,7 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
fl6.flowi6_oif = dst_addr->sin6_scope_id;

*dst = ip6_route_output(&init_net, NULL, &fl6);
if ((*dst)->error) {
dst_release(*dst);
*dst = NULL;
return -ENETUNREACH;
} else
if (*dst)
return 0;
#endif

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/cisco/enic/cq_enet_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0;
*fcoe_enc_error = (desc->flags &
CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0;
*fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >>
*fcoe_eof = (u8)((desc->checksum_fcoe >>
CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) &
CQ_ENET_RQ_DESC_FCOE_EOF_MASK);
*checksum = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/cisco/enic/enic_pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf)
struct enic_port_profile *pp;
struct vic_provinfo *vp;
const u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
char uuid_str[38];
char client_mac_str[18];
u8 *client_mac;
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/net/ethernet/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2328,11 +2328,19 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
((new_mtu) < IPV6_MIN_MTU))
return -EINVAL;

if (new_mtu > 4000) {
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
jme->reg_rxcs |= RXCS_FIFOTHNP_64QW;
jme_restart_rx_engine(jme);
} else {
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
jme->reg_rxcs |= RXCS_FIFOTHNP_128QW;
jme_restart_rx_engine(jme);
}

netdev->mtu = new_mtu;
netdev_update_features(netdev);

jme_restart_rx_engine(jme);
jme_reset_link(jme);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/jme.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ enum jme_rxcs_values {
RXCS_RETRYCNT_60 = 0x00000F00,

RXCS_DEFAULT = RXCS_FIFOTHTP_128T |
RXCS_FIFOTHNP_16QW |
RXCS_FIFOTHNP_128QW |
RXCS_DMAREQSZ_128B |
RXCS_RETRYGAP_256ns |
RXCS_RETRYCNT_32,
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/ethernet/mellanox/mlx4/eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
struct mlx4_priv *priv = mlx4_priv(dev);
int vec = 0, err = 0, i;

mutex_lock(&priv->msix_ctl.pool_lock);
spin_lock(&priv->msix_ctl.pool_lock);
for (i = 0; !vec && i < dev->caps.comp_pool; i++) {
if (~priv->msix_ctl.pool_bm & 1ULL << i) {
priv->msix_ctl.pool_bm |= 1ULL << i;
Expand All @@ -1058,7 +1058,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
eq_set_ci(&priv->eq_table.eq[vec], 1);
}
}
mutex_unlock(&priv->msix_ctl.pool_lock);
spin_unlock(&priv->msix_ctl.pool_lock);

if (vec) {
*vector = vec;
Expand All @@ -1079,13 +1079,13 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec)
if (likely(i >= 0)) {
/*sanity check , making sure were not trying to free irq's
Belonging to a legacy EQ*/
mutex_lock(&priv->msix_ctl.pool_lock);
spin_lock(&priv->msix_ctl.pool_lock);
if (priv->msix_ctl.pool_bm & 1ULL << i) {
free_irq(priv->eq_table.eq[vec].irq,
&priv->eq_table.eq[vec]);
priv->msix_ctl.pool_bm &= ~(1ULL << i);
}
mutex_unlock(&priv->msix_ctl.pool_lock);
spin_unlock(&priv->msix_ctl.pool_lock);
}

}
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/net/ethernet/mellanox/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,14 +531,15 @@ int mlx4_change_port_types(struct mlx4_dev *dev,
for (port = 0; port < dev->caps.num_ports; port++) {
/* Change the port type only if the new type is different
* from the current, and not set to Auto */
if (port_types[port] != dev->caps.port_type[port + 1])
if (port_types[port] != dev->caps.port_type[port + 1]) {
change = 1;
dev->caps.port_type[port + 1] = port_types[port];
}
}
if (change) {
mlx4_unregister_device(dev);
for (port = 1; port <= dev->caps.num_ports; port++) {
mlx4_CLOSE_PORT(dev, port);
dev->caps.port_type[port] = port_types[port - 1];
err = mlx4_SET_PORT(dev, port);
if (err) {
mlx4_err(dev, "Failed to set port %d, "
Expand Down Expand Up @@ -1827,7 +1828,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
goto err_master_mfunc;

priv->msix_ctl.pool_bm = 0;
mutex_init(&priv->msix_ctl.pool_lock);
spin_lock_init(&priv->msix_ctl.pool_lock);

mlx4_enable_msi_x(dev);
if ((mlx4_is_mfunc(dev)) &&
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/mellanox/mlx4/mlx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ struct mlx4_sense {

struct mlx4_msix_ctl {
u64 pool_bm;
struct mutex pool_lock;
spinlock_t pool_lock;
};

struct mlx4_steer {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue)
if (unlikely(!skb))
return -ENOMEM;

/* Adjust the SKB for padding and checksum */
/* Adjust the SKB for padding */
skb_reserve(skb, NET_IP_ALIGN);
rx_buf->len = skb_len - NET_IP_ALIGN;
rx_buf->is_page = false;
skb->ip_summed = CHECKSUM_UNNECESSARY;

rx_buf->dma_addr = pci_map_single(efx->pci_dev,
skb->data, rx_buf->len,
Expand Down Expand Up @@ -496,6 +495,7 @@ static void efx_rx_packet_gro(struct efx_channel *channel,

EFX_BUG_ON_PARANOID(!checksummed);
rx_buf->u.skb = NULL;
skb->ip_summed = CHECKSUM_UNNECESSARY;

gro_result = napi_gro_receive(napi, skb);
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/ethernet/ti/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status)
int ret;

/* free and bail if we are shutting down */
if (unlikely(!netif_running(ndev))) {
if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) {
dev_kfree_skb_any(skb);
return;
}
Expand Down Expand Up @@ -1038,9 +1038,7 @@ static void emac_rx_handler(void *token, int len, int status)
recycle:
ret = cpdma_chan_submit(priv->rxchan, skb, skb->data,
skb_tailroom(skb), GFP_KERNEL);

WARN_ON(ret == -ENOMEM);
if (unlikely(ret < 0))
if (WARN_ON(ret < 0))
dev_kfree_skb_any(skb);
}

Expand Down
55 changes: 20 additions & 35 deletions trunk/drivers/net/phy/icplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
#include <asm/irq.h>
#include <asm/uaccess.h>

MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IP101G/IC1001 PHY drivers");
MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IC1001 PHY drivers");
MODULE_AUTHOR("Michael Barkowski");
MODULE_LICENSE("GPL");

/* IP101A/G - IP1001 */
#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */
#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */
#define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */
#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */
#define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */
/* IP101A/IP1001 */
#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */
#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */
#define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */
#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */
#define IP101A_APS_ON 2 /* IP101A APS Mode bit */

static int ip175c_config_init(struct phy_device *phydev)
{
Expand Down Expand Up @@ -98,24 +98,20 @@ static int ip175c_config_init(struct phy_device *phydev)

static int ip1xx_reset(struct phy_device *phydev)
{
int bmcr;
int err, bmcr;

/* Software Reset PHY */
bmcr = phy_read(phydev, MII_BMCR);
if (bmcr < 0)
return bmcr;
bmcr |= BMCR_RESET;
bmcr = phy_write(phydev, MII_BMCR, bmcr);
if (bmcr < 0)
return bmcr;
err = phy_write(phydev, MII_BMCR, bmcr);
if (err < 0)
return err;

do {
bmcr = phy_read(phydev, MII_BMCR);
if (bmcr < 0)
return bmcr;
} while (bmcr & BMCR_RESET);

return 0;
return err;
}

static int ip1001_config_init(struct phy_device *phydev)
Expand All @@ -128,30 +124,22 @@ static int ip1001_config_init(struct phy_device *phydev)

/* Enable Auto Power Saving mode */
c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2);
if (c < 0)
return c;
c |= IP1001_APS_ON;
c = phy_write(phydev, IP1001_SPEC_CTRL_STATUS_2, c);
if (c < 0)
return c;

if (phydev->interface == PHY_INTERFACE_MODE_RGMII) {
/* Additional delay (2ns) used to adjust RX clock phase
* at RGMII interface */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
if (c < 0)
return c;

c |= IP1001_PHASE_SEL_MASK;
c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
if (c < 0)
return c;
}

return 0;
return c;
}

static int ip101a_g_config_init(struct phy_device *phydev)
static int ip101a_config_init(struct phy_device *phydev)
{
int c;

Expand All @@ -161,7 +149,7 @@ static int ip101a_g_config_init(struct phy_device *phydev)

/* Enable Auto Power Saving mode */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP101A_G_APS_ON;
c |= IP101A_APS_ON;
return c;
}

Expand Down Expand Up @@ -203,7 +191,6 @@ static struct phy_driver ip1001_driver = {
.phy_id_mask = 0x0ffffff0,
.features = PHY_GBIT_FEATURES | SUPPORTED_Pause |
SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &ip1001_config_init,
.config_aneg = &genphy_config_aneg,
.read_status = &genphy_read_status,
Expand All @@ -212,14 +199,13 @@ static struct phy_driver ip1001_driver = {
.driver = { .owner = THIS_MODULE,},
};

static struct phy_driver ip101a_g_driver = {
static struct phy_driver ip101a_driver = {
.phy_id = 0x02430c54,
.name = "ICPlus IP101A/G",
.name = "ICPlus IP101A",
.phy_id_mask = 0x0ffffff0,
.features = PHY_BASIC_FEATURES | SUPPORTED_Pause |
SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &ip101a_g_config_init,
.config_init = &ip101a_config_init,
.config_aneg = &genphy_config_aneg,
.read_status = &genphy_read_status,
.suspend = genphy_suspend,
Expand All @@ -235,7 +221,7 @@ static int __init icplus_init(void)
if (ret < 0)
return -ENODEV;

ret = phy_driver_register(&ip101a_g_driver);
ret = phy_driver_register(&ip101a_driver);
if (ret < 0)
return -ENODEV;

Expand All @@ -245,7 +231,7 @@ static int __init icplus_init(void)
static void __exit icplus_exit(void)
{
phy_driver_unregister(&ip1001_driver);
phy_driver_unregister(&ip101a_g_driver);
phy_driver_unregister(&ip101a_driver);
phy_driver_unregister(&ip175c_driver);
}

Expand All @@ -255,7 +241,6 @@ module_exit(icplus_exit);
static struct mdio_device_id __maybe_unused icplus_tbl[] = {
{ 0x02430d80, 0x0ffffff0 },
{ 0x02430d90, 0x0ffffff0 },
{ 0x02430c54, 0x0ffffff0 },
{ }
};

Expand Down
23 changes: 0 additions & 23 deletions trunk/drivers/net/ppp/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2024,22 +2024,14 @@ ppp_mp_reconstruct(struct ppp *ppp)
continue;
}
if (PPP_MP_CB(p)->sequence != seq) {
u32 oldseq;
/* Fragment `seq' is missing. If it is after
minseq, it might arrive later, so stop here. */
if (seq_after(seq, minseq))
break;
/* Fragment `seq' is lost, keep going. */
lost = 1;
oldseq = seq;
seq = seq_before(minseq, PPP_MP_CB(p)->sequence)?
minseq + 1: PPP_MP_CB(p)->sequence;

if (ppp->debug & 1)
netdev_printk(KERN_DEBUG, ppp->dev,
"lost frag %u..%u\n",
oldseq, seq-1);

goto again;
}

Expand Down Expand Up @@ -2084,10 +2076,6 @@ ppp_mp_reconstruct(struct ppp *ppp)
struct sk_buff *tmp2;

skb_queue_reverse_walk_from_safe(list, p, tmp2) {
if (ppp->debug & 1)
netdev_printk(KERN_DEBUG, ppp->dev,
"discarding frag %u\n",
PPP_MP_CB(p)->sequence);
__skb_unlink(p, list);
kfree_skb(p);
}
Expand All @@ -2103,17 +2091,6 @@ ppp_mp_reconstruct(struct ppp *ppp)
/* If we have discarded any fragments,
signal a receive error. */
if (PPP_MP_CB(head)->sequence != ppp->nextseq) {
skb_queue_walk_safe(list, p, tmp) {
if (p == head)
break;
if (ppp->debug & 1)
netdev_printk(KERN_DEBUG, ppp->dev,
"discarding frag %u\n",
PPP_MP_CB(p)->sequence);
__skb_unlink(p, list);
kfree_skb(p);
}

if (ppp->debug & 1)
netdev_printk(KERN_DEBUG, ppp->dev,
" missed pkts %u..%u\n",
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/net/usb/cdc_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,6 @@ static const struct usb_device_id products [] = {
.driver_info = 0,
},

/* Logitech Harmony 900 - uses the pseudo-MDLM (BLAN) driver */
{
USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0xc11f, USB_CLASS_COMM,
USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
.driver_info = 0,
},

/*
* WHITELIST!!!
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@ static int hso_get_count(struct tty_struct *tty,
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_tiocmget *tiocmget = serial->tiocmget;

memset(icount, 0, sizeof(struct serial_icounter_struct));
memset(&icount, 0, sizeof(struct serial_icounter_struct));

if (!tiocmget)
return -ENOENT;
Expand Down
Loading

0 comments on commit dca2a6d

Please sign in to comment.