Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64016
b: refs/heads/master
c: 3b993e8
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 14, 2007
1 parent 069b3a1 commit 02cd255
Show file tree
Hide file tree
Showing 36 changed files with 167 additions and 111 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: b5d0b4ba389711183b5af71438fe21b40ee32d6d
refs/heads/master: 3b993e8bee32d6dfe04df560eda8e1aff6248a22
6 changes: 6 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ M: philb@gnu.org
L: netdev@vger.kernel.org
S: Maintained

3C59X NETWORK DRIVER
P: Steffen Klassert
M: klassert@mathematik.tu-chemnitz.de
L: netdev@vger.kernel.org
S: Maintained

3CR990 NETWORK DRIVER
P: David Dillow
M: dave@thedillows.org
Expand Down
17 changes: 17 additions & 0 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,19 @@ static struct acpi_ec *make_acpi_ec(void)
return ec;
}

static acpi_status
acpi_ec_register_query_methods(acpi_handle handle, u32 level,
void *context, void **return_value)
{
struct acpi_namespace_node *node = handle;
struct acpi_ec *ec = context;
int value = 0;
if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
}
return AE_OK;
}

static acpi_status
ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
{
Expand All @@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
if (ACPI_FAILURE(status))
return status;

/* Find and register all query methods */
acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
acpi_ec_register_query_methods, ec, NULL);

/* Use the global lock for all EC transactions? */
acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/atm/fore200e.c
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ fore200e_init_cmd_queue(struct fore200e* fore200e)
}


static void __init
static void __devinit
fore200e_param_bs_queue(struct fore200e* fore200e,
enum buffer_scheme scheme, enum buffer_magn magn,
int queue_length, int pool_size, int supply_blksize)
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/atm/iphase.c
Original file line number Diff line number Diff line change
Expand Up @@ -1601,14 +1601,14 @@ static int rx_init(struct atm_dev *dev)

skb_queue_head_init(&iadev->rx_dma_q);
iadev->rx_free_desc_qhead = NULL;
iadev->rx_open = kmalloc(4*iadev->num_vc,GFP_KERNEL);
if (!iadev->rx_open)
{

iadev->rx_open = kzalloc(4 * iadev->num_vc, GFP_KERNEL);
if (!iadev->rx_open) {
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
dev->number);
goto err_free_dle;
}
memset(iadev->rx_open, 0, 4*iadev->num_vc);

iadev->rxing = 1;
iadev->rx_pkt_cnt = 0;
/* Mode Register */
Expand Down Expand Up @@ -3171,12 +3171,12 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
unsigned long flags;
int ret;

iadev = kmalloc(sizeof(*iadev), GFP_KERNEL);
iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
if (!iadev) {
ret = -ENOMEM;
goto err_out;
}
memset(iadev, 0, sizeof(*iadev));

iadev->pci = pdev;

IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/atm/lanai.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>

/* -------------------- TUNABLE PARAMATERS: */

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,7 @@ vortex_up(struct net_device *dev)
mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
mii_reg5 = mdio_read(dev, vp->phys[0], MII_LPA);
vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
vp->mii.full_duplex = vp->full_duplex;

vortex_check_media(dev, 1);
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/ax88796.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,9 @@ static int ax_probe(struct platform_device *pdev)
dev->base_addr = (unsigned long)ei_status.mem;

if (ei_status.mem == NULL) {
dev_err(&pdev->dev, "Cannot ioremap area (%08zx,%08zx)\n",
res->start, res->end);
dev_err(&pdev->dev, "Cannot ioremap area (%08llx,%08llx)\n",
(unsigned long long)res->start,
(unsigned long long)res->end);

ret = -ENXIO;
goto exit_req;
Expand Down
34 changes: 13 additions & 21 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,43 +1202,35 @@ static int bond_sethwaddr(struct net_device *bond_dev,
return 0;
}

#define BOND_INTERSECT_FEATURES \
(NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_TSO | NETIF_F_UFO)
#define BOND_VLAN_FEATURES \
(NETIF_F_VLAN_CHALLENGED | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX | \
NETIF_F_HW_VLAN_FILTER)

/*
* Compute the common dev->feature set available to all slaves. Some
* feature bits are managed elsewhere, so preserve feature bits set on
* master device that are not part of the examined set.
* feature bits are managed elsewhere, so preserve those feature bits
* on the master device.
*/
static int bond_compute_features(struct bonding *bond)
{
unsigned long features = BOND_INTERSECT_FEATURES;
struct slave *slave;
struct net_device *bond_dev = bond->dev;
unsigned long features = bond_dev->features;
unsigned short max_hard_header_len = ETH_HLEN;
int i;

features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;

bond_for_each_slave(bond, slave, i) {
features &= (slave->dev->features & BOND_INTERSECT_FEATURES);
features = netdev_compute_features(features,
slave->dev->features);
if (slave->dev->hard_header_len > max_hard_header_len)
max_hard_header_len = slave->dev->hard_header_len;
}

if ((features & NETIF_F_SG) &&
!(features & NETIF_F_ALL_CSUM))
features &= ~NETIF_F_SG;

/*
* features will include NETIF_F_TSO (NETIF_F_UFO) iff all
* slave devices support NETIF_F_TSO (NETIF_F_UFO), which
* implies that all slaves also support scatter-gather
* (NETIF_F_SG), which implies that features also includes
* NETIF_F_SG. So no need to check whether we have an
* illegal combination of NETIF_F_{TSO,UFO} and
* !NETIF_F_SG
*/

features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES);
features |= (bond_dev->features & BOND_VLAN_FEATURES);
bond_dev->features = features;
bond_dev->hard_header_len = max_hard_header_len;

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,7 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wol
case E1000_DEV_ID_82545EM_COPPER:
case E1000_DEV_ID_82546GB_QUAD_COPPER:
case E1000_DEV_ID_82546GB_PCIE:
case E1000_DEV_ID_82571EB_SERDES_QUAD:
/* these don't support WoL at all */
wol->supported = 0;
break;
Expand All @@ -1723,6 +1724,7 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wol
retval = 0;
break;
case E1000_DEV_ID_82571EB_QUAD_COPPER:
case E1000_DEV_ID_82571EB_QUAD_FIBER:
case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
/* quad port adapters only support WoL on port A */
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/e1000/e1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,10 @@ e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_82571EB_COPPER:
case E1000_DEV_ID_82571EB_FIBER:
case E1000_DEV_ID_82571EB_SERDES:
case E1000_DEV_ID_82571EB_SERDES_DUAL:
case E1000_DEV_ID_82571EB_SERDES_QUAD:
case E1000_DEV_ID_82571EB_QUAD_COPPER:
case E1000_DEV_ID_82571EB_QUAD_FIBER:
case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
hw->mac_type = e1000_82571;
break;
Expand Down Expand Up @@ -485,6 +488,8 @@ e1000_set_media_type(struct e1000_hw *hw)
case E1000_DEV_ID_82545GM_SERDES:
case E1000_DEV_ID_82546GB_SERDES:
case E1000_DEV_ID_82571EB_SERDES:
case E1000_DEV_ID_82571EB_SERDES_DUAL:
case E1000_DEV_ID_82571EB_SERDES_QUAD:
case E1000_DEV_ID_82572EI_SERDES:
case E1000_DEV_ID_80003ES2LAN_SERDES_DPT:
hw->media_type = e1000_media_type_internal_serdes;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/e1000/e1000_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
#define E1000_DEV_ID_82571EB_FIBER 0x105F
#define E1000_DEV_ID_82571EB_SERDES 0x1060
#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5
#define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC
#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA
#define E1000_DEV_ID_82572EI_COPPER 0x107D
#define E1000_DEV_ID_82572EI_FIBER 0x107E
#define E1000_DEV_ID_82572EI_SERDES 0x107F
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,16 @@ static struct pci_device_id e1000_pci_tbl[] = {
INTEL_E1000_ETHERNET_DEVICE(0x1099),
INTEL_E1000_ETHERNET_DEVICE(0x109A),
INTEL_E1000_ETHERNET_DEVICE(0x10A4),
INTEL_E1000_ETHERNET_DEVICE(0x10A5),
INTEL_E1000_ETHERNET_DEVICE(0x10B5),
INTEL_E1000_ETHERNET_DEVICE(0x10B9),
INTEL_E1000_ETHERNET_DEVICE(0x10BA),
INTEL_E1000_ETHERNET_DEVICE(0x10BB),
INTEL_E1000_ETHERNET_DEVICE(0x10BC),
INTEL_E1000_ETHERNET_DEVICE(0x10C4),
INTEL_E1000_ETHERNET_DEVICE(0x10C5),
INTEL_E1000_ETHERNET_DEVICE(0x10D9),
INTEL_E1000_ETHERNET_DEVICE(0x10DA),
/* required last entry */
{0,}
};
Expand Down Expand Up @@ -1096,6 +1099,7 @@ e1000_probe(struct pci_dev *pdev,
break;
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
case E1000_DEV_ID_82571EB_QUAD_COPPER:
case E1000_DEV_ID_82571EB_QUAD_FIBER:
case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
/* if quad port adapter, disable WoL on all but port A */
if (global_quad_port_a != 0)
Expand Down
24 changes: 10 additions & 14 deletions trunk/drivers/net/irda/irda-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,10 +1561,9 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf
struct irda_class_desc *desc;
int ret;

desc = kmalloc(sizeof (*desc), GFP_KERNEL);
if (desc == NULL)
desc = kzalloc(sizeof(*desc), GFP_KERNEL);
if (!desc)
return NULL;
memset(desc, 0, sizeof(*desc));

/* USB-IrDA class spec 1.0:
* 6.1.3: Standard "Get Descriptor" Device Request is not
Expand Down Expand Up @@ -1617,7 +1616,7 @@ static int irda_usb_probe(struct usb_interface *intf,
{
struct net_device *net;
struct usb_device *dev = interface_to_usbdev(intf);
struct irda_usb_cb *self = NULL;
struct irda_usb_cb *self;
struct usb_host_interface *interface;
struct irda_class_desc *irda_desc;
int ret = -ENOMEM;
Expand Down Expand Up @@ -1655,7 +1654,7 @@ static int irda_usb_probe(struct usb_interface *intf,
self->header_length = USB_IRDA_HEADER;
}

self->rx_urb = kzalloc(self->max_rx_urb * sizeof(struct urb *),
self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struct urb *),
GFP_KERNEL);

for (i = 0; i < self->max_rx_urb; i++) {
Expand Down Expand Up @@ -1715,7 +1714,7 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Find IrDA class descriptor */
irda_desc = irda_usb_find_class_desc(intf);
ret = -ENODEV;
if (irda_desc == NULL)
if (!irda_desc)
goto err_out_3;

if (self->needspatch) {
Expand All @@ -1738,15 +1737,13 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Don't change this buffer size and allocation without doing
* some heavy and complete testing. Don't ask why :-(
* Jean II */
self->speed_buff = kmalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
if (self->speed_buff == NULL)
self->speed_buff = kzalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
if (!self->speed_buff)
goto err_out_3;

memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU);

self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length,
GFP_KERNEL);
if (self->tx_buff == NULL)
if (!self->tx_buff)
goto err_out_4;

ret = irda_usb_open(self);
Expand All @@ -1767,12 +1764,11 @@ static int irda_usb_probe(struct usb_interface *intf,

/* replace IrDA class descriptor with what patched device is now reporting */
irda_desc = irda_usb_find_class_desc (self->usbintf);
if (irda_desc == NULL) {
if (!irda_desc) {
ret = -ENODEV;
goto err_out_6;
}
if (self->irda_desc)
kfree (self->irda_desc);
kfree(self->irda_desc);
self->irda_desc = irda_desc;
irda_usb_init_qos(self);
}
Expand Down
25 changes: 18 additions & 7 deletions trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ struct myri10ge_priv {
struct timer_list watchdog_timer;
int watchdog_tx_done;
int watchdog_tx_req;
int watchdog_pause;
int watchdog_resets;
int tx_linearized;
int pause;
Expand Down Expand Up @@ -2800,6 +2801,7 @@ static void myri10ge_watchdog(struct work_struct *work)
static void myri10ge_watchdog_timer(unsigned long arg)
{
struct myri10ge_priv *mgp;
u32 rx_pause_cnt;

mgp = (struct myri10ge_priv *)arg;

Expand All @@ -2816,19 +2818,28 @@ static void myri10ge_watchdog_timer(unsigned long arg)
myri10ge_fill_thresh)
mgp->rx_big.watchdog_needed = 0;
}
rx_pause_cnt = ntohl(mgp->fw_stats->dropped_pause);

if (mgp->tx.req != mgp->tx.done &&
mgp->tx.done == mgp->watchdog_tx_done &&
mgp->watchdog_tx_req != mgp->watchdog_tx_done)
mgp->watchdog_tx_req != mgp->watchdog_tx_done) {
/* nic seems like it might be stuck.. */
schedule_work(&mgp->watchdog_work);
else
/* rearm timer */
mod_timer(&mgp->watchdog_timer,
jiffies + myri10ge_watchdog_timeout * HZ);

if (rx_pause_cnt != mgp->watchdog_pause) {
if (net_ratelimit())
printk(KERN_WARNING "myri10ge %s:"
"TX paused, check link partner\n",
mgp->dev->name);
} else {
schedule_work(&mgp->watchdog_work);
return;
}
}
/* rearm timer */
mod_timer(&mgp->watchdog_timer,
jiffies + myri10ge_watchdog_timeout * HZ);
mgp->watchdog_tx_done = mgp->tx.done;
mgp->watchdog_tx_req = mgp->tx.req;
mgp->watchdog_pause = rx_pause_cnt;
}

static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/natsemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2438,13 +2438,16 @@ static void netdev_error(struct net_device *dev, int intr_status)
dev->name);
}
np->stats.rx_fifo_errors++;
np->stats.rx_errors++;
}
/* Hmmmmm, it's not clear how to recover from PCI faults. */
if (intr_status & IntrPCIErr) {
printk(KERN_NOTICE "%s: PCI error %#08x\n", dev->name,
intr_status & IntrPCIErr);
np->stats.tx_fifo_errors++;
np->stats.tx_errors++;
np->stats.rx_fifo_errors++;
np->stats.rx_errors++;
}
spin_unlock(&np->lock);
}
Expand Down
Loading

0 comments on commit 02cd255

Please sign in to comment.