Re: raid 5 creation fails on usb3 connected drives kernel 4.4.x, 4.5

2016-04-09 Thread Brian Chadwick

On 09/04/16 00:24, Greg KH wrote:

On Fri, Apr 08, 2016 at 07:37:12PM +1000, Brian Chadwick wrote:

On 08/04/16 01:59, Greg KH wrote:

On Fri, Apr 08, 2016 at 01:34:51AM +1000, Brian Chadwick wrote:

On 08/04/16 00:44, Greg KH wrote:

On Thu, Apr 07, 2016 at 03:04:55PM +1000, Brian Chadwick wrote:

On 06/04/16 19:53, Greg KH wrote:

On Tue, Apr 05, 2016 at 06:42:51PM +1000, Brian Chadwick wrote:

SETUP:

i7 16GB Computer.

1 x PCI-x USB3 adaptor card (i think uses xhci-hcd)04:00.0 USB controller:
Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
Kernel driver in use: xhci_hcd

2 x USB3 to dual SATA HDD docks. uses JMicron JMS56x Series controllers,
uses uas.ko kernel module
Bus 004 Device 002: ID 152d:9561 JMicron Technology Corp. / JMicron USA
Technology Corp.
Bus 004 Device 003: ID 152d:9561 JMicron Technology Corp. / JMicron USA
Technology Corp.

3 x Western Digital 320GB 3.5" SATA drives

USE:

RAID 5

KERNEL:
4.3.5

System works perfectly as expected.


Change to kernel 4.4.x or 4.5 and RAID 5 doesnt work. I am not sure whether
its actually RAID 5 at fault or if its the USB Attached SCSI driver uas.ko,
or maybe the host driver xhci-hcd.

Can you run 'git bisect' to try to track down the offending commit?

thanks,

greg k-h

Hi, I am unfamiliar with that command, when should it be run, and in what
directory?

Use it on the Linux kernel source git tree.  'man git-bisect' will
describe all about how to use it.  If you have specific questions about
it after reading that, please let us know.

thanks,

greg k-h


I am sorry to disappoint you ... I know nothing of the git tree ... I am
just a normal user who knows a little more than usual but not that much more
... i only download the source tarballs from kernel.org, i don't use git ...
so i don't know how else to help

If you are used to downloading source tarballs, using git is even
easier.  Just download the git tree once, and then updates are much
smaller downloads.

Download Linus's tree:
git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Copy your working .config file into the directory created:
cp $MY_WORKING_CONFIG linux/

Go into the directory:
cd linux/

run git bisect:
git biset start
git bisect good v4.3
git bisect bad v4.5

and it will chunk away and give you a kernel to test:
make oldconfig
make -j16
install and boot the kernel

and continue on with your testing of trying to find out where it broke.

Hope this helps,

greg k-h
--

Hi, so I followed man and did "git bisect good" for each iteration that
worked ok. Now I have arrived at the bad kernel. Do I do "git bisect bad"?
and then what?

Yes, do 'git bisect bad' and then git will give you another kernel to
test, eventually it will narrow things down and tell you exactly what
commit caused the problem, and you can email us that information.

thanks,

greg k-h
--
Hi, well to my surprise git bisect has come up with a commit about which 
I had no inkling. I may have to go to another mailing list it doesnt 
look like a usb problem.


This is the final output of 'git bisect view' :


commit 64d513ac31bd02a3c9b69ef0f36c196f9a9d
Author: Christoph Hellwig 
Date:   Thu Oct 8 09:28:04 2015 +0100

scsi: use host wide tags by default

This patch changes the !blk-mq path to the same defaults as the blk-mq
I/O path by always enabling block tagging, and always using host wide
tags.  We've had blk-mq available for a few releases so bugs with
this mode should have been ironed out, and this ensures we get better
coverage of over tagging setup over different configs.

Signed-off-by: Christoph Hellwig 
Acked-by: Jens Axboe 
Reviewed-by: Hannes Reinecke 
Signed-off-by: James Bottomley 



Thank you for your help in narrowing this down, and in educating me 
about git bisect (its a neat tool) ... I await your advice as how to 
proceed from here.


Regards

Brian C

--
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] USB: ftdi_sio: constify ftdi_sio_quirk structures

2016-04-09 Thread Julia Lawall
The ftdi_sio_quirk structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall 

---
 drivers/usb/serial/ftdi_sio.c |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 3a814e8..0082080 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -93,27 +93,27 @@ static int   ftdi_8u2232c_probe(struct usb_serial *serial);
 static void  ftdi_USB_UIRT_setup(struct ftdi_private *priv);
 static void  ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
 
-static struct ftdi_sio_quirk ftdi_jtag_quirk = {
+static const struct ftdi_sio_quirk ftdi_jtag_quirk = {
.probe  = ftdi_jtag_probe,
 };
 
-static struct ftdi_sio_quirk ftdi_NDI_device_quirk = {
+static const struct ftdi_sio_quirk ftdi_NDI_device_quirk = {
.probe  = ftdi_NDI_device_setup,
 };
 
-static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = {
+static const struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = {
.port_probe = ftdi_USB_UIRT_setup,
 };
 
-static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = {
+static const struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = {
.port_probe = ftdi_HE_TIRA1_setup,
 };
 
-static struct ftdi_sio_quirk ftdi_stmclite_quirk = {
+static const struct ftdi_sio_quirk ftdi_stmclite_quirk = {
.probe  = ftdi_stmclite_probe,
 };
 
-static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
+static const struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
.probe  = ftdi_8u2232c_probe,
 };
 
@@ -1775,7 +1775,7 @@ static void remove_sysfs_attrs(struct usb_serial_port 
*port)
 static int ftdi_sio_probe(struct usb_serial *serial,
const struct usb_device_id *id)
 {
-   struct ftdi_sio_quirk *quirk =
+   const struct ftdi_sio_quirk *quirk =
(struct ftdi_sio_quirk *)id->driver_info;
 
if (quirk && quirk->probe) {
@@ -1792,7 +1792,7 @@ static int ftdi_sio_probe(struct usb_serial *serial,
 static int ftdi_sio_port_probe(struct usb_serial_port *port)
 {
struct ftdi_private *priv;
-   struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial);
+   const struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial);
 
 
priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL);

--
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 v5 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-04-09 Thread Hans de Goede
From: Reinder de Haan 

At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple
reset lines, the controller will not initialize while the reset for
its companion is still asserted, which means we need to de-assert
2 resets for the controller to work.

Signed-off-by: Reinder de Haan 
Signed-off-by: Hans de Goede 
---
Changes in v2:
-Use the new reset_control_[de]assert_shared reset-controller functions
---
 Documentation/devicetree/bindings/usb/usb-ehci.txt |  2 +-
 drivers/usb/host/ehci-platform.c   | 41 --
 2 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt 
b/Documentation/devicetree/bindings/usb/usb-ehci.txt
index a12d601..0701812 100644
--- a/Documentation/devicetree/bindings/usb/usb-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
@@ -18,7 +18,7 @@ Optional properties:
  - clocks : a list of phandle + clock specifier pairs
  - phys : phandle + phy specifier pair
  - phy-names : "usb"
- - resets : phandle + reset specifier pair
+ - resets : a list of phandle + reset specifier pairs
 
 Example (Sequoia 440EPx):
 ehci@e300 {
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 1757ebb..f4c708f 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -39,11 +39,12 @@
 
 #define DRIVER_DESC "EHCI generic platform driver"
 #define EHCI_MAX_CLKS 3
+#define EHCI_MAX_RESETS 2
 #define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv)
 
 struct ehci_platform_priv {
struct clk *clks[EHCI_MAX_CLKS];
-   struct reset_control *rst;
+   struct reset_control *resets[EHCI_MAX_RESETS];
struct phy **phys;
int num_phys;
bool reset_on_resume;
@@ -149,7 +150,7 @@ static int ehci_platform_probe(struct platform_device *dev)
struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev);
struct ehci_platform_priv *priv;
struct ehci_hcd *ehci;
-   int err, irq, phy_num, clk = 0;
+   int err, irq, phy_num, clk = 0, rst = 0;
 
if (usb_disabled())
return -ENODEV;
@@ -232,18 +233,22 @@ static int ehci_platform_probe(struct platform_device 
*dev)
break;
}
}
-   }
 
-   priv->rst = devm_reset_control_get_optional(&dev->dev, NULL);
-   if (IS_ERR(priv->rst)) {
-   err = PTR_ERR(priv->rst);
-   if (err == -EPROBE_DEFER)
-   goto err_put_clks;
-   priv->rst = NULL;
-   } else {
-   err = reset_control_deassert(priv->rst);
-   if (err)
-   goto err_put_clks;
+   for (rst = 0; rst < EHCI_MAX_RESETS; rst++) {
+   priv->resets[rst] =
+   devm_reset_control_get_shared_by_index(
+   &dev->dev, rst);
+   if (IS_ERR(priv->resets[rst])) {
+   err = PTR_ERR(priv->resets[rst]);
+   if (err == -EPROBE_DEFER)
+   goto err_reset;
+   priv->resets[rst] = NULL;
+   break;
+   }
+   err = reset_control_deassert(priv->resets[rst]);
+   if (err)
+   goto err_reset;
+   }
}
 
if (pdata->big_endian_desc)
@@ -300,8 +305,8 @@ err_power:
if (pdata->power_off)
pdata->power_off(dev);
 err_reset:
-   if (priv->rst)
-   reset_control_assert(priv->rst);
+   while (--rst >= 0)
+   reset_control_assert(priv->resets[rst]);
 err_put_clks:
while (--clk >= 0)
clk_put(priv->clks[clk]);
@@ -319,15 +324,15 @@ static int ehci_platform_remove(struct platform_device 
*dev)
struct usb_hcd *hcd = platform_get_drvdata(dev);
struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev);
struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd);
-   int clk;
+   int clk, rst;
 
usb_remove_hcd(hcd);
 
if (pdata->power_off)
pdata->power_off(dev);
 
-   if (priv->rst)
-   reset_control_assert(priv->rst);
+   for (rst = 0; rst < EHCI_MAX_RESETS && priv->resets[rst]; rst++)
+   reset_control_assert(priv->resets[rst]);
 
for (clk = 0; clk < EHCI_MAX_CLKS && priv->clks[clk]; clk++)
clk_put(priv->clks[clk]);
-- 
2.7.3

--
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 v5 0/2] ?hci-platform: Add support for controllers with more then one reset line

2016-04-09 Thread Hans de Goede
Hi Greg, et al,

Here is a resend of my last version of the patch set to support usb
controllers which have multiple resets.

Unfortunately the shared reset controller support this depends on did
not make it into 4.6. Philipp Zabel, the reset maintainer (in the Cc)
has put these patches in a stable branch / tag here:

git://git.pengutronix.de/git/pza/linux.git tags/reset-for-4.7

Can you please merge in this tag and then these 2 patches for 4.7 ?

Changes in v2:
-Switch to now shared reset_[de]assert functions

Changes in v3:
-Adjust for changes to shared-reset reset-controller functions

Changes in v4:
-Fix Ugly continuation line
-Add Acked-by: Alan Stern 

Changes in v5:
-No changes, resend for merging into 4.7

Thanks & Regards,

Hans
--
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 v5 2/2] ohci-platform: Add support for controllers with multiple reset lines

2016-04-09 Thread Hans de Goede
At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple
reset lines, the controller will not initialize while the reset for
its companion is still asserted, which means we need to de-assert
2 resets for the controller to work.

Signed-off-by: Hans de Goede 
---
Changes in v2:
-New patch in v2 of this patch-set, to complement the identical patch for
 the ehci-platform code
---
 Documentation/devicetree/bindings/usb/usb-ohci.txt |  2 +-
 drivers/usb/host/ohci-platform.c   | 43 --
 2 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt 
b/Documentation/devicetree/bindings/usb/usb-ohci.txt
index 19233b7..9df4569 100644
--- a/Documentation/devicetree/bindings/usb/usb-ohci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt
@@ -14,7 +14,7 @@ Optional properties:
 - clocks : a list of phandle + clock specifier pairs
 - phys : phandle + phy specifier pair
 - phy-names : "usb"
-- resets : phandle + reset specifier pair
+- resets : a list of phandle + reset specifier pairs
 
 Example:
 
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index ae1c988..898b740 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -33,11 +33,12 @@
 
 #define DRIVER_DESC "OHCI generic platform driver"
 #define OHCI_MAX_CLKS 3
+#define OHCI_MAX_RESETS 2
 #define hcd_to_ohci_priv(h) ((struct ohci_platform_priv *)hcd_to_ohci(h)->priv)
 
 struct ohci_platform_priv {
struct clk *clks[OHCI_MAX_CLKS];
-   struct reset_control *rst;
+   struct reset_control *resets[OHCI_MAX_RESETS];
struct phy **phys;
int num_phys;
 };
@@ -117,7 +118,7 @@ static int ohci_platform_probe(struct platform_device *dev)
struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
struct ohci_platform_priv *priv;
struct ohci_hcd *ohci;
-   int err, irq, phy_num, clk = 0;
+   int err, irq, phy_num, clk = 0, rst = 0;
 
if (usb_disabled())
return -ENODEV;
@@ -195,19 +196,21 @@ static int ohci_platform_probe(struct platform_device 
*dev)
break;
}
}
-
-   }
-
-   priv->rst = devm_reset_control_get_optional(&dev->dev, NULL);
-   if (IS_ERR(priv->rst)) {
-   err = PTR_ERR(priv->rst);
-   if (err == -EPROBE_DEFER)
-   goto err_put_clks;
-   priv->rst = NULL;
-   } else {
-   err = reset_control_deassert(priv->rst);
-   if (err)
-   goto err_put_clks;
+   for (rst = 0; rst < OHCI_MAX_RESETS; rst++) {
+   priv->resets[rst] =
+   devm_reset_control_get_shared_by_index(
+   &dev->dev, rst);
+   if (IS_ERR(priv->resets[rst])) {
+   err = PTR_ERR(priv->resets[rst]);
+   if (err == -EPROBE_DEFER)
+   goto err_reset;
+   priv->resets[rst] = NULL;
+   break;
+   }
+   err = reset_control_deassert(priv->resets[rst]);
+   if (err)
+   goto err_reset;
+   }
}
 
if (pdata->big_endian_desc)
@@ -265,8 +268,8 @@ err_power:
if (pdata->power_off)
pdata->power_off(dev);
 err_reset:
-   if (priv->rst)
-   reset_control_assert(priv->rst);
+   while (--rst >= 0)
+   reset_control_assert(priv->resets[rst]);
 err_put_clks:
while (--clk >= 0)
clk_put(priv->clks[clk]);
@@ -284,15 +287,15 @@ static int ohci_platform_remove(struct platform_device 
*dev)
struct usb_hcd *hcd = platform_get_drvdata(dev);
struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd);
-   int clk;
+   int clk, rst;
 
usb_remove_hcd(hcd);
 
if (pdata->power_off)
pdata->power_off(dev);
 
-   if (priv->rst)
-   reset_control_assert(priv->rst);
+   for (rst = 0; rst < OHCI_MAX_RESETS && priv->resets[rst]; rst++)
+   reset_control_assert(priv->resets[rst]);
 
for (clk = 0; clk < OHCI_MAX_CLKS && priv->clks[clk]; clk++)
clk_put(priv->clks[clk]);
-- 
2.7.3

--
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: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-09 Thread Alan Stern
On Sat, 9 Apr 2016, Sam Sany wrote:

> Hi Allen, thank you for quick reply. It is VERY much appreciated.
> 
> The output of /sys/kernel/debug/usb/devices can be found here: 
> http://pastebin.com/HyzefGyB
> (I believe the relevent portion is at the end, the "Focusrite Scarlett" 
> device).

It looks quite normal, except for the fact that there are two copies of 
everything (which shouldn't hurt).

Somebody else reported a similar problem not long ago.  It turned out
to be caused by a problem with the xHCI controller involving Link Power
Management -- disabling LPM fixed it.  However, the 4.2 kernel does not
have any way to disable LPM (4.5 does).

> According to the output of "cat /boot/config" the CONFIG_USB_XHCI_HCD is 
> modulaized.  So can I simply "modprobe -r" it like any module?

You can, but I don't think it will help.

> I have yet to try the 4.5 kernel.  I prefer to use a low-latency kernel, bc 
> the primary purpose of this machine is recording music.  So I have been 
> downloading the newest source code available in the Ubuntu Studio 
> repositories, configuring with the xhci drivers modulized (by default Ubuntu 
> makes them builtin), and compiling from that.  If I download the source for 
> 4.5, is there somewhere I can find a .config file that would allow for low-
> latency performance?

What do you mean by low-latency kernel?  I'm not aware of any 
low-latency patches.

There is the RT series, of course.  But it's for bounded latency, not 
low latency.  And as far as I know, it's not available for 4.5.

If 4.5 doesn't pan out, you can try the patch below.  It will disable
LPM for all devices, and it should work with 4.2.  See if it helps.

Alan Stern



--- usb-3.15.orig/drivers/usb/core/hub.c
+++ usb-3.15/drivers/usb/core/hub.c
@@ -130,6 +130,8 @@ struct usb_hub *usb_hub_to_struct_hub(st
 
 static int usb_device_supports_lpm(struct usb_device *udev)
 {
+   return 0;
+
/* USB 2.1 (and greater) devices indicate LPM support through
 * their USB 2.0 Extended Capabilities BOS descriptor.
 */

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


ジェームズHartopから、

2016-04-09 Thread james william hartop
ジェームズHartopから、

私はあなたとあなたの家族がやっているか、私の手紙が今日健康とあなたの最高の気分でお会いすることを期待しますか?親切にあなたのプライバシーに侵入するための私を許してください。あなたは私達の両方の相互利益になります金融ビジネス関係で信頼することはできますか?私はあなたが私はあなたを伝えることを約午前何に興味を持つであろうことを期待して、あなたの国の国際ビジネス情報から自分の名前と連絡先を得ました。

私はここイギリスでHarlesdenからジェームズ・ウィリアムHartop、北西ロンドン、と思います。私は、UBS銀行、ロンドンのために働きます。私は私達の両方に莫大な利益をもたらすであろうビジネスの提案についてあなたを書いています。私の部署では、UBS
 
AGのカバレッジおよびアドバイザリーのマネージングディレクター/ヘッドなので、私は次のいずれかに属するアカウントで22.3百万英ポンドスターリング(二十二百三十万英ポンドスターリング)の放棄合計を発見しました私たちの外国人の故人の顧客、彼の死と彼の家族に生じたヘリコプターのクラッシュ2010年1月10日の犠牲者だった億万長者のビジネスモーグル後期氏モイゼスサバマスリ、メキシコからのユダヤ人。サバは47歳でした。また、衝突時のチョッパーに彼の妻、息子アブラハム(アルバート)と彼の義理の娘でした。パイロットはまた、死んでいました。
 
ご連絡の選択は、特にによるトランザクションの感度および本明細書の機密保持のために、あなたが住んでいる場所の地理的な性質から、興奮しています。現在、私たちの銀行は来アップするために請求のために親戚のいずれかを待っている誰もがそれをやっていません。私は個人的に、今、私は22.3百万ポンドの価値がこのアカウントの収益があなたに支払うことができるようにあなたの同意が故人の親族/ウィル受益次のようにあなたを提供しようと5年間の親戚を見つけるに失敗しました。
 
これは支払わまたは共有これらの割合で、私には60%と、あなたに40%になります。私たちが作っているこの主張をバックアップするために使用することができ、必要なすべての法的文書を確保しています。私が必要とするすべての文書にあなたの名前に充填し、正当な受益者としてあなたを証明するためにここに法廷でそれを合法化することです。私が今必要とするすべては、私たちはこのトランザクションを介して、参照可能にするためにあなたの正直な協力、機密性と信頼です。私は、これは法律の違反からあなたを保護する正当な配置の下で実行されることを保証します。
 
我々はそれを介して、実行するために7日を持っているように、私に次のようにしてください。これはPLEASE非常に急務です。
 
1.氏名:
2.あなたの直接携帯電話番号:
3.あなたの連絡先住所:
4.あなたの職業:
5.あなたの国籍:
6.あなたの性別/年齢:
 
系統的検索を経てきたが、私はあなたがこの提案が興味深い見つけることを期待してあなたに連絡することを決めました。より多くの情報をご提出します。このメッセージの確認に喜ばとご関心を示しています。私はあなたの決定を知らせるのではなく待っている私を保つに努めます。

よろしく、
ジェームズW.Hartop
UBS AG、投資銀行
1フィンズベリー・アベニュー、ロンドン
EC2M 2PP、イギリス。
www.ubs.com

Re: [PATCH v5 1/4] leds: core: add generic support for RGB Color LED's

2016-04-09 Thread Pavel Machek
Hi!

> >>>What's tricky about patterns is that you need to control 3 (or more)
> >>>leds at a time. Problem you are trying to solve here is ... control of
> >>>3 leds, at the same time.
> >>>
> >>>So let's solve them together.
> >>
> >>OK, now I've got your point. So we'd need to have a means for defining
> >>patterns. The interface could be located at /sys/class/leds/patterns.
> >>
> >>We'd need to have a flexible way for defining LED class devices involved
> >>in a pattern. Since we cannot guarantee no space in a LED class device
> >>name, then a single attribute containing space separated list is not an
> >>option. We'd have to create a predefined set of attributes that would
> >>contain LED class device name. Predefined implies that it would be
> >>a fixed number, i.e. either some attributes would always remain unused
> >>or, which is even worse, we could run out of free attributes for some
> >>use cases.
> >
> >There's a better solution: make pattern behave as a trigger for leds
> >it controls.
> >
> >So we'd have
> >
> >/sys/class/leds/patterns/lp5523
> >
> >then we'd have
> >
> >/sys/class/leds/lp5523::red/trigger = "lp5523:1"
> >/sys/class/leds/lp5523::green/trigger = "lp5523:2"
> >/sys/class/leds/lp5523::blue/trigger = "lp5523:3"
> >
> >(or something similar, I'd have to boot the n900 to see the exact
> >names).
> 
> How about implementing patterns as a specific typer of triggers?
> Let's say we have ledtrig-rgb-pattern:

Well, we'd need ledtrig-rgb-pattern-1, ledtrig-rgb-pattern-2, ... , as we
can have more than one rgb led. But yes.

> After setting a trigger following sysfs attribute would appear
> in a LED class device sysfs interface:
> 
> $cat /sys/class/lp5523::red/rgb_color
> red green blue [none]
> 
> $echo "red" > /sys/class/leds/lp5523::red/rgb_color
> 
> and similarly
> 
> $echo "green" > /sys/class/leds/lp5523::green/rgb_color
> $echo "blue" > /sys/class/leds/lp5523::blue/rgb_color

Yes, that would work -- selecting channels from the pattern.

> Similar approach could be applied for blink patterns:
> There could be additional attributes provided for defining
> the position in a blink sequence, or/and blink period.

For patterns, I'd suggest array of (r g b time) values.

Pattern engines can do stuff like "slowly turn LED from off to red, then switch 
color to
white, then slowly turn it to yellow, then turn it off at once" with defined 
speeds
for "slowly" and option of either linear on non-linear brightness ramping.

The last option might be a bit too much, but I believe we should support the 
rest.

Best regards,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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 v4 1/5] gadget: Introduce the notifier functions

2016-04-09 Thread Pavel Machek
Hi!

> >> Also, because soon enough we will have to support USB Power Delivery
> >> with Type C connector, this is bound to change in the coming months.
> >> 
> >> Frankly, I wanted all of this to be decided in userland with the
> >> kernel just providing notification and basic safety checks (we don't
> >> want to allow a bogus userspace daemon frying anybody's devices).
> >> 
> >> How would you feel about that ?
> >
> > So init=/bin/bash boot no longer provides machine that charges itself?
> >
> > That would be bad. Traditionally, hardware controls battery charging,
> > and if hardware needs some help, we should do it in kernel, to mask
> > the difference from userspace.
> 
> this is a very valid point which I hadn't considered :-)
> 
> Seems like kernel it is, no matter how easy or how difficult it gets.

Basically yes. Note that for some bells & whistles, you can require userland 
help.

For example it would probably be ok if it charged slower than usual... but I 
guess
that does not really help in this case.

Best regards,
Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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


LOAN

2016-04-09 Thread darlehen
Brauchen Sie einen Kredit? Wir bieten Darlehen in 2% gelten heute Kontakt mit 
uns auf: legacyassetgro...@hotmail.com
--
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


[GIT PULL] USB driver fixes for 4.6-rc3

2016-04-09 Thread Greg KH
The following changes since commit 9735a22799b9214d17d3c231fe377fc852f042e9:

  Linux 4.6-rc2 (2016-04-03 09:09:40 -0500)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.6-rc3

for you to fetch changes up to 636c8a8d85d0564222071f0caa4a4e6bf527efe5:

  Merge tag 'usb-serial-4.6-rc3' of 
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus 
(2016-04-08 15:41:58 -0700)


USB fixes for 4.6-rc3

Here are some USB fixes and new device ids for 4.6-rc3.

Nothing major, the normal USB gadget fixes and usb-serial driver ids,
along with some other fixes mixed in.  All except the USB serial ids
have been tested in linux-next, the id additions should be fine as they
are "trivial".

Signed-off-by: Greg Kroah-Hartman 


Arnd Bergmann (1):
  usb: phy: qcom-8x16: fix regulator API abuse

Bjørn Mork (1):
  USB: option: add "D-Link DWM-221 B1" device id

Dan Carpenter (1):
  usb: gadget: f_midi: unlock on error

Felipe Balbi (3):
  usb: dwc3: core: improve reset sequence
  usb: dwc3: gadget: fix endpoint renaming
  usb: gadget: udc: atmel: don't disable enpdoints we don't own

Felipe F. Tonello (2):
  usb: gadget: f_midi: added spinlock on transmit function
  usb: gadget: f_midi: Fixed a bug when buflen was smaller than 
wMaxPacketSize

Greg Kroah-Hartman (3):
  Merge tag 'fixes-for-v4.6-rc2' of git://git.kernel.org/.../balbi/usb into 
usb-linus
  Merge tag 'fixes-for-v4.6-rc3' of git://git.kernel.org/.../balbi/usb into 
usb-linus
  Merge tag 'usb-serial-4.6-rc3' of 
git://git.kernel.org/.../johan/usb-serial into usb-linus

Grygorii Strashko (2):
  usb: gadget: udc-core: remove manual dma configuration
  usb: dwc3: keystone: drop dma_mask configuration

Heikki Krogerus (1):
  usb: dwc3: pci: add ID for one more Intel Broxton platform

Ignat Korchagin (1):
  USB: usbip: fix potential out-of-bounds write

Jiebing Li (1):
  usb: dwc3: gadget: release spin lock during gadget resume

John Youn (2):
  usb: gadget: composite: Access SSP Dev Cap fields properly
  usb: ch9: Fix SSP Device Cap wFunctionalitySupport type

Josh Boyer (1):
  USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devices

Martyn Welch (1):
  USB: serial: cp210x: Adding GE Healthcare Device ID

Mathias Nyman (1):
  usb: fix regression in SuperSpeed endpoint descriptor parsing

Oliver Neukum (3):
  USB: mct_u232: add sanity checking in probe
  USB: cypress_m8: add endpoint sanity check
  USB: digi_acceleport: do sanity checking for the number of ports

Przemek Rudy (1):
  usb: dwc2: do not override forced dr_mode in gadget setup

Yoshihiro Shimoda (3):
  usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler()
  usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer
  usb: renesas_usbhs: fix to avoid using a disabled ep in 
usbhsg_queue_done()

 drivers/usb/core/config.c   | 16 
 drivers/usb/dwc2/gadget.c   | 23 ---
 drivers/usb/dwc3/core.c | 48 +-
 drivers/usb/dwc3/dwc3-keystone.c|  5 ---
 drivers/usb/dwc3/dwc3-pci.c |  2 +
 drivers/usb/dwc3/gadget.c   | 11 +++--
 drivers/usb/gadget/composite.c  |  8 ++--
 drivers/usb/gadget/function/f_midi.c| 17 +++-
 drivers/usb/gadget/udc/atmel_usba_udc.c | 14 ---
 drivers/usb/gadget/udc/udc-core.c   |  6 ---
 drivers/usb/phy/phy-qcom-8x16-usb.c | 72 +
 drivers/usb/renesas_usbhs/fifo.c|  4 +-
 drivers/usb/renesas_usbhs/mod_gadget.c  |  6 ++-
 drivers/usb/serial/cp210x.c |  1 +
 drivers/usb/serial/cypress_m8.c | 11 +++--
 drivers/usb/serial/digi_acceleport.c| 19 +
 drivers/usb/serial/ftdi_sio.c   |  4 ++
 drivers/usb/serial/ftdi_sio_ids.h   |  8 
 drivers/usb/serial/mct_u232.c   |  9 -
 drivers/usb/serial/option.c |  2 +
 drivers/usb/usbip/usbip_common.c| 11 +
 include/uapi/linux/usb/ch9.h|  2 +-
 22 files changed, 151 insertions(+), 148 deletions(-)
--
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 v5 2/2] ohci-platform: Add support for controllers with multiple reset lines

2016-04-09 Thread kbuild test robot
Hi Hans,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.6-rc2 next-20160408]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:
https://github.com/0day-ci/linux/commits/Hans-de-Goede/hci-platform-Add-support-for-controllers-with-more-then-one-reset-line/20160409-221746
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next
config: x86_64-randconfig-s5-04100613 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/usb/host/ohci-platform.c: In function 'ohci_platform_probe':
>> drivers/usb/host/ohci-platform.c:201:5: error: implicit declaration of 
>> function 'devm_reset_control_get_shared_by_index' 
>> [-Werror=implicit-function-declaration]
devm_reset_control_get_shared_by_index(
^
   drivers/usb/host/ohci-platform.c:200:22: warning: assignment makes pointer 
from integer without a cast [-Wint-conversion]
   priv->resets[rst] =
 ^
   cc1: some warnings being treated as errors

vim +/devm_reset_control_get_shared_by_index +201 
drivers/usb/host/ohci-platform.c

   195  priv->clks[clk] = NULL;
   196  break;
   197  }
   198  }
   199  for (rst = 0; rst < OHCI_MAX_RESETS; rst++) {
   200  priv->resets[rst] =
 > 201  devm_reset_control_get_shared_by_index(
   202  
&dev->dev, rst);
   203  if (IS_ERR(priv->resets[rst])) {
   204  err = PTR_ERR(priv->resets[rst]);

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH v5 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-04-09 Thread kbuild test robot
Hi Reinder,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.6-rc2 next-20160408]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:
https://github.com/0day-ci/linux/commits/Hans-de-Goede/hci-platform-Add-support-for-controllers-with-more-then-one-reset-line/20160409-221746
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/usb/host/ehci-platform.c: In function 'ehci_platform_probe':
>> drivers/usb/host/ehci-platform.c:239:5: error: implicit declaration of 
>> function 'devm_reset_control_get_shared_by_index' 
>> [-Werror=implicit-function-declaration]
devm_reset_control_get_shared_by_index(
^
   drivers/usb/host/ehci-platform.c:238:22: warning: assignment makes pointer 
from integer without a cast [-Wint-conversion]
   priv->resets[rst] =
 ^
   cc1: some warnings being treated as errors

vim +/devm_reset_control_get_shared_by_index +239 
drivers/usb/host/ehci-platform.c

   233  break;
   234  }
   235  }
   236  
   237  for (rst = 0; rst < EHCI_MAX_RESETS; rst++) {
   238  priv->resets[rst] =
 > 239  devm_reset_control_get_shared_by_index(
   240  
&dev->dev, rst);
   241  if (IS_ERR(priv->resets[rst])) {
   242  err = PTR_ERR(priv->resets[rst]);

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-09 Thread Sam Sany
Alan Stern  writes:

> 
> On Sat, 9 Apr 2016, Sam Sany wrote:
 
> --- usb-3.15.orig/drivers/usb/core/hub.c
> +++ usb-3.15/drivers/usb/core/hub.c
>  -130,6 +130,8  struct usb_hub 
*usb_hub_to_struct_hub(st
> 
>  static int usb_device_supports_lpm(struct usb_device *udev)
>  {
> + return 0;
> +
>   /* USB 2.1 (and greater) devices indicate LPM support through
>* their USB 2.0 Extended Capabilities BOS descriptor.
>*/

Last stupid question... what do I do with the patch? Do I add it to a 
particular file or just copy and paste the text to a terminal? Sorry, I know 
I'm embarrassingly uneducated in these respects...

--
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: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-09 Thread Sam Sany
Sam Sany  writes:

And one last question... I don't know too much C, but there is a missing 
closing bracket at the end, right? On the line after the "return 0" 
statement?

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