Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (39 commits)
  gigaset: fix build failure
  bridge: Make first arg to deliver_clone const.
  bridge br_multicast: Don't refer to BR_INPUT_SKB_CB(skb)->mrouters_only without IGMP snooping.
  route: Fix caught BUG_ON during rt_secret_rebuild_oneshot()
  bridge br_multicast: Fix skb leakage in error path.
  bridge br_multicast: Fix handling of Max Response Code in IGMPv3 message.
  NET: netpoll, fix potential NULL ptr dereference
  tipc: fix lockdep warning on address assignment
  l2tp: Fix UDP socket reference count bugs in the pppol2tp driver
  smsc95xx: wait for PHY to complete reset during init
  l2tp: Fix oops in pppol2tp_xmit
  smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver
  ne: Do not use slashes in irq name string
  NET: ksz884x, fix lock imbalance
  gigaset: correct range checking off by one error
  bridge: Fix br_forward crash in promiscuous mode
  bridge: Move NULL mdb check into br_mdb_ip_get
  ISDN: Add PCI ID for HFC-2S/4S Beronet Card PCIe
  net-2.6 [Bug-Fix][dccp]: fix oops caused after failed initialisation
  myri: remove dead code
  ...
  • Loading branch information
Linus Torvalds committed Mar 18, 2010
2 parents 7de4a9a + 22001a1 commit 2e0c17d
Show file tree
Hide file tree
Showing 43 changed files with 1,986 additions and 215 deletions.
2 changes: 2 additions & 0 deletions Documentation/networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ hostprogs-y := ifenslave

# Tell kbuild to always build the programs
always := $(hostprogs-y)

obj-m := timestamping/
11 changes: 9 additions & 2 deletions Documentation/networking/timestamping/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CPPFLAGS = -I../../../include
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

timestamping: timestamping.c
# List of programs to build
hostprogs-y := timestamping

# Tell kbuild to always build the programs
always := $(hostprogs-y)

HOSTCFLAGS_timestamping.o += -I$(objtree)/usr/include

clean:
rm -f timestamping
10 changes: 5 additions & 5 deletions Documentation/networking/timestamping/timestamping.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include <arpa/inet.h>
#include <net/if.h>

#include "asm/types.h"
#include "linux/net_tstamp.h"
#include "linux/errqueue.h"
#include <asm/types.h>
#include <linux/net_tstamp.h>
#include <linux/errqueue.h>

#ifndef SO_TIMESTAMPING
# define SO_TIMESTAMPING 37
Expand Down Expand Up @@ -164,7 +164,7 @@ static void printpacket(struct msghdr *msg, int res,

gettimeofday(&now, 0);

printf("%ld.%06ld: received %s data, %d bytes from %s, %d bytes control messages\n",
printf("%ld.%06ld: received %s data, %d bytes from %s, %zu bytes control messages\n",
(long)now.tv_sec, (long)now.tv_usec,
(recvmsg_flags & MSG_ERRQUEUE) ? "error" : "regular",
res,
Expand All @@ -173,7 +173,7 @@ static void printpacket(struct msghdr *msg, int res,
for (cmsg = CMSG_FIRSTHDR(msg);
cmsg;
cmsg = CMSG_NXTHDR(msg, cmsg)) {
printf(" cmsg len %d: ", cmsg->cmsg_len);
printf(" cmsg len %zu: ", cmsg->cmsg_len);
switch (cmsg->cmsg_level) {
case SOL_SOCKET:
printf("SOL_SOCKET ");
Expand Down
7 changes: 3 additions & 4 deletions drivers/atm/lanai.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,10 @@ static void vci_bitfield_iterate(struct lanai_dev *lanai,
const unsigned long *lp,
void (*func)(struct lanai_dev *,vci_t vci))
{
vci_t vci = find_first_bit(lp, NUM_VCI);
while (vci < NUM_VCI) {
vci_t vci;

for_each_set_bit(vci, lp, NUM_VCI)
func(lanai, vci);
vci = find_next_bit(lp, NUM_VCI, vci + 1);
}
}

/* -------------------- BUFFER UTILITIES: */
Expand Down
46 changes: 26 additions & 20 deletions drivers/isdn/gigaset/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
}

/* check parameter: CIP Value */
if (cmsg->CIPValue > ARRAY_SIZE(cip2bchlc) ||
if (cmsg->CIPValue >= ARRAY_SIZE(cip2bchlc) ||
(cmsg->CIPValue > 0 && cip2bchlc[cmsg->CIPValue].bc == NULL)) {
dev_notice(cs->dev, "%s: unknown CIP value %d\n",
"CONNECT_REQ", cmsg->CIPValue);
Expand Down Expand Up @@ -2191,36 +2191,24 @@ static const struct file_operations gigaset_proc_fops = {
.release = single_release,
};

static struct capi_driver capi_driver_gigaset = {
.name = "gigaset",
.revision = "1.0",
};

/**
* gigaset_isdn_register() - register to LL
* gigaset_isdn_regdev() - register device to LL
* @cs: device descriptor structure.
* @isdnid: device name.
*
* Called by main module to register the device with the LL.
*
* Return value: 1 for success, 0 for failure
*/
int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
struct gigaset_capi_ctr *iif;
int rc;

pr_info("Kernel CAPI interface\n");

iif = kmalloc(sizeof(*iif), GFP_KERNEL);
if (!iif) {
pr_err("%s: out of memory\n", __func__);
return 0;
}

/* register driver with CAPI (ToDo: what for?) */
register_capi_driver(&capi_driver_gigaset);

/* prepare controller structure */
iif->ctr.owner = THIS_MODULE;
iif->ctr.driverdata = cs;
Expand All @@ -2241,7 +2229,6 @@ int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
rc = attach_capi_ctr(&iif->ctr);
if (rc) {
pr_err("attach_capi_ctr failed (%d)\n", rc);
unregister_capi_driver(&capi_driver_gigaset);
kfree(iif);
return 0;
}
Expand All @@ -2252,17 +2239,36 @@ int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
}

/**
* gigaset_isdn_unregister() - unregister from LL
* gigaset_isdn_unregdev() - unregister device from LL
* @cs: device descriptor structure.
*
* Called by main module to unregister the device from the LL.
*/
void gigaset_isdn_unregister(struct cardstate *cs)
void gigaset_isdn_unregdev(struct cardstate *cs)
{
struct gigaset_capi_ctr *iif = cs->iif;

detach_capi_ctr(&iif->ctr);
kfree(iif);
cs->iif = NULL;
}

static struct capi_driver capi_driver_gigaset = {
.name = "gigaset",
.revision = "1.0",
};

/**
* gigaset_isdn_regdrv() - register driver to LL
*/
void gigaset_isdn_regdrv(void)
{
pr_info("Kernel CAPI interface\n");
register_capi_driver(&capi_driver_gigaset);
}

/**
* gigaset_isdn_unregdrv() - unregister driver from LL
*/
void gigaset_isdn_unregdrv(void)
{
unregister_capi_driver(&capi_driver_gigaset);
}
6 changes: 4 additions & 2 deletions drivers/isdn/gigaset/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ void gigaset_freecs(struct cardstate *cs)
case 2: /* error in initcshw */
/* Deregister from LL */
make_invalid(cs, VALID_ID);
gigaset_isdn_unregister(cs);
gigaset_isdn_unregdev(cs);

/* fall through */
case 1: /* error when registering to LL */
Expand Down Expand Up @@ -769,7 +769,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
cs->cmdbytes = 0;

gig_dbg(DEBUG_INIT, "setting up iif");
if (!gigaset_isdn_register(cs, modulename)) {
if (!gigaset_isdn_regdev(cs, modulename)) {
pr_err("error registering ISDN device\n");
goto error;
}
Expand Down Expand Up @@ -1205,11 +1205,13 @@ static int __init gigaset_init_module(void)
gigaset_debuglevel = DEBUG_DEFAULT;

pr_info(DRIVER_DESC DRIVER_DESC_DEBUG "\n");
gigaset_isdn_regdrv();
return 0;
}

static void __exit gigaset_exit_module(void)
{
gigaset_isdn_unregdrv();
}

module_init(gigaset_init_module);
Expand Down
14 changes: 11 additions & 3 deletions drivers/isdn/gigaset/dummyll.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,20 @@ void gigaset_isdn_stop(struct cardstate *cs)
{
}

int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
pr_info("no ISDN subsystem interface\n");
return 1;
}

void gigaset_isdn_unregister(struct cardstate *cs)
void gigaset_isdn_unregdev(struct cardstate *cs)
{
}

void gigaset_isdn_regdrv(void)
{
pr_info("no ISDN subsystem interface\n");
}

void gigaset_isdn_unregdrv(void)
{
}
12 changes: 4 additions & 8 deletions drivers/isdn/gigaset/ev-layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,14 +1258,10 @@ static void do_action(int action, struct cardstate *cs,
* note that bcs may be NULL if no B channel is free
*/
at_state2->ConState = 700;
kfree(at_state2->str_var[STR_NMBR]);
at_state2->str_var[STR_NMBR] = NULL;
kfree(at_state2->str_var[STR_ZCPN]);
at_state2->str_var[STR_ZCPN] = NULL;
kfree(at_state2->str_var[STR_ZBC]);
at_state2->str_var[STR_ZBC] = NULL;
kfree(at_state2->str_var[STR_ZHLC]);
at_state2->str_var[STR_ZHLC] = NULL;
for (i = 0; i < STR_NUM; ++i) {
kfree(at_state2->str_var[i]);
at_state2->str_var[i] = NULL;
}
at_state2->int_var[VAR_ZCTP] = -1;

spin_lock_irqsave(&cs->lock, flags);
Expand Down
6 changes: 4 additions & 2 deletions drivers/isdn/gigaset/gigaset.h
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,10 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size);
*/

/* Called from common.c for setting up/shutting down with the ISDN subsystem */
int gigaset_isdn_register(struct cardstate *cs, const char *isdnid);
void gigaset_isdn_unregister(struct cardstate *cs);
void gigaset_isdn_regdrv(void);
void gigaset_isdn_unregdrv(void);
int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid);
void gigaset_isdn_unregdev(struct cardstate *cs);

/* Called from hardware module to indicate completion of an skb */
void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb);
Expand Down
28 changes: 20 additions & 8 deletions drivers/isdn/gigaset/i4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,15 +592,13 @@ void gigaset_isdn_stop(struct cardstate *cs)
}

/**
* gigaset_isdn_register() - register to LL
* gigaset_isdn_regdev() - register to LL
* @cs: device descriptor structure.
* @isdnid: device name.
*
* Called by main module to register the device with the LL.
*
* Return value: 1 for success, 0 for failure
*/
int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
isdn_if *iif;

Expand Down Expand Up @@ -650,15 +648,29 @@ int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
}

/**
* gigaset_isdn_unregister() - unregister from LL
* gigaset_isdn_unregdev() - unregister device from LL
* @cs: device descriptor structure.
*
* Called by main module to unregister the device from the LL.
*/
void gigaset_isdn_unregister(struct cardstate *cs)
void gigaset_isdn_unregdev(struct cardstate *cs)
{
gig_dbg(DEBUG_CMD, "sending UNLOAD");
gigaset_i4l_cmd(cs, ISDN_STAT_UNLOAD);
kfree(cs->iif);
cs->iif = NULL;
}

/**
* gigaset_isdn_regdrv() - register driver to LL
*/
void gigaset_isdn_regdrv(void)
{
/* nothing to do */
}

/**
* gigaset_isdn_unregdrv() - unregister driver from LL
*/
void gigaset_isdn_unregdrv(void)
{
/* nothing to do */
}
1 change: 0 additions & 1 deletion drivers/isdn/gigaset/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ void gigaset_if_receive(struct cardstate *cs,
if (tty == NULL)
gig_dbg(DEBUG_IF, "receive on closed device");
else {
tty_buffer_request_room(tty, len);
tty_insert_flip_string(tty, buffer, len);
tty_flip_buffer_push(tty);
}
Expand Down
Loading

0 comments on commit 2e0c17d

Please sign in to comment.