Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180630
b: refs/heads/master
c: 1868821
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Feb 17, 2010
1 parent 0a62cb9 commit 933d20f
Show file tree
Hide file tree
Showing 36 changed files with 147 additions and 109 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: 31e5d4abceaa3d11ff583ddf76ec292e90eacb7d
refs/heads/master: 18688218d171cb653cbe82d03f72e51b02a5a83e
4 changes: 3 additions & 1 deletion trunk/arch/ia64/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
relevant until we have real hardware to play with... */
#define ELF_PLATFORM NULL

#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
#define SET_PERSONALITY(ex) \
set_personality((current->personality & ~PER_MASK) | PER_LINUX)

#define elf_read_implies_exec(ex, executable_stack) \
((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/x86/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ static inline void elf_common_init(struct thread_struct *t,
}

#define ELF_PLAT_INIT(_r, load_addr) \
do { \
elf_common_init(&current->thread, _r, 0); \
clear_thread_flag(TIF_IA32); \
} while (0)
elf_common_init(&current->thread, _r, 0)

#define COMPAT_ELF_PLAT_INIT(regs, load_addr) \
elf_common_init(&current->thread, regs, __USER_DS)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ void set_personality_ia32(void)

/* Make sure to be in 32bit mode */
set_thread_flag(TIF_IA32);
current->personality |= force_personality32;

/* Prepare the first "return" to user space */
current_thread_info()->status |= TS_COMPAT;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj)
else
pr_debug("class '%s' does not have a release() function, "
"be careful\n", class->name);

kfree(cp);
}

static struct sysfs_ops class_sysfs_ops = {
Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/md/dm-log-userspace-transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,15 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
{
int r = 0;
size_t dummy = 0;
int overhead_size =
sizeof(struct dm_ulog_request *) + sizeof(struct cn_msg);
int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg);
struct dm_ulog_request *tfr = prealloced_ulog_tfr;
struct receiving_pkg pkg;

/*
* Given the space needed to hold the 'struct cn_msg' and
* 'struct dm_ulog_request' - do we have enough payload
* space remaining?
*/
if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) {
DMINFO("Size of tfr exceeds preallocated size");
return -EINVAL;
Expand All @@ -191,7 +195,7 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
*/
mutex_lock(&dm_ulog_lock);

memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size);
memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg));
memcpy(tfr->uuid, uuid, DM_UUID_LEN);
tfr->luid = luid;
tfr->seq = dm_ulog_seq++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
/*
* Dispatch io.
*/
if (unlikely(ms->log_failure)) {
if (unlikely(ms->log_failure) && errors_handled(ms)) {
spin_lock_irq(&ms->lock);
bio_list_merge(&ms->failures, &sync);
spin_unlock_irq(&ms->lock);
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/md/dm-region-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,9 @@ void dm_rh_recovery_end(struct dm_region *reg, int success)
spin_lock_irq(&rh->region_lock);
if (success)
list_add(&reg->list, &reg->rh->recovered_regions);
else {
reg->state = DM_RH_NOSYNC;
else
list_add(&reg->list, &reg->rh->failed_recovered_regions);
}

spin_unlock_irq(&rh->region_lock);

rh->wakeup_workers(rh->context);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-snap-persistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,
* Issue the synchronous I/O from a different thread
* to avoid generic_make_request recursion.
*/
INIT_WORK(&req.work, do_metadata);
INIT_WORK_ON_STACK(&req.work, do_metadata);
queue_work(ps->metadata_wq, &req.work);
flush_workqueue(ps->metadata_wq);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-stripe.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}

stripes = simple_strtoul(argv[0], &end, 10);
if (*end) {
if (!stripes || *end) {
ti->error = "Invalid stripe count";
return -EINVAL;
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/md/dm-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,13 @@ static struct sysfs_ops dm_sysfs_ops = {
.show = dm_attr_show,
};

/*
* The sysfs structure is embedded in md struct, nothing to do here
*/
static void dm_sysfs_release(struct kobject *kobj)
{
}

/*
* dm kobject is embedded in mapped_device structure
* no need to define release function here
*/
static struct kobj_type dm_ktype = {
.sysfs_ops = &dm_sysfs_ops,
.default_attrs = dm_attrs,
.release = dm_sysfs_release
};

/*
Expand Down
21 changes: 17 additions & 4 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,10 +1595,15 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq)
return BLKPREP_OK;
}

static void map_request(struct dm_target *ti, struct request *clone,
struct mapped_device *md)
/*
* Returns:
* 0 : the request has been processed (not requeued)
* !0 : the request has been requeued
*/
static int map_request(struct dm_target *ti, struct request *clone,
struct mapped_device *md)
{
int r;
int r, requeued = 0;
struct dm_rq_target_io *tio = clone->end_io_data;

/*
Expand All @@ -1625,6 +1630,7 @@ static void map_request(struct dm_target *ti, struct request *clone,
case DM_MAPIO_REQUEUE:
/* The target wants to requeue the I/O */
dm_requeue_unmapped_request(clone);
requeued = 1;
break;
default:
if (r > 0) {
Expand All @@ -1636,6 +1642,8 @@ static void map_request(struct dm_target *ti, struct request *clone,
dm_kill_unmapped_request(clone, r);
break;
}

return requeued;
}

/*
Expand Down Expand Up @@ -1677,12 +1685,17 @@ static void dm_request_fn(struct request_queue *q)
atomic_inc(&md->pending[rq_data_dir(clone)]);

spin_unlock(q->queue_lock);
map_request(ti, clone, md);
if (map_request(ti, clone, md))
goto requeued;

spin_lock_irq(q->queue_lock);
}

goto out;

requeued:
spin_lock_irq(q->queue_lock);

plug_and_out:
if (!elv_queue_empty(q))
/* Some requests still remain, retry later */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
req_hdr->opcode = opcode;
req_hdr->subsystem = subsystem;
req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr));
req_hdr->version = 0;
}

static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages,
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/net/ixgbe/ixgbe_82598.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
u32 fctrl_reg;
u32 rmcs_reg;
u32 reg;
u32 link_speed = 0;
bool link_up;

#ifdef CONFIG_DCB
if (hw->fc.requested_mode == ixgbe_fc_pfc)
goto out;

#endif /* CONFIG_DCB */
/*
* On 82598 having Rx FC on causes resets while doing 1G
* so if it's on turn it off once we know link_speed. For
* more details see 82598 Specification update.
*/
hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
if (link_up && link_speed == IXGBE_LINK_SPEED_1GB_FULL) {
switch (hw->fc.requested_mode) {
case ixgbe_fc_full:
hw->fc.requested_mode = ixgbe_fc_tx_pause;
break;
case ixgbe_fc_rx_pause:
hw->fc.requested_mode = ixgbe_fc_none;
break;
default:
/* no change */
break;
}
}

/* Negotiate the fc mode to use */
ret_val = ixgbe_fc_autoneg(hw);
if (ret_val)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5763,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
if (err)
goto err_sw_init;

/* Make it possible the adapter to be woken up via WOL */
if (adapter->hw.mac.type == ixgbe_mac_82599EB)
IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);

/*
* If there is a fan on this device and it has failed log the
* failure.
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
fail2:
efx_fini_struct(efx);
fail1:
WARN_ON(rc > 0);
EFX_LOG(efx, "initialisation failed. rc=%d\n", rc);
free_netdev(net_dev);
return rc;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sfc/qt202x_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx)

falcon_board(efx)->type->init_phy(efx);

return rc;
return 0;

fail:
EFX_ERR(efx, "PHY reset timed out\n");
Expand Down
41 changes: 20 additions & 21 deletions trunk/drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status)
/**
* tx_srv - transmit interrupt service
* @vptr; Velocity
* @status:
*
* Scan the queues looking for transmitted packets that
* we can complete and clean up. Update any statistics as
* necessary/
*/
static int velocity_tx_srv(struct velocity_info *vptr, u32 status)
static int velocity_tx_srv(struct velocity_info *vptr)
{
struct tx_desc *td;
int qnum;
Expand Down Expand Up @@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
/**
* velocity_rx_srv - service RX interrupt
* @vptr: velocity
* @status: adapter status (unused)
*
* Walk the receive ring of the velocity adapter and remove
* any received packets from the receive queue. Hand the ring
* slots back to the adapter for reuse.
*/
static int velocity_rx_srv(struct velocity_info *vptr, int status,
int budget_left)
static int velocity_rx_srv(struct velocity_info *vptr, int budget_left)
{
struct net_device_stats *stats = &vptr->dev->stats;
int rd_curr = vptr->rx.curr;
Expand Down Expand Up @@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget)
struct velocity_info *vptr = container_of(napi,
struct velocity_info, napi);
unsigned int rx_done;
u32 isr_status;

spin_lock(&vptr->lock);
isr_status = mac_read_isr(vptr->mac_regs);

/* Ack the interrupt */
mac_write_isr(vptr->mac_regs, isr_status);
if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
velocity_error(vptr, isr_status);
unsigned long flags;

spin_lock_irqsave(&vptr->lock, flags);
/*
* Do rx and tx twice for performance (taken from the VIA
* out-of-tree driver).
*/
rx_done = velocity_rx_srv(vptr, isr_status, budget / 2);
velocity_tx_srv(vptr, isr_status);
rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done);
velocity_tx_srv(vptr, isr_status);

spin_unlock(&vptr->lock);
rx_done = velocity_rx_srv(vptr, budget / 2);
velocity_tx_srv(vptr);
rx_done += velocity_rx_srv(vptr, budget - rx_done);
velocity_tx_srv(vptr);

/* If budget not fully consumed, exit the polling mode */
if (rx_done < budget) {
napi_complete(napi);
mac_enable_int(vptr->mac_regs);
}
spin_unlock_irqrestore(&vptr->lock, flags);

return rx_done;
}
Expand Down Expand Up @@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance)
return IRQ_NONE;
}

/* Ack the interrupt */
mac_write_isr(vptr->mac_regs, isr_status);

if (likely(napi_schedule_prep(&vptr->napi))) {
mac_disable_int(vptr->mac_regs);
__napi_schedule(&vptr->napi);
}

if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
velocity_error(vptr, isr_status);

spin_unlock(&vptr->lock);

return IRQ_HANDLED;
Expand Down Expand Up @@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev)
velocity_init_registers(vptr, VELOCITY_INIT_WOL);
mac_disable_int(vptr->mac_regs);

velocity_tx_srv(vptr, 0);
velocity_tx_srv(vptr);

for (i = 0; i < vptr->tx.numq; i++) {
if (vptr->tx.used[i])
Expand Down Expand Up @@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev,
{
struct velocity_info *vptr = netdev_priv(dev);
int max_us = 0x3f * 64;
unsigned long flags;

/* 6 bits of */
if (ecmd->tx_coalesce_usecs > max_us)
Expand All @@ -3365,13 +3362,15 @@ static int velocity_set_coalesce(struct net_device *dev,
ecmd->tx_coalesce_usecs);

/* Setup the interrupt suppression and queue timers */
spin_lock_irqsave(&vptr->lock, flags);
mac_disable_int(vptr->mac_regs);
setup_adaptive_interrupts(vptr);
setup_queue_timers(vptr);

mac_write_int_mask(vptr->int_mask, vptr->mac_regs);
mac_clear_isr(vptr->mac_regs);
mac_enable_int(vptr->mac_regs);
spin_unlock_irqrestore(&vptr->lock, flags);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
bf->bf_frmlen -= padsize;
}

if (conf_is_ht(&hw->conf) && !is_pae(skb))
if (conf_is_ht(&hw->conf))
bf->bf_state.bf_type |= BUF_HT;

bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq);
Expand Down Expand Up @@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
goto tx_done;
}

if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) {
/*
* Try aggregation if it's a unicast data frame
* and the destination is HT capable.
Expand Down
Loading

0 comments on commit 933d20f

Please sign in to comment.