Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  [TIPC]: Removing useless casts
  [IPV4]: Fix nexthop realm dumping for multipath routes
  [DUMMY]: Avoid an oops when dummy_init_one() failed
  [IFB] After ifb_init_one() failed, i is increased. Decrease
  [NET]: Fix reversed error test in netif_tx_trylock
  [MAINTAINERS]: Mark LAPB as Oprhan.
  [NET]: Conversions from kmalloc+memset to k(z|c)alloc.
  [NET]: sun happymeal, little pci cleanup
  [IrDA]: Use alloc_skb() in IrDA TX path
  [I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine
  [I/OAT]: net/core/user_dma.c should #include <net/netdma.h>
  [SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed
  [SCTP]: Set chunk->data_accepted only if we are going to accept it.
  [SCTP]: Verify all the paths to a peer via heartbeat before using them.
  [SCTP]: Unhash the endpoint in sctp_endpoint_free().
  [SCTP]: Check for NULL arg to sctp_bucket_destroy().
  [PKT_SCHED] netem: Fix slab corruption with netem (2nd try)
  [WAN]: Converted synclink drivers to use netif_carrier_*()
  [WAN]: Cosmetic changes to N2 and C101 drivers
  [WAN]: Added missing netif_dormant_off() to generic HDLC
  ...
  • Loading branch information
Linus Torvalds committed Jul 21, 2006
2 parents efab4cb + 9df3f3d commit 12157a8
Show file tree
Hide file tree
Showing 141 changed files with 413 additions and 470 deletions.
4 changes: 1 addition & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1676,10 +1676,8 @@ L: linux-kernel@vger.kernel.org
S: Maintained

LAPB module
P: Henner Eisen
M: eis@baty.hanse.de
L: linux-x25@vger.kernel.org
S: Maintained
S: Orphan

LASI 53c700 driver for PARISC
P: James E.J. Bottomley
Expand Down
14 changes: 10 additions & 4 deletions drivers/char/pcmcia/synclink_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,8 +1174,12 @@ static void dcd_change(MGSLPC_INFO *info)
else
info->input_signal_events.dcd_down++;
#ifdef CONFIG_HDLC
if (info->netcount)
hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, info->netdev);
if (info->netcount) {
if (info->serial_signals & SerialSignal_DCD)
netif_carrier_on(info->netdev);
else
netif_carrier_off(info->netdev);
}
#endif
wake_up_interruptible(&info->status_event_wait_q);
wake_up_interruptible(&info->event_wait_q);
Expand Down Expand Up @@ -4251,8 +4255,10 @@ static int hdlcdev_open(struct net_device *dev)
spin_lock_irqsave(&info->lock, flags);
get_signals(info);
spin_unlock_irqrestore(&info->lock, flags);
hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);

if (info->serial_signals & SerialSignal_DCD)
netif_carrier_on(dev);
else
netif_carrier_off(dev);
return 0;
}

Expand Down
14 changes: 10 additions & 4 deletions drivers/char/synclink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,8 +1344,12 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
} else
info->input_signal_events.dcd_down++;
#ifdef CONFIG_HDLC
if (info->netcount)
hdlc_set_carrier(status & MISCSTATUS_DCD, info->netdev);
if (info->netcount) {
if (status & MISCSTATUS_DCD)
netif_carrier_on(info->netdev);
else
netif_carrier_off(info->netdev);
}
#endif
}
if (status & MISCSTATUS_CTS_LATCHED)
Expand Down Expand Up @@ -7844,8 +7848,10 @@ static int hdlcdev_open(struct net_device *dev)
spin_lock_irqsave(&info->irq_spinlock, flags);
usc_get_serial_signals(info);
spin_unlock_irqrestore(&info->irq_spinlock, flags);
hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);

if (info->serial_signals & SerialSignal_DCD)
netif_carrier_on(dev);
else
netif_carrier_off(dev);
return 0;
}

Expand Down
14 changes: 10 additions & 4 deletions drivers/char/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,8 +1497,10 @@ static int hdlcdev_open(struct net_device *dev)
spin_lock_irqsave(&info->lock, flags);
get_signals(info);
spin_unlock_irqrestore(&info->lock, flags);
hdlc_set_carrier(info->signals & SerialSignal_DCD, dev);

if (info->signals & SerialSignal_DCD)
netif_carrier_on(dev);
else
netif_carrier_off(dev);
return 0;
}

Expand Down Expand Up @@ -1997,8 +1999,12 @@ static void dcd_change(struct slgt_info *info)
info->input_signal_events.dcd_down++;
}
#ifdef CONFIG_HDLC
if (info->netcount)
hdlc_set_carrier(info->signals & SerialSignal_DCD, info->netdev);
if (info->netcount) {
if (info->signals & SerialSignal_DCD)
netif_carrier_on(info->netdev);
else
netif_carrier_off(info->netdev);
}
#endif
wake_up_interruptible(&info->status_event_wait_q);
wake_up_interruptible(&info->event_wait_q);
Expand Down
14 changes: 10 additions & 4 deletions drivers/char/synclinkmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1752,8 +1752,10 @@ static int hdlcdev_open(struct net_device *dev)
spin_lock_irqsave(&info->lock, flags);
get_signals(info);
spin_unlock_irqrestore(&info->lock, flags);
hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);

if (info->serial_signals & SerialSignal_DCD)
netif_carrier_on(dev);
else
netif_carrier_off(dev);
return 0;
}

Expand Down Expand Up @@ -2522,8 +2524,12 @@ void isr_io_pin( SLMP_INFO *info, u16 status )
} else
info->input_signal_events.dcd_down++;
#ifdef CONFIG_HDLC
if (info->netcount)
hdlc_set_carrier(status & SerialSignal_DCD, info->netdev);
if (info->netcount) {
if (status & SerialSignal_DCD)
netif_carrier_on(info->netdev);
else
netif_carrier_off(info->netdev);
}
#endif
}
if (status & MISCSTATUS_CTS_LATCHED)
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/ioatdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static int __init ioat_init_module(void)
/* if forced, worst case is that rmmod hangs */
__unsafe(THIS_MODULE);

return pci_module_init(&ioat_pci_drv);
return pci_register_driver(&ioat_pci_drv);
}

module_init(ioat_init_module);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ static int __init dummy_init_module(void)
for (i = 0; i < numdummies && !err; i++)
err = dummy_init_one(i);
if (err) {
i--;
while (--i >= 0)
dummy_free_one(i);
}
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ static int __init ifb_init_module(void)
for (i = 0; i < numifbs && !err; i++)
err = ifb_init_one(i);
if (err) {
i--;
while (--i >= 0)
ifb_free_one(i);
}
Expand Down
9 changes: 2 additions & 7 deletions drivers/net/sunhme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3255,12 +3255,7 @@ static void __devexit happy_meal_pci_remove(struct pci_dev *pdev)
}

static struct pci_device_id happymeal_pci_ids[] = {
{
.vendor = PCI_VENDOR_ID_SUN,
.device = PCI_DEVICE_ID_SUN_HAPPYMEAL,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
{ PCI_DEVICE(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_HAPPYMEAL) },
{ } /* Terminating entry */
};

Expand All @@ -3275,7 +3270,7 @@ static struct pci_driver hme_pci_driver = {

static int __init happy_meal_pci_init(void)
{
return pci_module_init(&hme_pci_driver);
return pci_register_driver(&hme_pci_driver);
}

static void happy_meal_pci_exit(void)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wan/c101.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ static int c101_open(struct net_device *dev)
sca_out(IE0_TXINT, MSCI0_OFFSET + IE0, port);

set_carrier(port);
printk(KERN_DEBUG "0x%X\n", sca_in(MSCI1_OFFSET + ST3, port));

/* enable MSCI1 CDCD interrupt */
sca_out(IE1_CDCD, MSCI1_OFFSET + IE1, port);
Expand Down Expand Up @@ -449,4 +448,5 @@ module_exit(c101_cleanup);
MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>");
MODULE_DESCRIPTION("Moxa C101 serial port driver");
MODULE_LICENSE("GPL v2");
module_param(hw, charp, 0444); /* hw=irq,ram:irq,... */
module_param(hw, charp, 0444);
MODULE_PARM_DESC(hw, "irq,ram:irq,...");
1 change: 1 addition & 0 deletions drivers/net/wan/hdlc_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ int hdlc_ppp_ioctl(struct net_device *dev, struct ifreq *ifr)
dev->hard_header = NULL;
dev->type = ARPHRD_PPP;
dev->addr_len = 0;
netif_dormant_off(dev);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/net/wan/hdlc_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ int hdlc_raw_ioctl(struct net_device *dev, struct ifreq *ifr)
dev->type = ARPHRD_RAWHDLC;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
dev->addr_len = 0;
netif_dormant_off(dev);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/net/wan/hdlc_raw_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ int hdlc_raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
dev->tx_queue_len = old_qlen;
memcpy(dev->dev_addr, "\x00\x01", 2);
get_random_bytes(dev->dev_addr + 2, ETH_ALEN - 2);
netif_dormant_off(dev);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/net/wan/hdlc_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ int hdlc_x25_ioctl(struct net_device *dev, struct ifreq *ifr)
dev->hard_header = NULL;
dev->type = ARPHRD_X25;
dev->addr_len = 0;
netif_dormant_off(dev);
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wan/n2.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,5 @@ module_exit(n2_cleanup);
MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>");
MODULE_DESCRIPTION("RISCom/N2 serial port driver");
MODULE_LICENSE("GPL v2");
module_param(hw, charp, 0444); /* hw=io,irq,ram,ports:io,irq,... */
module_param(hw, charp, 0444);
MODULE_PARM_DESC(hw, "io,irq,ram,ports:io,irq,...");
6 changes: 3 additions & 3 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -924,10 +924,10 @@ static inline void netif_tx_lock_bh(struct net_device *dev)

static inline int netif_tx_trylock(struct net_device *dev)
{
int err = spin_trylock(&dev->_xmit_lock);
if (!err)
int ok = spin_trylock(&dev->_xmit_lock);
if (likely(ok))
dev->xmit_lock_owner = smp_processor_id();
return err;
return ok;
}

static inline void netif_tx_unlock(struct net_device *dev)
Expand Down
2 changes: 1 addition & 1 deletion include/net/netdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static inline struct dma_chan *get_softnet_dma(void)
}

int dma_skb_copy_datagram_iovec(struct dma_chan* chan,
const struct sk_buff *skb, int offset, struct iovec *to,
struct sk_buff *skb, int offset, struct iovec *to,
size_t len, struct dma_pinned_list *pinned_list);

#endif /* CONFIG_NET_DMA */
Expand Down
11 changes: 6 additions & 5 deletions include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ typedef struct sctp_sender_hb_info {
struct sctp_paramhdr param_hdr;
union sctp_addr daddr;
unsigned long sent_at;
__u64 hb_nonce;
} __attribute__((packed)) sctp_sender_hb_info_t;

/*
Expand Down Expand Up @@ -730,13 +731,10 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);

/* This is a structure for holding either an IPv6 or an IPv4 address. */
/* sin_family -- AF_INET or AF_INET6
* sin_port -- ordinary port number
* sin_addr -- cast to either (struct in_addr) or (struct in6_addr)
*/
struct sctp_sockaddr_entry {
struct list_head list;
union sctp_addr a;
__u8 use_as_src;
};

typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *);
Expand Down Expand Up @@ -984,6 +982,9 @@ struct sctp_transport {
*/
char cacc_saw_newack;
} cacc;

/* 64-bit random number sent with heartbeat. */
__u64 hb_nonce;
};

struct sctp_transport *sctp_transport_new(const union sctp_addr *,
Expand Down Expand Up @@ -1138,7 +1139,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
sctp_scope_t scope, gfp_t gfp,
int flags);
int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
gfp_t gfp);
__u8 use_as_src, gfp_t gfp);
int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
struct sctp_sock *);
Expand Down
9 changes: 9 additions & 0 deletions include/net/sctp/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,18 @@ struct sctp_paddrinfo {
} __attribute__((packed, aligned(4)));

/* Peer addresses's state. */
/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x]
* calls.
* UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters.
* Not yet confirmed by a heartbeat and not available for data
* transfers.
* ACTIVE : Peer address confirmed, active and available for data transfers.
* INACTIVE: Peer address inactive and not available for data transfers.
*/
enum sctp_spinfo_state {
SCTP_INACTIVE,
SCTP_ACTIVE,
SCTP_UNCONFIRMED,
SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */
};

Expand Down
3 changes: 1 addition & 2 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,11 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
* so it cannot "appear" on us.
*/
if (!grp) { /* need to add a new group */
grp = kmalloc(sizeof(struct vlan_group), GFP_KERNEL);
grp = kzalloc(sizeof(struct vlan_group), GFP_KERNEL);
if (!grp)
goto out_free_unregister;

/* printk(KERN_ALERT "VLAN REGISTER: Allocated new group.\n"); */
memset(grp, 0, sizeof(struct vlan_group));
grp->real_dev_ifindex = real_dev->ifindex;

hlist_add_head_rcu(&grp->hlist,
Expand Down
6 changes: 2 additions & 4 deletions net/appletalk/ddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,11 @@ static void atif_drop_device(struct net_device *dev)
static struct atalk_iface *atif_add_device(struct net_device *dev,
struct atalk_addr *sa)
{
struct atalk_iface *iface = kmalloc(sizeof(*iface), GFP_KERNEL);
struct atalk_iface *iface = kzalloc(sizeof(*iface), GFP_KERNEL);

if (!iface)
goto out;

memset(iface, 0, sizeof(*iface));
dev_hold(dev);
iface->dev = dev;
dev->atalk_ptr = iface;
Expand Down Expand Up @@ -559,12 +558,11 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
}

if (!rt) {
rt = kmalloc(sizeof(*rt), GFP_ATOMIC);
rt = kzalloc(sizeof(*rt), GFP_ATOMIC);

retval = -ENOBUFS;
if (!rt)
goto out_unlock;
memset(rt, 0, sizeof(*rt));

rt->next = atalk_routes;
atalk_routes = rt;
Expand Down
3 changes: 1 addition & 2 deletions net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,9 @@ Note: we do not have explicit unassign, but look at _push()

if (copy_from_user(&be, arg, sizeof be))
return -EFAULT;
brvcc = kmalloc(sizeof(struct br2684_vcc), GFP_KERNEL);
brvcc = kzalloc(sizeof(struct br2684_vcc), GFP_KERNEL);
if (!brvcc)
return -ENOMEM;
memset(brvcc, 0, sizeof(struct br2684_vcc));
write_lock_irq(&devs_lock);
net_dev = br2684_find_dev(&be.ifspec);
if (net_dev == NULL) {
Expand Down
3 changes: 1 addition & 2 deletions net/atm/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,12 +929,11 @@ static int arp_seq_open(struct inode *inode, struct file *file)
struct seq_file *seq;
int rc = -EAGAIN;

state = kmalloc(sizeof(*state), GFP_KERNEL);
state = kzalloc(sizeof(*state), GFP_KERNEL);
if (!state) {
rc = -ENOMEM;
goto out_kfree;
}
memset(state, 0, sizeof(*state));
state->ns.neigh_sub_iter = clip_seq_sub_iter;

rc = seq_open(file, &arp_seq_ops);
Expand Down
3 changes: 1 addition & 2 deletions net/atm/lec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,12 +1811,11 @@ make_entry(struct lec_priv *priv, unsigned char *mac_addr)
{
struct lec_arp_table *to_return;

to_return = kmalloc(sizeof(struct lec_arp_table), GFP_ATOMIC);
to_return = kzalloc(sizeof(struct lec_arp_table), GFP_ATOMIC);
if (!to_return) {
printk("LEC: Arp entry kmalloc failed\n");
return NULL;
}
memset(to_return, 0, sizeof(struct lec_arp_table));
memcpy(to_return->mac_addr, mac_addr, ETH_ALEN);
init_timer(&to_return->timer);
to_return->timer.function = lec_arp_expire_arp;
Expand Down
Loading

0 comments on commit 12157a8

Please sign in to comment.