Skip to content

Commit

Permalink
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…davem/net-2.6

Conflicts:
	drivers/net/tg3.c
  • Loading branch information
davem330 committed May 5, 2011
2 parents 90864fb + 87e9af6 commit 7143b7d
Show file tree
Hide file tree
Showing 28 changed files with 170 additions and 66 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6551,7 +6551,7 @@ S: Maintained
F: drivers/usb/host/uhci*

USB "USBNET" DRIVER FRAMEWORK
M: David Brownell <[email protected]>
M: Oliver Neukum <[email protected]>
L: [email protected]
W: http://www.linux-usb.org/usbnet
S: Maintained
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/amd8111e.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version "M
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
module_param_array(speed_duplex, int, NULL, 0);
MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotiate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
module_param_array(coalesce, bool, NULL, 0);
MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable");
module_param_array(dynamic_ipg, bool, NULL, 0);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8357,6 +8357,8 @@ bnx2_remove_one(struct pci_dev *pdev)

unregister_netdev(dev);

del_timer_sync(&bp->timer);

if (bp->mips_firmware)
release_firmware(bp->mips_firmware);
if (bp->rv2p_firmware)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/sja1000/sja1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ static void sja1000_rx(struct net_device *dev)
| (priv->read_reg(priv, REG_ID2) >> 5);
}

cf->can_dlc = get_can_dlc(fi & 0x0F);
if (fi & FI_RTR) {
id |= CAN_RTR_FLAG;
} else {
cf->can_dlc = get_can_dlc(fi & 0x0F);
for (i = 0; i < cf->can_dlc; i++)
cf->data[i] = priv->read_reg(priv, dreg++);
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/ftmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
* that hardware reset completed (what the f*ck).
* We still need to wait for a while.
*/
usleep_range(500, 1000);
udelay(500);
return 0;
}

usleep_range(1000, 10000);
udelay(1000);
}

netdev_err(netdev, "software reset failed\n");
Expand Down Expand Up @@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg)
if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
return phycr & FTMAC100_PHYCR_MIIRDATA;

usleep_range(100, 1000);
udelay(100);
}

netdev_err(netdev, "mdio read timed out\n");
Expand Down Expand Up @@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg,
if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
return;

usleep_range(100, 1000);
udelay(100);
}

netdev_err(netdev, "mdio write timed out\n");
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
result |= ADVERTISED_100baseT_Half;
if (advert & ADVERTISE_100FULL)
result |= ADVERTISED_100baseT_Full;
if (advert & ADVERTISE_PAUSE_CAP)
result |= ADVERTISED_Pause;
if (advert & ADVERTISE_PAUSE_ASYM)
result |= ADVERTISED_Asym_Pause;

return result;
}
Expand Down
8 changes: 6 additions & 2 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -12747,8 +12747,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
if (val & VCPU_CFGSHDW_ASPM_DBNC)
tg3_flag_set(tp, ASPM_WORKAROUND);
if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
(val & VCPU_CFGSHDW_WOL_MAGPKT))
(val & VCPU_CFGSHDW_WOL_MAGPKT)) {
tg3_flag_set(tp, WOL_ENABLE);
device_set_wakeup_enable(&tp->pdev->dev, true);
}
goto done;
}

Expand Down Expand Up @@ -12881,8 +12883,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
tg3_flag_clear(tp, WOL_CAP);

if (tg3_flag(tp, WOL_CAP) &&
(nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE))
(nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) {
tg3_flag_set(tp, WOL_ENABLE);
device_set_wakeup_enable(&tp->pdev->dev, true);
}

if (cfg2 & (1 << 17))
tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING;
Expand Down
14 changes: 12 additions & 2 deletions drivers/net/usb/cdc_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static const struct driver_info cdc_info = {
.manage_power = cdc_manage_power,
};

static const struct driver_info mbm_info = {
static const struct driver_info wwan_info = {
.description = "Mobile Broadband Network Device",
.flags = FLAG_WWAN,
.bind = usbnet_cdc_bind,
Expand All @@ -471,6 +471,7 @@ static const struct driver_info mbm_info = {

/*-------------------------------------------------------------------------*/

#define HUAWEI_VENDOR_ID 0x12D1

static const struct usb_device_id products [] = {
/*
Expand Down Expand Up @@ -587,8 +588,17 @@ static const struct usb_device_id products [] = {
}, {
USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
USB_CDC_PROTO_NONE),
.driver_info = (unsigned long)&mbm_info,
.driver_info = (unsigned long)&wwan_info,

}, {
/* Various Huawei modems with a network port like the UMG1831 */
.match_flags = USB_DEVICE_ID_MATCH_VENDOR
| USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = HUAWEI_VENDOR_ID,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET,
.bInterfaceProtocol = 255,
.driver_info = (unsigned long)&wwan_info,
},
{ }, // END
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
msleep(10);
bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
timeout++;
} while ((bmcr & MII_BMCR) && (timeout < 100));
} while ((bmcr & BMCR_RESET) && (timeout < 100));

if (timeout >= 100) {
netdev_warn(dev->net, "timeout on PHY Reset");
Expand Down
18 changes: 15 additions & 3 deletions drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net)
struct driver_info *info = dev->driver_info;
int retval;

clear_bit(EVENT_DEV_OPEN, &dev->flags);
netif_stop_queue (net);

netif_info(dev, ifdown, dev->net,
Expand Down Expand Up @@ -736,6 +737,7 @@ int usbnet_open (struct net_device *net)
}
}

set_bit(EVENT_DEV_OPEN, &dev->flags);
netif_start_queue (net);
netif_info(dev, ifup, dev->net,
"open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
Expand Down Expand Up @@ -1259,6 +1261,9 @@ void usbnet_disconnect (struct usb_interface *intf)
if (dev->driver_info->unbind)
dev->driver_info->unbind (dev, intf);

usb_kill_urb(dev->interrupt);
usb_free_urb(dev->interrupt);

free_netdev(net);
usb_put_dev (xdev);
}
Expand Down Expand Up @@ -1498,6 +1503,10 @@ int usbnet_resume (struct usb_interface *intf)
int retval;

if (!--dev->suspend_count) {
/* resume interrupt URBs */
if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
usb_submit_urb(dev->interrupt, GFP_NOIO);

spin_lock_irq(&dev->txq.lock);
while ((res = usb_get_from_anchor(&dev->deferred))) {

Expand All @@ -1516,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf)
smp_mb();
clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
spin_unlock_irq(&dev->txq.lock);
if (!(dev->txq.qlen >= TX_QLEN(dev)))
netif_start_queue(dev->net);
tasklet_schedule (&dev->bh);

if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
if (!(dev->txq.qlen >= TX_QLEN(dev)))
netif_start_queue(dev->net);
tasklet_schedule (&dev->bh);
}
}
return 0;
}
Expand Down
12 changes: 12 additions & 0 deletions drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,17 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
if (tb[IFLA_ADDRESS] == NULL)
random_ether_addr(dev->dev_addr);

if (tb[IFLA_IFNAME])
nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
else
snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d");

if (strchr(dev->name, '%')) {
err = dev_alloc_name(dev, dev->name);
if (err < 0)
goto err_alloc_name;
}

err = register_netdevice(dev);
if (err < 0)
goto err_register_dev;
Expand All @@ -387,6 +398,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,

err_register_dev:
/* nothing to do */
err_alloc_name:
err_configure_peer:
unregister_netdevice(peer);
return err;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ MODULE_FIRMWARE("b43/ucode11.fw");
MODULE_FIRMWARE("b43/ucode13.fw");
MODULE_FIRMWARE("b43/ucode14.fw");
MODULE_FIRMWARE("b43/ucode15.fw");
MODULE_FIRMWARE("b43/ucode16_mimo.fw");
MODULE_FIRMWARE("b43/ucode5.fw");
MODULE_FIRMWARE("b43/ucode9.fw");

Expand Down
18 changes: 12 additions & 6 deletions drivers/net/wireless/iwlegacy/iwl-4965-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,18 @@ int iwl4965_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)

hdr_len = ieee80211_hdrlen(fc);

/* Find index into station table for destination station */
sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta);
if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
hdr->addr1);
goto drop_unlock;
/* For management frames use broadcast id to do not break aggregation */
if (!ieee80211_is_data(fc))
sta_id = ctx->bcast_sta_id;
else {
/* Find index into station table for destination station */
sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta);

if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
hdr->addr1);
goto drop_unlock;
}
}

IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
Expand Down
20 changes: 19 additions & 1 deletion drivers/net/wireless/iwlegacy/iwl-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,21 @@ module_param(led_mode, int, S_IRUGO);
MODULE_PARM_DESC(led_mode, "0=system default, "
"1=On(RF On)/Off(RF Off), 2=blinking");

/* Throughput OFF time(ms) ON time (ms)
* >300 25 25
* >200 to 300 40 40
* >100 to 200 55 55
* >70 to 100 65 65
* >50 to 70 75 75
* >20 to 50 85 85
* >10 to 20 95 95
* >5 to 10 110 110
* >1 to 5 130 130
* >0 to 1 167 167
* <=0 SOLID ON
*/
static const struct ieee80211_tpt_blink iwl_blink[] = {
{ .throughput = 0 * 1024 - 1, .blink_time = 334 },
{ .throughput = 0, .blink_time = 334 },
{ .throughput = 1 * 1024 - 1, .blink_time = 260 },
{ .throughput = 5 * 1024 - 1, .blink_time = 220 },
{ .throughput = 10 * 1024 - 1, .blink_time = 190 },
Expand Down Expand Up @@ -101,6 +114,11 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv,
if (priv->blink_on == on && priv->blink_off == off)
return 0;

if (off == 0) {
/* led is SOLID_ON */
on = IWL_LED_SOLID;
}

IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n",
priv->cfg->base_params->led_compensation);
led_cmd.on = iwl_legacy_blink_compensation(priv, on,
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/iwlegacy/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2992,15 +2992,15 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
struct iwl_priv *priv = container_of(work, struct iwl_priv,
txpower_work);

mutex_lock(&priv->mutex);

/* If a scan happened to start before we got here
* then just return; the statistics notification will
* kick off another scheduled work to compensate for
* any temperature delta we missed here. */
if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
test_bit(STATUS_SCANNING, &priv->status))
return;

mutex_lock(&priv->mutex);
goto out;

/* Regardless of if we are associated, we must reconfigure the
* TX power since frames can be sent on non-radar channels while
Expand All @@ -3010,7 +3010,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
/* Update last_temperature to keep is_calib_needed from running
* when it isn't needed... */
priv->last_temperature = priv->temperature;

out:
mutex_unlock(&priv->mutex);
}

Expand Down
17 changes: 11 additions & 6 deletions drivers/net/wireless/iwlwifi/iwl-agn-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)

hdr_len = ieee80211_hdrlen(fc);

/* Find index into station table for destination station */
sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta);
if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
hdr->addr1);
goto drop_unlock;
/* For management frames use broadcast id to do not break aggregation */
if (!ieee80211_is_data(fc))
sta_id = ctx->bcast_sta_id;
else {
/* Find index into station table for destination station */
sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta);
if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
hdr->addr1);
goto drop_unlock;
}
}

IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
Expand Down
1 change: 1 addition & 0 deletions include/linux/usb/usbnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct usbnet {
# define EVENT_RX_PAUSED 5
# define EVENT_DEV_WAKING 6
# define EVENT_DEV_ASLEEP 7
# define EVENT_DEV_OPEN 8
};

static inline struct usb_driver *driver_of(struct usb_interface *intf)
Expand Down
6 changes: 3 additions & 3 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4783,7 +4783,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm
* is never reached
*/
WARN_ON(1);
err = -EINVAL;
err = -ENOTTY;
break;

}
Expand Down Expand Up @@ -5051,7 +5051,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
/* Set the per device memory buffer space.
* Not applicable in our case */
case SIOCSIFLINK:
return -EINVAL;
return -ENOTTY;

/*
* Unknown or private ioctl.
Expand All @@ -5072,7 +5072,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
/* Take care of Wireless Extensions */
if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST)
return wext_handle_ioctl(net, &ifr, cmd, arg);
return -EINVAL;
return -ENOTTY;
}
}

Expand Down
4 changes: 2 additions & 2 deletions net/dsa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ config NET_DSA_MV88E6XXX_NEED_PPU
default n

config NET_DSA_MV88E6131
bool "Marvell 88E6095/6095F/6131 ethernet switch chip support"
bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
select NET_DSA_MV88E6XXX
select NET_DSA_MV88E6XXX_NEED_PPU
select NET_DSA_TAG_DSA
---help---
This enables support for the Marvell 88E6095/6095F/6131
This enables support for the Marvell 88E6085/6095/6095F/6131
ethernet switch chips.

config NET_DSA_MV88E6123_61_65
Expand Down
Loading

0 comments on commit 7143b7d

Please sign in to comment.