Skip to content

Commit

Permalink
mainline: kernel 3.0.30 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
freak007 committed May 7, 2012
1 parent 80f9a9d commit 2d2f0b6
Show file tree
Hide file tree
Showing 66 changed files with 315 additions and 269 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 29
SUBLEVEL = 30
EXTRAVERSION =
NAME = Sneaky Weasel

Expand Down
2 changes: 1 addition & 1 deletion crypto/sha512_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ sha512_update(struct shash_desc *desc, const u8 *data, unsigned int len)
index = sctx->count[0] & 0x7f;

/* Update number of bytes */
if (!(sctx->count[0] += len))
if ((sctx->count[0] += len) < len)
sctx->count[1]++;

part_len = 128 - index;
Expand Down
2 changes: 2 additions & 0 deletions drivers/bluetooth/ath3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static struct usb_device_id ath3k_table[] = {
{ USB_DEVICE(0x0CF3, 0x3004) },
{ USB_DEVICE(0x0CF3, 0x311D) },
{ USB_DEVICE(0x13d3, 0x3375) },
{ USB_DEVICE(0x04CA, 0x3005) },

/* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE02C) },
Expand All @@ -91,6 +92,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },

{ } /* Terminating entry */
};
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ static struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },

/* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
Expand Down
1 change: 1 addition & 0 deletions drivers/media/rc/winbond-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
goto exit_unregister_led;
}

data->dev->driver_type = RC_DRIVER_IR_RAW;
data->dev->driver_name = WBCIR_NAME;
data->dev->input_name = WBCIR_NAME;
data->dev->input_phys = "wbcir/cir0";
Expand Down
10 changes: 8 additions & 2 deletions drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,11 @@ static inline void cp_start_hw (struct cp_private *cp)
cpw8(Cmd, RxOn | TxOn);
}

static void cp_enable_irq(struct cp_private *cp)
{
cpw16_f(IntrMask, cp_intr_mask);
}

static void cp_init_hw (struct cp_private *cp)
{
struct net_device *dev = cp->dev;
Expand Down Expand Up @@ -1031,8 +1036,6 @@ static void cp_init_hw (struct cp_private *cp)

cpw16(MultiIntr, 0);

cpw16_f(IntrMask, cp_intr_mask);

cpw8_f(Cfg9346, Cfg9346_Lock);
}

Expand Down Expand Up @@ -1164,6 +1167,8 @@ static int cp_open (struct net_device *dev)
if (rc)
goto err_out_hw;

cp_enable_irq(cp);

netif_carrier_off(dev);
mii_check_media(&cp->mii_if, netif_msg_link(cp), true);
netif_start_queue(dev);
Expand Down Expand Up @@ -2052,6 +2057,7 @@ static int cp_resume (struct pci_dev *pdev)
/* FIXME: sh*t may happen if the Rx ring buffer is depleted */
cp_init_rings_index (cp);
cp_init_hw (cp);
cp_enable_irq(cp);
netif_start_queue (dev);

spin_lock_irqsave (&cp->lock, flags);
Expand Down
12 changes: 5 additions & 7 deletions drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
"pcie phy link down %x\n", status);
if (netif_running(adapter->netdev)) { /* reset MAC */
iowrite32(0, adapter->hw.hw_addr + REG_IMR);
schedule_work(&adapter->pcie_dma_to_rst_task);
schedule_work(&adapter->reset_dev_task);
return IRQ_HANDLED;
}
}
Expand All @@ -2488,7 +2488,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
"pcie DMA r/w error (status = 0x%x)\n",
status);
iowrite32(0, adapter->hw.hw_addr + REG_IMR);
schedule_work(&adapter->pcie_dma_to_rst_task);
schedule_work(&adapter->reset_dev_task);
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -2633,10 +2633,10 @@ static void atl1_down(struct atl1_adapter *adapter)
atl1_clean_rx_ring(adapter);
}

static void atl1_tx_timeout_task(struct work_struct *work)
static void atl1_reset_dev_task(struct work_struct *work)
{
struct atl1_adapter *adapter =
container_of(work, struct atl1_adapter, tx_timeout_task);
container_of(work, struct atl1_adapter, reset_dev_task);
struct net_device *netdev = adapter->netdev;

netif_device_detach(netdev);
Expand Down Expand Up @@ -3034,12 +3034,10 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
(unsigned long)adapter);
adapter->phy_timer_pending = false;

INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task);
INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task);

INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task);

INIT_WORK(&adapter->pcie_dma_to_rst_task, atl1_tx_timeout_task);

err = register_netdev(netdev);
if (err)
goto err_common;
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/atlx/atl1.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,8 @@ struct atl1_adapter {
u16 link_speed;
u16 link_duplex;
spinlock_t lock;
struct work_struct tx_timeout_task;
struct work_struct reset_dev_task;
struct work_struct link_chg_task;
struct work_struct pcie_dma_to_rst_task;

struct timer_list phy_config_timer;
bool phy_timer_pending;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/atlx/atlx.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void atlx_tx_timeout(struct net_device *netdev)
{
struct atlx_adapter *adapter = netdev_priv(netdev);
/* Do the reset outside of interrupt context */
schedule_work(&adapter->tx_timeout_task);
schedule_work(&adapter->reset_dev_task);
}

/*
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3071,7 +3071,11 @@ static void bond_ab_arp_commit(struct bonding *bond, int delta_in_ticks)
trans_start + delta_in_ticks)) ||
bond->curr_active_slave != slave) {
slave->link = BOND_LINK_UP;
bond->current_arp_slave = NULL;
if (bond->current_arp_slave) {
bond_set_slave_inactive_flags(
bond->current_arp_slave);
bond->current_arp_slave = NULL;
}

pr_info("%s: link status definitely up for interface %s.\n",
bond->dev->name, slave->dev->name);
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/davinci_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ static inline int wait_for_user_access(struct davinci_mdio_data *data)
__davinci_mdio_reset(data);
return -EAGAIN;
}

reg = __raw_readl(&regs->user[0].access);
if ((reg & USERACCESS_GO) == 0)
return 0;

dev_err(data->dev, "timed out waiting for user access\n");
return -ETIMEDOUT;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ static int dummy_dev_init(struct net_device *dev)
return 0;
}

static void dummy_dev_free(struct net_device *dev)
static void dummy_dev_uninit(struct net_device *dev)
{
free_percpu(dev->dstats);
free_netdev(dev);
}

static const struct net_device_ops dummy_netdev_ops = {
.ndo_init = dummy_dev_init,
.ndo_uninit = dummy_dev_uninit,
.ndo_start_xmit = dummy_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_multicast_list = set_multicast_list,
Expand All @@ -127,7 +127,7 @@ static void dummy_setup(struct net_device *dev)

/* Initialize the device structure. */
dev->netdev_ops = &dummy_netdev_ops;
dev->destructor = dummy_dev_free;
dev->destructor = free_netdev;

/* Fill in device structure with ethernet-generic values. */
dev->tx_queue_len = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ks8851_mll.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define DRV_NAME "ks8851_mll"

static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 };
#define MAX_RECV_FRAMES 32
#define MAX_RECV_FRAMES 255
#define MAX_BUF_SIZE 2048
#define TX_BUF_SIZE 2000
#define RX_BUF_SIZE 2000
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -5679,7 +5679,7 @@ static int netdev_set_mac_address(struct net_device *dev, void *addr)
memcpy(hw->override_addr, mac->sa_data, MAC_ADDR_LEN);
}

memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN);
memcpy(dev->dev_addr, mac->sa_data, ETH_ALEN);

interrupt = hw_block_intr(hw);

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,6 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
proto = npindex_to_proto[npi];
put_unaligned_be16(proto, pp);

netif_stop_queue(dev);
skb_queue_tail(&ppp->file.xq, skb);
ppp_xmit_process(ppp);
return NETDEV_TX_OK;
Expand Down Expand Up @@ -1063,6 +1062,8 @@ ppp_xmit_process(struct ppp *ppp)
code that we can accept some more. */
if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq))
netif_wake_queue(ppp->dev);
else
netif_stop_queue(ppp->dev);
}
ppp_xmit_unlock(ppp);
}
Expand Down
14 changes: 5 additions & 9 deletions drivers/net/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,10 +1083,8 @@ smsc911x_rx_counterrors(struct net_device *dev, unsigned int rxstat)

/* Quickly dumps bad packets */
static void
smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes)
smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktwords)
{
unsigned int pktwords = (pktbytes + NET_IP_ALIGN + 3) >> 2;

if (likely(pktwords >= 4)) {
unsigned int timeout = 500;
unsigned int val;
Expand Down Expand Up @@ -1150,7 +1148,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
continue;
}

skb = netdev_alloc_skb(dev, pktlength + NET_IP_ALIGN);
skb = netdev_alloc_skb(dev, pktwords << 2);
if (unlikely(!skb)) {
SMSC_WARN(pdata, rx_err,
"Unable to allocate skb for rx packet");
Expand All @@ -1160,14 +1158,12 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
break;
}

skb->data = skb->head;
skb_reset_tail_pointer(skb);
pdata->ops->rx_readfifo(pdata,
(unsigned int *)skb->data, pktwords);

/* Align IP on 16B boundary */
skb_reserve(skb, NET_IP_ALIGN);
skb_put(skb, pktlength - 4);
pdata->ops->rx_readfifo(pdata,
(unsigned int *)skb->head, pktwords);
skb->protocol = eth_type_trans(skb, dev);
skb_checksum_none_assert(skb);
netif_receive_skb(skb);
Expand Down Expand Up @@ -1390,7 +1386,7 @@ static int smsc911x_open(struct net_device *dev)
smsc911x_reg_write(pdata, FIFO_INT, temp);

/* set RX Data offset to 2 bytes for alignment */
smsc911x_reg_write(pdata, RX_CFG, (2 << 8));
smsc911x_reg_write(pdata, RX_CFG, (NET_IP_ALIGN << 8));

/* enable NAPI polling before enabling RX interrupts */
napi_enable(&pdata->napi);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/usb/smsc75xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf)
dev->net->ethtool_ops = &smsc75xx_ethtool_ops;
dev->net->flags |= IFF_MULTICAST;
dev->net->hard_header_len += SMSC75XX_TX_OVERHEAD;
dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wimax/i2400m/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ static void i2400m_get_drvinfo(struct net_device *net_dev,
struct i2400m *i2400m = net_dev_to_i2400m(net_dev);

strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1);
strncpy(info->fw_version, i2400m->fw_name, sizeof(info->fw_version) - 1);
strncpy(info->fw_version,
i2400m->fw_name ? : "", sizeof(info->fw_version) - 1);
if (net_dev->dev.parent)
strncpy(info->bus_info, dev_name(net_dev->dev.parent),
sizeof(info->bus_info) - 1);
Expand Down
Loading

0 comments on commit 2d2f0b6

Please sign in to comment.