<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/scsi, branch v4.6-rc3</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2016-04-09T19:00:42+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-09T19:00:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fb41b4be00270f5b28784a31a458a4dcf4519b9e'/>
<id>fb41b4be00270f5b28784a31a458a4dcf4519b9e</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "This is a set of eight fixes.

  Two are trivial gcc-6 updates (brace additions and unused variable
  removal).  There's a couple of cxlflash regressions, a correction for
  sd being overly chatty on revalidation (causing excess log increases).
  A VPD issue which could crash USB devices because they seem very
  intolerant to VPD inquiries, an ALUA deadlock fix and a mpt3sas buffer
  overrun fix"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: Do not attach VPD to devices that don't support it
  sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes
  scsi_dh_alua: Fix a recently introduced deadlock
  scsi: Declare local symbols static
  cxlflash: Move to exponential back-off when cmd_room is not available
  cxlflash: Fix regression issue with re-ordering patch
  mpt3sas: Don't overreach ioc-&gt;reply_post[] during initialization
  aacraid: add missing curly braces
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull SCSI fixes from James Bottomley:
 "This is a set of eight fixes.

  Two are trivial gcc-6 updates (brace additions and unused variable
  removal).  There's a couple of cxlflash regressions, a correction for
  sd being overly chatty on revalidation (causing excess log increases).
  A VPD issue which could crash USB devices because they seem very
  intolerant to VPD inquiries, an ALUA deadlock fix and a mpt3sas buffer
  overrun fix"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: Do not attach VPD to devices that don't support it
  sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes
  scsi_dh_alua: Fix a recently introduced deadlock
  scsi: Declare local symbols static
  cxlflash: Move to exponential back-off when cmd_room is not available
  cxlflash: Fix regression issue with re-ordering patch
  mpt3sas: Don't overreach ioc-&gt;reply_post[] during initialization
  aacraid: add missing curly braces
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fixes-base' into fixes</title>
<updated>2016-04-05T10:56:47+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-04-05T10:56:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6ea7e3873e52902af9ee8c0837450fdb69d54140'/>
<id>6ea7e3873e52902af9ee8c0837450fdb69d54140</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Do not attach VPD to devices that don't support it</title>
<updated>2016-04-05T10:56:40+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-04-01T06:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5ddfe0858ea7848c5d4efe3f4319e7543522e0ee'/>
<id>5ddfe0858ea7848c5d4efe3f4319e7543522e0ee</id>
<content type='text'>
The patch "scsi: rescan VPD attributes" introduced a regression in which
devices that don't support VPD were being scanned for VPD attributes
anyway.  This could cause issues for some devices and should be avoided
so the check for scsi_level has been moved out of scsi_add_lun and into
scsi_attach_vpd so that all callers will not scan VPD for devices that
don't support it.

[mkp: Merge fix]

Fixes: 09e2b0b14690 ("scsi: rescan VPD attributes")
Cc: &lt;stable@vger.kernel.org&gt; #v4.5+
Suggested-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The patch "scsi: rescan VPD attributes" introduced a regression in which
devices that don't support VPD were being scanned for VPD attributes
anyway.  This could cause issues for some devices and should be avoided
so the check for scsi_level has been moved out of scsi_add_lun and into
scsi_attach_vpd so that all callers will not scan VPD for devices that
don't support it.

[mkp: Merge fix]

Fixes: 09e2b0b14690 ("scsi: rescan VPD attributes")
Cc: &lt;stable@vger.kernel.org&gt; #v4.5+
Suggested-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros</title>
<updated>2016-04-04T17:41:08+00:00</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2016-04-01T12:29:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a'/>
<id>09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a</id>
<content type='text'>
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE.  And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special.  They are
not.

The changes are pretty straight-forward:

 - &lt;foo&gt; &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - &lt;foo&gt; &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -&gt; PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -&gt; get_page();

 - page_cache_release() -&gt; put_page();

This patch contains automated changes generated with coccinelle using
script below.  For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach.  I'll
fix them manually in a separate patch.  Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE.  And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special.  They are
not.

The changes are pretty straight-forward:

 - &lt;foo&gt; &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - &lt;foo&gt; &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -&gt; PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -&gt; get_page();

 - page_cache_release() -&gt; put_page();

This patch contains automated changes generated with coccinelle using
script below.  For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach.  I'll
fix them manually in a separate patch.  Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes</title>
<updated>2016-04-01T00:59:08+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2016-03-29T01:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f08bb1e0dbdd0297258d0b8cd4dbfcc057e57b2a'/>
<id>f08bb1e0dbdd0297258d0b8cd4dbfcc057e57b2a</id>
<content type='text'>
During revalidate we check whether device capacity has changed before we
decide whether to output disk information or not.

The check for old capacity failed to take into account that we scaled
sdkp-&gt;capacity based on the reported logical block size. And therefore
the capacity test would always fail for devices with sectors bigger than
512 bytes and we would print several copies of the same discovery
information.

Avoid scaling sdkp-&gt;capacity and instead adjust the value on the fly
when setting the block device capacity and generating fake C/H/S
geometry.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During revalidate we check whether device capacity has changed before we
decide whether to output disk information or not.

The check for old capacity failed to take into account that we scaled
sdkp-&gt;capacity based on the reported logical block size. And therefore
the capacity test would always fail for devices with sectors bigger than
512 bytes and we would print several copies of the same discovery
information.

Avoid scaling sdkp-&gt;capacity and instead adjust the value on the fly
when setting the block device capacity and generating fake C/H/S
geometry.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_dh_alua: Fix a recently introduced deadlock</title>
<updated>2016-03-30T00:32:02+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-03-28T18:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=38c315992338a6c26050477b50700e0f8e08ff96'/>
<id>38c315992338a6c26050477b50700e0f8e08ff96</id>
<content type='text'>
While retesting the SRP initiator I ran the command "rmmod mlx4_ib"
while I/O was in progress. That command triggers SCSI device removal
indirectly. Avoid that this action triggers the following deadlock:

=================================
[ INFO: inconsistent lock state ]
4.6.0-rc0-dbg+ #2 Tainted: G           O
---------------------------------
inconsistent {IN-SOFTIRQ-W} -&gt; {SOFTIRQ-ON-W} usage.
multipathd/484 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;(&amp;pg-&gt;lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa04f50a2&gt;] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
{IN-SOFTIRQ-W} state was registered at:
  [&lt;ffffffff810a64a9&gt;] __lock_acquire+0x7e9/0x1ad0
  [&lt;ffffffff810a7fd0&gt;] lock_acquire+0x60/0x80
  [&lt;ffffffff8159910e&gt;] _raw_spin_lock_irqsave+0x3e/0x60
  [&lt;ffffffffa04f5131&gt;] alua_rtpg_queue+0x41/0x1d0 [scsi_dh_alua]
  [&lt;ffffffffa04f5531&gt;] alua_check+0xe1/0x220 [scsi_dh_alua]
  [&lt;ffffffffa04f5709&gt;] alua_check_sense+0x99/0xb0 [scsi_dh_alua]
  [&lt;ffffffff813f0d01&gt;] scsi_check_sense+0x71/0x3f0
  [&lt;ffffffff813f2f8b&gt;] scsi_decide_disposition+0x18b/0x1d0
  [&lt;ffffffff813f6e52&gt;] scsi_softirq_done+0x52/0x140
  [&lt;ffffffff812a26f2&gt;] blk_done_softirq+0x52/0x90
  [&lt;ffffffff8105bc1f&gt;] __do_softirq+0x10f/0x230
  [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0
  [&lt;ffffffff8101a675&gt;] do_IRQ+0x65/0x110
  [&lt;ffffffff8159a2c9&gt;] ret_from_intr+0x0/0x19
  [&lt;ffffffff811732f1&gt;] kmem_cache_alloc+0x151/0x190
  [&lt;ffffffff8118e534&gt;] create_object+0x34/0x2d0
  [&lt;ffffffff8158eaa6&gt;] kmemleak_alloc_percpu+0x56/0xd0
  [&lt;ffffffff8113ab0d&gt;] pcpu_alloc+0x38d/0x660
  [&lt;ffffffff8113aded&gt;] __alloc_percpu_gfp+0xd/0x10
  [&lt;ffffffff812e56a5&gt;] __percpu_counter_init+0x55/0xb0
  [&lt;ffffffff812b4989&gt;] blkg_alloc+0x79/0x230
  [&lt;ffffffff812b6756&gt;] blkcg_init_queue+0x26/0x1d0
  [&lt;ffffffff81297eed&gt;] blk_alloc_queue_node+0x27d/0x2e0
  [&lt;ffffffffa017766c&gt;] dm_create+0x20c/0x570 [dm_mod]
  [&lt;ffffffffa017e356&gt;] dev_create+0x56/0x2c0 [dm_mod]
  [&lt;ffffffffa017dcae&gt;] ctl_ioctl+0x26e/0x520 [dm_mod]
  [&lt;ffffffffa017df6e&gt;] dm_ctl_ioctl+0xe/0x20 [dm_mod]
  [&lt;ffffffff811aa8ee&gt;] do_vfs_ioctl+0x8e/0x660
  [&lt;ffffffff811aaefc&gt;] SyS_ioctl+0x3c/0x70
  [&lt;ffffffff81599929&gt;] entry_SYSCALL_64_fastpath+0x1c/0xac
irq event stamp: 4290931
hardirqs last  enabled at (4290931): [ 1662.892772]
[&lt;ffffffff81599341&gt;] _raw_spin_unlock_irqrestore+0x31/0x50
hardirqs last disabled at (4290930): [&lt;ffffffff815990e7&gt;] _raw_spin_lock_irqsave+0x17/0x60
softirqs last  enabled at (4290774): [&lt;ffffffff8105bcdb&gt;] __do_softirq+0x1cb/0x230
softirqs last disabled at (4289831): [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0

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

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

 *** DEADLOCK ***

2 locks held by multipathd/484:
 #0:  (&amp;bdev-&gt;bd_mutex){+.+.+.}, at: [&lt;ffffffff811d1cc3&gt;] __blkdev_put+0x33/0x360
 #1:  (sd_ref_mutex){+.+...}, at: [&lt;ffffffff81400afc&gt;] scsi_disk_put+0x1c/0x40

stack backtrace:
CPU: 6 PID: 484 Comm: multipathd Tainted: G           O    4.6.0-rc0-dbg+ #2
Call Trace:
 [&lt;ffffffff812bd115&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff810a5175&gt;] print_usage_bug+0x215/0x240
 [&lt;ffffffff810a56ea&gt;] mark_lock+0x54a/0x610
 [&lt;ffffffff810a6505&gt;] __lock_acquire+0x845/0x1ad0
 [&lt;ffffffff810a7fd0&gt;] lock_acquire+0x60/0x80
 [&lt;ffffffff81598f23&gt;] _raw_spin_lock+0x33/0x50
 [&lt;ffffffffa04f50a2&gt;] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
 [&lt;ffffffff813ff6f7&gt;] scsi_dh_release_device+0x17/0x50
 [&lt;ffffffff813fb8da&gt;] scsi_device_dev_release_usercontext+0x2a/0x120
 [&lt;ffffffff810701f0&gt;] execute_in_process_context+0x80/0x90
 [&lt;ffffffff813fb8a7&gt;] scsi_device_dev_release+0x17/0x20
 [&lt;ffffffff813c8cfd&gt;] device_release+0x2d/0x90
 [&lt;ffffffff812bfa8a&gt;] kobject_release+0x7a/0x190
 [&lt;ffffffff812bf946&gt;] kobject_put+0x26/0x50
 [&lt;ffffffff813c8ee2&gt;] put_device+0x12/0x20
 [&lt;ffffffff813edc86&gt;] scsi_device_put+0x26/0x30
 [&lt;ffffffff81400b0d&gt;] scsi_disk_put+0x2d/0x40
 [&lt;ffffffff81400b68&gt;] sd_release+0x48/0xb0
 [&lt;ffffffff811d1f2e&gt;] __blkdev_put+0x29e/0x360
 [&lt;ffffffff811d24b9&gt;] blkdev_put+0x49/0x170
 [&lt;ffffffff811d2600&gt;] blkdev_close+0x20/0x30
 [&lt;ffffffff81198f48&gt;] __fput+0xe8/0x1f0
 [&lt;ffffffff81199089&gt;] ____fput+0x9/0x10
 [&lt;ffffffff81075d9e&gt;] task_work_run+0x6e/0xa0
 [&lt;ffffffff81001119&gt;] exit_to_usermode_loop+0xa9/0xb0
 [&lt;ffffffff81001590&gt;] syscall_return_slowpath+0xb0/0xc0
 [&lt;ffffffff815999b7&gt;] entry_SYSCALL_64_fastpath+0xaa/0xac

Fixes: cb0a168cb6b8 (scsi_dh_alua: update 'access_state' field)
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While retesting the SRP initiator I ran the command "rmmod mlx4_ib"
while I/O was in progress. That command triggers SCSI device removal
indirectly. Avoid that this action triggers the following deadlock:

=================================
[ INFO: inconsistent lock state ]
4.6.0-rc0-dbg+ #2 Tainted: G           O
---------------------------------
inconsistent {IN-SOFTIRQ-W} -&gt; {SOFTIRQ-ON-W} usage.
multipathd/484 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;(&amp;pg-&gt;lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa04f50a2&gt;] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
{IN-SOFTIRQ-W} state was registered at:
  [&lt;ffffffff810a64a9&gt;] __lock_acquire+0x7e9/0x1ad0
  [&lt;ffffffff810a7fd0&gt;] lock_acquire+0x60/0x80
  [&lt;ffffffff8159910e&gt;] _raw_spin_lock_irqsave+0x3e/0x60
  [&lt;ffffffffa04f5131&gt;] alua_rtpg_queue+0x41/0x1d0 [scsi_dh_alua]
  [&lt;ffffffffa04f5531&gt;] alua_check+0xe1/0x220 [scsi_dh_alua]
  [&lt;ffffffffa04f5709&gt;] alua_check_sense+0x99/0xb0 [scsi_dh_alua]
  [&lt;ffffffff813f0d01&gt;] scsi_check_sense+0x71/0x3f0
  [&lt;ffffffff813f2f8b&gt;] scsi_decide_disposition+0x18b/0x1d0
  [&lt;ffffffff813f6e52&gt;] scsi_softirq_done+0x52/0x140
  [&lt;ffffffff812a26f2&gt;] blk_done_softirq+0x52/0x90
  [&lt;ffffffff8105bc1f&gt;] __do_softirq+0x10f/0x230
  [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0
  [&lt;ffffffff8101a675&gt;] do_IRQ+0x65/0x110
  [&lt;ffffffff8159a2c9&gt;] ret_from_intr+0x0/0x19
  [&lt;ffffffff811732f1&gt;] kmem_cache_alloc+0x151/0x190
  [&lt;ffffffff8118e534&gt;] create_object+0x34/0x2d0
  [&lt;ffffffff8158eaa6&gt;] kmemleak_alloc_percpu+0x56/0xd0
  [&lt;ffffffff8113ab0d&gt;] pcpu_alloc+0x38d/0x660
  [&lt;ffffffff8113aded&gt;] __alloc_percpu_gfp+0xd/0x10
  [&lt;ffffffff812e56a5&gt;] __percpu_counter_init+0x55/0xb0
  [&lt;ffffffff812b4989&gt;] blkg_alloc+0x79/0x230
  [&lt;ffffffff812b6756&gt;] blkcg_init_queue+0x26/0x1d0
  [&lt;ffffffff81297eed&gt;] blk_alloc_queue_node+0x27d/0x2e0
  [&lt;ffffffffa017766c&gt;] dm_create+0x20c/0x570 [dm_mod]
  [&lt;ffffffffa017e356&gt;] dev_create+0x56/0x2c0 [dm_mod]
  [&lt;ffffffffa017dcae&gt;] ctl_ioctl+0x26e/0x520 [dm_mod]
  [&lt;ffffffffa017df6e&gt;] dm_ctl_ioctl+0xe/0x20 [dm_mod]
  [&lt;ffffffff811aa8ee&gt;] do_vfs_ioctl+0x8e/0x660
  [&lt;ffffffff811aaefc&gt;] SyS_ioctl+0x3c/0x70
  [&lt;ffffffff81599929&gt;] entry_SYSCALL_64_fastpath+0x1c/0xac
irq event stamp: 4290931
hardirqs last  enabled at (4290931): [ 1662.892772]
[&lt;ffffffff81599341&gt;] _raw_spin_unlock_irqrestore+0x31/0x50
hardirqs last disabled at (4290930): [&lt;ffffffff815990e7&gt;] _raw_spin_lock_irqsave+0x17/0x60
softirqs last  enabled at (4290774): [&lt;ffffffff8105bcdb&gt;] __do_softirq+0x1cb/0x230
softirqs last disabled at (4289831): [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0

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

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

 *** DEADLOCK ***

2 locks held by multipathd/484:
 #0:  (&amp;bdev-&gt;bd_mutex){+.+.+.}, at: [&lt;ffffffff811d1cc3&gt;] __blkdev_put+0x33/0x360
 #1:  (sd_ref_mutex){+.+...}, at: [&lt;ffffffff81400afc&gt;] scsi_disk_put+0x1c/0x40

stack backtrace:
CPU: 6 PID: 484 Comm: multipathd Tainted: G           O    4.6.0-rc0-dbg+ #2
Call Trace:
 [&lt;ffffffff812bd115&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff810a5175&gt;] print_usage_bug+0x215/0x240
 [&lt;ffffffff810a56ea&gt;] mark_lock+0x54a/0x610
 [&lt;ffffffff810a6505&gt;] __lock_acquire+0x845/0x1ad0
 [&lt;ffffffff810a7fd0&gt;] lock_acquire+0x60/0x80
 [&lt;ffffffff81598f23&gt;] _raw_spin_lock+0x33/0x50
 [&lt;ffffffffa04f50a2&gt;] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
 [&lt;ffffffff813ff6f7&gt;] scsi_dh_release_device+0x17/0x50
 [&lt;ffffffff813fb8da&gt;] scsi_device_dev_release_usercontext+0x2a/0x120
 [&lt;ffffffff810701f0&gt;] execute_in_process_context+0x80/0x90
 [&lt;ffffffff813fb8a7&gt;] scsi_device_dev_release+0x17/0x20
 [&lt;ffffffff813c8cfd&gt;] device_release+0x2d/0x90
 [&lt;ffffffff812bfa8a&gt;] kobject_release+0x7a/0x190
 [&lt;ffffffff812bf946&gt;] kobject_put+0x26/0x50
 [&lt;ffffffff813c8ee2&gt;] put_device+0x12/0x20
 [&lt;ffffffff813edc86&gt;] scsi_device_put+0x26/0x30
 [&lt;ffffffff81400b0d&gt;] scsi_disk_put+0x2d/0x40
 [&lt;ffffffff81400b68&gt;] sd_release+0x48/0xb0
 [&lt;ffffffff811d1f2e&gt;] __blkdev_put+0x29e/0x360
 [&lt;ffffffff811d24b9&gt;] blkdev_put+0x49/0x170
 [&lt;ffffffff811d2600&gt;] blkdev_close+0x20/0x30
 [&lt;ffffffff81198f48&gt;] __fput+0xe8/0x1f0
 [&lt;ffffffff81199089&gt;] ____fput+0x9/0x10
 [&lt;ffffffff81075d9e&gt;] task_work_run+0x6e/0xa0
 [&lt;ffffffff81001119&gt;] exit_to_usermode_loop+0xa9/0xb0
 [&lt;ffffffff81001590&gt;] syscall_return_slowpath+0xb0/0xc0
 [&lt;ffffffff815999b7&gt;] entry_SYSCALL_64_fastpath+0xaa/0xac

Fixes: cb0a168cb6b8 (scsi_dh_alua: update 'access_state' field)
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Declare local symbols static</title>
<updated>2016-03-30T00:29:55+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-03-28T18:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d78540dae77fd18e2eba57e5dc7021953f9506f4'/>
<id>d78540dae77fd18e2eba57e5dc7021953f9506f4</id>
<content type='text'>
Avoid that building with W=1 causes gcc to report warnings about symbols
that have not been declared.

Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid that building with W=1 causes gcc to report warnings about symbols
that have not been declared.

Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cxlflash: Move to exponential back-off when cmd_room is not available</title>
<updated>2016-03-29T00:43:34+00:00</updated>
<author>
<name>Manoj N. Kumar</name>
<email>manoj@linux.vnet.ibm.com</email>
</author>
<published>2016-03-25T19:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ea76543127da32dec28af0a13ea1b06625fc085e'/>
<id>ea76543127da32dec28af0a13ea1b06625fc085e</id>
<content type='text'>
While profiling the cxlflash_queuecommand() path under a heavy load it
was found that number of retries to find cmd_room was fairly high.

There are two problems with the current back-off:
a) It starts with a udelay of 0
b) It backs-off linearly

Tried several approaches (a higher multiple 10*n, 100*n, as well as n^2,
2^n) and found that the exponential back-off(2^n) approach had the least
overall cost. Cost as being defined as overall time spent waiting.

The fix is to change the linear back-off to an exponential back-off.
This solution also takes care of the problem with the initial
delay (starts with 1 usec).

Signed-off-by: Manoj N. Kumar &lt;manoj@linux.vnet.ibm.com&gt;
Acked-by: Matthew R. Ochs &lt;mrochs@linux.vnet.ibm.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Uma Krishnan &lt;ukrishn@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While profiling the cxlflash_queuecommand() path under a heavy load it
was found that number of retries to find cmd_room was fairly high.

There are two problems with the current back-off:
a) It starts with a udelay of 0
b) It backs-off linearly

Tried several approaches (a higher multiple 10*n, 100*n, as well as n^2,
2^n) and found that the exponential back-off(2^n) approach had the least
overall cost. Cost as being defined as overall time spent waiting.

The fix is to change the linear back-off to an exponential back-off.
This solution also takes care of the problem with the initial
delay (starts with 1 usec).

Signed-off-by: Manoj N. Kumar &lt;manoj@linux.vnet.ibm.com&gt;
Acked-by: Matthew R. Ochs &lt;mrochs@linux.vnet.ibm.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Uma Krishnan &lt;ukrishn@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cxlflash: Fix regression issue with re-ordering patch</title>
<updated>2016-03-29T00:43:17+00:00</updated>
<author>
<name>Manoj N. Kumar</name>
<email>manoj@linux.vnet.ibm.com</email>
</author>
<published>2016-03-25T19:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9526f36026f778e82b5175249443854c03b2e660'/>
<id>9526f36026f778e82b5175249443854c03b2e660</id>
<content type='text'>
While running 'sg_reset -H' back to back the following exception was seen:

[  735.115695] Faulting instruction address: 0xd0000000098c0864
cpu 0x0: Vector: 300 (Data Access) at [c000000ffffafa80]
    pc: d0000000098c0864: cxlflash_async_err_irq+0x84/0x5c0 [cxlflash]
    lr: c00000000013aed0: handle_irq_event_percpu+0xa0/0x310
    sp: c000000ffffafd00
   msr: 9000000000009033
   dar: 2010000
 dsisr: 40000000
  current = 0xc000000001510880
  paca    = 0xc00000000fb80000   softe: 0        irq_happened: 0x01
    pid   = 0, comm = swapper/0

Linux version 4.5.0-491-26f710d+

enter ? for help
[c000000ffffafe10] c00000000013aed0 handle_irq_event_percpu+0xa0/0x310
[c000000ffffafed0] c00000000013b1a8 handle_irq_event+0x68/0xc0
[c000000ffffaff00] c0000000001404ec handle_fasteoi_irq+0xec/0x2a0
[c000000ffffaff30] c00000000013a084 generic_handle_irq+0x54/0x80
[c000000ffffaff60] c000000000011130 __do_irq+0x80/0x1d0
[c000000ffffaff90] c000000000024d40 call_do_irq+0x14/0x24
[c000000001573a20] c000000000011318 do_IRQ+0x98/0x140
[c000000001573a70] c000000000002594 hardware_interrupt_common+0x114/0x180

This exception is being hit because the async_err interrupt path performs
an MMIO to read the interrupt status register. The MMIO region in this
case is not available.

Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching
master context") re-ordered the sequence in which term_mc() and stop_afu()
are called. This introduces a window for interrupts to come in with the
problem space area unmapped, that did not exist previously.

The fix is to separate the disabling of all AFU interrupts to a distinct
function, term_intr() so that it is the first thing that is done in the
tear down process.

To keep the initialization process symmetric, separate the AFU interrupt
setup also to a distinct function: init_intr().

Fixes: 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context")
Signed-off-by: Manoj N. Kumar &lt;manoj@linux.vnet.ibm.com&gt;
Acked-by: Matthew R. Ochs &lt;mrochs@linux.vnet.ibm.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Uma Krishnan &lt;ukrishn@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While running 'sg_reset -H' back to back the following exception was seen:

[  735.115695] Faulting instruction address: 0xd0000000098c0864
cpu 0x0: Vector: 300 (Data Access) at [c000000ffffafa80]
    pc: d0000000098c0864: cxlflash_async_err_irq+0x84/0x5c0 [cxlflash]
    lr: c00000000013aed0: handle_irq_event_percpu+0xa0/0x310
    sp: c000000ffffafd00
   msr: 9000000000009033
   dar: 2010000
 dsisr: 40000000
  current = 0xc000000001510880
  paca    = 0xc00000000fb80000   softe: 0        irq_happened: 0x01
    pid   = 0, comm = swapper/0

Linux version 4.5.0-491-26f710d+

enter ? for help
[c000000ffffafe10] c00000000013aed0 handle_irq_event_percpu+0xa0/0x310
[c000000ffffafed0] c00000000013b1a8 handle_irq_event+0x68/0xc0
[c000000ffffaff00] c0000000001404ec handle_fasteoi_irq+0xec/0x2a0
[c000000ffffaff30] c00000000013a084 generic_handle_irq+0x54/0x80
[c000000ffffaff60] c000000000011130 __do_irq+0x80/0x1d0
[c000000ffffaff90] c000000000024d40 call_do_irq+0x14/0x24
[c000000001573a20] c000000000011318 do_IRQ+0x98/0x140
[c000000001573a70] c000000000002594 hardware_interrupt_common+0x114/0x180

This exception is being hit because the async_err interrupt path performs
an MMIO to read the interrupt status register. The MMIO region in this
case is not available.

Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching
master context") re-ordered the sequence in which term_mc() and stop_afu()
are called. This introduces a window for interrupts to come in with the
problem space area unmapped, that did not exist previously.

The fix is to separate the disabling of all AFU interrupts to a distinct
function, term_intr() so that it is the first thing that is done in the
tear down process.

To keep the initialization process symmetric, separate the AFU interrupt
setup also to a distinct function: init_intr().

Fixes: 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context")
Signed-off-by: Manoj N. Kumar &lt;manoj@linux.vnet.ibm.com&gt;
Acked-by: Matthew R. Ochs &lt;mrochs@linux.vnet.ibm.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Uma Krishnan &lt;ukrishn@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2016-03-26T18:31:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-26T18:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=895a1067d5b83065afbad3bb02c3c464b71f1b3f'/>
<id>895a1067d5b83065afbad3bb02c3c464b71f1b3f</id>
<content type='text'>
Pull more SCSI updates from James Bottomley:
 "The only new stuff which missed the first pull request is an update to
  the UFS driver.

  The rest is an assortment of bug fixes and minor tweaks which appeared
  recently (some are fixes for recent code and some are stuff spotted
  recently by the checkers or the new gcc-6 compiler [most of Arnd's
  stuff])"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
  scsi_common: do not clobber fixed sense information
  scsi: ufs: select CONFIG_NLS
  scsi: fc: use get/put_unaligned64 for wwn access
  fnic: move printk()s outside of the critical code section.
  qla2xxx: avoid maybe_uninitialized warning
  megaraid_sas: add missing curly braces in ioctl handler
  lpfc: fix misleading indentation
  scsi_transport_sas: add 'scsi_target_id' sysfs attribute
  scsi_dh_alua: uninitialized variable in alua_check_vpd()
  scsi: ufs-qcom: add printouts of testbus debug registers
  scsi: ufs-qcom: enable/disable the device ref clock
  scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup
  scsi: ufs: add device quirk delay before putting UFS rails in LPM
  scsi: ufs: fix leakage during link off state
  scsi: ufs: tune UniPro parameters to optimize hibern8 exit time
  scsi: ufs: handle non spec compliant bkops behaviour by device
  scsi: ufs: add retry for query descriptors
  scsi: ufs: add error recovery after DL NAC error
  scsi: ufs: make error handling bit faster
  scsi: ufs: disable vccq if it's not needed by UFS device
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull more SCSI updates from James Bottomley:
 "The only new stuff which missed the first pull request is an update to
  the UFS driver.

  The rest is an assortment of bug fixes and minor tweaks which appeared
  recently (some are fixes for recent code and some are stuff spotted
  recently by the checkers or the new gcc-6 compiler [most of Arnd's
  stuff])"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
  scsi_common: do not clobber fixed sense information
  scsi: ufs: select CONFIG_NLS
  scsi: fc: use get/put_unaligned64 for wwn access
  fnic: move printk()s outside of the critical code section.
  qla2xxx: avoid maybe_uninitialized warning
  megaraid_sas: add missing curly braces in ioctl handler
  lpfc: fix misleading indentation
  scsi_transport_sas: add 'scsi_target_id' sysfs attribute
  scsi_dh_alua: uninitialized variable in alua_check_vpd()
  scsi: ufs-qcom: add printouts of testbus debug registers
  scsi: ufs-qcom: enable/disable the device ref clock
  scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup
  scsi: ufs: add device quirk delay before putting UFS rails in LPM
  scsi: ufs: fix leakage during link off state
  scsi: ufs: tune UniPro parameters to optimize hibern8 exit time
  scsi: ufs: handle non spec compliant bkops behaviour by device
  scsi: ufs: add retry for query descriptors
  scsi: ufs: add error recovery after DL NAC error
  scsi: ufs: make error handling bit faster
  scsi: ufs: disable vccq if it's not needed by UFS device
  ...
</pre>
</div>
</content>
</entry>
</feed>
