提交 d7fff6f4 编写于 作者: L Linus Torvalds

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: Add missing entries to family name tables
  [NET]: Make NETDEVICES depend on NET.
  [IPV6]: endianness bug in ip6_tunnel
  [IrDA]: TOSHIBA_FIR depends on virt_to_bus
  [IrDA]: EP7211 IR driver port to the latest SIR API
  [IrDA] Typo fix in irnetlink.c copyright
  [NET]: Fix loopback crashes when multiqueue is enabled.
  [IPV4]: Fix inetpeer gcc-4.2 warnings
......@@ -5,6 +5,7 @@
menuconfig NETDEVICES
default y if UML
depends on NET
bool "Network device support"
---help---
You can say N here if you don't intend to connect your Linux box to
......
......@@ -155,6 +155,15 @@ config KINGSUN_DONGLE
To compile it as a module, choose M here: the module will be called
kingsun-sir.
config EP7211_DONGLE
tristate "EP7211 I/R support"
depends on IRTTY_SIR && ARCH_EP7211 && IRDA && EXPERIMENTAL
help
Say Y here if you want to build support for the Cirrus logic
EP7211 chipset's infrared module.
comment "Old SIR device drivers"
config IRPORT_SIR
......@@ -355,7 +364,7 @@ config WINBOND_FIR
config TOSHIBA_FIR
tristate "Toshiba Type-O IR Port"
depends on IRDA && PCI && !64BIT
depends on IRDA && PCI && !64BIT && VIRT_TO_BUS
help
Say Y here if you want to build support for the Toshiba Type-O IR
and Donau oboe chipsets. These chipsets are used by the Toshiba
......
......@@ -45,6 +45,7 @@ obj-$(CONFIG_MCP2120_DONGLE) += mcp2120-sir.o
obj-$(CONFIG_ACT200L_DONGLE) += act200l-sir.o
obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o
obj-$(CONFIG_TOIM3232_DONGLE) += toim3232-sir.o
obj-$(CONFIG_EP7211_DONGLE) += ep7211-sir.o
obj-$(CONFIG_KINGSUN_DONGLE) += kingsun-sir.o
# The SIR helper module
......
/*
* IR port driver for the Cirrus Logic EP7211 processor.
*
* Copyright 2001, Blue Mug Inc. All rights reserved.
* Copyright 2007, Samuel Ortiz <samuel@sortiz.org>
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <net/irda/irda.h>
#include <net/irda/irda_device.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include "sir-dev.h"
#define MIN_DELAY 25 /* 15 us, but wait a little more to be sure */
#define MAX_DELAY 10000 /* 1 ms */
static int ep7211_open(struct sir_dev *dev);
static int ep7211_close(struct sir_dev *dev);
static int ep7211_change_speed(struct sir_dev *dev, unsigned speed);
static int ep7211_reset(struct sir_dev *dev);
static struct dongle_driver ep7211 = {
.owner = THIS_MODULE,
.driver_name = "EP7211 IR driver",
.type = IRDA_EP7211_DONGLE,
.open = ep7211_open,
.close = ep7211_close,
.reset = ep7211_reset,
.set_speed = ep7211_change_speed,
};
static int __init ep7211_sir_init(void)
{
return irda_register_dongle(&ep7211);
}
static void __exit ep7211_sir_cleanup(void)
{
irda_unregister_dongle(&ep7211);
}
static int ep7211_open(struct sir_dev *dev)
{
unsigned int syscon;
/* Turn on the SIR encoder. */
syscon = clps_readl(SYSCON1);
syscon |= SYSCON1_SIREN;
clps_writel(syscon, SYSCON1);
return 0;
}
static int ep7211_close(struct sir_dev *dev)
{
unsigned int syscon;
/* Turn off the SIR encoder. */
syscon = clps_readl(SYSCON1);
syscon &= ~SYSCON1_SIREN;
clps_writel(syscon, SYSCON1);
return 0;
}
static int ep7211_change_speed(struct sir_dev *dev, unsigned speed)
{
return 0;
}
static int ep7211_reset(struct sir_dev *dev)
{
return 0;
}
MODULE_AUTHOR("Samuel Ortiz <samuel@sortiz.org>");
MODULE_DESCRIPTION("EP7211 IR dongle driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("irda-dongle-13"); /* IRDA_EP7211_DONGLE */
module_init(ep7211_sir_init);
module_exit(ep7211_sir_cleanup);
......@@ -77,6 +77,7 @@ typedef enum {
IRDA_ACT200L_DONGLE = 10,
IRDA_MA600_DONGLE = 11,
IRDA_TOIM3232_DONGLE = 12,
IRDA_EP7211_DONGLE = 13,
} IRDA_DONGLE;
/* Protocol types to be used for SOCK_DGRAM */
......
......@@ -575,7 +575,7 @@ struct net_device
/* The TX queue control structures */
unsigned int egress_subqueue_count;
struct net_device_subqueue egress_subqueue[0];
struct net_device_subqueue egress_subqueue[1];
};
#define to_net_dev(d) container_of(d, struct net_device, dev)
......
......@@ -3624,7 +3624,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
/* ensure 32-byte alignment of both the device and private area */
alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST +
(sizeof(struct net_device_subqueue) * queue_count)) &
(sizeof(struct net_device_subqueue) * (queue_count - 1))) &
~NETDEV_ALIGN_CONST;
alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
......@@ -3642,7 +3642,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
dev->priv = ((char *)dev +
((sizeof(struct net_device) +
(sizeof(struct net_device_subqueue) *
queue_count) + NETDEV_ALIGN_CONST)
(queue_count - 1)) + NETDEV_ALIGN_CONST)
& ~NETDEV_ALIGN_CONST));
}
......
......@@ -182,7 +182,8 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
"clock-21" , "clock-AF_SNA" , "clock-AF_IRDA" ,
"clock-AF_PPPOX" , "clock-AF_WANPIPE" , "clock-AF_LLC" ,
"clock-27" , "clock-28" , "clock-29" ,
"clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_MAX"
"clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_IUCV" ,
"clock-AF_RXRPC" , "clock-AF_MAX"
};
#endif
......
......@@ -158,7 +158,7 @@ static void unlink_from_unused(struct inet_peer *p)
#define lookup(_daddr,_stack) \
({ \
struct inet_peer *u, **v; \
if (_stack) { \
if (_stack != NULL) { \
stackptr = _stack; \
*stackptr++ = &peer_root; \
} \
......@@ -169,7 +169,7 @@ static void unlink_from_unused(struct inet_peer *p)
v = &u->avl_left; \
else \
v = &u->avl_right; \
if (_stack) \
if (_stack != NULL) \
*stackptr++ = v; \
u = *v; \
} \
......
......@@ -962,8 +962,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
dsfield = ipv4_get_dsfield(iph);
if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS))
fl.fl6_flowlabel |= ntohl(((__u32)iph->tos << IPV6_TCLASS_SHIFT)
& IPV6_TCLASS_MASK);
fl.fl6_flowlabel |= htonl((__u32)iph->tos << IPV6_TCLASS_SHIFT)
& IPV6_TCLASS_MASK;
err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu);
if (err != 0) {
......
/*
* IrDA netlink layer, for stack configuration.
*
* Copyright (c) 2007 Samuel Ortiz <samuel@sortiz>
* Copyright (c) 2007 Samuel Ortiz <samuel@sortiz.org>
*
* Partly based on the 802.11 nelink implementation
* (see net/wireless/nl80211.c) which is:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册