nding work.
CC: #4.4+
Fixes: e50293ef9775 ("USB: fix invalid memory access in hub_activate()")
Signed-off-by: Viresh Kumar
---
Greg,
This is tested over 3.10 with backported patches only, sorry didn't had
a mainline setup to test this out. :(
drivers/usb/core/hub.c | 3 ++-
1 fi
On 28-07-16, 10:13, Alan Stern wrote:
> On Wed, 27 Jul 2016, Viresh Kumar wrote:
>
> > If the hub gets disconnected while the core is still activating it, this
> > can result in leaking memory of few USB structures.
> >
> > This will happen if we have done a kref
On 01-08-16, 20:01, Matwey V. Kornilov wrote:
> With this patch, there is no cpufreq directory here.
>
> Without this patch, the output is the following:
>
> nohostname:~ # uname -a
> Linux nohostname 4.6.4-3.gecd9058-default #1 SMP PREEMPT Fri Jul 15
> 08:08:50 UTC 2016 (ecd9058) armv7l armv7l a
hz by cpufreq driver
> (as it did whet there was cpufreq driver).
>
> 2016-07-29 21:01 GMT+03:00 Matwey V. Kornilov :
> > Hello,
> >
> > I've found that the following commit fixes the issue:
> >
> > commit 7694ca6e1d6f01122f05039b81f70f64b1ec406
On 04-08-16, 11:20, Alan Stern wrote:
> Yes, it could lead to this deadlock.
>
> > Should we rather have device_trylock instead of device_lock
>
> No.
>
> > > @@ -1031,10 +1031,20 @@ static void hub_activate(struct usb_hub
> > > unsigned delay;
> > >
> > > /* Continue a partial initializati
On 04-08-16, 14:47, Alan Stern wrote:
> On Thu, 4 Aug 2016, Viresh Kumar wrote:
>
> > On 04-08-16, 11:20, Alan Stern wrote:
> > > Yes, it could lead to this deadlock.
> > >
> > > > Should we rather have device_trylock instead of device_lock
> > &g
to acquire the same interface
device lock and this may result in deadlock.
Fix both the issues by removing the call to cancel_delayed_work_sync().
CC: #4.4+
Fixes: e50293ef9775 ("USB: fix invalid memory access in hub_activate()")
Reported-by: Manu Gautam
Signed-off-by: Viresh Ku
On 04-08-16, 11:49, Viresh Kumar wrote:
> On 04-08-16, 14:47, Alan Stern wrote:
> > On Thu, 4 Aug 2016, Viresh Kumar wrote:
> >
> > > On 04-08-16, 11:20, Alan Stern wrote:
> > > > Yes, it could lead to this deadlock.
> > > >
> > > > &
> [as1807]
>
>
> drivers/usb/core/hub.c | 15 ++-
> 1 file changed, 6 insertions(+), 9 deletions(-)
Reviewed-by: Viresh Kumar
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05-08-16, 11:51, Alan Stern wrote:
> The locking in hub_activate() is not adequate to provide full mutual
> exclusion with hub_quiesce(). The subroutine locks the hub's
> usb_interface, but the callers of hub_quiesce() (such as
> hub_pre_reset() and hub_event()) hold the lock to the hub's
> usb
On 31-08-16, 12:46, Alan Stern wrote:
> On Wed, 31 Aug 2016, Viresh Kumar wrote:
>
> > On 05-08-16, 11:51, Alan Stern wrote:
> > > +++ usb-4.x/drivers/usb/core/hub.c
> > > @@ -1052,7 +1052,7 @@ static void hub_activate(struct usb_hub
> > >
>
; st}/phy-spear1340-miphy.c| 0
> rename drivers/phy/{ => st}/phy-spear1310-miphy.c (100%)
> rename drivers/phy/{ => st}/phy-spear1340-miphy.c (100%)
>
Acked-by: Viresh Kumar
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the
device-tree
> @@ -36,6 +37,7 @@ config MACH_SPEAR1310
> config MACH_SPEAR1340
> bool "SPEAr1340 Machine support with Device Tree"
> select PINCTRL_SPEAR1340
> + select PHY_PLAT
> select PHY_ST_SPEAR1340_MIPHY
> help
> Supports ST
oudar
> Signed-off-by: Deepak Saxena
> Cc: Greg KH
> Cc: Alan Stern
> Cc: Viresh Kumar
> Cc: Shiraz Hashim
> Cc: linux-usb@vger.kernel.org
> Cc: spear-de...@list.st.com
> ---
> drivers/usb/host/Kconfig |8 +
> drivers/usb/host/Makefile |
On Mon, Feb 11, 2013 at 12:28 AM, wrote:
> From: Manjunath Goudar
>
> Separate the Spear host controller driver from ehci-hcd host code
SPEAr
> into its own driver module.
>
> Signed-off-by: Manjunath Goudar
> Signed-off-by: Deepak Saxena
> Cc: Greg KH
> Cc: Ala
On Tue, Feb 12, 2013 at 4:32 PM, wrote:
> From: Manjunath Goudar
>
> Separate the SPEAr host controller driver from ehci-hcd host code
> into its own driver module.
>
> Signed-off-by: Manjunath Goudar
> Signed-off-by: Deepak Saxena
> Cc: Greg KH
> Cc: Alan Ster
-platform kernels on ARM.
>
> Signed-off-by: Manjunath Goudar
> Cc: Viresh Kumar
> Cc: Arnd Bergmann
> Cc: Greg KH
> Cc: Alan Stern
> Cc: linux-usb@vger.kernel.org
> ---
> drivers/usb/host/Kconfig |8 +++
> drivers/usb/host/Makefile |1 +
On 13 June 2013 14:41, Manjunath Goudar wrote:
> Suspend scenario in case of ohci-spear glue was not
> properly handled as it was not suspending generic part
> of ohci controller.Calling explicitly the ohci_suspend()
Add space after full stop.
> routine in spear_ohci_hcd_drv_suspend() will ensur
On 17 June 2013 14:52, Manjunath Goudar wrote:
> when we are using tab characters before "do_wakeup" and "ret" variable,we
> will be getting error below.
>
> WARNING: please, no space before tabs
> #31: FILE: drivers/usb/host/ohci-at91.c:622:
> +^Ibool ^I^Ido_wakeup = device_may_wakeup(&pdev->dev
On 19 June 2013 20:12, Manjunath Goudar wrote:
> On 19 June 2013 18:13, Sergei Shtylyov
>> On 19-06-2013 16:12, Manjunath Goudar wrote:
>>> struct usb_hcd *hcd = platform_get_drvdata(pdev);
>>> struct ohci_hcd *ohci = hcd_to_ohci(hcd);
>>> + booldo_wakeup = device_may_w
On 12 August 2013 12:16, Manjunath Goudar wrote:
> This work is part of enabling multi-platform kernels on ARM;
> it would be nice to have in 3.11.
You really want it in 3.11, we are already at 3.11-rc5 :)
Whatever you write here gets in git history with your patch and I
am sure you never wanted
From: Amardeep Rai
We used to get clk using con-id, but now we have device struct available for
these devices as they are probed using DT. And so must get clk using dev-id.
Signed-off-by: Amardeep Rai
Signed-off-by: Viresh Kumar
---
drivers/usb/host/ehci-spear.c | 13 +
drivers
This patch frees SPEAr ehci/ohci drivers from tension of freeing resources :)
devm_* derivatives of multiple routines are used while allocating resources,
which would be freed automatically by kernel.
Signed-off-by: Viresh Kumar
---
drivers/usb/host/ehci-spear.c | 37
t; In V2:
> Replaced spear as SPEAr everywhere, leaving functions/variables/config
> options.
>
> Signed-off-by: Deepak Saxena
> Signed-off-by: Manjunath Goudar
> Signed-off-by: Arnd Bergmann
> Acked-by: Viresh Kumar
This version has changed from what i Acked, but it still look
100644
> --- a/drivers/usb/host/ohci-spear.c
> +++ b/drivers/usb/host/ohci-spear.c
> @@ -179,8 +179,6 @@ static int spear_ohci_hcd_drv_remove(struct
> platform_device *pdev)
> spear_stop_ohci(ohci_p);
>
> usb_put_hcd(hcd);
> -
> - platform_
On Tue, May 21, 2013 at 8:12 AM, Libo Chen wrote:
> set the owner of platform_driver, to ensure that the
> caller of driver holds a module refernece
>
> Signed-off-by: Libo Chen
> ---
> drivers/usb/host/ehci-spear.c | 1 +
Acked-by: Viresh Kumar
--
To unsubscribe from t
On 21 May 2013 17:17, Sachin Kamat wrote:
> 'spear_ehci_id_table' is always compiled in. Hence use of
> of_match_ptr is unnecessary.
>
> Signed-off-by: Sachin Kamat
> Cc: Viresh Kumar
> ---
> drivers/usb/host/ehci-spear.c |2 +-
> 1 file changed, 1 in
On 21 May 2013 17:17, Sachin Kamat wrote:
> 'spear_ohci_id_table' is always compiled in. Hence use of
> of_match_ptr is unnecessary.
>
> Signed-off-by: Sachin Kamat
> Cc: Viresh Kumar
> ---
> drivers/usb/host/ohci-spear.c |2 +-
> 1 file changed, 1 in
On 22 May 2013 09:05, Sachin Kamat wrote:
> 'hcd' is dereferenced before NULL check. Move the assignment after
> the check to avoid potential NULL pointer dereferencing error.
>
> Signed-off-by: Sachin Kamat
> Cc: Viresh Kumar
> ---
> drivers/usb/host/ehci
On 27 May 2013 17:55, Manjunath Goudar wrote:
> This series of patches begins the process of splitting ohci-hcd up into
> a core library module and independent pci driver modules.
>
> Patch 1/3 prepares the way by exporting a few functions from ohci-hcd
> and adding a new mechanism for platform-sp
On 11 December 2013 12:59, Jingoo Han wrote:
> Use devm_ioremap_resource() to make cleanup paths simpler.
>
> Signed-off-by: Jingoo Han
> ---
> drivers/usb/host/ohci-spear.c | 13 +++--
> 1 file changed, 3 insertions(+), 10 deletions(-)
Acked-by: Viresh Kumar
--
T
eturn 0;
> }
>
> -static struct of_device_id spear_ehci_id_table[] = {
> +static const struct of_device_id spear_ehci_id_table[] = {
> { .compatible = "st,spear600-ehci", },
> { },
> };
Acked-by: Viresh Kumar
--
To unsubscribe from this list: send the line &
;
> -static struct of_device_id spear_ohci_id_table[] = {
> +static const struct of_device_id spear_ohci_id_table[] = {
> { .compatible = "st,spear600-ohci", },
> { },
> };
Acked-by: Viresh Kumar
--
To unsubscribe from this list: send the line "
debugfs_create_bool() and
assigning its value to global_lock later.
Signed-off-by: Viresh Kumar
---
V3->V4:
- Create a local variable instead of changing type of global_lock
(Rafael)
- Drop the stable tag
- BCC'd a lot of people (rather than cc'ing them) to make sure
- the series
byte (mostly).
That required updates to all user sites as well, in the same commit
updating the API. regmap core was also using
debugfs_{read|write}_file_bool(), directly and variable types were
updated for that to be bool as well.
Signed-off-by: Viresh Kumar
Acked-by: Mark Brown
Acked-by: Ch
On 25-09-15, 19:42, Johannes Berg wrote:
> On Fri, 2015-09-25 at 09:41 -0700, Viresh Kumar wrote:
>
> > Signed-off-by: Viresh Kumar
> > ---
> > V3->V4:
> > - Create a local variable instead of changing type of global_lock
> > (Rafael)
>
> Err, sur
On 25-09-15, 20:49, Johannes Berg wrote:
> Ok, then, but that means Rafael is completely wrong ...
> debugfs_create_bool() takes a *pointer* and it needs to be long-lived,
> it can't be on the stack. You also don't get a call when it changes.
Ahh, ofcourse. My bad as well...
I think we can change
On 25 September 2015 at 13:33, Rafael J. Wysocki wrote:
> You're going to change that into bool in the next patch, right?
Yeah.
> So what if bool is a byte and the field is not word-aligned
Its between two 'unsigned long' variables today, and the struct isn't packed.
So, it will be aligned, isn
On 25-09-15, 22:58, Rafael J. Wysocki wrote:
> Say you have three adjacent fields in a structure, x, y, z, each one byte
> long.
> Initially, all of them are equal to 0.
>
> CPU A writes 1 to x and CPU B writes 2 to y at the same time.
>
> What's the result?
But then two CPUs can update the sam
On 25 September 2015 at 15:19, Rafael J. Wysocki wrote:
> So if you allow something like debugfs to update your structure, how
> do you make sure there is the proper locking?
Not really sure at all.. Isn't there some debugfs locking that will
jump in, to avoid updation of fields to the same devic
_lock' to u32.
Signed-off-by: Viresh Kumar
---
BCC'd a lot of people (rather than cc'ing them) to make sure
- the series reaches them
- mailing lists do not block the patchset due to long cc list
- and we don't spam the BCC'd people for every reply
V4->V5:
- Switch
byte.
That required updates to all user sites as well, in the same commit
updating the API. regmap core was also using
debugfs_{read|write}_file_bool(), directly and variable types were
updated for that to be bool as well.
Signed-off-by: Viresh Kumar
Acked-by: Mark Brown
Acked-by: Charles Keep
On 26 September 2015 at 22:31, Jiri Slaby wrote:
> But this has to crash whenever the file is read as val's storage is gone at
> that moment already, right?
Yeah, its fixed now in the new version. This was a *really* bad idea :(
--
To unsubscribe from this list: send the line "unsubscribe linux-u
At few places we have used usb_disabled() and at other places used 'nousb'
directly. Lets be consistent and use usb_disabled();
Signed-off-by: Viresh Kumar
---
drivers/usb/core/usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/core/usb.c b/d
Move usb_disabled() and module_param()/core_param() towards the top of the file,
where 'nousb' is defined, as they are all related.
Signed-off-by: Viresh Kumar
---
drivers/usb/core/usb.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
di
ged, 495 deletions(-)
> delete mode 100644
> Documentation/devicetree/bindings/cpufreq/cpufreq-exynos5440.txt
> delete mode 100644 drivers/cpufreq/exynos5440-cpufreq.c
Acked-by: Viresh Kumar
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-usb"
On Sun, Apr 23, 2017 at 4:52 PM, Pan Bian wrote:
> From: Pan Bian
>
> Function usb_autopm_get_interface() will return a negative errno on
> failure, and function usb_autopm_put_interface() should not be called if
> it fails. However, in function usb_remove_device(), the return value of
> function
47 matches
Mail list logo