Re: [PATCH v2 1/3] gadget: Support for the usb charger framework

2015-08-16 Thread Baolin Wang
On 17 August 2015 at 08:40, Peter Chen peter.c...@freescale.com wrote:
 On Fri, Aug 14, 2015 at 05:47:44PM +0800, Baolin Wang wrote:
 The usb charger framework is based on usb gadget, and each usb gadget
 can be one usb charger to set the current limitation.

 This patch adds a notifier mechanism for usb charger to report to usb
 charger when the usb gadget state is changed.

 Also we introduce a callback 'get_charger_type' which will implemented
 by user for usb gadget operations to get the usb charger type.

 Signed-off-by: Baolin Wang baolin.w...@linaro.org
 ---
  drivers/usb/gadget/udc/udc-core.c |   38 
 +
  include/linux/usb/gadget.h|   20 +++
  2 files changed, 58 insertions(+)

 diff --git a/drivers/usb/gadget/udc/udc-core.c 
 b/drivers/usb/gadget/udc/udc-core.c
 index f660afb..47b231c 100644
 --- a/drivers/usb/gadget/udc/udc-core.c
 +++ b/drivers/usb/gadget/udc/udc-core.c
 @@ -28,6 +28,7 @@
  #include linux/usb/ch9.h
  #include linux/usb/gadget.h
  #include linux/usb.h
 +#include linux/usb/usb_charger.h

  /**
   * struct usb_udc - describes one usb device controller
 @@ -129,6 +130,32 @@ void usb_gadget_giveback_request(struct usb_ep *ep,
  }
  EXPORT_SYMBOL_GPL(usb_gadget_giveback_request);

 +int usb_gadget_register_notify(struct usb_gadget *gadget,
 +struct notifier_block *nb)
 +{
 + int ret;
 +
 + mutex_lock(gadget-lock);
 + ret = raw_notifier_chain_register(gadget-nh, nb);
 + mutex_unlock(gadget-lock);
 +
 + return ret;
 +}
 +EXPORT_SYMBOL_GPL(usb_gadget_register_notify);
 +
 +int usb_gadget_unregister_notify(struct usb_gadget *gadget,
 +  struct notifier_block *nb)
 +{
 + int ret;
 +
 + mutex_lock(gadget-lock);
 + ret = raw_notifier_chain_unregister(gadget-nh, nb);
 + mutex_unlock(gadget-lock);
 +
 + return ret;
 +}
 +EXPORT_SYMBOL_GPL(usb_gadget_unregister_notify);
 +
  /* 
 - */

  /**
 @@ -226,6 +253,10 @@ static void usb_gadget_state_work(struct work_struct 
 *work)
   struct usb_gadget *gadget = work_to_gadget(work);
   struct usb_udc *udc = gadget-udc;

 + mutex_lock(gadget-lock);
 + raw_notifier_call_chain(gadget-nh, gadget-state, gadget);
 + mutex_unlock(gadget-lock);
 +
   if (udc)
   sysfs_notify(udc-dev.kobj, NULL, state);
  }
 @@ -364,6 +395,8 @@ int usb_add_gadget_udc_release(struct device *parent, 
 struct usb_gadget *gadget,

   dev_set_name(gadget-dev, gadget);
   INIT_WORK(gadget-work, usb_gadget_state_work);
 + RAW_INIT_NOTIFIER_HEAD(gadget-nh);
 + mutex_init(gadget-lock);
   gadget-dev.parent = parent;

  #ifdef   CONFIG_HAS_DMA
 @@ -405,6 +438,10 @@ int usb_add_gadget_udc_release(struct device *parent, 
 struct usb_gadget *gadget,

   mutex_unlock(udc_lock);

 + ret = usb_charger_init(gadget);
 + if (ret)
 + goto err4;
 +

 If the charger's initialization fails, you may need to
 call device_del(udc-dev).


Yes, I missed that. Thanks for your comments.

 Peter

   return 0;

  err4:
 @@ -481,6 +518,7 @@ void usb_del_gadget_udc(struct usb_gadget *gadget)
   kobject_uevent(udc-dev.kobj, KOBJ_REMOVE);
   flush_work(gadget-work);
   device_unregister(udc-dev);
 + usb_charger_exit(gadget);
   device_unregister(gadget-dev);
  }
  EXPORT_SYMBOL_GPL(usb_del_gadget_udc);
 diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
 index c14a69b..78cc862 100644
 --- a/include/linux/usb/gadget.h
 +++ b/include/linux/usb/gadget.h
 @@ -537,6 +537,7 @@ struct usb_gadget_ops {
   struct usb_ep *(*match_ep)(struct usb_gadget *,
   struct usb_endpoint_descriptor *,
   struct usb_ss_ep_comp_descriptor *);
 + enum usb_charger_type   (*get_charger_type)(struct usb_gadget *);
  };

  /**
 @@ -609,6 +610,9 @@ struct usb_gadget {
   unsignedout_epnum;
   unsignedin_epnum;
   struct usb_otg_caps *otg_caps;
 + struct raw_notifier_headnh;
 + struct usb_charger  *uchger;
 + struct mutexlock;

   unsignedsg_supported:1;
   unsignedis_otg:1;
 @@ -1183,6 +1187,22 @@ extern void usb_gadget_unmap_request(struct 
 usb_gadget *gadget,

  
 /*-*/

 +/**
 + * Register a notifiee to get notified by any attach status changes from
 + * the usb gadget
 + */
 +int usb_gadget_register_notify(struct usb_gadget *gadget,
 +struct notifier_block *nb);
 +
 +/*-*/
 +
 +
 +/* Unregister a notifiee from the usb gadget */
 +int usb_gadget_unregister_notify(struct usb_gadget *gadget,
 + 

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-16 Thread Peter Chen
On Fri, Aug 14, 2015 at 10:26:35AM -0400, Alan Stern wrote:
 On Fri, 14 Aug 2015, Peter Chen wrote:
 
   In the old days, a single device could be a USB host controller and
   nothing else.  Then later, a single device could be either a host
   controller or a device controller.  Now a single device can be both.
   
   Obviously this causes problems for our original design, where the 
   device's drvdata stored a pointer to the hcd structure or the udc 
   structure.
   
   In principle, the drvdata should point to something that contains
   pointers to both the hcd and udc structures.  Maybe also an otg
   structure.  That would require a lot of changes to existing code but it
   might be worthwhile.
   
  
  Yes, the core device drvdata should contain standard hcd, gadget,
  otg structure together. Currently, the gadget is child device
  for core device, it is reasonable the same for hcd, and we can
  create device for chipidea host to achieve it. The dwc3 driver
  does the similar things.
  

I was wrong, go back to dwc3, it has a intermediate device (xhci-hcd)
between platform device and roothub.

  Below is the reference device hierarchy for current IP driver:
  
  Glue Layer Device
 |
 |
 |
   IP  Core Device
  |
 |||
 |||
  Gadget  hcd  otg
  
  Alan/Felipe, what do you think?
 
 That's not quite what I had in mind.  I was thinking of something more 
 like this:
 
   Platform device  drvdata  struct usb_pointers
   |
   |
   |---|---|
   |   |   |
 gadget   hcd otg
 
 where struct usb_pointers (maybe you can think of a better name) looks 
 like this:
 
 struct usb_pointers {
   struct usb_hcd  *hcd;
   struct usb_gadget   *gadget;
   struct usb_otg  *otg;
 };
 
 If you want, you can use your IP Core device in place of my platform
 device.  All that matters is that the parent device of the root hub
 (for hosts) or gadget (for peripherals) should store the address of a 
 usb_pointers structure in its drvdata.
 

I am wonder how you get hcd pointer at hcd core code? The platform
device drvdata is not hcd pointer any more, instead, it is platform
device private data.

-- 

Best Regards,
Peter Chen
--
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


Re: [PATCH v2 1/3] gadget: Support for the usb charger framework

2015-08-16 Thread Peter Chen
On Fri, Aug 14, 2015 at 05:47:44PM +0800, Baolin Wang wrote:
 The usb charger framework is based on usb gadget, and each usb gadget
 can be one usb charger to set the current limitation.
 
 This patch adds a notifier mechanism for usb charger to report to usb
 charger when the usb gadget state is changed.
 
 Also we introduce a callback 'get_charger_type' which will implemented
 by user for usb gadget operations to get the usb charger type.
 
 Signed-off-by: Baolin Wang baolin.w...@linaro.org
 ---
  drivers/usb/gadget/udc/udc-core.c |   38 
 +
  include/linux/usb/gadget.h|   20 +++
  2 files changed, 58 insertions(+)
 
 diff --git a/drivers/usb/gadget/udc/udc-core.c 
 b/drivers/usb/gadget/udc/udc-core.c
 index f660afb..47b231c 100644
 --- a/drivers/usb/gadget/udc/udc-core.c
 +++ b/drivers/usb/gadget/udc/udc-core.c
 @@ -28,6 +28,7 @@
  #include linux/usb/ch9.h
  #include linux/usb/gadget.h
  #include linux/usb.h
 +#include linux/usb/usb_charger.h
  
  /**
   * struct usb_udc - describes one usb device controller
 @@ -129,6 +130,32 @@ void usb_gadget_giveback_request(struct usb_ep *ep,
  }
  EXPORT_SYMBOL_GPL(usb_gadget_giveback_request);
  
 +int usb_gadget_register_notify(struct usb_gadget *gadget,
 +struct notifier_block *nb)
 +{
 + int ret;
 +
 + mutex_lock(gadget-lock);
 + ret = raw_notifier_chain_register(gadget-nh, nb);
 + mutex_unlock(gadget-lock);
 +
 + return ret;
 +}
 +EXPORT_SYMBOL_GPL(usb_gadget_register_notify);
 +
 +int usb_gadget_unregister_notify(struct usb_gadget *gadget,
 +  struct notifier_block *nb)
 +{
 + int ret;
 +
 + mutex_lock(gadget-lock);
 + ret = raw_notifier_chain_unregister(gadget-nh, nb);
 + mutex_unlock(gadget-lock);
 +
 + return ret;
 +}
 +EXPORT_SYMBOL_GPL(usb_gadget_unregister_notify);
 +
  /* - 
 */
  
  /**
 @@ -226,6 +253,10 @@ static void usb_gadget_state_work(struct work_struct 
 *work)
   struct usb_gadget *gadget = work_to_gadget(work);
   struct usb_udc *udc = gadget-udc;
  
 + mutex_lock(gadget-lock);
 + raw_notifier_call_chain(gadget-nh, gadget-state, gadget);
 + mutex_unlock(gadget-lock);
 +
   if (udc)
   sysfs_notify(udc-dev.kobj, NULL, state);
  }
 @@ -364,6 +395,8 @@ int usb_add_gadget_udc_release(struct device *parent, 
 struct usb_gadget *gadget,
  
   dev_set_name(gadget-dev, gadget);
   INIT_WORK(gadget-work, usb_gadget_state_work);
 + RAW_INIT_NOTIFIER_HEAD(gadget-nh);
 + mutex_init(gadget-lock);
   gadget-dev.parent = parent;
  
  #ifdef   CONFIG_HAS_DMA
 @@ -405,6 +438,10 @@ int usb_add_gadget_udc_release(struct device *parent, 
 struct usb_gadget *gadget,
  
   mutex_unlock(udc_lock);
  
 + ret = usb_charger_init(gadget);
 + if (ret)
 + goto err4;
 +

If the charger's initialization fails, you may need to
call device_del(udc-dev).

Peter

   return 0;
  
  err4:
 @@ -481,6 +518,7 @@ void usb_del_gadget_udc(struct usb_gadget *gadget)
   kobject_uevent(udc-dev.kobj, KOBJ_REMOVE);
   flush_work(gadget-work);
   device_unregister(udc-dev);
 + usb_charger_exit(gadget);
   device_unregister(gadget-dev);
  }
  EXPORT_SYMBOL_GPL(usb_del_gadget_udc);
 diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
 index c14a69b..78cc862 100644
 --- a/include/linux/usb/gadget.h
 +++ b/include/linux/usb/gadget.h
 @@ -537,6 +537,7 @@ struct usb_gadget_ops {
   struct usb_ep *(*match_ep)(struct usb_gadget *,
   struct usb_endpoint_descriptor *,
   struct usb_ss_ep_comp_descriptor *);
 + enum usb_charger_type   (*get_charger_type)(struct usb_gadget *);
  };
  
  /**
 @@ -609,6 +610,9 @@ struct usb_gadget {
   unsignedout_epnum;
   unsignedin_epnum;
   struct usb_otg_caps *otg_caps;
 + struct raw_notifier_headnh;
 + struct usb_charger  *uchger;
 + struct mutexlock;
  
   unsignedsg_supported:1;
   unsignedis_otg:1;
 @@ -1183,6 +1187,22 @@ extern void usb_gadget_unmap_request(struct usb_gadget 
 *gadget,
  
  /*-*/
  
 +/**
 + * Register a notifiee to get notified by any attach status changes from
 + * the usb gadget
 + */
 +int usb_gadget_register_notify(struct usb_gadget *gadget,
 +struct notifier_block *nb);
 +
 +/*-*/
 +
 +
 +/* Unregister a notifiee from the usb gadget */
 +int usb_gadget_unregister_notify(struct usb_gadget *gadget,
 +  struct notifier_block *nb);
 +
 

Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-16 Thread Peter Chen
On Fri, Aug 14, 2015 at 05:47:46PM +0800, Baolin Wang wrote:
 Integrate with the newly added USB charger interface to limit the current
 we draw from the USB input based on the input device configuration
 identified by the USB stack, allowing us to charge more quickly from high
 current inputs without drawing more current than specified from others.
 
 Signed-off-by: Mark Brown broo...@kernel.org
 Signed-off-by: Baolin Wang baolin.w...@linaro.org
 ---
  drivers/power/wm831x_power.c |   69 
 ++
  include/linux/mfd/wm831x/pdata.h |3 ++
  2 files changed, 72 insertions(+)
 
 diff --git a/drivers/power/wm831x_power.c b/drivers/power/wm831x_power.c
 index db11ae6..72c661f 100644
 --- a/drivers/power/wm831x_power.c
 +++ b/drivers/power/wm831x_power.c
 @@ -13,6 +13,7 @@
  #include linux/platform_device.h
  #include linux/power_supply.h
  #include linux/slab.h
 +#include linux/usb/usb_charger.h
  
  #include linux/mfd/wm831x/core.h
  #include linux/mfd/wm831x/auxadc.h
 @@ -31,6 +32,8 @@ struct wm831x_power {
   char usb_name[20];
   char battery_name[20];
   bool have_battery;
 + struct usb_charger *usb_charger;
 + struct notifier_block usb_notify;
  };
  
  static int wm831x_power_check_online(struct wm831x *wm831x, int supply,
 @@ -125,6 +128,43 @@ static enum power_supply_property wm831x_usb_props[] = {
   POWER_SUPPLY_PROP_VOLTAGE_NOW,
  };
  
 +/* In miliamps */
 +static unsigned int wm831x_usb_limits[] = {
 + 0,
 + 2,
 + 100,
 + 500,
 + 900,
 + 1500,
 + 1800,
 + 550,
 +};

Why 550 is the last, but not 1800?

 +
 +static int wm831x_usb_limit_change(struct notifier_block *nb,
 +unsigned long limit, void *data)
 +{
 + struct wm831x_power *wm831x_power = container_of(nb,
 +  struct wm831x_power,
 +  usb_notify);
 + int i, best;
 +
 + /* Find the highest supported limit */
 + best = 0;
 + for (i = 0; i  ARRAY_SIZE(wm831x_usb_limits); i++) {
 + if (limit  wm831x_usb_limits[i] 
 + wm831x_usb_limits[best]  wm831x_usb_limits[i])
 + best = i;
 + }
 +
 + dev_dbg(wm831x_power-wm831x-dev,
 + Limiting USB current to %dmA, wm831x_usb_limits[best]);
 +
 + wm831x_set_bits(wm831x_power-wm831x, WM831X_POWER_STATE,
 + WM831X_USB_ILIM_MASK, best);
 +
 + return 0;
 +}
 +
  /*
   *   Battery properties
   */
 @@ -606,8 +646,31 @@ static int wm831x_power_probe(struct platform_device 
 *pdev)
   }
   }
  
 + if (wm831x_pdata  wm831x_pdata-usb_gadget) {

Where the wm831x_pdata-usb_gadget is initialized?

 + power-usb_charger =
 + usb_charger_find_by_name(wm831x_pdata-usb_gadget);
 + if (IS_ERR(power-usb_charger)) {
 + ret = PTR_ERR(power-usb_charger);
 + dev_err(pdev-dev,
 + Failed to find USB gadget: %d\n, ret);
 + goto err_bat_irq;
 + }
 +
 + power-usb_notify.notifier_call = wm831x_usb_limit_change;
 +
 + ret = usb_charger_register_notify(power-usb_charger,
 +   power-usb_notify);
 + if (ret != 0) {
 + dev_err(pdev-dev,
 + Failed to register notifier: %d\n, ret);
 + goto err_usb_charger;
 + }
 + }
 +
   return ret;
  
 +err_usb_charger:
 + usb_charger_put(power-usb_charger);
  err_bat_irq:
   --i;
   for (; i = 0; i--) {
 @@ -637,6 +700,12 @@ static int wm831x_power_remove(struct platform_device 
 *pdev)
   struct wm831x *wm831x = wm831x_power-wm831x;
   int irq, i;
  
 + if (wm831x_power-usb_charger) {
 + usb_charger_unregister_notify(wm831x_power-usb_charger,
 +   wm831x_power-usb_notify);
 + usb_charger_put(wm831x_power-usb_charger);
 + }
 +
   for (i = 0; i  ARRAY_SIZE(wm831x_bat_irqs); i++) {
   irq = wm831x_irq(wm831x, 
platform_get_irq_byname(pdev,
 diff --git a/include/linux/mfd/wm831x/pdata.h 
 b/include/linux/mfd/wm831x/pdata.h
 index dcc9631..5af8399 100644
 --- a/include/linux/mfd/wm831x/pdata.h
 +++ b/include/linux/mfd/wm831x/pdata.h
 @@ -126,6 +126,9 @@ struct wm831x_pdata {
   /** The driver should initiate a power off sequence during shutdown */
   bool soft_shutdown;
  
 + /** dev_name of USB charger gadget to integrate with */
 + const char *usb_gadget;
 +
   int irq_base;
   int gpio_base;
   int gpio_defaults[WM831X_GPIO_NUM];
 -- 
 

[PATCH 1/3][v2] Documentation: dt: dwc3: Add snps,quirk-frame-length-adjustment property

2015-08-16 Thread Nikhil Badola
Add snps,quirk-frame-length-adjustment property which provides value
for post silicon frame length adjustment

Signed-off-by: Nikhil Badola nikhil.bad...@freescale.com
---
Changes for v2
- changed quirk name as well description

 Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt 
b/Documentation/devicetree/bindings/usb/dwc3.txt
index 0815eac..8c7d585 100644
--- a/Documentation/devicetree/bindings/usb/dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -40,6 +40,9 @@ Optional properties:
  - snps,hird-threshold: HIRD threshold
  - snps,hsphy_interface: High-Speed PHY interface selection between utmi for
UTMI+ and ulpi for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3.
+ - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ
+   register for post-silicon frame length adjustment when the
+   fladj_30mhz_sdbnd signal is invalid or incorrect.
 
 This is usually a subnode to DWC3 glue to which it is connected.
 
-- 
2.1.0

--
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


[PATCH 3/3][v2] arm: dts: ls1021a: Add quirk for Erratum A009116

2015-08-16 Thread Nikhil Badola
Add snps,quirk-frame-length-adjustment property to
USB3 node for erratum A009116. This property provides
value of GFLADJ_30MHZ for post silicon frame length
adjustment.

Signed-off-by: Nikhil Badola nikhil.bad...@freescale.com
---
Changes for v2 : 
- updated property name

 arch/arm/boot/dts/ls1021a.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index c70bb27..50ac0d4 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -404,6 +404,7 @@
reg = 0x0 0x310 0x0 0x1;
interrupts = GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH;
dr_mode = host;
+   snps,quirk-frame-length-adjustment = 0x20;
};
};
 };
-- 
2.1.0

--
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


Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-16 Thread Li Jun
On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote:
 On 14 August 2015 at 16:55, Li Jun b47...@freescale.com wrote:
  Hi Baolin,
 
  On Fri, Aug 14, 2015 at 05:47:43PM +0800, Baolin Wang wrote:
  Currently the Linux kernel does not provide any standard integration of 
  this
  feature that integrates the USB subsystem with the system power regulation
  provided by PMICs meaning that either vendors must add this in their 
  kernels
  or USB gadget devices based on Linux (such as mobile phones) may not behave
  as they should.
 
  Providing a standard framework for doing this in the kernel.
 
 
  Why not add power supply class support into this?
 
 
 Hi Jun,
 
 We don't need the power supply class support into the usb charger,
I suppose usb charger is also a power supply for the system, we can use power
supply class framework for notify mechanism and get/set many attributes(maybe
also the current limit), I see those usb charger drivers under ./driver/power/
are designed with power supply supported.

Li Jun
 just introduce the notify mechanism for power to set the current limit
 when notifying some events from usb charger. Maybe I misunderstand
 your meanings, please describe it detailedly. Thanks for your
 comments.
 
  Li Jun
 
 
 
 
 -- 
 Baolin.wang
 Best Regards
--
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


Re: Re: [PATCH v4]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-08-16 Thread AMAN DEEP

This still does not apply properly :(

Sorry for inconveince.


What tree are you making it against?


I made it for 4.2-rc6.


Thanks  Regards,
Aman Deep

--- Original Message ---
Sender : Greg KHgre...@linuxfoundation.org
Date : Aug 15, 2015 05:51 (GMT+06:00)
Title : Re: [PATCH v4]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle 
race condition between usb_kill_urb() and finish_unlinks()

On Mon, Aug 10, 2015 at 11:05:11AM +, AMAN DEEP wrote:
 There is a race condition between 
  finish_unlinks-finish_urb() function and 
  usb_kill_urb() in ohci controller case. The finish_urb 
  calls spin_unlock(ohci-lock) before 
  usb_hcd_giveback_urb() function call, then if during 
  this time, usb_kill_urb is called for another endpoint,
then new ed will be added to ed_rm_list at beginning 
  for unlink. and ed_rm_list will point to newly added 
  ed.
 
 When finish_urb() is completed in finish_unlinks() and
 ed-td_list becomes empty as in below code (in finish_unlinks() function)
 if (list_empty(ed-td_list)) {
 *last = ed-ed_next;
 ed-ed_next = NULL;
 } else if (ohci-rh_state == OHCI_RH_RUNNING) {
 *last = ed-ed_next;
 ed-ed_next = NULL;
 ed_schedule(ohci, ed);
 }
 *last = ed-ed_next will make ed_rm_list to point to ed-ed_next and
 previously added ed by usb_kill_urb will be left unreferenced by
 ed_rm_list. This causes usb_kill_urb() hang forever waiting for
 finish_unlink to remove added ed from ed_rm_list.
 
 The main reason for hang in this race condtion is addition and removal
 of ed from ed_rm_list in the beginning during usb_kill_urb and later last*
 is modified in finish_unlinks().
 As suggested by Alan Stern, the solution for proper handling of
 ohci-ed_rm_list is to remove ed from the ed_rm_list before finishing
 any URBs. Then at the end, we can add ed back to the list if necessary.
 This properly handle the updated ohci-ed_rm_list in
 usb_kill_urb().
 
 Fixes:977dcfdc6031(USB:OHCI:don't lose track of EDs when a
 controller dies)
 
 Acked-by: Alan Stern 
 
 Signed-off-by: Aman Deep 
 CC: 
 ---
  drivers/usb/host/ohci-q.c |   17 ++---
  1 file changed, 10 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
 index d029bbe..da878f3 100644
 --- a/drivers/usb/host/ohci-q.c
 +++ b/drivers/usb/host/ohci-q.c
 @@ -1017,6 +1017,8 @@ skip_ed:
   * have modified this list.  normally it's just prepending
   * entries (which we'd ignore), but paranoia won't hurt.
   */
 + *last = ed-ed_next;
 + ed-ed_next = NULL;
   modified = 0;
  
   /* unlink urbs as requested, but rescan the list after
 @@ -1075,21 +1077,22 @@ rescan_this:
   goto rescan_this;
  
   /*
 - * If no TDs are queued, take ED off the ed_rm_list.
 + * If no TDs are queued, ED is now idle.
   * Otherwise, if the HC is running, reschedule.
 - * If not, leave it on the list for further dequeues.
 + * If the HC isn't running, add ED back to the
 + * start of the list for later processing.
   */
   if (list_empty(ed-td_list)) {
 - *last = ed-ed_next;
 - ed-ed_next = NULL;
   ed-state = ED_IDLE;
   list_del(ed-in_use_list);
   } else if (ohci-rh_state == OHCI_RH_RUNNING) {
 - *last = ed-ed_next;
 - ed-ed_next = NULL;
   ed_schedule(ohci, ed);
   } else {
 - last = ed-ed_next;
 + ed-ed_next = ohci-ed_rm_list;
 + ohci-ed_rm_list = ed;
 + /* Don't loop on the same ED */
 + if (last == ohci-ed_rm_list)
 + last = ed-ed_next;
   }
  
   if (modified)
 -- 
 1.7.9.5

This still does not apply properly :(

What tree are you making it against?

thanks,

greg k-h



Thanks  Regards,
Aman Deep

[PATCH 2/3][v2] drivers: usb: dwc3: Add frame length adjustment quirk

2015-08-16 Thread Nikhil Badola
Add adjust_frame_length_quirk for writing to fladj register
which adjusts (micro)frame length to value provided by
snps,quirk-frame-length-adjustment property thus avoiding
USB 2.0 devices to time-out over a longer run

Signed-off-by: Nikhil Badola nikhil.bad...@freescale.com
---
changes for v2 :
- updated quirk's name 
- added separate function for frame length adjustment
- added frame length adjustment for pdata users
- removed unnecessary flag from struct dwc3

 drivers/usb/dwc3/core.c  | 37 +
 drivers/usb/dwc3/core.h  |  5 +
 drivers/usb/dwc3/platform_data.h |  2 ++
 3 files changed, 44 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 064123e..f3beb2e 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -143,6 +143,34 @@ static int dwc3_soft_reset(struct dwc3 *dwc)
return 0;
 }
 
+/*
+ * dwc3_frame_length_adjustment - Adjusts frame length if required
+ * @dwc3: Pointer to our controller context structure
+ * @fladj: Value of GFLADJ_30MHZ to adjust frame length
+ */
+static void dwc3_frame_length_adjustment(struct dwc3 *dwc, u32 fladj)
+{
+   if (dwc-revision  DWC3_REVISION_250A)
+   return;
+
+   if (fladj == 0)
+   return;
+
+   if (fladj) {
+   u32 reg;
+   u32 dft;
+
+   reg = dwc3_readl(dwc-regs, DWC3_GFLADJ);
+   dft = reg  DWC3_GFLADJ_30MHZ_MASK;
+   if (!dev_WARN_ONCE(dwc-dev, dft == fladj,
+   request value same as default, ignoring\n)) {
+   reg = ~DWC3_GFLADJ_30MHZ_MASK;
+   reg |= DWC3_GFLADJ_30MHZ_SDBND_SEL | fladj;
+   dwc3_writel(dwc-regs, DWC3_GFLADJ, reg);
+   }
+   }
+}
+
 /**
  * dwc3_free_one_event_buffer - Frees one event buffer
  * @dwc: Pointer to our controller context structure
@@ -779,6 +807,7 @@ static int dwc3_probe(struct platform_device *pdev)
u8  lpm_nyet_threshold;
u8  tx_de_emphasis;
u8  hird_threshold;
+   u32 fladj = 0;
 
int ret;
 
@@ -886,6 +915,9 @@ static int dwc3_probe(struct platform_device *pdev)
tx_de_emphasis);
of_property_read_string(node, snps,hsphy_interface,
dwc-hsphy_interface);
+   of_property_read_u32(node,
+snps,quirk-frame-length-adjustment,
+fladj);
} else if (pdata) {
dwc-maximum_speed = pdata-maximum_speed;
dwc-has_lpm_erratum = pdata-has_lpm_erratum;
@@ -915,6 +947,7 @@ static int dwc3_probe(struct platform_device *pdev)
tx_de_emphasis = pdata-tx_de_emphasis;
 
dwc-hsphy_interface = pdata-hsphy_interface;
+   fladj = pdata-fladj_value;
}
 
/* default to superspeed if no maximum_speed passed */
@@ -957,6 +990,7 @@ static int dwc3_probe(struct platform_device *pdev)
goto err1;
}
 
+
if (IS_ENABLED(CONFIG_USB_DWC3_HOST))
dwc-dr_mode = USB_DR_MODE_HOST;
else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET))
@@ -971,6 +1005,9 @@ static int dwc3_probe(struct platform_device *pdev)
goto err1;
}
 
+   /* Adjust Frame Length */
+   dwc3_frame_length_adjustment(dwc, fladj);
+
usb_phy_set_suspend(dwc-usb2_phy, 0);
usb_phy_set_suspend(dwc-usb3_phy, 0);
ret = phy_power_on(dwc-usb2_generic_phy);
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 0447788..9188745 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -124,6 +124,7 @@
 #define DWC3_GEVNTCOUNT(n) (0xc40c + (n * 0x10))
 
 #define DWC3_GHWPARAMS80xc600
+#define DWC3_GFLADJ0xc630
 
 /* Device Registers */
 #define DWC3_DCFG  0xc700
@@ -234,6 +235,10 @@
 /* Global HWPARAMS6 Register */
 #define DWC3_GHWPARAMS6_EN_FPGA(1  7)
 
+/* Global Frame Length Adjustment Register */
+#define DWC3_GFLADJ_30MHZ_SDBND_SEL(1  7)
+#define DWC3_GFLADJ_30MHZ_MASK 0x3f
+
 /* Device Configuration Register */
 #define DWC3_DCFG_DEVADDR(addr)((addr)  3)
 #define DWC3_DCFG_DEVADDR_MASK DWC3_DCFG_DEVADDR(0x7f)
diff --git a/drivers/usb/dwc3/platform_data.h b/drivers/usb/dwc3/platform_data.h
index d3614ec..400b197 100644
--- a/drivers/usb/dwc3/platform_data.h
+++ b/drivers/usb/dwc3/platform_data.h
@@ -46,5 +46,7 @@ struct dwc3_platform_data {
unsigned tx_de_emphasis_quirk:1;
unsigned tx_de_emphasis:2;
 
+   u32 fladj_value;
+
const char *hsphy_interface;
 };
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe 

Re: [PATCH v5 3/5] usb: phy: add usb3.0 phy driver for mt65xx SoCs

2015-08-16 Thread Kishon Vijay Abraham I
Hi,

On Friday 07 August 2015 06:00 PM, Chunfeng Yun wrote:
 support usb3.0 phy of mt65xx SoCs
 
 Signed-off-by: Chunfeng Yun chunfeng@mediatek.com

change $subject to phy:
 ---
  drivers/phy/Kconfig   |   9 +
  drivers/phy/Makefile  |   1 +
  drivers/phy/phy-mt65xx-usb3.c | 467 
 ++
  3 files changed, 477 insertions(+)
  create mode 100644 drivers/phy/phy-mt65xx-usb3.c
 
 diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
 index c0e6ede..019cf8b 100644
 --- a/drivers/phy/Kconfig
 +++ b/drivers/phy/Kconfig
 @@ -193,6 +193,15 @@ config PHY_HIX5HD2_SATA
   help
 Support for SATA PHY on Hisilicon hix5hd2 Soc.
  
 +config PHY_MT65XX_USB3
 + tristate Mediatek USB3.0 PHY Driver
 + depends on ARCH_MEDIATEK  OF
 + select GENERIC_PHY
 + help
 +   Say 'Y' here to add support for Mediatek USB3.0 PHY driver
 +   for mt65xx SoCs. it supports two usb2.0 ports and
 +   one usb3.0 port.
 +
  config PHY_SUN4I_USB
   tristate Allwinner sunxi SoC USB PHY driver
   depends on ARCH_SUNXI  HAS_IOMEM  OF
 diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
 index f344e1b..3ceff2a 100644
 --- a/drivers/phy/Makefile
 +++ b/drivers/phy/Makefile
 @@ -22,6 +22,7 @@ obj-$(CONFIG_TI_PIPE3)  += 
 phy-ti-pipe3.o
  obj-$(CONFIG_TWL4030_USB)+= phy-twl4030-usb.o
  obj-$(CONFIG_PHY_EXYNOS5250_SATA)+= phy-exynos5250-sata.o
  obj-$(CONFIG_PHY_HIX5HD2_SATA)   += phy-hix5hd2-sata.o
 +obj-$(CONFIG_PHY_MT65XX_USB3)+= phy-mt65xx-usb3.o
  obj-$(CONFIG_PHY_SUN4I_USB)  += phy-sun4i-usb.o
  obj-$(CONFIG_PHY_SUN9I_USB)  += phy-sun9i-usb.o
  obj-$(CONFIG_PHY_SAMSUNG_USB2)   += phy-exynos-usb2.o
 diff --git a/drivers/phy/phy-mt65xx-usb3.c b/drivers/phy/phy-mt65xx-usb3.c
 new file mode 100644
 index 000..6835bff
 --- /dev/null
 +++ b/drivers/phy/phy-mt65xx-usb3.c
.
.
snip
.
.
 +static struct phy *mt65xx_phy_xlate(struct device *dev,
 + struct of_phandle_args *args)
 +{
 + struct mt65xx_u3phy *u3phy = dev_get_drvdata(dev);
 + struct mt65xx_phy_instance *instance = NULL;
 + struct device_node *phy_np = args-np;
 + struct resource res;
 + int index;
 + int ret;
 +
 + if (args-args_count != 1) {
 + dev_err(dev, invalid number of cells in 'phy' property\n);
 + return ERR_PTR(-EINVAL);
 + }
 +
 + for (index = 0; index  u3phy-nphys; index++)
 + if (phy_np == u3phy-phys[index]-phy-dev.of_node) {
 + instance = u3phy-phys[index];
 + break;
 + }
 +
 + if (!instance) {
 + dev_err(dev, failed to find appropriate phy\n);
 + return ERR_PTR(-EINVAL);
 + }
 +
 + instance-type = args-args[0];
 +
 + if (!(instance-type == PHY_TYPE_USB2 ||
 +   instance-type == PHY_TYPE_USB3)) {
 + dev_err(dev, unsupported device type: %d\n, instance-type);
 + return ERR_PTR(-EINVAL);
 + }
 +
 + ret = of_address_to_resource(phy_np, 0, res);
 + if (ret) {
 + dev_err(dev, failed to get address resource, err-%d 
 (index-%d)\n,
 + ret, instance-index);
 + return ERR_PTR(-EINVAL);
 + }

This should be done in probe itself.
 +
 + instance-port_base = devm_ioremap_resource(instance-phy-dev, res);
 + if (IS_ERR(instance-port_base)) {
 + dev_err(dev, failed to remap sif regs\n);
 + return instance-port_base;
 + }

This too should be done in probe.
 +
 + return instance-phy;
 +}
 +
 +static struct phy_ops mt65xx_u3phy_ops = {
 + .init   = mt65xx_phy_init,
 + .power_on   = mt65xx_phy_power_on,
 + .power_off  = mt65xx_phy_power_off,
 + .owner  = THIS_MODULE,
 +};
 +
 +static int mt65xx_u3phy_probe(struct platform_device *pdev)
 +{
 + struct device *dev = pdev-dev;
 + struct device_node *np = dev-of_node;
 + struct device_node *child_np;
 + struct phy_provider *phy_provider;
 + struct resource *sif_res;
 + struct mt65xx_u3phy *u3phy;
 + int port;
 +
 + u3phy = devm_kzalloc(dev, sizeof(*u3phy), GFP_KERNEL);
 + if (!u3phy)
 + return -ENOMEM;
 +
 + u3phy-nphys = of_get_child_count(np);
 + u3phy-phys = devm_kcalloc(dev, u3phy-nphys,
 +sizeof(*u3phy-phys), GFP_KERNEL);
 + if (!u3phy-phys)
 + return -ENOMEM;
 +
 + u3phy-dev = dev;
 + platform_set_drvdata(pdev, u3phy);
 +
 + sif_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 + u3phy-sif_base = devm_ioremap_resource(dev, sif_res);
 + if (IS_ERR(u3phy-sif_base)) {
 + dev_err(dev, failed to remap sif regs\n);
 + return PTR_ERR(u3phy-sif_base);
 + }
 +
 + u3phy-u3phya_ref = devm_clk_get(dev, u3phya_ref);
 + if 

Re: [PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-16 Thread Baolin Wang
On 14 August 2015 at 23:27, Greg KH gre...@linuxfoundation.org wrote:
 On Fri, Aug 14, 2015 at 05:47:45PM +0800, Baolin Wang wrote:
 This patch introduces the usb charger driver based on usb gadget that
 makes an enhancement to a power driver. It works well in practice but
 that requires a system with suitable hardware.

 The basic conception of the usb charger is that, when one usb charger
 is added or removed by reporting from the usb gadget state change or
 the extcon device state change, the usb charger will report to power
 user to set the current limitation.

 The usb charger will register notifiees on the usb gadget or the extcon
 device to get notified the usb charger state.

 Power user will register a notifiee on the usb charger to get notified
 by status changes from the usb charger. It will report to power user
 to set the current limitation when detecting the usb charger is added
 or removed from extcon device state or usb gadget state.

 Signed-off-by: Baolin Wang baolin.w...@linaro.org
 ---
  drivers/usb/gadget/Kconfig  |7 +
  drivers/usb/gadget/Makefile |1 +
  drivers/usb/gadget/charger.c|  561 
 +++
  include/linux/usb/usb_charger.h |  145 ++
  4 files changed, 714 insertions(+)
  create mode 100644 drivers/usb/gadget/charger.c
  create mode 100644 include/linux/usb/usb_charger.h

 diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
 index bcf83c0..3d2b959 100644
 --- a/drivers/usb/gadget/Kconfig
 +++ b/drivers/usb/gadget/Kconfig
 @@ -127,6 +127,13 @@ config USB_GADGET_STORAGE_NUM_BUFFERS
  a module parameter as well.
  If unsure, say 2.

 +config USB_CHARGER
 + bool USB charger support
 + help
 +   The usb charger driver based on the usb gadget that makes an
 +   enhancement to a power driver which can set the current limitation
 +   when the usb charger is added or removed.
 +
  source drivers/usb/gadget/udc/Kconfig

  #
 diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
 index 598a67d..1e421c1 100644
 --- a/drivers/usb/gadget/Makefile
 +++ b/drivers/usb/gadget/Makefile
 @@ -10,3 +10,4 @@ libcomposite-y  := usbstring.o 
 config.o epautoconf.o
  libcomposite-y   += composite.o functions.o configfs.o 
 u_f.o

  obj-$(CONFIG_USB_GADGET) += udc/ function/ legacy/
 +obj-$(CONFIG_USB_CHARGER)+= charger.o
 diff --git a/drivers/usb/gadget/charger.c b/drivers/usb/gadget/charger.c
 new file mode 100644
 index 000..f24f7b7
 --- /dev/null
 +++ b/drivers/usb/gadget/charger.c
 @@ -0,0 +1,561 @@
 +/*
 + * usb charger.c -- USB charger driver

 I think your company also wants a copyright line here.  Not that it
 means anything at all, but some lawyers love cargo-cult text blobs.


Hi Greg,

Thanks for your reviewing and comments. I'll add it in next patch.


 + *
 + * 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.

 I have to ask, do you really mean any later version?


I think I did not get your point, could you explain it detailedly?

 + */
 +
 +#include linux/device.h
 +#include linux/err.h
 +#include linux/extcon.h
 +#include linux/export.h
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/of.h
 +#include linux/of_device.h
 +#include linux/of_address.h
 +#include linux/platform_device.h
 +#include linux/slab.h
 +#include linux/usb.h
 +#include linux/usb/ch9.h
 +#include linux/usb/gadget.h
 +#include linux/usb/usb_charger.h
 +
 +#define DEFAULT_CUR_PROTECT  (50)
 +#define DEFAULT_SDP_CUR_LIMIT(500 - DEFAULT_CUR_PROTECT)
 +#define DEFAULT_DCP_CUR_LIMIT(1500 - DEFAULT_CUR_PROTECT)
 +#define DEFAULT_CDP_CUR_LIMIT(1500 - DEFAULT_CUR_PROTECT)
 +#define DEFAULT_ACA_CUR_LIMIT(1500 - DEFAULT_CUR_PROTECT)
 +
 +static DEFINE_IDA(usb_charger_ida);
 +static struct bus_type usb_charger_subsys = {
 + .name   = usb-charger,
 + .dev_name   = usb-charger,
 +};
 +
 +static struct usb_charger *dev_to_uchger(struct device *udev)
 +{
 + return container_of(udev, struct usb_charger, dev);
 +}
 +
 +static ssize_t usb_charger_cur_show(struct device *dev,
 + struct device_attribute *attr,
 + char *buf)
 +{
 + struct usb_charger *uchger = dev_to_uchger(dev);
 +
 + return scnprintf(buf, PAGE_SIZE, %d %d %d %d\n,
 +  uchger-cur_limit.sdp_cur_limit,
 +  uchger-cur_limit.dcp_cur_limit,
 +  uchger-cur_limit.cdp_cur_limit,
 +  uchger-cur_limit.aca_cur_limit);
 +}
 +
 +static ssize_t usb_charger_cur_store(struct device *dev,
 +  struct device_attribute *attr,
 +

[PATCH 1/1] usb: host: ehci-sys: delete useless bus_to_hcd conversion

2015-08-16 Thread Peter Chen
The ehci platform device's drvdata is the pointer of struct usb_hcd
already, so we doesn't need to call bus_to_hcd conversion again.

Cc: sta...@vger.kernel.org
Signed-off-by: Peter Chen peter.c...@freescale.com
---
 drivers/usb/host/ehci-sysfs.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-sysfs.c b/drivers/usb/host/ehci-sysfs.c
index 5e44407..5216f2b 100644
--- a/drivers/usb/host/ehci-sysfs.c
+++ b/drivers/usb/host/ehci-sysfs.c
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,
int count = PAGE_SIZE;
char*ptr = buf;
 
-   ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+   ehci = hcd_to_ehci(dev_get_drvdata(dev));
nports = HCS_N_PORTS(ehci-hcs_params);
 
for (index = 0; index  nports; ++index) {
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,
struct ehci_hcd *ehci;
int portnum, new_owner;
 
-   ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+   ehci = hcd_to_ehci(dev_get_drvdata(dev));
new_owner = PORT_OWNER; /* Owned by companion */
if (sscanf(buf, %d, portnum) != 1)
return -EINVAL;
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,
struct ehci_hcd *ehci;
int n;
 
-   ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+   ehci = hcd_to_ehci(dev_get_drvdata(dev));
n = scnprintf(buf, PAGE_SIZE, %d\n, ehci-uframe_periodic_max);
return n;
 }
@@ -101,7 +101,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,
unsigned long   flags;
ssize_t ret;
 
-   ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
+   ehci = hcd_to_ehci(dev_get_drvdata(dev));
if (kstrtouint(buf, 0, uframe_periodic_max)  0)
return -EINVAL;
 
-- 
1.9.1

--
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


Stack dump when try to store uframe_periodic_max

2015-08-16 Thread Peter Chen
Hi Alan,

When run echo 105   /sys/bus/platform/devices/ci_hdrc.1/uframe_periodic_max,
if lockdep check is enabled, there is below dump, I am afraid it can't
find how to fix it, the warning shows the key is not persistent.
(see line 757, kernel/locking/lockdep.c).


[   70.190430] INFO: trying to register non-static key.
[   70.195437] the code is fine but needs lockdep annotation.
[   70.200939] turning off the locking correctness validator.
[   70.206455] CPU: 0 PID: 752 Comm: sh Not tainted 
4.2.0-rc6-00030-g91b123e-dirty #475
[   70.214216] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[   70.220064] Backtrace: 
[   70.222585] [800142e4] (dump_backtrace) from [800144d8] 
(show_stack+0x18/0x1c)
[   70.230176]  r6:80b39960 r5: r4: r3:
[   70.235965] [800144c0] (show_stack) from [807d2d58] 
(dump_stack+0x8c/0xa4)
[   70.243231] [807d2ccc] (dump_stack) from [8006e184] 
(__lock_acquire+0x1d24/0x1ecc)
[   70.251164]  r6: r5: r4:80cc3188 r3:0001
[   70.256947] [8006c460] (__lock_acquire) from [8006ec04] 
(lock_acquire+0x74/0x94)
[   70.264706]  r10:bcf73f80 r9:bd7d290c r8:bbd5fe80 r7:0001 r6:804cc2ec 
r5:60010093
[   70.272669]  r4:
[   70.275254] [8006eb90] (lock_acquire) from [807dc618] 
(_raw_spin_lock_irqsave+0x48/0x5c)
[   70.283707]  r7:bdbba010 r6:804cc2ec r5:80010013 r4:bdbba28c
[   70.289494] [807dc5d0] (_raw_spin_lock_irqsave) from [804cc2ec] 
(store_uframe_periodic_max+0x4c/0x12c)
[   70.299164]  r6:bbd5fe80 r5:bdbba28c r4:0004
[   70.303881] [804cc2a0] (store_uframe_periodic_max) from [803dae98] 
(dev_attr_store+0x20/0x2c)
[   70.312768]  r7: r6:bbd5fe80 r5:bd7d2900 r4:0004
[   70.318549] [803dae78] (dev_attr_store) from [80172d24] 
(sysfs_kf_write+0x54/0x58)
[   70.326494] [80172cd0] (sysfs_kf_write) from [80171f10] 
(kernfs_fop_write+0xc4/0x1a8)
[   70.334686]  r6: r5:0004 r4:bd7d2900 r3:80172cd0
[   70.340471] [80171e4c] (kernfs_fop_write) from [80103f44] 
(__vfs_write+0x2c/0xe0)
[   70.348316]  r10: r9:bcf72000 r8:80010844 r7:bcf73f80 r6:0169d408 
r5:bcf73f80
[   70.356278]  r4:bcdad500
[   70.358863] [80103f18] (__vfs_write) from [801047e8] 
(vfs_write+0x98/0x16c)
[   70.366187]  r8:80010844 r7:bcf73f80 r6:0169d408 r5:0004 r4:bcdad500
[   70.373029] [80104750] (vfs_write) from [80105064] (SyS_write+0x4c/0xa8)
[   70.380092]  r8:80010844 r7:0169d408 r6:0004 r5:bcdad500 r4:bcdad500
[   70.386941] [80105018] (SyS_write) from [80010660] 
(ret_fast_syscall+0x0/0x54)
[   70.394525]  r7:0004 r6:76f95b48 r5:0169d408 r4:0004
[   70.400307] ci_hdrc ci_hdrc.1: setting max periodic bandwidth to 84% (== 105 
usec/uframe)
[   70.408507] ci_hdrc ci_hdrc.1: max periodic bandwidth set is non-standard

-- 

Best Regards,
Peter Chen
--
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


Re: Re: [PATCH v4]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-08-16 Thread Greg KH
On Mon, Aug 17, 2015 at 03:30:11AM +, AMAN DEEP wrote:
 
 This still does not apply properly :(
 
 Sorry for inconveince.
 
 
 What tree are you making it against?
 
 
 I made it for 4.2-rc6.

I need it made against linux-next please.

thanks,

greg k-h
--
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