Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189047
b: refs/heads/master
c: 80bb3a0
h: refs/heads/master
i:
  189045: 120bacd
  189043: 8a8a978
  189039: 158bec9
v: v3
  • Loading branch information
David S. Miller committed Mar 25, 2010
1 parent ee808ba commit 6305816
Show file tree
Hide file tree
Showing 65 changed files with 634 additions and 386 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: 8f5992291457c8e6de2f5fe39849de6756be1a96
refs/heads/master: 80bb3a00fa314e3c5dbbd23a38bfaf94f2402b99
8 changes: 5 additions & 3 deletions trunk/arch/x86/kernel/cpu/perf_event_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,12 @@ static void amd_pmu_cpu_offline(int cpu)

raw_spin_lock(&amd_nb_lock);

if (--cpuhw->amd_nb->refcnt == 0)
kfree(cpuhw->amd_nb);
if (cpuhw->amd_nb) {
if (--cpuhw->amd_nb->refcnt == 0)
kfree(cpuhw->amd_nb);

cpuhw->amd_nb = NULL;
cpuhw->amd_nb = NULL;
}

raw_spin_unlock(&amd_nb_lock);
}
Expand Down
15 changes: 13 additions & 2 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,10 @@ static void resize_console(struct port *port)
struct virtio_device *vdev;
struct winsize ws;

/* The port could have been hot-unplugged */
if (!port)
return;

vdev = port->portdev->vdev;
if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_SIZE)) {
vdev->config->get(vdev,
Expand Down Expand Up @@ -947,11 +951,18 @@ static void handle_control_message(struct ports_device *portdev,
*/
err = sysfs_create_group(&port->dev->kobj,
&port_attribute_group);
if (err)
if (err) {
dev_err(port->dev,
"Error %d creating sysfs device attributes\n",
err);

} else {
/*
* Generate a udev event so that appropriate
* symlinks can be created based on udev
* rules.
*/
kobject_uevent(&port->dev->kobj, KOBJ_CHANGE);
}
break;
case VIRTIO_CONSOLE_PORT_REMOVE:
/*
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/edac/edac_mce_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,12 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors)
if (regs->nbsh & K8_NBSH_ERR_CPU_VAL)
pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf));
} else {
pr_cont(", core: %d\n", fls((regs->nbsh & 0xf) - 1));
u8 assoc_cpus = regs->nbsh & 0xf;

if (assoc_cpus > 0)
pr_cont(", core: %d", fls(assoc_cpus) - 1);

pr_cont("\n");
}

pr_emerg("%s.\n", EXT_ERR_MSG(xec));
Expand Down
24 changes: 9 additions & 15 deletions trunk/drivers/net/arm/ks8695net.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,19 +449,17 @@ ks8695_rx_irq(int irq, void *dev_id)
}

/**
* ks8695_rx - Receive packets called by NAPI poll method
* ks8695_rx - Receive packets called by NAPI poll method
* @ksp: Private data for the KS8695 Ethernet
* @budget: The max packets would be receive
* @budget: Number of packets allowed to process
*/

static int ks8695_rx(struct ks8695_priv *ksp, int budget)
{
struct net_device *ndev = ksp->ndev;
struct sk_buff *skb;
int buff_n;
u32 flags;
int pktlen;
int last_rx_processed = -1;
int received = 0;

buff_n = ksp->next_rx_desc_read;
Expand All @@ -471,6 +469,7 @@ static int ks8695_rx(struct ks8695_priv *ksp, int budget)
cpu_to_le32(RDES_OWN)))) {
rmb();
flags = le32_to_cpu(ksp->rx_ring[buff_n].status);

/* Found an SKB which we own, this means we
* received a packet
*/
Expand Down Expand Up @@ -533,23 +532,18 @@ static int ks8695_rx(struct ks8695_priv *ksp, int budget)
ksp->rx_ring[buff_n].status = cpu_to_le32(RDES_OWN);
rx_finished:
received++;
/* And note this as processed so we can start
* from here next time
*/
last_rx_processed = buff_n;
buff_n = (buff_n + 1) & MAX_RX_DESC_MASK;
/*And note which RX descriptor we last did */
if (likely(last_rx_processed != -1))
ksp->next_rx_desc_read =
(last_rx_processed + 1) &
MAX_RX_DESC_MASK;
}

/* And note which RX descriptor we last did */
ksp->next_rx_desc_read = buff_n;

/* And refill the buffers */
ks8695_refill_rxbuffers(ksp);

/* Kick the RX DMA engine, in case it became
* suspended */
/* Kick the RX DMA engine, in case it became suspended */
ks8695_writereg(ksp, KS8695_DRSC, 0);

return received;
}

Expand Down
14 changes: 9 additions & 5 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ static const struct flash_spec flash_5709 = {

MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl);

static void bnx2_init_napi(struct bnx2 *bp);

static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)
{
u32 diff;
Expand Down Expand Up @@ -6197,6 +6199,7 @@ bnx2_open(struct net_device *dev)
bnx2_disable_int(bp);

bnx2_setup_int_mode(bp, disable_msi);
bnx2_init_napi(bp);
bnx2_napi_enable(bp);
rc = bnx2_alloc_mem(bp);
if (rc)
Expand Down Expand Up @@ -7643,9 +7646,11 @@ poll_bnx2(struct net_device *dev)
int i;

for (i = 0; i < bp->irq_nvecs; i++) {
disable_irq(bp->irq_tbl[i].vector);
bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]);
enable_irq(bp->irq_tbl[i].vector);
struct bnx2_irq *irq = &bp->irq_tbl[i];

disable_irq(irq->vector);
irq->handler(irq->vector, &bp->bnx2_napi[i]);
enable_irq(irq->vector);
}
}
#endif
Expand Down Expand Up @@ -8207,7 +8212,7 @@ bnx2_init_napi(struct bnx2 *bp)
{
int i;

for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) {
for (i = 0; i < bp->irq_nvecs; i++) {
struct bnx2_napi *bnapi = &bp->bnx2_napi[i];
int (*poll)(struct napi_struct *, int);

Expand Down Expand Up @@ -8276,7 +8281,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->ethtool_ops = &bnx2_ethtool_ops;

bp = netdev_priv(dev);
bnx2_init_napi(bp);

pci_set_drvdata(pdev, dev);

Expand Down
97 changes: 7 additions & 90 deletions trunk/drivers/net/can/bfin_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,96 +22,13 @@
#include <linux/can/dev.h>
#include <linux/can/error.h>

#include <asm/bfin_can.h>
#include <asm/portmux.h>

#define DRV_NAME "bfin_can"
#define BFIN_CAN_TIMEOUT 100
#define TX_ECHO_SKB_MAX 1

/*
* transmit and receive channels
*/
#define TRANSMIT_CHL 24
#define RECEIVE_STD_CHL 0
#define RECEIVE_EXT_CHL 4
#define RECEIVE_RTR_CHL 8
#define RECEIVE_EXT_RTR_CHL 12
#define MAX_CHL_NUMBER 32

/*
* bfin can registers layout
*/
struct bfin_can_mask_regs {
u16 aml;
u16 dummy1;
u16 amh;
u16 dummy2;
};

struct bfin_can_channel_regs {
u16 data[8];
u16 dlc;
u16 dummy1;
u16 tsv;
u16 dummy2;
u16 id0;
u16 dummy3;
u16 id1;
u16 dummy4;
};

struct bfin_can_regs {
/*
* global control and status registers
*/
u16 mc1; /* offset 0 */
u16 dummy1;
u16 md1; /* offset 4 */
u16 rsv1[13];
u16 mbtif1; /* offset 0x20 */
u16 dummy2;
u16 mbrif1; /* offset 0x24 */
u16 dummy3;
u16 mbim1; /* offset 0x28 */
u16 rsv2[11];
u16 mc2; /* offset 0x40 */
u16 dummy4;
u16 md2; /* offset 0x44 */
u16 dummy5;
u16 trs2; /* offset 0x48 */
u16 rsv3[11];
u16 mbtif2; /* offset 0x60 */
u16 dummy6;
u16 mbrif2; /* offset 0x64 */
u16 dummy7;
u16 mbim2; /* offset 0x68 */
u16 rsv4[11];
u16 clk; /* offset 0x80 */
u16 dummy8;
u16 timing; /* offset 0x84 */
u16 rsv5[3];
u16 status; /* offset 0x8c */
u16 dummy9;
u16 cec; /* offset 0x90 */
u16 dummy10;
u16 gis; /* offset 0x94 */
u16 dummy11;
u16 gim; /* offset 0x98 */
u16 rsv6[3];
u16 ctrl; /* offset 0xa0 */
u16 dummy12;
u16 intr; /* offset 0xa4 */
u16 rsv7[7];
u16 esr; /* offset 0xb4 */
u16 rsv8[37];

/*
* channel(mailbox) mask and message registers
*/
struct bfin_can_mask_regs msk[MAX_CHL_NUMBER]; /* offset 0x100 */
struct bfin_can_channel_regs chl[MAX_CHL_NUMBER]; /* offset 0x200 */
};

/*
* bfin can private data
*/
Expand Down Expand Up @@ -163,7 +80,7 @@ static int bfin_can_set_bittiming(struct net_device *dev)
if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
timing |= SAM;

bfin_write16(&reg->clk, clk);
bfin_write16(&reg->clock, clk);
bfin_write16(&reg->timing, timing);

dev_info(dev->dev.parent, "setting CLOCK=0x%04x TIMING=0x%04x\n",
Expand All @@ -185,11 +102,11 @@ static void bfin_can_set_reset_mode(struct net_device *dev)
bfin_write16(&reg->gim, 0);

/* reset can and enter configuration mode */
bfin_write16(&reg->ctrl, SRS | CCR);
bfin_write16(&reg->control, SRS | CCR);
SSYNC();
bfin_write16(&reg->ctrl, CCR);
bfin_write16(&reg->control, CCR);
SSYNC();
while (!(bfin_read16(&reg->ctrl) & CCA)) {
while (!(bfin_read16(&reg->control) & CCA)) {
udelay(10);
if (--timeout == 0) {
dev_err(dev->dev.parent,
Expand Down Expand Up @@ -244,7 +161,7 @@ static void bfin_can_set_normal_mode(struct net_device *dev)
/*
* leave configuration mode
*/
bfin_write16(&reg->ctrl, bfin_read16(&reg->ctrl) & ~CCR);
bfin_write16(&reg->control, bfin_read16(&reg->control) & ~CCR);

while (bfin_read16(&reg->status) & CCA) {
udelay(10);
Expand Down Expand Up @@ -726,7 +643,7 @@ static int bfin_can_suspend(struct platform_device *pdev, pm_message_t mesg)

if (netif_running(dev)) {
/* enter sleep mode */
bfin_write16(&reg->ctrl, bfin_read16(&reg->ctrl) | SMR);
bfin_write16(&reg->control, bfin_read16(&reg->control) | SMR);
SSYNC();
while (!(bfin_read16(&reg->intr) & SMACK)) {
udelay(10);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/e1000_82575.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
case E1000_DEV_ID_82576_FIBER:
case E1000_DEV_ID_82576_SERDES:
case E1000_DEV_ID_82576_QUAD_COPPER:
case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
case E1000_DEV_ID_82576_SERDES_QUAD:
mac->type = e1000_82576;
break;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/e1000_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct e1000_hw;
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526
#define E1000_DEV_ID_82576_NS 0x150A
#define E1000_DEV_ID_82576_NS_SERDES 0x1518
#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/igb/igb.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ struct igb_adapter {

/* TX */
struct igb_ring *tx_ring[16];
unsigned long tx_queue_len;
u32 tx_timeout_count;

/* RX */
Expand Down
Loading

0 comments on commit 6305816

Please sign in to comment.