Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96079
b: refs/heads/master
c: 78ab88f
h: refs/heads/master
i:
  96077: fc22716
  96075: b5f4f7a
  96071: 0f0b0a4
  96063: df9cb2c
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed May 6, 2008
1 parent 4c5cbe4 commit 434a6bf
Show file tree
Hide file tree
Showing 22 changed files with 95 additions and 141 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: 4880d10927c93d858d40e297361fff375ee98492
refs/heads/master: 78ab88f04f44bed566d51dce0c7cbfeff6449a06
4 changes: 1 addition & 3 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1267,9 +1267,7 @@ static int ahci_check_ready(struct ata_link *link)
void __iomem *port_mmio = ahci_port_base(link->ap);
u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;

if (!(status & ATA_BUSY))
return 1;
return 0;
return ata_check_ready(status);
}

static int ahci_softreset(struct ata_link *link, unsigned int *class,
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,7 @@ static int ata_sff_check_ready(struct ata_link *link)
{
u8 status = link->ap->ops->sff_check_status(link->ap);

if (!(status & ATA_BUSY))
return 1;
if (status == 0xff)
return -ENODEV;
return 0;
return ata_check_ready(status);
}

/**
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/net/irda/nsc-ircc.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info);
static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info);
static int nsc_ircc_init_338(nsc_chip_t *chip, chipio_t *info);
static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info);
#ifdef CONFIG_PNP
static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id);
#endif

/* These are the known NSC chips */
static nsc_chip_t chips[] = {
Expand Down Expand Up @@ -158,11 +156,9 @@ static const struct pnp_device_id nsc_ircc_pnp_table[] = {
MODULE_DEVICE_TABLE(pnp, nsc_ircc_pnp_table);

static struct pnp_driver nsc_ircc_pnp_driver = {
#ifdef CONFIG_PNP
.name = "nsc-ircc",
.id_table = nsc_ircc_pnp_table,
.probe = nsc_ircc_pnp_probe,
#endif
};

/* Some prototypes */
Expand Down Expand Up @@ -920,7 +916,6 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
return 0;
}

#ifdef CONFIG_PNP
/* PNP probing */
static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id)
{
Expand Down Expand Up @@ -957,7 +952,6 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i

return 0;
}
#endif

/*
* Function nsc_ircc_setup (info)
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/net/irda/smsc-ircc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ MODULE_DEVICE_TABLE(pnp, smsc_ircc_pnp_table);

static int pnp_driver_registered;

#ifdef CONFIG_PNP
static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev,
const struct pnp_device_id *dev_id)
{
Expand All @@ -403,9 +402,7 @@ static struct pnp_driver smsc_ircc_pnp_driver = {
.id_table = smsc_ircc_pnp_table,
.probe = smsc_ircc_pnp_probe,
};
#else /* CONFIG_PNP */
static struct pnp_driver smsc_ircc_pnp_driver;
#endif


/*******************************************************************************
*
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/net/niu.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* niu.c: Neptune ethernet driver.
*
* Copyright (C) 2007, 2008 David S. Miller (davem@davemloft.net)
* Copyright (C) 2007 David S. Miller (davem@davemloft.net)
*/

#include <linux/module.h>
Expand Down Expand Up @@ -33,8 +33,8 @@

#define DRV_MODULE_NAME "niu"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.9"
#define DRV_MODULE_RELDATE "May 4, 2008"
#define DRV_MODULE_VERSION "0.8"
#define DRV_MODULE_RELDATE "April 24, 2008"

static char version[] __devinitdata =
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
Expand Down Expand Up @@ -7264,11 +7264,8 @@ static int __devinit niu_get_and_validate_port(struct niu *np)
parent->num_ports = nr64(ESPC_NUM_PORTS_MACS) &
ESPC_NUM_PORTS_MACS_VAL;

/* All of the current probing methods fail on
* Maramba on-board parts.
*/
if (!parent->num_ports)
parent->num_ports = 4;
return -ENODEV;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wan/lapbether.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ static void __exit lapbeth_cleanup_driver(void)
list_for_each_safe(entry, tmp, &lapbeth_devices) {
lapbeth = list_entry(entry, struct lapbethdev, node);

dev_put(lapbeth->ethdev);
unregister_netdevice(lapbeth->axdev);
}
rtnl_unlock();
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config IWLWIFI
tristate
bool
default n

config IWLCORE
tristate "Intel Wireless Wifi Core"
Expand Down
15 changes: 15 additions & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,21 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
return *(struct ata_port **)&host->hostdata[0];
}

static inline int ata_check_ready(u8 status)
{
/* Some controllers report 0x77 or 0x7f during intermediate
* not-ready stages.
*/
if (status == 0x77 || status == 0x7f)
return 0;

/* 0xff indicates either no device or device not ready */
if (status == 0xff)
return -ENODEV;

return !(status & ATA_BUSY);
}


/**************************************************************************
* PMP - drivers/ata/libata-pmp.c
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
{
return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO ||
(inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT &&
!(dst_metric_locked(dst, RTAX_MTU))));
!(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU))));
}

extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more);
Expand Down
48 changes: 8 additions & 40 deletions trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,46 +648,14 @@ extern void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family,
extern void xfrm_audit_state_icvfail(struct xfrm_state *x,
struct sk_buff *skb, u8 proto);
#else

static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result,
u32 auid, u32 ses, u32 secid)
{
}

static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result,
u32 auid, u32 ses, u32 secid)
{
}

static inline void xfrm_audit_state_add(struct xfrm_state *x, int result,
u32 auid, u32 ses, u32 secid)
{
}

static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result,
u32 auid, u32 ses, u32 secid)
{
}

static inline void xfrm_audit_state_replay_overflow(struct xfrm_state *x,
struct sk_buff *skb)
{
}

static inline void xfrm_audit_state_notfound_simple(struct sk_buff *skb,
u16 family)
{
}

static inline void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family,
__be32 net_spi, __be32 net_seq)
{
}

static inline void xfrm_audit_state_icvfail(struct xfrm_state *x,
struct sk_buff *skb, u8 proto)
{
}
#define xfrm_audit_policy_add(x, r, a, se, s) do { ; } while (0)
#define xfrm_audit_policy_delete(x, r, a, se, s) do { ; } while (0)
#define xfrm_audit_state_add(x, r, a, se, s) do { ; } while (0)
#define xfrm_audit_state_delete(x, r, a, se, s) do { ; } while (0)
#define xfrm_audit_state_replay_overflow(x, s) do { ; } while (0)
#define xfrm_audit_state_notfound_simple(s, f) do { ; } while (0)
#define xfrm_audit_state_notfound(s, f, sp, sq) do { ; } while (0)
#define xfrm_audit_state_icvfail(x, s, p) do { ; } while (0)
#endif /* CONFIG_AUDITSYSCALL */

static inline void xfrm_pol_hold(struct xfrm_policy *policy)
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
/* skb==NULL means VCC is being destroyed */
br2684_close_vcc(brvcc);
if (list_empty(&brdev->brvccs)) {
write_lock_irq(&devs_lock);
read_lock(&devs_lock);
list_del(&brdev->br2684_devs);
write_unlock_irq(&devs_lock);
read_unlock(&devs_lock);
unregister_netdev(net_dev);
free_netdev(net_dev);
}
Expand Down
12 changes: 5 additions & 7 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,24 +273,22 @@ int br_add_bridge(const char *name)
rtnl_lock();
if (strchr(dev->name, '%')) {
ret = dev_alloc_name(dev, dev->name);
if (ret < 0)
goto out_free;
if (ret < 0) {
free_netdev(dev);
goto out;
}
}

ret = register_netdevice(dev);
if (ret)
goto out_free;
goto out;

ret = br_sysfs_addbr(dev);
if (ret)
unregister_netdevice(dev);
out:
rtnl_unlock();
return ret;

out_free:
free_netdev(dev);
goto out;
}

int br_del_bridge(const char *name)
Expand Down
4 changes: 1 addition & 3 deletions trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
goto nodata;

/*
* Only clear those fields we need to clear, not those that we will
* actually initialise below. Hence, don't put any more fields after
* the tail pointer in struct sk_buff!
* See comment in sk_buff definition, just before the 'tail' member
*/
memset(skb, 0, offsetof(struct sk_buff, tail));
skb->truesize = size + sizeof(struct sk_buff);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/dccp/feat.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,

if (len > 3) {
DCCP_WARN("invalid length %d\n", len);
return -EINVAL;
return 1;
}
/* XXX add further sanity checks */

Expand Down
12 changes: 6 additions & 6 deletions trunk/net/decnet/dn_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ static void dn_dst_update_pmtu(struct dst_entry *dst, u32 mtu)
else
min_mtu -= 21;

if (dst_metric(dst, RTAX_MTU) > mtu && mtu >= min_mtu) {
if (dst->metrics[RTAX_MTU-1] > mtu && mtu >= min_mtu) {
if (!(dst_metric_locked(dst, RTAX_MTU))) {
dst->metrics[RTAX_MTU-1] = mtu;
dst_set_expires(dst, dn_rt_mtu_expires);
}
if (!(dst_metric_locked(dst, RTAX_ADVMSS))) {
u32 mss = mtu - DN_MAX_NSP_DATA_HEADER;
if (dst_metric(dst, RTAX_ADVMSS) > mss)
if (dst->metrics[RTAX_ADVMSS-1] > mss)
dst->metrics[RTAX_ADVMSS-1] = mss;
}
}
Expand Down Expand Up @@ -805,12 +805,12 @@ static int dn_rt_set_next_hop(struct dn_route *rt, struct dn_fib_res *res)
rt->u.dst.neighbour = n;
}

if (dst_metric(&rt->u.dst, RTAX_MTU) == 0 ||
dst_metric(&rt->u.dst, RTAX_MTU) > rt->u.dst.dev->mtu)
if (rt->u.dst.metrics[RTAX_MTU-1] == 0 ||
rt->u.dst.metrics[RTAX_MTU-1] > rt->u.dst.dev->mtu)
rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu;
mss = dn_mss_from_pmtu(dev, dst_mtu(&rt->u.dst));
if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0 ||
dst_metric(&rt->u.dst, RTAX_ADVMSS) > mss)
if (rt->u.dst.metrics[RTAX_ADVMSS-1] == 0 ||
rt->u.dst.metrics[RTAX_ADVMSS-1] > mss)
rt->u.dst.metrics[RTAX_ADVMSS-1] = mss;
return 0;
}
Expand Down
18 changes: 9 additions & 9 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1468,14 +1468,14 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,

/* BSD 4.2 compatibility hack :-( */
if (mtu == 0 &&
old_mtu >= dst_metric(&rth->u.dst, RTAX_MTU) &&
old_mtu >= rth->u.dst.metrics[RTAX_MTU-1] &&
old_mtu >= 68 + (iph->ihl << 2))
old_mtu -= iph->ihl << 2;

mtu = guess_mtu(old_mtu);
}
if (mtu <= dst_metric(&rth->u.dst, RTAX_MTU)) {
if (mtu < dst_metric(&rth->u.dst, RTAX_MTU)) {
if (mtu <= rth->u.dst.metrics[RTAX_MTU-1]) {
if (mtu < rth->u.dst.metrics[RTAX_MTU-1]) {
dst_confirm(&rth->u.dst);
if (mtu < ip_rt_min_pmtu) {
mtu = ip_rt_min_pmtu;
Expand All @@ -1497,7 +1497,7 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,

static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
{
if (dst_metric(dst, RTAX_MTU) > mtu && mtu >= 68 &&
if (dst->metrics[RTAX_MTU-1] > mtu && mtu >= 68 &&
!(dst_metric_locked(dst, RTAX_MTU))) {
if (mtu < ip_rt_min_pmtu) {
mtu = ip_rt_min_pmtu;
Expand Down Expand Up @@ -1613,7 +1613,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
sizeof(rt->u.dst.metrics));
if (fi->fib_mtu == 0) {
rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu;
if (dst_metric_locked(&rt->u.dst, RTAX_MTU) &&
if (rt->u.dst.metrics[RTAX_LOCK-1] & (1 << RTAX_MTU) &&
rt->rt_gateway != rt->rt_dst &&
rt->u.dst.dev->mtu > 576)
rt->u.dst.metrics[RTAX_MTU-1] = 576;
Expand All @@ -1624,14 +1624,14 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
} else
rt->u.dst.metrics[RTAX_MTU-1]= rt->u.dst.dev->mtu;

if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0)
if (rt->u.dst.metrics[RTAX_HOPLIMIT-1] == 0)
rt->u.dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl;
if (dst_metric(&rt->u.dst, RTAX_MTU) > IP_MAX_MTU)
if (rt->u.dst.metrics[RTAX_MTU-1] > IP_MAX_MTU)
rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU;
if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0)
if (rt->u.dst.metrics[RTAX_ADVMSS-1] == 0)
rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40,
ip_rt_min_advmss);
if (dst_metric(&rt->u.dst, RTAX_ADVMSS) > 65535 - 40)
if (rt->u.dst.metrics[RTAX_ADVMSS-1] > 65535 - 40)
rt->u.dst.metrics[RTAX_ADVMSS-1] = 65535 - 40;

#ifdef CONFIG_NET_CLS_ROUTE
Expand Down
Loading

0 comments on commit 434a6bf

Please sign in to comment.