Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65143
b: refs/heads/master
c: a7f3941
h: refs/heads/master
i:
  65141: cb22238
  65139: 2280e48
  65135: 2c57177
v: v3
  • Loading branch information
Linus Torvalds committed Sep 25, 2007
1 parent 403c43d commit 8d8fd4e
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 42 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: 474f81967217f3bec2389ae913da72641f2c40e3
refs/heads/master: a7f3941a2cecf044f3c2975aee9c2bd423018463
26 changes: 8 additions & 18 deletions trunk/drivers/char/mspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,22 @@ mspec_open(struct vm_area_struct *vma)
* mspec_close
*
* Called when unmapping a device mapping. Frees all mspec pages
* belonging to the vma.
* belonging to all the vma's sharing this vma_data structure.
*/
static void
mspec_close(struct vm_area_struct *vma)
{
struct vma_data *vdata;
int index, last_index, result;
int index, last_index;
unsigned long my_page;

vdata = vma->vm_private_data;

BUG_ON(vma->vm_start < vdata->vm_start || vma->vm_end > vdata->vm_end);
if (!atomic_dec_and_test(&vdata->refcnt))
return;

spin_lock(&vdata->lock);
index = (vma->vm_start - vdata->vm_start) >> PAGE_SHIFT;
last_index = (vma->vm_end - vdata->vm_start) >> PAGE_SHIFT;
for (; index < last_index; index++) {
last_index = (vdata->vm_end - vdata->vm_start) >> PAGE_SHIFT;
for (index = 0; index < last_index; index++) {
if (vdata->maddr[index] == 0)
continue;
/*
Expand All @@ -180,28 +179,19 @@ mspec_close(struct vm_area_struct *vma)
*/
my_page = vdata->maddr[index];
vdata->maddr[index] = 0;
spin_unlock(&vdata->lock);
result = mspec_zero_block(my_page, PAGE_SIZE);
if (!result)
if (!mspec_zero_block(my_page, PAGE_SIZE))
uncached_free_page(my_page);
else
printk(KERN_WARNING "mspec_close(): "
"failed to zero page %i\n",
result);
spin_lock(&vdata->lock);
"failed to zero page %ld\n", my_page);
}
spin_unlock(&vdata->lock);

if (!atomic_dec_and_test(&vdata->refcnt))
return;

if (vdata->flags & VMD_VMALLOCED)
vfree(vdata);
else
kfree(vdata);
}


/*
* mspec_nopfn
*
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/lguest/lguest_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
jmp lguest_init

/*G:055 We create a macro which puts the assembler code between lgstart_ and
* lgend_ markers. These templates end up in the .init.text section, so they
* are discarded after boot. */
* lgend_ markers. These templates are put in the .text section: they can't be
* discarded after boot as we may need to patch modules, too. */
.text
#define LGUEST_PATCH(name, insns...) \
lgstart_##name: insns; lgend_##name:; \
.globl lgstart_##name; .globl lgend_##name
Expand All @@ -34,7 +35,6 @@ LGUEST_PATCH(popf, movl %eax, lguest_data+LGUEST_DATA_irq_enabled)
LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
/*:*/

.text
/* These demark the EIP range where host should never deliver interrupts. */
.global lguest_noirq_start
.global lguest_noirq_end
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/pcmcia/3c589_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct el3_private {
spinlock_t lock;
};

static const char *if_names[] = { "auto", "10base2", "10baseT", "AUI" };
static const char *if_names[] = { "auto", "10baseT", "10base2", "AUI" };

/*====================================================================*/

Expand Down
14 changes: 13 additions & 1 deletion trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,10 @@ static void rtl8169_hw_phy_config(struct net_device *dev)
return;
}

/* phy config for RTL8169s mac_version C chip */
if ((tp->mac_version != RTL_GIGA_MAC_VER_02) &&
(tp->mac_version != RTL_GIGA_MAC_VER_03))
return;

mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1
mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000
mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7
Expand Down Expand Up @@ -2567,6 +2570,15 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
(TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
netif_wake_queue(dev);
}
/*
* 8168 hack: TxPoll requests are lost when the Tx packets are
* too close. Let's kick an extra TxPoll request when a burst
* of start_xmit activity is detected (if it is not detected,
* it is slow enough). -- FR
*/
smp_rmb();
if (tp->cur_tx != dirty_tx)
RTL_W8(TxPoll, NPQ);
}
}

Expand Down
37 changes: 24 additions & 13 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,16 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
if (!(hw->flags & SKY2_HW_GIGABIT)) {
/* enable automatic crossover */
ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1;

if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
hw->chip_rev == CHIP_REV_YU_FE2_A0) {
u16 spec;

/* Enable Class A driver for FE+ A0 */
spec = gm_phy_read(hw, port, PHY_MARV_FE_SPEC_2);
spec |= PHY_M_FESC_SEL_CL_A;
gm_phy_write(hw, port, PHY_MARV_FE_SPEC_2, spec);
}
} else {
/* disable energy detect */
ctrl &= ~PHY_M_PC_EN_DET_MSK;
Expand Down Expand Up @@ -816,7 +826,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR);
sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON);

if (!(hw->flags & SKY2_HW_RAMBUFFER)) {
/* On chips without ram buffer, pause is controled by MAC level */
if (sky2_read8(hw, B2_E_0) == 0) {
sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8);
sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8);

Expand Down Expand Up @@ -1271,7 +1282,7 @@ static int sky2_up(struct net_device *dev)
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
unsigned port = sky2->port;
u32 imask;
u32 imask, ramsize;
int cap, err = -ENOMEM;
struct net_device *otherdev = hw->dev[sky2->port^1];

Expand Down Expand Up @@ -1326,13 +1337,12 @@ static int sky2_up(struct net_device *dev)

sky2_mac_init(hw, port);

if (hw->flags & SKY2_HW_RAMBUFFER) {
/* Register is number of 4K blocks on internal RAM buffer. */
u32 ramsize = sky2_read8(hw, B2_E_0) * 4;
/* Register is number of 4K blocks on internal RAM buffer. */
ramsize = sky2_read8(hw, B2_E_0) * 4;
if (ramsize > 0) {
u32 rxspace;

printk(KERN_DEBUG PFX "%s: ram buffer %dK\n", dev->name, ramsize);

pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
if (ramsize < 16)
rxspace = ramsize / 2;
else
Expand Down Expand Up @@ -1995,7 +2005,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)

synchronize_irq(hw->pdev->irq);

if (!(hw->flags & SKY2_HW_RAMBUFFER))
if (sky2_read8(hw, B2_E_0) == 0)
sky2_set_tx_stfwd(hw, port);

ctl = gma_read16(hw, port, GM_GP_CTRL);
Expand Down Expand Up @@ -2526,7 +2536,7 @@ static void sky2_watchdog(unsigned long arg)
++active;

/* For chips with Rx FIFO, check if stuck */
if ((hw->flags & SKY2_HW_RAMBUFFER) &&
if ((hw->flags & SKY2_HW_FIFO_HANG_CHECK) &&
sky2_rx_hung(dev)) {
pr_info(PFX "%s: receiver hang detected\n",
dev->name);
Expand Down Expand Up @@ -2684,8 +2694,10 @@ static int __devinit sky2_init(struct sky2_hw *hw)
switch(hw->chip_id) {
case CHIP_ID_YUKON_XL:
hw->flags = SKY2_HW_GIGABIT
| SKY2_HW_NEWER_PHY
| SKY2_HW_RAMBUFFER;
| SKY2_HW_NEWER_PHY;
if (hw->chip_rev < 3)
hw->flags |= SKY2_HW_FIFO_HANG_CHECK;

break;

case CHIP_ID_YUKON_EC_U:
Expand All @@ -2711,11 +2723,10 @@ static int __devinit sky2_init(struct sky2_hw *hw)
dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n");
return -EOPNOTSUPP;
}
hw->flags = SKY2_HW_GIGABIT | SKY2_HW_RAMBUFFER;
hw->flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK;
break;

case CHIP_ID_YUKON_FE:
hw->flags = SKY2_HW_RAMBUFFER;
break;

case CHIP_ID_YUKON_FE_P:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sky2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ struct sky2_hw {
#define SKY2_HW_FIBRE_PHY 0x00000002
#define SKY2_HW_GIGABIT 0x00000004
#define SKY2_HW_NEWER_PHY 0x00000008
#define SKY2_HW_RAMBUFFER 0x00000010 /* chip has RAM FIFO */
#define SKY2_HW_FIFO_HANG_CHECK 0x00000010
#define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */
#define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */
#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/w1/w1.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp,
err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
&cur_len, "W1_SLAVE_ID=%024LX",
(unsigned long long)sl->reg_num.id);
envp[cur_index] = NULL;
if (err)
return err;

Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/ufs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
goto again;
}


sbi->s_flags = flags;/*after that line some functions use s_flags*/
ufs_print_super_stuff(sb, usb1, usb2, usb3);

/*
Expand Down Expand Up @@ -1025,8 +1025,6 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
UFS_MOUNT_UFSTYPE_44BSD)
uspi->s_maxsymlinklen =
fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);

sbi->s_flags = flags;

inode = iget(sb, UFS_ROOTINO);
if (!inode || is_bad_inode(inode))
Expand Down
2 changes: 1 addition & 1 deletion trunk/lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ config LOCKDEP
select KALLSYMS_ALL

config LOCK_STAT
bool "Lock usage statisitics"
bool "Lock usage statistics"
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
select LOCKDEP
select DEBUG_SPINLOCK
Expand Down

0 comments on commit 8d8fd4e

Please sign in to comment.