Kees Cook writes:
> Instead of kmalloc() with manually calculated values followed by
> multiple strcpy()/strcat() calls, just fold it all into a single
> kasprintf() call.
>
> Signed-off-by: Kees Cook
Reviewed-by: Keith Packard
Instead of kmalloc() with manually calculated values followed by
multiple strcpy()/strcat() calls, just fold it all into a single
kasprintf() call.
Signed-off-by: Kees Cook
---
drivers/usb/misc/chaoskey.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff
Add the ability for PCI platforms to customize device properties via
debugfs attributes. For IP and FPGA validation purposes, this feature is
useful to test against various HW configurations that are normally
statically configured in a real HW. It allows changing of the device
properties while
Move dwc3_pci structure definition and some common function declarations
to their own header file so multiple source files can reference them.
Signed-off-by: Thinh Nguyen
---
drivers/usb/dwc3/dwc3-pci.h | 46 +
Rename dwc3-pci.c to pci.c. There will be multiple source files to
create dwc3-pci module, so dwc3-pci.c needs to use a different name than
the module name.
Signed-off-by: Thinh Nguyen
---
drivers/usb/dwc3/Makefile | 2 ++
drivers/usb/dwc3/{dwc3-pci.c => pci.c}
Refactor and move dwc3 platform creation from dwc3_pci_probe() to a
new function called dwc3_pci_add_platform_device(). This way, it can be
called later.
Signed-off-by: Thinh Nguyen
---
drivers/usb/dwc3/dwc3-pci.c | 89 -
1 file
Platform device is allocated before adding resources. Make sure to
properly cleanup on error case.
Fixes: f1c7e7108109 ("usb: dwc3: convert to pcim_enable_device()")
Signed-off-by: Thinh Nguyen
---
drivers/usb/dwc3/dwc3-pci.c | 2 +-
1 file changed, 1 insertion(+), 1
Set the device name for PCI glue layer to "dwc3-pci.BB:SS.FF" where BB
is PCI bus number, SS is PCI slot, and FF is PCI function number.
Signed-off-by: Thinh Nguyen
---
drivers/usb/dwc3/dwc3-pci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git
Add the ability for PCI platforms to customize device properties via
debugfs attributes. For IP and FPGA validation purposes, this feature is
useful to test against various HW configurations that are normally
statically configured in a real HW. It allows changing of the device
properties while
Add the ability to add device properties dynamically. Currently, device
properties are added to platform device using
platform_device_add_properties(). However, this function does not allow
adding properties incrementally. It is useful to have this ability when
the driver needs to set common
On Fri, 16 Feb 2018, Sebastian Andrzej Siewior wrote:
> On 2018-02-16 13:29:01 [-0500], Alan Stern wrote:
> > We originally used tasklets because we didn't want to incur the delays
> > associated with running in a process context. It seems odd to be
> > reversing that decision now.
>
> The
On 2018-02-16 13:29:01 [-0500], Alan Stern wrote:
> We originally used tasklets because we didn't want to incur the delays
> associated with running in a process context. It seems odd to be
> reversing that decision now.
The theaded interrupt runs SCHED_FIFO priority 50 by default. The only
On 02/16/2018 06:59 AM, Minas Harutyunyan wrote:
> On 2/15/2018 5:20 PM, Mirza Krak wrote:
>> On 14 February 2018 at 13:07, Minas Harutyunyan
>> wrote:
>>> On 2/14/2018 12:57 PM, Mirza Krak wrote:
On 8 February 2018 at 14:53, Minas Harutyunyan
On Fri, 16 Feb 2018, Andreas Kemnade wrote:
> On Fri, 16 Feb 2018 13:13:11 -0500 (EST)
> Alan Stern wrote:
>
> > On Fri, 16 Feb 2018, Andreas Kemnade wrote:
> >
> > > This powers down the phy and on a gta04 it reduces
> > > suspend current by 13 mA.
> > > For unknown
On Fri, 16 Feb 2018 13:13:11 -0500 (EST)
Alan Stern wrote:
> On Fri, 16 Feb 2018, Andreas Kemnade wrote:
>
> > This powers down the phy and on a gta04 it reduces
> > suspend current by 13 mA.
> > For unknown reasons usb does not power on properly.
> > Also calling
On 02/16/2018 02:47 AM, Hans de Goede wrote:
> From: Heikki Krogerus
>
> diff --git a/drivers/usb/common/roles.c b/drivers/usb/common/roles.c
> new file mode 100644
> index ..923e3721d183
> --- /dev/null
> +++ b/drivers/usb/common/roles.c
> @@ -0,0
On Fri, 16 Feb 2018, Sebastian Andrzej Siewior wrote:
> I've been going over Frederic's softirq patches and it seems that there
> were two problems. One was network related, the other was Mauro's USB
> dvb-[stc] device which was not able to stream properly over time.
>
> Here is an attempt to
On Fri, 16 Feb 2018, Andreas Kemnade wrote:
> This powers down the phy and on a gta04 it reduces
> suspend current by 13 mA.
> For unknown reasons usb does not power on properly.
> Also calling usb_phy_shutdown() here feels wrong
> apparently the reset line has to be activated.
>
This powers down the phy and on a gta04 it reduces
suspend current by 13 mA.
For unknown reasons usb does not power on properly.
Also calling usb_phy_shutdown() here feels wrong
apparently the reset line has to be activated.
usb_phy_set_suspend is not enough here. The power
consumption still stays
I've been going over Frederic's softirq patches and it seems that there
were two problems. One was network related, the other was Mauro's USB
dvb-[stc] device which was not able to stream properly over time.
Here is an attempt to let the URB complete in the threaded handler
instead of going to
* Matwey V. Kornilov [180215 17:55]:
> [] 7.219456 d= 0.000997 [181.0 + 3.667] [ 3] IN : 4.5
> [T ] 7.219459 d= 0.03 [181.0 + 7.083] [800] DATA0: 53 da ...
> [] 7.220456 d= 0.000997 [182 + 3.667] [ 3] IN : 4.5
> [
On Fri, Feb 16, 2018 at 04:07:59PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
>
> > USB role switch is a device that can be used to choose the
> > data role for USB connector. With dual-role capable USB
> > controllers, the
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> USB role switch is a device that can be used to choose the
> data role for USB connector. With dual-role capable USB
> controllers, the controller itself will be the switch, but
> on some platforms the USB host and
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> USB Type-C connectors consist of various muxes and switches
> that route the pins on the connector to the right locations.
> The USB Type-C drivers need to be able to control the muxes,
> as they are the ones that know
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> The xHCI controller on various Intel SoCs has an extended cap mmio-range
> which contains registers to control the muxing to the xHCI (host mode)
> or the dwc3 (device mode) and vbus-detection for the otg usb-phy.
>
>
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> Various Intel SoCs (Cherry Trail, Broxton and others) have an internal USB
> role switch for swiching the OTG USB data lines between the xHCI host
> controller and the dwc3 gadget controller.
>
> Note on some Cherry
On Fri, Feb 16, 2018 at 11:47:51AM +0100, Hans de Goede wrote:
> The AXP288 BC1.2 charger detection / extcon code may seem like a strange
> place to add code to control the USB role-switch on devices with an AXP288,
> but there are 2 reasons to do this inside the axp288 extcon code:
>
> 1) On
On Fri, Feb 16, 2018 at 11:47:50AM +0100, Hans de Goede wrote:
> We need to add device-connections for the TYPE-C mux/switch and usb-role
> code to be able to find the PI3USB30532 Type-C cross-switch and the
> device/host switch integrated in the CHT SoC.
>
> Signed-off-by: Hans de Goede
On Fri, Feb 16, 2018 at 11:47:49AM +0100, Hans de Goede wrote:
> Add a driver for the Pericom PI3USB30532 Type-C cross switch /
> mux chip found on some devices with a Type-C port.
>
> Signed-off-by: Hans de Goede
Reviewed-by: Heikki Krogerus
On Fri, Feb 16, 2018 at 11:47:48AM +0100, Hans de Goede wrote:
> diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
> index 060643a1b5c8..7d1b8c82b208 100644
> --- a/drivers/usb/Makefile
> +++ b/drivers/usb/Makefile
> @@ -65,3 +65,5 @@ obj-$(CONFIG_USB_COMMON)+= common/
>
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
While I'm going through patches, one notice to all of them: be
consistent with xHCI abbreviation.
Also check others, like vBus (or whatever is standard de facto to show
it in comments and to the user in messages).
--
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> Add a driver for the Pericom PI3USB30532 Type-C cross switch /
> mux chip found on some devices with a Type-C port.
> +static int pi3usb30532_set_conf(struct pi3usb30532 *pi, u8 new_conf)
> +{
> + int ret = 0;
>
On Fri, Feb 16, 2018 at 11:47:47AM +0100, Hans de Goede wrote:
> The xHCI controller on various Intel SoCs has an extended cap mmio-range
> which contains registers to control the muxing to the xHCI (host mode)
> or the dwc3 (device mode) and vbus-detection for the otg usb-phy.
>
> Having a
Hi Mathias,
On Mon, 29 Jan 2018 14:02:57 +0200, Mathias Nyman wrote:
> On 19.01.2018 22:12, Philipp Zabel wrote:
> > Hi,
> >
> > On Fri, Jan 19, 2018 at 2:10 PM, Michael Tretter
> > wrote:
> >> I found the old thread and it sounds exactly like my issue. Different
>
On Fri, Feb 16, 2018 at 11:47:46AM +0100, Hans de Goede wrote:
> From: Mathias Nyman
>
> Modify xhci_find_next_ext_cap(base, offset, id) to return the next
> capability offset if 0 is passed for id. Otherwise it will behave as
> previously and return the offset of
On Fri, Feb 16, 2018 at 11:47:44AM +0100, Hans de Goede wrote:
> Setting the mux to MUX_NONE and the switch to USB_SWITCH_DISCONNECT when
> the data-role is device is not correct. Plenty of devices support
> operating as USB device through a (separate) USB device controller.
>
> We really need 2
On Fri, Feb 16, 2018 at 11:47:45AM +0100, Hans de Goede wrote:
> Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction
> and replace it with calling the new typec_set_orientation,
> usb_role_switch_set and typec_set_mode functions.
>
> Signed-off-by: Hans de Goede
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> The AXP288 BC1.2 charger detection / extcon code may seem like a strange
> place to add code to control the USB role-switch on devices with an AXP288,
> but there are 2 reasons to do this inside the axp288 extcon code:
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> We need to add device-connections for the TYPE-C mux/switch and usb-role
> code to be able to find the PI3USB30532 Type-C cross-switch and the
> device/host switch integrated in the CHT SoC.
>
Acked-by: Andy Shevchenko
On Thursday 01 February 2018 06:08 PM, Kishon Vijay Abraham I wrote:
> Hi,
>
> On Wednesday 31 January 2018 10:51 AM, Manu Gautam wrote:
>> Hi Kishon,
>>
>>
>> On 1/16/2018 4:26 PM, Manu Gautam wrote:
>>> QUSB-v2 and QMP-v3 USB PHYs are present on Qualcomm's 14nm
>>> and 10nm SOCs.
>>> This
On Fri, Feb 16, 2018 at 12:21:15PM +0100, Hans de Goede wrote:
> Hi,
>
> On 16-02-18 12:00, Andy Shevchenko wrote:
> > On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> > > From: Heikki Krogerus
> > >
> > > Several frameworks - clk,
Hi,
On 16-02-18 12:07, Andy Shevchenko wrote:
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
From: Heikki Krogerus
In order to allow the USB Type-C Class driver take care of
things like muxes and other possible dependencies for
Hi,
On 16-02-18 12:00, Andy Shevchenko wrote:
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
From: Heikki Krogerus
Several frameworks - clk, gpio, phy, pmw, etc. - maintain
lookup tables for describing connections and provide
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> From: Heikki Krogerus
>
> In order to allow the USB Type-C Class driver take care of
> things like muxes and other possible dependencies for the
> port drivers, returning ERR_PTR
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote:
> From: Heikki Krogerus
>
> Several frameworks - clk, gpio, phy, pmw, etc. - maintain
> lookup tables for describing connections and provide custom
> API for handling them. This
Hi All,
Some devices with an USB Type-C connector have a bunch of muxes
behind that connector which need to be controlled by the kernel (rather
then having them controlled by firmware as on most devices).
Quite a while back I submitted a patch-series to tie together these muxes
and the Type-C
From: Heikki Krogerus
USB role switch is a device that can be used to choose the
data role for USB connector. With dual-role capable USB
controllers, the controller itself will be the switch, but
on some platforms the USB host and device controllers are
separate
From: Heikki Krogerus
Several frameworks - clk, gpio, phy, pmw, etc. - maintain
lookup tables for describing connections and provide custom
API for handling them. This introduces a single generic
lookup table and API for the connections.
The motivation for this
From: Heikki Krogerus
In order to allow the USB Type-C Class driver take care of
things like muxes and other possible dependencies for the
port drivers, returning ERR_PTR instead of NULL from the
registration functions in case of failure.
The reason for taking
From: Heikki Krogerus
USB Type-C connectors consist of various muxes and switches
that route the pins on the connector to the right locations.
The USB Type-C drivers need to be able to control the muxes,
as they are the ones that know things like the cable plug
Setting the mux to MUX_NONE and the switch to USB_SWITCH_DISCONNECT when
the data-role is device is not correct. Plenty of devices support
operating as USB device through a (separate) USB device controller.
We really need 2 different versions of USB_SWITCH_CONNECT,
USB_SWITCH_CONNECT_HOST and
Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction
and replace it with calling the new typec_set_orientation,
usb_role_switch_set and typec_set_mode functions.
Signed-off-by: Hans de Goede
---
drivers/usb/typec/Kconfig | 1 +
The xHCI controller on various Intel SoCs has an extended cap mmio-range
which contains registers to control the muxing to the xHCI (host mode)
or the dwc3 (device mode) and vbus-detection for the otg usb-phy.
Having a role-sw driver included in the xhci code (under drivers/usb/host)
is not
From: Mathias Nyman
Modify xhci_find_next_ext_cap(base, offset, id) to return the next
capability offset if 0 is passed for id. Otherwise it will behave as
previously and return the offset of the next capability with matching id
capability id 0 is not used by xhci
Various Intel SoCs (Cherry Trail, Broxton and others) have an internal USB
role switch for swiching the OTG USB data lines between the xHCI host
controller and the dwc3 gadget controller.
Note on some Cherry Trail systems there is ACPI/AML code listening to
edge interrupts on the id-pin (through
Add a driver for the Pericom PI3USB30532 Type-C cross switch /
mux chip found on some devices with a Type-C port.
Signed-off-by: Hans de Goede
---
Note this is a rewrite of my previous driver which was using the
drivers/mux framework to use the new drivers/usb/typec/mux
We need to add device-connections for the TYPE-C mux/switch and usb-role
code to be able to find the PI3USB30532 Type-C cross-switch and the
device/host switch integrated in the CHT SoC.
Signed-off-by: Hans de Goede
---
drivers/platform/x86/intel_cht_int33fe.c | 25
The AXP288 BC1.2 charger detection / extcon code may seem like a strange
place to add code to control the USB role-switch on devices with an AXP288,
but there are 2 reasons to do this inside the axp288 extcon code:
1) On many devices the USB role is controlled by ACPI AML code, but the AML
From: John Youn
Enable the power down option based on the core capability.
Signed-off-by: John Youn
Signed-off-by: Vardan Mikayelyan
Signed-off-by: Artur Petrosyan
Signed-off-by: Grigor Tovmasyan
From: Vardan Mikayelyan
Affected cases:
ClearPortFeature's
USB_PORT_FEAT_SUSPEND
SetPortFeature's
USB_PORT_FEAT_SUSPEND
USB_PORT_FEAT_RESET
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
Signed-off-by: Grigor
From: Vardan Mikayelyan
The GPWRDN interrupts are those that occur in both Host and
Device mode while core is in hibernated state.
Export dwc2_core_init to be able to use it in GPWRDN_IDSTS
interrupt handler.
Here we have duplicated init functions in host and gadget sides
From: Vardan Mikayelyan
These are wrapper functions which are calling device or host
enter/exit hibernation functions.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
Signed-off-by: Grigor Tovmasyan
From: Vardan Mikayelyan
Do changes to allow entering hibernated state from USB_SUSPEND
interrupt. All code is added under if conditions and mustn't impact
existing functionality.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
From: Vardan Mikayelyan
Add common (host/device) helper functions, which will be called while
exiting from hibernation, from both sides.
dwc2_restore_essential_regs()
dwc2_hib_restore_common()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John
From: Vardan Mikayelyan
Add host/device hibernation functions which must be wrapped
by core's dwc2_enter_hibernation()/dwc2_exit_hibernation()
functions.
Make dwc2_backup_global_registers dwc2_restore_global_register
non-static to use them in both host/gadget sides.
From: Vardan Mikayelyan
It will be set once corresponding set_feature command comes.
True if device is allowed to wake-up host by remote-wakeup
signalling.
This is preparation for remote wake-up support implementation,
it will not be implemented until gadget stack provide
From: Vardan Mikayelyan
Move hptxfsiz to host register's backup/restore functions, not
needed to have it in global register's backup/restore functions.
Add backup for glpmcfg, and read/write for gi2cctl and pcgcctl.
As requires programming guide.
Affected functions:
From: Vardan Mikayelyan
Added a flag to indicate that core is in hibernation,
it is used to determine the hibernation state of the core.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
Signed-off-by: Grigor Tovmasyan
From: Vardan Mikayelyan
Add parameter remote_wakeup to dwc2_restore_device_registers()
to be able to restore device registers according to programming
guide for dwc-otg. It says that in case of rem_wakeup DCTL must not
be restored here.
Remove setting of DCTL_PWRONPRGDONE
From: Vardan Mikayelyan
Moved dtxfsiz from dwc2_gregs_backup to dwc2_dregs_backup,
because it is device register.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
Signed-off-by: Grigor Tovmasyan
From: Vardan Mikayelyan
Add parameter and it's initialization, needed for hibernation.
Reimplement dwc2_set_param_power_down() to support hibernation too.
Now 'power_down' parameter can be initialized with 0, 1 or 2.
0 - No
1 - Partial power down
2 - Hibernation
From: Vardan Mikayelyan
No-op change, only rename.
This code was misnamed originally. It was only responsible for partial
power down and not for hibernation.
Rename core_params->hibernation to core_params->power_down,
dwc2_set_param_hibernation() to
This series contains patches which are already have been sent in
"usb: dwc2: fixes, enhancements and new features" series.
That patch series was too large, and based on community feedbacks decided to
split that series into small pieces. This is a fourth and last part.
In this series we included
From: Vardan Mikayelyan
If the dr_mode is USB_DR_MODE_OTG, forcing the mode is needed during
driver probe to get the host and device specific HW parameters. Then we
clear the force mode bits so that the core operates in OTG mode.
The force mode bits should not be touched
On Fri, Feb 16, 2018 at 10:20:51AM +0200, Felipe Balbi wrote:
>
> Hi Greg,
>
> here's my first set of fixes for current -rc cycle. Let me know if you
> want any changes to the pull request.
>
> cheers
>
> The following changes since commit 7928b2cbe55b2a410a0f5c1f154610059c57b1b2:
>
> Linux
Hi Greg,
here's my first set of fixes for current -rc cycle. Let me know if you
want any changes to the pull request.
cheers
The following changes since commit 7928b2cbe55b2a410a0f5c1f154610059c57b1b2:
Linux 4.16-rc1 (2018-02-11 15:04:29 -0800)
are available in the Git repository at:
Hi Balbi,
On 2/16/2018 11:09, Felipe Balbi wrote:
>
> Hi,
>
> Grigor Tovmasyan writes:
>
>> Hi Balbi,
>>
>> I rebased this commit to your testing/next (see below).
>
> Are you sure you did?
Yes. I checked my version of your testing/next, it also was
77 matches
Mail list logo