Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29523
b: refs/heads/master
c: db9ca58
h: refs/heads/master
i:
  29521: f72ce3d
  29519: 3fe4e19
v: v3
  • Loading branch information
Jeff Garzik committed Jun 14, 2006
1 parent afe8645 commit a535cc4
Show file tree
Hide file tree
Showing 20 changed files with 85 additions and 39 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: bf717b11aec20965d48dea36dea3eea18a75d18c
refs/heads/master: db9ca5803566078aafe63cf364ef98b5097e4194
2 changes: 1 addition & 1 deletion trunk/arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ config ALPHA_IRONGATE

config GENERIC_HWEIGHT
bool
default y if !ALPHA_EV6 && !ALPHA_EV67
default y if !ALPHA_EV67

config ALPHA_AVANTI
bool
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static void
imx_gpio_ack_irq(unsigned int irq)
{
DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq);
ISR(IRQ_TO_REG(irq)) |= 1 << ((irq - IRQ_GPIOA(0)) % 32);
ISR(IRQ_TO_REG(irq)) = 1 << ((irq - IRQ_GPIOA(0)) % 32);
}

static void
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/arm/mach-integrator/integrator_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ static void __init intcp_init_irq(void)
for (i = IRQ_PIC_START; i <= IRQ_PIC_END; i++) {
if (i == 11)
i = 22;
if (i == IRQ_CP_CPPLDINT)
i++;
if (i == 29)
break;
set_irq_chip(i, &pic_chip);
Expand All @@ -259,8 +257,7 @@ static void __init intcp_init_irq(void)
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
}

set_irq_handler(IRQ_CP_CPPLDINT, sic_handle_irq);
pic_unmask_irq(IRQ_CP_CPPLDINT);
set_irq_chained_handler(IRQ_CP_CPPLDINT, sic_handle_irq);
}

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ static int spitz_ohci_init(struct device *dev)
static struct pxaohci_platform_data spitz_ohci_platform_data = {
.port_mode = PMM_NPS_MODE,
.init = spitz_ohci_init,
.power_budget = 150,
};


Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/mach-sa1100/neponset.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
if (irr & (IRR_ETHERNET | IRR_USAR)) {
desc->chip->mask(irq);

/*
* Ack the interrupt now to prevent re-entering
* this neponset handler. Again, this is safe
* since we'll check the IRR register prior to
* leaving.
*/
desc->chip->ack(irq);

if (irr & IRR_ETHERNET) {
d = irq_desc + IRQ_NEPONSET_SMC9196;
desc_handle_irq(IRQ_NEPONSET_SMC9196, d, regs);
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/arm/mach-versatile/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,9 @@ void __init versatile_init_irq(void)
{
unsigned int i;

vic_init(VA_VIC_BASE, IRQ_VIC_START, ~(1 << 31));
vic_init(VA_VIC_BASE, IRQ_VIC_START, ~0);

set_irq_handler(IRQ_VICSOURCE31, sic_handle_irq);
enable_irq(IRQ_VICSOURCE31);
set_irq_chained_handler(IRQ_VICSOURCE31, sic_handle_irq);

/* Do second interrupt controller */
writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sparc64/kernel/sparc64_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ EXPORT_SYMBOL(svr4_getcontext);
EXPORT_SYMBOL(svr4_setcontext);
EXPORT_SYMBOL(compat_sys_ioctl);
EXPORT_SYMBOL(sparc32_open);
EXPORT_SYMBOL(sys_close);
#endif

/* Special internal versions of library functions. */
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,10 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
* longer than TTY_THRESHOLD_UNTHROTTLE in canonical mode,
* we won't get any more characters.
*/
if (n_tty_chars_in_buffer(tty) <= TTY_THRESHOLD_UNTHROTTLE)
if (n_tty_chars_in_buffer(tty) <= TTY_THRESHOLD_UNTHROTTLE) {
n_tty_set_room(tty);
check_unthrottle(tty);
}

if (b - buf >= minimum)
break;
Expand Down
46 changes: 31 additions & 15 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,11 @@ static u16 gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg)
return v;
}

static int sky2_set_power_state(struct sky2_hw *hw, pci_power_t state)
static void sky2_set_power_state(struct sky2_hw *hw, pci_power_t state)
{
u16 power_control;
u32 reg1;
int vaux;
int ret = 0;

pr_debug("sky2_set_power_state %d\n", state);
sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
Expand Down Expand Up @@ -275,12 +274,10 @@ static int sky2_set_power_state(struct sky2_hw *hw, pci_power_t state)
break;
default:
printk(KERN_ERR PFX "Unknown power state %d\n", state);
ret = -1;
}

sky2_pci_write16(hw, hw->pm_cap + PCI_PM_CTRL, power_control);
sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
return ret;
}

static void sky2_phy_reset(struct sky2_hw *hw, unsigned port)
Expand Down Expand Up @@ -2164,6 +2161,13 @@ static void sky2_descriptor_error(struct sky2_hw *hw, unsigned port,
/* If idle then force a fake soft NAPI poll once a second
* to work around cases where sharing an edge triggered interrupt.
*/
static inline void sky2_idle_start(struct sky2_hw *hw)
{
if (idle_timeout > 0)
mod_timer(&hw->idle_timer,
jiffies + msecs_to_jiffies(idle_timeout));
}

static void sky2_idle(unsigned long arg)
{
struct sky2_hw *hw = (struct sky2_hw *) arg;
Expand All @@ -2183,6 +2187,9 @@ static int sky2_poll(struct net_device *dev0, int *budget)
int work_done = 0;
u32 status = sky2_read32(hw, B0_Y2_SP_EISR);

if (!~status)
goto out;

if (status & Y2_IS_HW_ERR)
sky2_hw_intr(hw);

Expand Down Expand Up @@ -2219,7 +2226,7 @@ static int sky2_poll(struct net_device *dev0, int *budget)

if (sky2_more_work(hw))
return 1;

out:
netif_rx_complete(dev0);

sky2_read32(hw, B0_Y2_SP_LISR);
Expand Down Expand Up @@ -3350,9 +3357,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
sky2_write32(hw, B0_IMSK, Y2_IS_BASE);

setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw);
if (idle_timeout > 0)
mod_timer(&hw->idle_timer,
jiffies + msecs_to_jiffies(idle_timeout));
sky2_idle_start(hw);

pci_set_drvdata(pdev, hw);

Expand Down Expand Up @@ -3425,8 +3430,14 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct sky2_hw *hw = pci_get_drvdata(pdev);
int i;
pci_power_t pstate = pci_choose_state(pdev, state);

if (!(pstate == PCI_D3hot || pstate == PCI_D3cold))
return -EINVAL;

del_timer_sync(&hw->idle_timer);

for (i = 0; i < 2; i++) {
for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];

if (dev) {
Expand All @@ -3438,7 +3449,10 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
}
}

return sky2_set_power_state(hw, pci_choose_state(pdev, state));
sky2_write32(hw, B0_IMSK, 0);
pci_save_state(pdev);
sky2_set_power_state(hw, pstate);
return 0;
}

static int sky2_resume(struct pci_dev *pdev)
Expand All @@ -3448,15 +3462,15 @@ static int sky2_resume(struct pci_dev *pdev)

pci_restore_state(pdev);
pci_enable_wake(pdev, PCI_D0, 0);
err = sky2_set_power_state(hw, PCI_D0);
if (err)
goto out;
sky2_set_power_state(hw, PCI_D0);

err = sky2_reset(hw);
if (err)
goto out;

for (i = 0; i < 2; i++) {
sky2_write32(hw, B0_IMSK, Y2_IS_BASE);

for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
if (dev && netif_running(dev)) {
netif_device_attach(dev);
Expand All @@ -3465,10 +3479,12 @@ static int sky2_resume(struct pci_dev *pdev)
printk(KERN_ERR PFX "%s: could not up: %d\n",
dev->name, err);
dev_close(dev);
break;
goto out;
}
}
}

sky2_idle_start(hw);
out:
return err;
}
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ static int pci_device_suspend(struct device * dev, pm_message_t state)
* Default resume method for devices that have no driver provided resume,
* or not even a driver at all.
*/
static void pci_default_resume(struct pci_dev *pci_dev)
static int pci_default_resume(struct pci_dev *pci_dev)
{
int retval;
int retval = 0;

/* restore the PCI config space */
pci_restore_state(pci_dev);
Expand All @@ -297,18 +297,21 @@ static void pci_default_resume(struct pci_dev *pci_dev)
/* if the device was busmaster before the suspend, make it busmaster again */
if (pci_dev->is_busmaster)
pci_set_master(pci_dev);

return retval;
}

static int pci_device_resume(struct device * dev)
{
int error;
struct pci_dev * pci_dev = to_pci_dev(dev);
struct pci_driver * drv = pci_dev->driver;

if (drv && drv->resume)
drv->resume(pci_dev);
error = drv->resume(pci_dev);
else
pci_default_resume(pci_dev);
return 0;
error = pci_default_resume(pci_dev);
return error;
}

static void pci_device_shutdown(struct device *dev)
Expand Down
18 changes: 16 additions & 2 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,23 @@ int
pci_restore_state(struct pci_dev *dev)
{
int i;
int val;

for (i = 0; i < 16; i++)
pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]);
/*
* The Base Address register should be programmed before the command
* register(s)
*/
for (i = 15; i >= 0; i--) {
pci_read_config_dword(dev, i * 4, &val);
if (val != dev->saved_config_space[i]) {
printk(KERN_DEBUG "PM: Writing back config space on "
"device %s at offset %x (was %x, writing %x)\n",
pci_name(dev), i,
val, (int)dev->saved_config_space[i]);
pci_write_config_dword(dev,i * 4,
dev->saved_config_space[i]);
}
}
pci_restore_msi_state(dev);
pci_restore_msix_state(dev);
return 0;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/usb/host/ohci-pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
/* Select Power Management Mode */
pxa27x_ohci_select_pmm(inf->port_mode);

if (inf->power_budget)
hcd->power_budget = inf->power_budget;

ohci_hcd_init(hcd_to_ohci(hcd));

retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-arm/arch-pxa/ohci.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ struct pxaohci_platform_data {
#define PMM_NPS_MODE 1
#define PMM_GLOBAL_MODE 2
#define PMM_PERPORT_MODE 3

int power_budget;
};

extern void pxa_set_ohci_info(struct pxaohci_platform_data *info);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/pci-acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
extern acpi_status pci_osc_support_set(u32 flags);
#else
#if !defined(acpi_status)
#if !defined(AE_ERROR)
typedef u32 acpi_status;
#define AE_ERROR (acpi_status) (0x0001)
#endif
Expand Down
2 changes: 2 additions & 0 deletions trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,7 @@ static int shmem_rmdir(struct inode *dir, struct dentry *dentry)
if (!simple_empty(dentry))
return -ENOTEMPTY;

dentry->d_inode->i_nlink--;
dir->i_nlink--;
return shmem_unlink(dir, dentry);
}
Expand Down Expand Up @@ -2102,6 +2103,7 @@ static int shmem_fill_super(struct super_block *sb,
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
sb->s_magic = TMPFS_MAGIC;
sb->s_op = &shmem_ops;
sb->s_time_gran = 1;

inode = shmem_get_inode(sb, S_IFDIR | mode, 0);
if (!inode)
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, unsigned long nr_pages,
loop_again:
total_scanned = 0;
nr_reclaimed = 0;
sc.may_writepage = !laptop_mode,
sc.may_writepage = !laptop_mode;
sc.nr_mapped = read_page_state(nr_mapped);

inc_page_state(pageoutrun);
Expand Down
1 change: 1 addition & 0 deletions trunk/net/dccp/ackvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ static void dccp_ackvec_check_rcv_ackvector(struct dccp_ackvec *av,
(unsigned long long)
avr->dccpavr_ack_ackno);
dccp_ackvec_throw_record(av, avr);
break;
}
/*
* If it wasn't received, continue scanning... we might
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/ip_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ int ip_forward(struct sk_buff *skb)

too_many_hops:
/* Tell the sender its packet died... */
IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0);
drop:
kfree_skb(skb);
Expand Down
4 changes: 1 addition & 3 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ static void tcp_update_scoreboard(struct sock *sk, struct tcp_sock *tp)
* Hence, we can detect timed out packets during fast
* retransmit without falling to slow start.
*/
if (tcp_head_timedout(sk, tp)) {
if (!IsReno(tp) && tcp_head_timedout(sk, tp)) {
struct sk_buff *skb;

skb = tp->scoreboard_skb_hint ? tp->scoreboard_skb_hint
Expand All @@ -1662,8 +1662,6 @@ static void tcp_update_scoreboard(struct sock *sk, struct tcp_sock *tp)
if (!(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) {
TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
tp->lost_out += tcp_skb_pcount(skb);
if (IsReno(tp))
tcp_remove_reno_sacks(sk, tp, tcp_skb_pcount(skb) + 1);

/* clear xmit_retrans hint */
if (tp->retransmit_skb_hint &&
Expand Down

0 comments on commit a535cc4

Please sign in to comment.