Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  myri10ge: update driver version to 1.3.2-1.269
  myri10ge: use pcie_get/set_readrq
  ehea: fix queue destructor
  ehea: fix module parameter description
  ehea: fix interface to DLPAR tools
  sgiseeq: Fix return type of sgiseeq_remove
  sky2 1.17
  sky2: only bring up watchdog if link is active
  sky2: clear PCI power control reg at startup
  DM9000: fix interface hang under load
  phy layer: fix genphy_setup_forced (don't reset)
  Don't use GFP_DMA for zone allocation.
  fix realtek phy id in forcedeth
  • Loading branch information
Linus Torvalds committed Aug 25, 2007
2 parents 0b887d0 + 2972863 commit 36373b4
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 86 deletions.
25 changes: 7 additions & 18 deletions drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,30 +700,25 @@ dm9000_init_dm9000(struct net_device *dev)
static int
dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long flags;
board_info_t *db = (board_info_t *) dev->priv;

PRINTK3("dm9000_start_xmit\n");

if (db->tx_pkt_cnt > 1)
return 1;

netif_stop_queue(dev);

/* Disable all interrupts */
iow(db, DM9000_IMR, IMR_PAR);
spin_lock_irqsave(&db->lock, flags);

/* Move data to DM9000 TX RAM */
writeb(DM9000_MWCMD, db->io_addr);

(db->outblk)(db->io_data, skb->data, skb->len);
db->stats.tx_bytes += skb->len;

db->tx_pkt_cnt++;
/* TX control: First packet immediately send, second packet queue */
if (db->tx_pkt_cnt == 0) {

/* First Packet */
db->tx_pkt_cnt++;

if (db->tx_pkt_cnt == 1) {
/* Set TX length to DM9000 */
iow(db, DM9000_TXPLL, skb->len & 0xff);
iow(db, DM9000_TXPLH, (skb->len >> 8) & 0xff);
Expand All @@ -732,23 +727,17 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
iow(db, DM9000_TCR, TCR_TXREQ); /* Cleared after TX complete */

dev->trans_start = jiffies; /* save the time stamp */

} else {
/* Second packet */
db->tx_pkt_cnt++;
db->queue_pkt_len = skb->len;
netif_stop_queue(dev);
}

spin_unlock_irqrestore(&db->lock, flags);

/* free this SKB */
dev_kfree_skb(skb);

/* Re-enable resource check */
if (db->tx_pkt_cnt == 1)
netif_wake_queue(dev);

/* Re-enable interrupt */
iow(db, DM9000_IMR, IMR_PAR | IMR_PTM | IMR_PRM);

return 0;
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ MODULE_PARM_DESC(rq1_entries, "Number of entries for Receive Queue 1 "
MODULE_PARM_DESC(sq_entries, " Number of entries for the Send Queue "
"[2^x - 1], x = [6..14]. Default = "
__MODULE_STRING(EHEA_DEF_ENTRIES_SQ) ")");
MODULE_PARM_DESC(use_mcs, " 0:NAPI, 1:Multiple receive queues, Default = 1 ");
MODULE_PARM_DESC(use_mcs, " 0:NAPI, 1:Multiple receive queues, Default = 0 ");

static int port_name_cnt = 0;
static LIST_HEAD(adapter_list);
Expand Down Expand Up @@ -2490,7 +2490,7 @@ static ssize_t ehea_show_port_id(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev);
return sprintf(buf, "0x%X", port->logical_port_id);
return sprintf(buf, "%d", port->logical_port_id);
}

static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id,
Expand Down Expand Up @@ -2781,7 +2781,7 @@ static ssize_t ehea_probe_port(struct device *dev,

u32 logical_port_id;

sscanf(buf, "%X", &logical_port_id);
sscanf(buf, "%d", &logical_port_id);

port = ehea_get_port(adapter, logical_port_id);

Expand Down Expand Up @@ -2834,7 +2834,7 @@ static ssize_t ehea_remove_port(struct device *dev,
int i;
u32 logical_port_id;

sscanf(buf, "%X", &logical_port_id);
sscanf(buf, "%d", &logical_port_id);

port = ehea_get_port(adapter, logical_port_id);

Expand Down
6 changes: 6 additions & 0 deletions drivers/net/ehea/ehea_qmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ int ehea_destroy_cq(struct ehea_cq *cq)
if (!cq)
return 0;

hcp_epas_dtor(&cq->epas);

if ((hret = ehea_destroy_cq_res(cq, NORMAL_FREE)) == H_R_STATE) {
ehea_error_data(cq->adapter, cq->fw_handle);
hret = ehea_destroy_cq_res(cq, FORCE_FREE);
Expand Down Expand Up @@ -361,6 +363,8 @@ int ehea_destroy_eq(struct ehea_eq *eq)
if (!eq)
return 0;

hcp_epas_dtor(&eq->epas);

if ((hret = ehea_destroy_eq_res(eq, NORMAL_FREE)) == H_R_STATE) {
ehea_error_data(eq->adapter, eq->fw_handle);
hret = ehea_destroy_eq_res(eq, FORCE_FREE);
Expand Down Expand Up @@ -541,6 +545,8 @@ int ehea_destroy_qp(struct ehea_qp *qp)
if (!qp)
return 0;

hcp_epas_dtor(&qp->epas);

if ((hret = ehea_destroy_qp_res(qp, NORMAL_FREE)) == H_R_STATE) {
ehea_error_data(qp->adapter, qp->fw_handle);
hret = ehea_destroy_qp_res(qp, FORCE_FREE);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ union ring_type {
#define PHY_OUI_MARVELL 0x5043
#define PHY_OUI_CICADA 0x03f1
#define PHY_OUI_VITESSE 0x01c1
#define PHY_OUI_REALTEK 0x01c1
#define PHY_OUI_REALTEK 0x0732
#define PHYID1_OUI_MASK 0x03ff
#define PHYID1_OUI_SHFT 6
#define PHYID2_OUI_MASK 0xfc00
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/meth.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static void meth_rx(struct net_device* dev, unsigned long int_status)
priv->stats.rx_length_errors++;
skb = priv->rx_skbs[priv->rx_write];
} else {
skb = alloc_skb(METH_RX_BUFF_SIZE, GFP_ATOMIC | GFP_DMA);
skb = alloc_skb(METH_RX_BUFF_SIZE, GFP_ATOMIC);
if (!skb) {
/* Ouch! No memory! Drop packet on the floor */
DPRINTK("No mem: dropping packet\n");
Expand Down
34 changes: 7 additions & 27 deletions drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#include "myri10ge_mcp.h"
#include "myri10ge_mcp_gen_header.h"

#define MYRI10GE_VERSION_STR "1.3.1-1.248"
#define MYRI10GE_VERSION_STR "1.3.2-1.269"

MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
MODULE_AUTHOR("Maintainer: help@myri.com");
Expand Down Expand Up @@ -2514,26 +2514,20 @@ static void myri10ge_firmware_probe(struct myri10ge_priv *mgp)
{
struct pci_dev *pdev = mgp->pdev;
struct device *dev = &pdev->dev;
int cap, status;
u16 val;
int status;

mgp->tx.boundary = 4096;
/*
* Verify the max read request size was set to 4KB
* before trying the test with 4KB.
*/
cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
if (cap < 64) {
dev_err(dev, "Bad PCI_CAP_ID_EXP location %d\n", cap);
goto abort;
}
status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val);
if (status != 0) {
status = pcie_get_readrq(pdev);
if (status < 0) {
dev_err(dev, "Couldn't read max read req size: %d\n", status);
goto abort;
}
if ((val & (5 << 12)) != (5 << 12)) {
dev_warn(dev, "Max Read Request size != 4096 (0x%x)\n", val);
if (status != 4096) {
dev_warn(dev, "Max Read Request size != 4096 (%d)\n", status);
mgp->tx.boundary = 2048;
}
/*
Expand Down Expand Up @@ -2850,9 +2844,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
size_t bytes;
int i;
int status = -ENXIO;
int cap;
int dac_enabled;
u16 val;

netdev = alloc_etherdev(sizeof(*mgp));
if (netdev == NULL) {
Expand Down Expand Up @@ -2884,19 +2876,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
= pci_find_capability(pdev, PCI_CAP_ID_VNDR);

/* Set our max read request to 4KB */
cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
if (cap < 64) {
dev_err(&pdev->dev, "Bad PCI_CAP_ID_EXP location %d\n", cap);
goto abort_with_netdev;
}
status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val);
if (status != 0) {
dev_err(&pdev->dev, "Error %d reading PCI_EXP_DEVCTL\n",
status);
goto abort_with_netdev;
}
val = (val & ~PCI_EXP_DEVCTL_READRQ) | (5 << 12);
status = pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, val);
status = pcie_set_readrq(pdev, 4096);
if (status != 0) {
dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n",
status);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ EXPORT_SYMBOL(genphy_config_advert);
*/
int genphy_setup_forced(struct phy_device *phydev)
{
int ctl = BMCR_RESET;
int ctl = 0;

phydev->pause = phydev->asym_pause = 0;

Expand Down
4 changes: 3 additions & 1 deletion drivers/net/sgiseeq.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ static int __init sgiseeq_probe(struct platform_device *pdev)
return err;
}

static void __exit sgiseeq_remove(struct platform_device *pdev)
static int __exit sgiseeq_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct sgiseeq_private *sp = netdev_priv(dev);
Expand All @@ -735,6 +735,8 @@ static void __exit sgiseeq_remove(struct platform_device *pdev)
free_page((unsigned long) sp->srings);
free_netdev(dev);
platform_set_drvdata(pdev, NULL);

return 0;
}

static struct platform_driver sgiseeq_driver = {
Expand Down
Loading

0 comments on commit 36373b4

Please sign in to comment.