/********************************************************************* * * Filename: ircomm_tty.h * Version: * Description: * Status: Experimental. * Author: Dag Brattli * Created at: Sun Jun 6 23:24:22 1999 * Modified at: Fri Jan 28 13:16:57 2000 * Modified by: Dag Brattli * * Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * ********************************************************************/ #ifndef IRCOMM_TTY_H #define IRCOMM_TTY_H #include #include #include #include /* struct tty_struct */ #include #include #include #define IRCOMM_TTY_PORTS 32 #define IRCOMM_TTY_MAGIC 0x3432 #define IRCOMM_TTY_MAJOR 161 #define IRCOMM_TTY_MINOR 0 /* This is used as an initial value to max_header_size before the proper * value is filled in (5 for ttp, 4 for lmp). This allow us to detect * the state of the underlying connection. - Jean II */ #define IRCOMM_TTY_HDR_UNINITIALISED 16 /* Same for payload size. See qos.c for the smallest max data size */ #define IRCOMM_TTY_DATA_UNINITIALISED (64 - IRCOMM_TTY_HDR_UNINITIALISED) /* * IrCOMM TTY driver state */ struct ircomm_tty_cb { irda_queue_t queue; /* Must be first */ struct tty_port port; magic_t magic; int state; /* Connect state */ struct ircomm_cb *ircomm; /* IrCOMM layer instance */ struct sk_buff *tx_skb; /* Transmit buffer */ struct sk_buff *ctrl_skb; /* Control data buffer */ /* Parameters */ struct ircomm_params settings; __u8 service_type; /* The service that we support */ int client; /* True if we are a client */ LOCAL_FLOW flow; /* IrTTP flow status */ int line; __u8 dlsap_sel; __u8 slsap_sel; __u32 saddr; __u32 daddr; __u32 max_data_size; /* Max data we can transmit in one packet */ __u32 max_header_size; /* The amount of header space we must reserve */ __u32 tx_data_size; /* Max data size of current tx_skb */ struct iriap_cb *iriap; /* Instance used for querying remote IAS */ struct ias_object* obj; void *skey; void *ckey; struct timer_list watchdog_timer; struct work_struct tqueue; /* Protect concurent access to : * o self->ctrl_skb * o self->tx_skb * Maybe other things may gain to be protected as well... * Jean II */ spinlock_t spinlock; }; void ircomm_tty_start(struct tty_struct *tty); void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self); int ircomm_tty_tiocmget(struct tty_struct *tty); int ircomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear); int ircomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void ircomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios); #endif tion value='3' selected='selected'>3space:mode:
authorDexuan Cui <decui@microsoft.com>2017-01-28 11:46:02 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-31 10:59:48 +0100
commit433e19cf33d34bb6751c874a9c00980552fe508c (patch)
treece6547ef2987fbb289fa28f03536328a42781651 /net/bluetooth/bnep/Makefile
parent191e885a2e130e639bb0c8ee350d7047294f2ce6 (diff)
Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()") added the proper mb(), but removed the test "prev_write_sz < pending_sz" when making the signal decision. As a result, the guest can signal the host unnecessarily, and then the host can throttle the guest because the host thinks the guest is buggy or malicious; finally the user running stress test can perceive intermittent freeze of the guest. This patch brings back the test, and properly handles the in-place consumption APIs used by NetVSC (see get_next_pkt_raw(), put_pkt_raw() and commit_rd_index()). Fixes: a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()") Signed-off-by: Dexuan Cui <decui@microsoft.com> Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com> Tested-by: Rolf Neugebauer <rolf.neugebauer@docker.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: <stable@vger.kernel.org> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/bluetooth/bnep/Makefile')