/********************************************************************* * * Filename: qos.h * Version: 1.0 * Description: Quality of Service definitions * Status: Experimental. * Author: Dag Brattli * Created at: Fri Sep 19 23:21:09 1997 * Modified at: Thu Dec 2 13:51:54 1999 * Modified by: Dag Brattli * * Copyright (c) 1999 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 IRDA_QOS_H #define IRDA_QOS_H #include #include #define PI_BAUD_RATE 0x01 #define PI_MAX_TURN_TIME 0x82 #define PI_DATA_SIZE 0x83 #define PI_WINDOW_SIZE 0x84 #define PI_ADD_BOFS 0x85 #define PI_MIN_TURN_TIME 0x86 #define PI_LINK_DISC 0x08 #define IR_115200_MAX 0x3f /* Baud rates (first byte) */ #define IR_2400 0x01 #define IR_9600 0x02 #define IR_19200 0x04 #define IR_38400 0x08 #define IR_57600 0x10 #define IR_115200 0x20 #define IR_576000 0x40 #define IR_1152000 0x80 /* Baud rates (second byte) */ #define IR_4000000 0x01 #define IR_16000000 0x02 /* Quality of Service information */ typedef struct { __u32 value; __u16 bits; /* LSB is first byte, MSB is second byte */ } qos_value_t; struct qos_info { magic_t magic; qos_value_t baud_rate; /* IR_11520O | ... */ qos_value_t max_turn_time; qos_value_t data_size; qos_value_t window_size; qos_value_t additional_bofs; qos_value_t min_turn_time; qos_value_t link_disc_time; qos_value_t power; }; extern int sysctl_max_baud_rate; extern int sysctl_max_inactive_time; void irda_init_max_qos_capabilies(struct qos_info *qos); void irda_qos_compute_intersection(struct qos_info *, struct qos_info *); __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time); void irda_qos_bits_to_value(struct qos_info *qos); /* So simple, how could we not inline those two ? * Note : one byte is 10 bits if you include start and stop bits * Jean II */ #define irlap_min_turn_time_in_bytes(speed, min_turn_time) ( \ speed * min_turn_time / 10000000 \ ) #define irlap_xbofs_in_usec(speed, xbofs) ( \ xbofs * 10000000 / speed \ ) #endif gi/linux/net-next.git/commit/net?h=nds-private-remove&id=407788b51db6f6aab499d02420082f436abf3238'>net/packet
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2017-01-24 09:18:57 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 11:02:29 +0100
commit407788b51db6f6aab499d02420082f436abf3238 (patch)
treeb2fb3c885baf47cd2bd8ee0429f423b352e11905 /net/packet
parent7a308bb3016f57e5be11a677d15b821536419d36 (diff)
usb: musb: Fix host mode error -71 regression
Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") started implementing musb generic runtime PM support by introducing devctl register session bit based state control. This caused a regression where if a USB mass storage device is connected to a USB hub, we can get: usb 1-1: reset high-speed USB device number 2 using musb-hdrc usb 1-1: device descriptor read/64, error -71 usb 1-1.1: new high-speed USB device number 4 using musb-hdrc This is because before the USB storage device is connected, musb is in OTG_STATE_A_SUSPEND. And we currently only set need_finish_resume in musb_stage0_irq() and the related code calling finish_resume_work in musb_resume() and musb_runtime_resume() never gets called. To fix the issue, we can call schedule_delayed_work() directly in musb_stage0_irq() to have finish_resume_work run. And we should no longer never get interrupts when when suspended. We have changed musb to no longer need pm_runtime_irqsafe(). The need_finish_resume flag was added in commit 9298b4aad37e ("usb: musb: fix device hotplug behind hub") and no longer applies as far as I can tell. So let's just remove the earlier code that no longer is needed. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Reported-by: Bin Liu <b-liu@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/packet')