Commit 821bc517 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 08d65cfe f6c27cdd
......@@ -67,7 +67,7 @@
#endif
#ifdef CONFIG_BT_HCIUSB_SCO
static int isoc = 1;
static int isoc = 2;
#endif
#define VERSION "2.7"
......@@ -898,7 +898,7 @@ static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id
switch (ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
case USB_ENDPOINT_XFER_ISOC:
if (ep->desc.wMaxPacketSize < size ||
uif->desc.bAlternateSetting > 2)
uif->desc.bAlternateSetting != isoc)
break;
size = ep->desc.wMaxPacketSize;
......@@ -1037,7 +1037,7 @@ module_init(hci_usb_init);
module_exit(hci_usb_exit);
#ifdef CONFIG_BT_HCIUSB_SCO
module_param(isoc, bool, 0);
module_param(isoc, int, 0644);
MODULE_PARM_DESC(isoc, "Set isochronous transfers for SCO over HCI support");
#endif
......
......@@ -52,7 +52,7 @@
/*------------------------------------------------------------------*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/init.h>
......@@ -88,10 +88,10 @@ static struct usb_device_id dongles[] = {
/*
* Important note :
* Devices based on the SigmaTel chipset (0x66f, 0x4200) are not compliant
* with the USB-IrDA specification (and actually very very different), and
* there is no way this driver can support those devices, apart from
* a complete rewrite...
* Devices based on the SigmaTel chipset (0x66f, 0x4200) are not designed
* using the "USB-IrDA specification" (yes, there exist such a thing), and
* therefore not supported by this driver (don't add them above).
* There is a Linux driver, stir4200, that support those USB devices.
* Jean II
*/
......@@ -1007,9 +1007,9 @@ static int irda_usb_net_close(struct net_device *netdev)
}
/* Cancel Tx and speed URB - need to be synchronous to avoid races */
self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->tx_urb);
usb_kill_urb(self->tx_urb);
self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->speed_urb);
usb_kill_urb(self->speed_urb);
/* Stop and remove instance of IrLAP */
if (self->irlap)
......@@ -1520,9 +1520,9 @@ static void irda_usb_disconnect(struct usb_interface *intf)
/* Cancel Tx and speed URB.
* Toggle flags to make sure it's synchronous. */
self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->tx_urb);
usb_kill_urb(self->tx_urb);
self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->speed_urb);
usb_kill_urb(self->speed_urb);
}
/* Cleanup the device stuff */
......@@ -1593,7 +1593,7 @@ module_exit(usb_irda_cleanup);
/*
* Module parameters
*/
MODULE_PARM(qos_mtt_bits, "i");
module_param(qos_mtt_bits, int, 0);
MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time");
MODULE_AUTHOR("Roman Weissgaerber <weissg@vienna.at>, Dag Brattli <dag@brattli.net> and Jean Tourrilhes <jt@hpl.hp.com>");
MODULE_DESCRIPTION("IrDA-USB Dongle Driver");
......
......@@ -705,7 +705,7 @@ static int receive_start(struct stir_cb *stir)
static void receive_stop(struct stir_cb *stir)
{
stir->receiving = 0;
usb_unlink_urb(stir->rx_urb);
usb_kill_urb(stir->rx_urb);
if (stir->rx_buff.in_frame)
stir->stats.collisions++;
......@@ -974,7 +974,7 @@ static int stir_net_close(struct net_device *netdev)
kfree(stir->fifo_status);
/* Mop up receive urb's */
usb_unlink_urb(stir->rx_urb);
usb_kill_urb(stir->rx_urb);
kfree(stir->io_buf);
usb_free_urb(stir->rx_urb);
......
......@@ -75,6 +75,9 @@ static int dongle_id = 0; /* default: probe */
/* We can't guess the type of connected dongle, user *must* supply it. */
MODULE_PARM(dongle_id, "i");
/* FIXME : we should not need this, because instances should be automatically
* managed by the PCI layer. Especially that we seem to only be using the
* first entry. Jean II */
/* Max 4 instances for now */
static struct via_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL };
......@@ -153,11 +156,9 @@ static int __init via_ircc_init(void)
IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
rc = pci_register_driver(&via_driver);
if (rc < 1) {
if (rc < 0) {
IRDA_DEBUG(0, "%s(): error rc = %d, returning -ENODEV...\n",
__FUNCTION__, rc);
if (rc == 0)
pci_unregister_driver (&via_driver);
return -ENODEV;
}
return 0;
......@@ -288,15 +289,27 @@ static void __exit via_remove_one (struct pci_dev *pdev)
{
IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
/* FIXME : This is ugly. We should use pci_get_drvdata(pdev);
* to get our driver instance and call directly via_ircc_close().
* See vlsi_ir for details...
* Jean II */
via_ircc_clean();
/* FIXME : This should be in via_ircc_close(), because here we may
* theoritically disable still configured devices :-( - Jean II */
pci_disable_device(pdev);
}
static void __exit via_ircc_cleanup(void)
{
IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
/* FIXME : This should be redundant, as pci_unregister_driver()
* should call via_remove_one() on each device.
* Jean II */
via_ircc_clean();
/* Cleanup all instances of the driver */
pci_unregister_driver (&via_driver);
}
......@@ -323,6 +336,10 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id)
self->netdev = dev;
spin_lock_init(&self->lock);
/* FIXME : We should store our driver instance in the PCI layer,
* using pci_set_drvdata(), not in this array.
* See vlsi_ir for details... - Jean II */
/* FIXME : 'i' is always 0 (see via_init_one()) :-( - Jean II */
/* Need to store self somewhere */
dev_self[i] = self;
self->index = i;
......
......@@ -38,10 +38,20 @@ extern struct proc_dir_entry *proc_bt_hci;
/* HCI Core structures */
struct inquiry_data {
bdaddr_t bdaddr;
__u8 pscan_rep_mode;
__u8 pscan_period_mode;
__u8 pscan_mode;
__u8 dev_class[3];
__u16 clock_offset;
__s8 rssi;
};
struct inquiry_entry {
struct inquiry_entry *next;
__u32 timestamp;
struct inquiry_info info;
struct inquiry_data data;
};
struct inquiry_cache {
......@@ -142,6 +152,7 @@ struct hci_conn {
__u16 state;
__u8 type;
__u8 out;
__u8 dev_class[3];
__u32 link_mode;
unsigned long pend;
......@@ -199,7 +210,7 @@ static inline long inquiry_entry_age(struct inquiry_entry *e)
}
struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr);
void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_info *info);
void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data);
/* ----- HCI Connections ----- */
enum {
......
......@@ -358,6 +358,7 @@ enum {
NET_IPV4_VS_EXPIRE_NODEST_CONN=23,
NET_IPV4_VS_SYNC_THRESHOLD=24,
NET_IPV4_VS_NAT_ICMP_SEND=25,
NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26,
NET_IPV4_VS_LAST
};
......@@ -879,6 +880,7 @@ extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
*/
extern int sysctl_ip_vs_cache_bypass;
extern int sysctl_ip_vs_expire_nodest_conn;
extern int sysctl_ip_vs_expire_quiescent_template;
extern int sysctl_ip_vs_sync_threshold[2];
extern int sysctl_ip_vs_nat_icmp_send;
extern struct ip_vs_stats ip_vs_stats;
......
......@@ -71,9 +71,10 @@ void hci_acl_connect(struct hci_conn *conn)
if ((ie = hci_inquiry_cache_lookup(hdev, &conn->dst)) &&
inquiry_entry_age(ie) <= INQUIRY_ENTRY_AGE_MAX) {
cp.pscan_rep_mode = ie->info.pscan_rep_mode;
cp.pscan_mode = ie->info.pscan_mode;
cp.clock_offset = ie->info.clock_offset | __cpu_to_le16(0x8000);
cp.pscan_rep_mode = ie->data.pscan_rep_mode;
cp.pscan_mode = ie->data.pscan_mode;
cp.clock_offset = ie->data.clock_offset | __cpu_to_le16(0x8000);
memcpy(conn->dev_class, ie->data.dev_class, 3);
}
cp.pkt_type = __cpu_to_le16(hdev->pkt_type & ACL_PTYPE_MASK);
......
......@@ -313,19 +313,19 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *b
BT_DBG("cache %p, %s", cache, batostr(bdaddr));
for (e = cache->list; e; e = e->next)
if (!bacmp(&e->info.bdaddr, bdaddr))
if (!bacmp(&e->data.bdaddr, bdaddr))
break;
return e;
}
void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_info *info)
void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data)
{
struct inquiry_cache *cache = &hdev->inq_cache;
struct inquiry_entry *e;
BT_DBG("cache %p, %s", cache, batostr(&info->bdaddr));
BT_DBG("cache %p, %s", cache, batostr(&data->bdaddr));
if (!(e = hci_inquiry_cache_lookup(hdev, &info->bdaddr))) {
if (!(e = hci_inquiry_cache_lookup(hdev, &data->bdaddr))) {
/* Entry not in the cache. Add new one. */
if (!(e = kmalloc(sizeof(struct inquiry_entry), GFP_ATOMIC)))
return;
......@@ -334,7 +334,7 @@ void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_info *info)
cache->list = e;
}
memcpy(&e->info, info, sizeof(*info));
memcpy(&e->data, data, sizeof(*data));
e->timestamp = jiffies;
cache->timestamp = jiffies;
}
......@@ -346,8 +346,16 @@ static int inquiry_cache_dump(struct hci_dev *hdev, int num, __u8 *buf)
struct inquiry_entry *e;
int copied = 0;
for (e = cache->list; e && copied < num; e = e->next, copied++)
memcpy(info++, &e->info, sizeof(*info));
for (e = cache->list; e && copied < num; e = e->next, copied++) {
struct inquiry_data *data = &e->data;
bacpy(&info->bdaddr, &data->bdaddr);
info->pscan_rep_mode = data->pscan_rep_mode;
info->pscan_period_mode = data->pscan_period_mode;
info->pscan_mode = data->pscan_mode;
memcpy(info->dev_class, data->dev_class, 3);
info->clock_offset = data->clock_offset;
info++;
}
BT_DBG("cache %p, copied %d", cache, copied);
return copied;
......
......@@ -491,8 +491,18 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *
BT_DBG("%s num_rsp %d", hdev->name, num_rsp);
hci_dev_lock(hdev);
for (; num_rsp; num_rsp--)
hci_inquiry_cache_update(hdev, info++);
for (; num_rsp; num_rsp--) {
struct inquiry_data data;
bacpy(&data.bdaddr, &info->bdaddr);
data.pscan_rep_mode = info->pscan_rep_mode;
data.pscan_period_mode = info->pscan_period_mode;
data.pscan_mode = info->pscan_mode;
memcpy(data.dev_class, info->dev_class, 3);
data.clock_offset = info->clock_offset;
data.rssi = 0x00;
info++;
hci_inquiry_cache_update(hdev, &data);
}
hci_dev_unlock(hdev);
}
......@@ -506,15 +516,16 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
hci_dev_lock(hdev);
for (; num_rsp; num_rsp--) {
struct inquiry_info tmp;
bacpy(&tmp.bdaddr, &info->bdaddr);
tmp.pscan_rep_mode = info->pscan_rep_mode;
tmp.pscan_period_mode = info->pscan_period_mode;
tmp.pscan_mode = 0x00;
memcpy(tmp.dev_class, &info->dev_class, 3);
tmp.clock_offset = info->clock_offset;
struct inquiry_data data;
bacpy(&data.bdaddr, &info->bdaddr);
data.pscan_rep_mode = info->pscan_rep_mode;
data.pscan_period_mode = info->pscan_period_mode;
data.pscan_mode = 0x00;
memcpy(data.dev_class, info->dev_class, 3);
data.clock_offset = info->clock_offset;
data.rssi = info->rssi;
info++;
hci_inquiry_cache_update(hdev, &tmp);
hci_inquiry_cache_update(hdev, &data);
}
hci_dev_unlock(hdev);
}
......@@ -544,6 +555,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
return;
}
}
memcpy(conn->dev_class, ev->dev_class, 3);
conn->state = BT_CONNECT;
hci_dev_unlock(hdev);
......
......@@ -48,14 +48,14 @@ static ssize_t show_inquiry_cache(struct class_device *cdev, char *buf)
hci_dev_lock_bh(hdev);
for (e = cache->list; e; e = e->next) {
struct inquiry_info *info = &e->info;
struct inquiry_data *data = &e->data;
bdaddr_t bdaddr;
baswap(&bdaddr, &info->bdaddr);
n += sprintf(buf + n, "%s %d %d %d 0x%.2x%.2x%.2x 0x%.4x 0x%.2x %u\n",
baswap(&bdaddr, &data->bdaddr);
n += sprintf(buf + n, "%s %d %d %d 0x%.2x%.2x%.2x 0x%.4x %d %u\n",
batostr(&bdaddr),
info->pscan_rep_mode, info->pscan_period_mode, info->pscan_mode,
info->dev_class[2], info->dev_class[1], info->dev_class[0],
info->clock_offset, 0, e->timestamp);
data->pscan_rep_mode, data->pscan_period_mode, data->pscan_mode,
data->dev_class[2], data->dev_class[1], data->dev_class[0],
data->clock_offset, data->rssi, e->timestamp);
}
hci_dev_unlock_bh(hdev);
......
......@@ -453,7 +453,9 @@ int ip_vs_check_template(struct ip_vs_conn *ct)
* Checking the dest server status.
*/
if ((dest == NULL) ||
!(dest->flags & IP_VS_DEST_F_AVAILABLE)) {
!(dest->flags & IP_VS_DEST_F_AVAILABLE) ||
(sysctl_ip_vs_expire_quiescent_template &&
(atomic_read(&dest->weight) == 0))) {
IP_VS_DBG(9, "check_template: dest not available for "
"protocol %s s:%u.%u.%u.%u:%d v:%u.%u.%u.%u:%d "
"-> d:%u.%u.%u.%u:%d\n",
......
......@@ -75,6 +75,7 @@ static int sysctl_ip_vs_amemthresh = 1024;
static int sysctl_ip_vs_am_droprate = 10;
int sysctl_ip_vs_cache_bypass = 0;
int sysctl_ip_vs_expire_nodest_conn = 0;
int sysctl_ip_vs_expire_quiescent_template = 0;
int sysctl_ip_vs_sync_threshold[2] = { 3, 50 };
int sysctl_ip_vs_nat_icmp_send = 0;
......@@ -1447,9 +1448,9 @@ static struct ctl_table vs_vars[] = {
{
.ctl_name = NET_IPV4_VS_TO_ES,
.procname = "timeout_established",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED],
.data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1457,7 +1458,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_synsent",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1465,7 +1466,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_synrecv",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1473,7 +1474,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_finwait",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1489,7 +1490,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_close",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1497,7 +1498,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_closewait",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1505,7 +1506,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_lastack",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1513,7 +1514,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_listen",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1521,7 +1522,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_synack",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1529,7 +1530,7 @@ static struct ctl_table vs_vars[] = {
.procname = "timeout_udp",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP],
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
},
{
......@@ -1557,6 +1558,14 @@ static struct ctl_table vs_vars[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{
.ctl_name = NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE,
.procname = "expire_quiescent_template",
.data = &sysctl_ip_vs_expire_quiescent_template,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{
.ctl_name = NET_IPV4_VS_SYNC_THRESHOLD,
.procname = "sync_threshold",
......
......@@ -3028,7 +3028,7 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_opt *tp, int estab)
tp->snd_wscale = *(__u8 *)ptr;
if(tp->snd_wscale > 14) {
if(net_ratelimit())
printk("tcp_parse_options: Illegal window "
printk(KERN_INFO "tcp_parse_options: Illegal window "
"scaling value %d >14 received.",
tp->snd_wscale);
tp->snd_wscale = 14;
......
......@@ -524,11 +524,33 @@ extern void ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
#endif
/* Same as inet6_dgram_ops, sans udp_poll. */
static struct proto_ops inet6_sockraw_ops = {
.family = PF_INET6,
.owner = THIS_MODULE,
.release = inet6_release,
.bind = inet6_bind,
.connect = inet_dgram_connect, /* ok */
.socketpair = sock_no_socketpair, /* a do nothing */
.accept = sock_no_accept, /* a do nothing */
.getname = inet6_getname,
.poll = datagram_poll, /* ok */
.ioctl = inet6_ioctl, /* must change */
.listen = sock_no_listen, /* ok */
.shutdown = inet_shutdown, /* ok */
.setsockopt = sock_common_setsockopt, /* ok */
.getsockopt = sock_common_getsockopt, /* ok */
.sendmsg = inet_sendmsg, /* ok */
.recvmsg = sock_common_recvmsg, /* ok */
.mmap = sock_no_mmap,
.sendpage = sock_no_sendpage,
};
static struct inet_protosw rawv6_protosw = {
.type = SOCK_RAW,
.protocol = IPPROTO_IP, /* wild card */
.prot = &rawv6_prot,
.ops = &inet6_dgram_ops,
.ops = &inet6_sockraw_ops,
.capability = CAP_NET_RAW,
.no_check = UDP_CSUM_DEFAULT,
.flags = INET_PROTOSW_REUSE,
......
......@@ -63,8 +63,7 @@ init_targ(struct tcf_ipt *p)
target = __ipt_find_target_lock(t->u.user.name, &ret);
if (!target) {
printk("init_targ: Failed to find %s\n",
t->u.kernel.target->name);
printk("init_targ: Failed to find %s\n", t->u.user.name);
return -1;
}
......
......@@ -258,12 +258,13 @@ static void netem_watchdog(unsigned long arg)
{
struct Qdisc *sch = (struct Qdisc *)arg;
struct netem_sched_data *q = qdisc_priv(sch);
struct net_device *dev = sch->dev;
struct sk_buff *skb;
psched_time_t now;
pr_debug("netem_watchdog: fired @%lu\n", jiffies);
spin_lock_bh(&sch->dev->queue_lock);
spin_lock_bh(&dev->queue_lock);
PSCHED_GET_TIME(now);
while ((skb = skb_peek(&q->delayed)) != NULL) {
......@@ -286,7 +287,8 @@ static void netem_watchdog(unsigned long arg)
else
sch->q.qlen++;
}
spin_unlock_bh(&sch->dev->queue_lock);
qdisc_restart(dev);
spin_unlock_bh(&dev->queue_lock);
}
static void netem_reset(struct Qdisc *sch)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment