<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/usb/isp1760, branch v4.0</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>usb: isp1760: fix spin unlock in the error path of isp1760_udc_start</title>
<updated>2015-03-24T16:38:58+00:00</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2015-03-20T11:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=65582a7f4ce5bd7a1fb61516d9c2476f4f166f4e'/>
<id>65582a7f4ce5bd7a1fb61516d9c2476f4f166f4e</id>
<content type='text'>
Commit a124820de5fd ("usb: isp1760: fix possible deadlock in
isp1760_udc_irq") replaced spin_{un,}lock with spin_{un,}lock_irq{save,restore}.
However it missed an error path resulting in the smatch warning as below:

drivers/usb/isp1760/isp1760-udc.c:1230 isp1760_udc_start() warn: inconsistent returns 'irqsave:flags'.
Locked on:   line 1207
Unlocked on: line 1199

This patch fixes the spin unlock in the error path in isp1760_udc_start
thereby removing the smatch warning mentioned above.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit a124820de5fd ("usb: isp1760: fix possible deadlock in
isp1760_udc_irq") replaced spin_{un,}lock with spin_{un,}lock_irq{save,restore}.
However it missed an error path resulting in the smatch warning as below:

drivers/usb/isp1760/isp1760-udc.c:1230 isp1760_udc_start() warn: inconsistent returns 'irqsave:flags'.
Locked on:   line 1207
Unlocked on: line 1199

This patch fixes the spin unlock in the error path in isp1760_udc_start
thereby removing the smatch warning mentioned above.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: add peripheral/device controller chip id</title>
<updated>2015-03-09T15:49:46+00:00</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2015-02-26T11:47:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1998adab1c188076eaf356a8ae28217856f0ee92'/>
<id>1998adab1c188076eaf356a8ae28217856f0ee92</id>
<content type='text'>
As per the SAF1761 data sheet[0], the DcChipID register represents
the hardware version number (0001h) and the chip ID (1582h) for the
Peripheral Controller.

However as per the ISP1761 data sheet[1], the DcChipID register
represents the hardware version number (0015h) and the chip ID (8210h)
for the Peripheral Controller.

This patch adds support for both the chip ID values.

[0] http://www.nxp.com/documents/data_sheet/SAF1761.pdf
[1] http://pdf.datasheetcatalog.com/datasheets2/74/742102_1.pdf

Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As per the SAF1761 data sheet[0], the DcChipID register represents
the hardware version number (0001h) and the chip ID (1582h) for the
Peripheral Controller.

However as per the ISP1761 data sheet[1], the DcChipID register
represents the hardware version number (0015h) and the chip ID (8210h)
for the Peripheral Controller.

This patch adds support for both the chip ID values.

[0] http://www.nxp.com/documents/data_sheet/SAF1761.pdf
[1] http://pdf.datasheetcatalog.com/datasheets2/74/742102_1.pdf

Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: set IRQ flags properly</title>
<updated>2015-03-09T15:46:15+00:00</updated>
<author>
<name>Valentin Rothberg</name>
<email>Valentin.Rothberg@lip6.fr</email>
</author>
<published>2015-03-01T15:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=80b4a0f8feeb6ee7fa4430a2b4ae1155ed923bd2'/>
<id>80b4a0f8feeb6ee7fa4430a2b4ae1155ed923bd2</id>
<content type='text'>
The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
commit e58aa3d2d0cc ("genirq: Run irq handlers with interrupts
disabled") running IRQ handlers with interrupts enabled can cause stack
overflows when the interrupt line of the issuing device is still active.

This patch removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED for isp1760_udc_register().

Signed-off-by: Valentin Rothberg &lt;Valentin.Rothberg@lip6.fr&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
commit e58aa3d2d0cc ("genirq: Run irq handlers with interrupts
disabled") running IRQ handlers with interrupts enabled can cause stack
overflows when the interrupt line of the issuing device is still active.

This patch removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED for isp1760_udc_register().

Signed-off-by: Valentin Rothberg &lt;Valentin.Rothberg@lip6.fr&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: fix possible deadlock in isp1760_udc_irq</title>
<updated>2015-03-09T15:44:08+00:00</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2015-03-04T17:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=798523973dcc93c2440932dc4dfe76fbf571f668'/>
<id>798523973dcc93c2440932dc4dfe76fbf571f668</id>
<content type='text'>
Use spin_{un,}lock_irq{save,restore} in isp1760_udc_{start,stop} to
prevent following potentially deadlock scenario between
isp1760_udc_{start,stop} and isp1760_udc_irq :

=================================
[ INFO: inconsistent lock state ]
4.0.0-rc2-00004-gf7bb2ef60173 #51 Not tainted
---------------------------------
inconsistent {HARDIRQ-ON-W} -&gt; {IN-HARDIRQ-W} usage.
in:imklog/2118 [HC1[1]:SC0[0]:HE0:SE1] takes:
 (&amp;(&amp;udc-&gt;lock)-&gt;rlock){?.+...}, at: [&lt;c0397a93&gt;] isp1760_udc_irq+0x367/0x9dc
{HARDIRQ-ON-W} state was registered at:
  [&lt;c05135b3&gt;] _raw_spin_lock+0x23/0x30
  [&lt;c0396b87&gt;] isp1760_udc_start+0x23/0xf8
  [&lt;c039dc21&gt;] udc_bind_to_driver+0x71/0xb0
  [&lt;c039de4f&gt;] usb_gadget_probe_driver+0x53/0x9c
  [&lt;bf80d0df&gt;] usb_composite_probe+0x8a/0xa4 [libcomposite]
  [&lt;bf8311a7&gt;] 0xbf8311a7
  [&lt;c00088c5&gt;] do_one_initcall+0x8d/0x17c
  [&lt;c050b92d&gt;] do_init_module+0x49/0x148
  [&lt;c0087323&gt;] load_module+0xb7f/0xbc4
  [&lt;c0087471&gt;] SyS_finit_module+0x51/0x74
  [&lt;c000d8c1&gt;] ret_fast_syscall+0x1/0x68
irq event stamp: 4966
hardirqs last  enabled at (4965): [&lt;c05137df&gt;] _raw_spin_unlock_irq+0x1f/0x24
hardirqs last disabled at (4966): [&lt;c00110b3&gt;] __irq_svc+0x33/0x64
softirqs last  enabled at (4458): [&lt;c0023475&gt;] __do_softirq+0x23d/0x2d0
softirqs last disabled at (4389): [&lt;c002380b&gt;] irq_exit+0xef/0x15c

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;udc-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;udc-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

1 lock held by in:imklog/2118:
 #0:  (&amp;f-&gt;f_pos_lock){+.+.+.}, at: [&lt;c010a101&gt;] __fdget_pos+0x31/0x34

Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use spin_{un,}lock_irq{save,restore} in isp1760_udc_{start,stop} to
prevent following potentially deadlock scenario between
isp1760_udc_{start,stop} and isp1760_udc_irq :

=================================
[ INFO: inconsistent lock state ]
4.0.0-rc2-00004-gf7bb2ef60173 #51 Not tainted
---------------------------------
inconsistent {HARDIRQ-ON-W} -&gt; {IN-HARDIRQ-W} usage.
in:imklog/2118 [HC1[1]:SC0[0]:HE0:SE1] takes:
 (&amp;(&amp;udc-&gt;lock)-&gt;rlock){?.+...}, at: [&lt;c0397a93&gt;] isp1760_udc_irq+0x367/0x9dc
{HARDIRQ-ON-W} state was registered at:
  [&lt;c05135b3&gt;] _raw_spin_lock+0x23/0x30
  [&lt;c0396b87&gt;] isp1760_udc_start+0x23/0xf8
  [&lt;c039dc21&gt;] udc_bind_to_driver+0x71/0xb0
  [&lt;c039de4f&gt;] usb_gadget_probe_driver+0x53/0x9c
  [&lt;bf80d0df&gt;] usb_composite_probe+0x8a/0xa4 [libcomposite]
  [&lt;bf8311a7&gt;] 0xbf8311a7
  [&lt;c00088c5&gt;] do_one_initcall+0x8d/0x17c
  [&lt;c050b92d&gt;] do_init_module+0x49/0x148
  [&lt;c0087323&gt;] load_module+0xb7f/0xbc4
  [&lt;c0087471&gt;] SyS_finit_module+0x51/0x74
  [&lt;c000d8c1&gt;] ret_fast_syscall+0x1/0x68
irq event stamp: 4966
hardirqs last  enabled at (4965): [&lt;c05137df&gt;] _raw_spin_unlock_irq+0x1f/0x24
hardirqs last disabled at (4966): [&lt;c00110b3&gt;] __irq_svc+0x33/0x64
softirqs last  enabled at (4458): [&lt;c0023475&gt;] __do_softirq+0x23d/0x2d0
softirqs last disabled at (4389): [&lt;c002380b&gt;] irq_exit+0xef/0x15c

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;udc-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;udc-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

1 lock held by in:imklog/2118:
 #0:  (&amp;f-&gt;f_pos_lock){+.+.+.}, at: [&lt;c010a101&gt;] __fdget_pos+0x31/0x34

Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: use msecs_to_jiffies for time conversion</title>
<updated>2015-02-23T15:18:20+00:00</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2015-02-06T10:08:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4d3db7d78425c469d328d460e3b69dfb80dd309c'/>
<id>4d3db7d78425c469d328d460e3b69dfb80dd309c</id>
<content type='text'>
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2015-02-04T19:03:20+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-02-04T19:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4d4bac4499e9955521af80198063ef9c2f2bd634'/>
<id>4d4bac4499e9955521af80198063ef9c2f2bd634</id>
<content type='text'>
Felipe writes:

usb: patches for v3.20 merge window

Here's the big pull request for Gadgets and PHYs. It's
a total of 217 non-merge commits with pretty much everything
being touched.

The most important bits are a ton of new documentation for
almost all usb gadget functions, a new isp1760 UDC driver,
several improvements to the old net2280 UDC driver, and
some minor tracepoint improvements to dwc3.

Other than that, a big list of minor cleanups, smaller bugfixes
and new features all over the place.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Felipe writes:

usb: patches for v3.20 merge window

Here's the big pull request for Gadgets and PHYs. It's
a total of 217 non-merge commits with pretty much everything
being touched.

The most important bits are a ton of new documentation for
almost all usb gadget functions, a new isp1760 UDC driver,
several improvements to the old net2280 UDC driver, and
some minor tracepoint improvements to dwc3.

Other than that, a big list of minor cleanups, smaller bugfixes
and new features all over the place.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: Fix USB disabled check</title>
<updated>2015-01-27T15:39:51+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2015-01-20T22:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d21daf1e90514cee8e3fb11c8e28acee3fb87edf'/>
<id>d21daf1e90514cee8e3fb11c8e28acee3fb87edf</id>
<content type='text'>
The isp1760 driver registration function returns an error if USB is
disabled. This made sense when the driver only supported host
controllers, but now that it supports peripheral controllers host
support isn't mandatory anymore.

Fix this by returning an error only when both the HCD and UDC functions
are disabled, either through the kernel configuration or at runtime.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The isp1760 driver registration function returns an error if USB is
disabled. This made sense when the driver only supported host
controllers, but now that it supports peripheral controllers host
support isn't mandatory anymore.

Fix this by returning an error only when both the HCD and UDC functions
are disabled, either through the kernel configuration or at runtime.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: Remove duplicate usb_disabled() check</title>
<updated>2015-01-27T15:39:47+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2015-01-20T22:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1f8d9b9b503070e5450f49e0a341ac3b43d9164d'/>
<id>1f8d9b9b503070e5450f49e0a341ac3b43d9164d</id>
<content type='text'>
Both isp1760_register() and isp1761_pci_probe() check whether USB is
disabled by calling usb_disabled(), and bail out with an error if it is.
One check is enough, remove the PCI-specific check.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both isp1760_register() and isp1761_pci_probe() check whether USB is
disabled by calling usb_disabled(), and bail out with an error if it is.
One check is enough, remove the PCI-specific check.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: Make HCD support optional</title>
<updated>2015-01-27T15:39:42+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2015-01-20T22:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=100832abf065bc186ae48165c16546784b90a4be'/>
<id>100832abf065bc186ae48165c16546784b90a4be</id>
<content type='text'>
Enable compilation of the isp1760 driver in pure host mode, pure device
mode, or dual-role mode.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable compilation of the isp1760 driver in pure host mode, pure device
mode, or dual-role mode.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: isp1760: Move driver from drivers/usb/host/ to drivers/usb/isp1760/</title>
<updated>2015-01-27T15:39:38+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2015-01-20T22:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7ef077a8ad3557f030d0407c4f56c5a0cf1e418a'/>
<id>7ef077a8ad3557f030d0407c4f56c5a0cf1e418a</id>
<content type='text'>
Now that this is DRD, it doesn't make sense to keep it under
drivers/usb/host.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that this is DRD, it doesn't make sense to keep it under
drivers/usb/host.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
