Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19056
b: refs/heads/master
c: 6a986ce
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sesterhenn authored and Jeff Garzik committed Jan 27, 2006
1 parent e2dc61e commit 449a428
Show file tree
Hide file tree
Showing 24 changed files with 83 additions and 156 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: 70b4d63e98fd93fb9742708a54f872cba24e0fea
refs/heads/master: 6a986ce45d45b099ddf676c340267765e76db91e
6 changes: 2 additions & 4 deletions trunk/arch/powerpc/platforms/powermac/feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,18 +910,16 @@ core99_gmac_phy_reset(struct device_node *node, long param, long value)
macio->type != macio_intrepid)
return -ENODEV;

printk(KERN_DEBUG "Hard reset of PHY chip ...\n");

LOCK(flags);
MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE);
(void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET);
UNLOCK(flags);
msleep(10);
mdelay(10);
LOCK(flags);
MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */
KEYLARGO_GPIO_OUTOUT_DATA);
UNLOCK(flags);
msleep(10);
mdelay(10);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#define curptr g6

#define NR_SYSCALLS 299 /* Each OS is different... */
#define NR_SYSCALLS 284 /* Each OS is different... */

/* These are just handy. */
#define _SV save %sp, -STACKFRAME_SZ, %sp
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/sparc/math-emu/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
case FMOVS:
case FABSS:
case FNEGS: TYPE(2,1,0,1,0,0,0); break;
default:
#ifdef DEBUG_MATHEMU
printk("unknown FPop1: %03lx\n",(insn>>5)&0x1ff);
#endif
break;
}
} else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ {
switch ((insn >> 5) & 0x1ff) {
Expand All @@ -332,6 +337,11 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
case FCMPED: TYPE(3,0,0,2,1,2,1); break;
case FCMPQ: TYPE(3,0,0,3,1,3,1); break;
case FCMPEQ: TYPE(3,0,0,3,1,3,1); break;
default:
#ifdef DEBUG_MATHEMU
printk("unknown FPop2: %03lx\n",(insn>>5)&0x1ff);
#endif
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#define curptr g6

#define NR_SYSCALLS 299 /* Each OS is different... */
#define NR_SYSCALLS 284 /* Each OS is different... */

.text
.align 32
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/sparc64/kernel/sys32.S
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5)
SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1)
SIGN1(sys32_mlockall, sys_mlockall, %o0)
SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0)
SIGN1(sys32_clock_settime, compat_sys_clock_settime, %o1)
SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1)
SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1)
SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc64/kernel/systbls.S
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sys_call_table32:
/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
.word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
.word sys_ni_syscall, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
.word sys_ni_syscall, sys32_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
.word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
/*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ static int bond_update_speed_duplex(struct slave *slave)
slave->duplex = DUPLEX_FULL;

if (slave_dev->ethtool_ops) {
u32 res;
int res;

if (!slave_dev->ethtool_ops->get_settings) {
return -1;
Expand Down
55 changes: 25 additions & 30 deletions trunk/drivers/net/sungem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,40 +1653,36 @@ static void gem_init_rings(struct gem *gp)
/* Init PHY interface and start link poll state machine */
static void gem_init_phy(struct gem *gp)
{
u32 mif_cfg;
u32 mifcfg;

/* Revert MIF CFG setting done on stop_phy */
mif_cfg = readl(gp->regs + MIF_CFG);
mif_cfg &= ~(MIF_CFG_PSELECT|MIF_CFG_POLL|MIF_CFG_BBMODE|MIF_CFG_MDI1);
mif_cfg |= MIF_CFG_MDI0;
writel(mif_cfg, gp->regs + MIF_CFG);
writel(PCS_DMODE_MGM, gp->regs + PCS_DMODE);
writel(MAC_XIFCFG_OE, gp->regs + MAC_XIFCFG);
mifcfg = readl(gp->regs + MIF_CFG);
mifcfg &= ~MIF_CFG_BBMODE;
writel(mifcfg, gp->regs + MIF_CFG);

if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE) {
int i;
u16 ctrl;

/* Those delay sucks, the HW seem to love them though, I'll
* serisouly consider breaking some locks here to be able
* to schedule instead
*/
for (i = 0; i < 3; i++) {
#ifdef CONFIG_PPC_PMAC
pmac_call_feature(PMAC_FTR_GMAC_PHY_RESET, gp->of_node, 0, 0);
pmac_call_feature(PMAC_FTR_GMAC_PHY_RESET, gp->of_node, 0, 0);
msleep(20);
#endif

/* Some PHYs used by apple have problem getting back
* to us, we do an additional reset here
*/
phy_write(gp, MII_BMCR, BMCR_RESET);
for (i = 0; i < 50; i++) {
if ((phy_read(gp, MII_BMCR) & BMCR_RESET) == 0)
/* Some PHYs used by apple have problem getting back to us,
* we do an additional reset here
*/
phy_write(gp, MII_BMCR, BMCR_RESET);
msleep(20);
if (phy_read(gp, MII_BMCR) != 0xffff)
break;
msleep(10);
if (i == 2)
printk(KERN_WARNING "%s: GMAC PHY not responding !\n",
gp->dev->name);
}
if (i == 50)
printk(KERN_WARNING "%s: GMAC PHY not responding !\n",
gp->dev->name);
/* Make sure isolate is off */
ctrl = phy_read(gp, MII_BMCR);
if (ctrl & BMCR_ISOLATE)
phy_write(gp, MII_BMCR, ctrl & ~BMCR_ISOLATE);
}

if (gp->pdev->vendor == PCI_VENDOR_ID_SUN &&
Expand Down Expand Up @@ -2123,7 +2119,7 @@ static void gem_reinit_chip(struct gem *gp)
/* Must be invoked with no lock held. */
static void gem_stop_phy(struct gem *gp, int wol)
{
u32 mif_cfg;
u32 mifcfg;
unsigned long flags;

/* Let the chip settle down a bit, it seems that helps
Expand All @@ -2134,9 +2130,9 @@ static void gem_stop_phy(struct gem *gp, int wol)
/* Make sure we aren't polling PHY status change. We
* don't currently use that feature though
*/
mif_cfg = readl(gp->regs + MIF_CFG);
mif_cfg &= ~MIF_CFG_POLL;
writel(mif_cfg, gp->regs + MIF_CFG);
mifcfg = readl(gp->regs + MIF_CFG);
mifcfg &= ~MIF_CFG_POLL;
writel(mifcfg, gp->regs + MIF_CFG);

if (wol && gp->has_wol) {
unsigned char *e = &gp->dev->dev_addr[0];
Expand Down Expand Up @@ -2186,8 +2182,7 @@ static void gem_stop_phy(struct gem *gp, int wol)
/* According to Apple, we must set the MDIO pins to this begnign
* state or we may 1) eat more current, 2) damage some PHYs
*/
mif_cfg = 0;
writel(mif_cfg | MIF_CFG_BBMODE, gp->regs + MIF_CFG);
writel(mifcfg | MIF_CFG_BBMODE, gp->regs + MIF_CFG);
writel(0, gp->regs + MIF_BBCLK);
writel(0, gp->regs + MIF_BBDATA);
writel(0, gp->regs + MIF_BBOENAB);
Expand Down
24 changes: 1 addition & 23 deletions trunk/include/asm-sparc64/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,28 +131,6 @@ static void inline __read_lock(raw_rwlock_t *lock)
: "memory");
}

static int inline __read_trylock(raw_rwlock_t *lock)
{
int tmp1, tmp2;

__asm__ __volatile__ (
"1: ldsw [%2], %0\n"
" brlz,a,pn %0, 2f\n"
" mov 0, %0\n"
" add %0, 1, %1\n"
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" membar #StoreLoad | #StoreStore\n"
" bne,pn %%icc, 1b\n"
" mov 1, %0\n"
"2:"
: "=&r" (tmp1), "=&r" (tmp2)
: "r" (lock)
: "memory");

return tmp1;
}

static void inline __read_unlock(raw_rwlock_t *lock)
{
unsigned long tmp1, tmp2;
Expand Down Expand Up @@ -233,12 +211,12 @@ static int inline __write_trylock(raw_rwlock_t *lock)
}

#define __raw_read_lock(p) __read_lock(p)
#define __raw_read_trylock(p) __read_trylock(p)
#define __raw_read_unlock(p) __read_unlock(p)
#define __raw_write_lock(p) __write_lock(p)
#define __raw_write_unlock(p) __write_unlock(p)
#define __raw_write_trylock(p) __write_trylock(p)

#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
#define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL))
#define __raw_write_can_lock(rw) (!(rw)->lock)

Expand Down
16 changes: 1 addition & 15 deletions trunk/include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,7 @@ struct xt_get_revision
/* For standard target */
#define XT_RETURN (-NF_REPEAT - 1)

/* this is a dummy structure to find out the alignment requirement for a struct
* containing all the fundamental data types that are used in ipt_entry,
* ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my
* personal pleasure to remove it -HW
*/
struct _xt_align
{
u_int8_t u8;
u_int16_t u16;
u_int32_t u32;
u_int64_t u64;
};

#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \
& ~(__alignof__(struct _xt_align)-1))
#define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1))

/* Standard return verdict, or do jump. */
#define XT_STANDARD_TARGET ""
Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5141,7 +5141,7 @@ static void init_sched_build_groups(struct sched_group groups[], cpumask_t span,
#define SEARCH_SCOPE 2
#define MIN_CACHE_SIZE (64*1024U)
#define DEFAULT_CACHE_SIZE (5*1024*1024U)
#define ITERATIONS 1
#define ITERATIONS 2
#define SIZE_THRESH 130
#define COST_THRESH 130

Expand Down Expand Up @@ -5480,9 +5480,9 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2)
break;
}
/*
* Increase the cachesize in 10% steps:
* Increase the cachesize in 5% steps:
*/
size = size * 10 / 9;
size = size * 20 / 19;
}

if (migration_debug)
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz)
static int firsttime = 1;
int error = 0;

if (tv && !timespec_valid(tv))
if (!timespec_valid(tv))
return -EINVAL;

error = security_settime(tv, tz);
Expand Down
5 changes: 2 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2543,14 +2543,13 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
case SIOCBONDENSLAVE:
case SIOCBONDRELEASE:
case SIOCBONDSETHWADDR:
case SIOCBONDSLAVEINFOQUERY:
case SIOCBONDINFOQUERY:
case SIOCBONDCHANGEACTIVE:
case SIOCBRADDIF:
case SIOCBRDELIF:
if (!capable(CAP_NET_ADMIN))
return -EPERM;
/* fall through */
case SIOCBONDSLAVEINFOQUERY:
case SIOCBONDINFOQUERY:
dev_load(ifr.ifr_name);
rtnl_lock();
ret = dev_ifsioc(&ifr, cmd);
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static inline void *load_pointer(struct sk_buff *skb, int k,
}

/**
* sk_run_filter - run a filter on a socket
* sk_run_filter - run a filter on a socket
* @skb: buffer to run the filter on
* @filter: filter to apply
* @flen: length of filter
Expand All @@ -78,8 +78,8 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
{
struct sock_filter *fentry; /* We walk down these */
void *ptr;
u32 A = 0; /* Accumulator */
u32 X = 0; /* Index Register */
u32 A = 0; /* Accumulator */
u32 X = 0; /* Index Register */
u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */
u32 tmp;
int k;
Expand Down
8 changes: 3 additions & 5 deletions trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,13 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
int fclone)
{
kmem_cache_t *cache;
struct skb_shared_info *shinfo;
struct sk_buff *skb;
u8 *data;

cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;

/* Get the HEAD */
skb = kmem_cache_alloc(cache, gfp_mask & ~__GFP_DMA);
skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache,
gfp_mask & ~__GFP_DMA);
if (!skb)
goto out;

Expand Down Expand Up @@ -182,7 +180,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
out:
return skb;
nodata:
kmem_cache_free(cache, skb);
kmem_cache_free(skbuff_head_cache, skb);
skb = NULL;
goto out;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ int igmp_rcv(struct sk_buff *skb)
case IGMP_MTRACE_RESP:
break;
default:
NETDEBUG(KERN_DEBUG "New IGMP type=%d, why we do not know about it?\n", ih->type);
}

drop:
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/tcp_htcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
tp->snd_cwnd++;
tp->snd_cwnd_cnt = 0;
ca->ccount++;
}
}
}
Expand Down
Loading

0 comments on commit 449a428

Please sign in to comment.