<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-08T20:04:41Z</updated>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2016-12-08T20:04:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-08T20:04:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4aafe77ec65ab2846a5780bb1ba4eff7ccf82d1'/>
<id>urn:sha1:b4aafe77ec65ab2846a5780bb1ba4eff7ccf82d1</id>
<content type='text'>
Pull SCSI fix from James Bottomley:
 "One small fix for a regression in a prior fix (again).

  This time the condition in the prior fix BUG_ON proved to be wrong
  under certain circumstances causing a BUG to trigger where it
  shouldn't in the lpfc driver"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put()
</content>
</entry>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2016-11-29T19:15:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-11-29T19:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab59d1f4b66540d2b9c4a15b377d6c9e6ffd1103'/>
<id>urn:sha1:ab59d1f4b66540d2b9c4a15b377d6c9e6ffd1103</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "Four small fixes.

  The be2iscsi is a potential device overrun in consistent memory, which
  could have nasty consequences if the consistent allocations are
  packed.

  The hpsa one fixes a regression where older controllers can now get a
  numbering clash between the first internal disk and the controller.

  The libfc one is a regression in timespec conversions which causes a
  user visible issue in a command line tool and the mpt3sas one fixes a
  regression where the controller could remain permanently blocked after
  an ATA pass through command followed by a reset"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo()
  scsi: mpt3sas: Unblock device after controller reset
  scsi: hpsa: use bus '3' for legacy HBA devices
  scsi: libfc: fix seconds_since_last_reset miscalculation
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes</title>
<updated>2016-11-29T18:57:03Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-11-29T18:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff682a3dad98074f956e6da099448d3eb93f095c'/>
<id>urn:sha1:ff682a3dad98074f956e6da099448d3eb93f095c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata</title>
<updated>2016-11-28T22:17:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-11-28T22:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88abd8249ee8bcebb98c90e890ea5e342db832af'/>
<id>urn:sha1:88abd8249ee8bcebb98c90e890ea5e342db832af</id>
<content type='text'>
Pull libata fixes from Tejun Heo:
 "The recent changes in ahci MSI handling need one more fix.  Hopefully,
  this restores parity with before.

  The other two are minor fixes with both low impact and risk"

* 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ahci: always fall back to single-MSI mode
  libata-scsi: Fixup ata_gen_passthru_sense()
  mvsas: fix error return code in mvs_task_prep()
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc</title>
<updated>2016-11-28T21:53:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-11-28T21:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96e52d3ac88780d60ca74bb96301369b7e0c5867'/>
<id>urn:sha1:96e52d3ac88780d60ca74bb96301369b7e0c5867</id>
<content type='text'>
Pull sparc fixes from David Miller:
 "Two ugly build warning fixes"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  dbri: Fix compiler warning
  qlogicpti: Fix compiler warnings
</content>
</entry>
<entry>
<title>qlogicpti: Fix compiler warnings</title>
<updated>2016-11-28T20:51:31Z</updated>
<author>
<name>Tushar Dave</name>
<email>tushar.n.dave@oracle.com</email>
</author>
<published>2016-11-24T02:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e58566b1b17fef5c4590e652a337afe66277131a'/>
<id>urn:sha1:e58566b1b17fef5c4590e652a337afe66277131a</id>
<content type='text'>
qlogicpti uses '__u32' for dma handle while invoking kernel DMA APIs,
instead of using dma_addr_t. This hasn't caused any 'incompatible
pointer type' warning on SPARC because until now dma_addr_t is of
type u32. However, recent changes in SPARC ATU (iommu) enabled 64bit
DMA and therefore dma_addr_t became of type u64. This makes
'incompatible pointer type' warnings inevitable.

e.g.
drivers/scsi/qlogicpti.c: In function ‘qpti_map_queues’:
drivers/scsi/qlogicpti.c:813: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type
./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’
drivers/scsi/qlogicpti.c:822: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type
./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’

For the record, qlogicpti never executes on sun4v. Therefore even
though 64bit DMA is enabled on SPARC, qlogicpti continues to use
legacy iommu that guarantees DMA address is always in 32bit range.

This patch resolves aforementioned compiler warnings.

Signed-off-by: Tushar Dave &lt;tushar.n.dave@oracle.com&gt;
Reviewed-by: thomas tai &lt;thomas.tai@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>scsi: lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put()</title>
<updated>2016-11-25T14:58:34Z</updated>
<author>
<name>Mauricio Faria de Oliveira</name>
<email>mauricfo@linux.vnet.ibm.com</email>
</author>
<published>2016-11-23T12:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2319f847a8910cff1d46c9b66aa1dd7cc3e836a9'/>
<id>urn:sha1:2319f847a8910cff1d46c9b66aa1dd7cc3e836a9</id>
<content type='text'>
The BUG_ON() recently introduced in lpfc_sli_ringtxcmpl_put() is hit in
the lpfc_els_abort() &gt; lpfc_sli_issue_abort_iotag() &gt;
lpfc_sli_abort_iotag_issue() function path [similar names], due to
'piocb-&gt;vport == NULL':

	BUG_ON(!piocb || !piocb-&gt;vport);

This happens because lpfc_sli_abort_iotag_issue() doesn't set the
'abtsiocbp-&gt;vport' pointer -- but this is not the problem.

Previously, lpfc_sli_ringtxcmpl_put() accessed 'piocb-&gt;vport' only if
'piocb-&gt;iocb.ulpCommand' is neither CMD_ABORT_XRI_CN nor
CMD_CLOSE_XRI_CN, which are the only possible values for
lpfc_sli_abort_iotag_issue():

    lpfc_sli_ringtxcmpl_put():

        if ((unlikely(pring-&gt;ringno == LPFC_ELS_RING)) &amp;&amp;
           (piocb-&gt;iocb.ulpCommand != CMD_ABORT_XRI_CN) &amp;&amp;
           (piocb-&gt;iocb.ulpCommand != CMD_CLOSE_XRI_CN) &amp;&amp;
            (!(piocb-&gt;vport-&gt;load_flag &amp; FC_UNLOADING)))

    lpfc_sli_abort_iotag_issue():

        if (phba-&gt;link_state &gt;= LPFC_LINK_UP)
                iabt-&gt;ulpCommand = CMD_ABORT_XRI_CN;
        else
                iabt-&gt;ulpCommand = CMD_CLOSE_XRI_CN;

So, this function path would not have hit this possible NULL pointer
dereference before.

In order to fix this regression, move the second part of the BUG_ON()
check prior to the pointer dereference that it does check for.

For reference, this is the stack trace observed. The problem happened
because an unsolicited event was received - a PLOGI was received after
our PLOGI was issued but not yet complete, so the discovery state
machine goes on to sw-abort our PLOGI.

    kernel BUG at drivers/scsi/lpfc/lpfc_sli.c:1326!
    Oops: Exception in kernel mode, sig: 5 [#1]
    &lt;...&gt;
    NIP [...] lpfc_sli_ringtxcmpl_put+0x1c/0xf0 [lpfc]
    LR  [...] __lpfc_sli_issue_iocb_s4+0x188/0x200 [lpfc]
    Call Trace:
    [...] [...] __lpfc_sli_issue_iocb_s4+0xb0/0x200 [lpfc] (unreliable)
    [...] [...] lpfc_sli_issue_abort_iotag+0x2b4/0x350 [lpfc]
    [...] [...] lpfc_els_abort+0x1a8/0x4a0 [lpfc]
    [...] [...] lpfc_rcv_plogi+0x6d4/0x700 [lpfc]
    [...] [...] lpfc_rcv_plogi_plogi_issue+0xd8/0x1d0 [lpfc]
    [...] [...] lpfc_disc_state_machine+0xc0/0x2b0 [lpfc]
    [...] [...] lpfc_els_unsol_buffer+0xcc0/0x26c0 [lpfc]
    [...] [...] lpfc_els_unsol_event+0xa8/0x220 [lpfc]
    [...] [...] lpfc_complete_unsol_iocb+0xb8/0x138 [lpfc]
    [...] [...] lpfc_sli4_handle_received_buffer+0x6a0/0xec0 [lpfc]
    [...] [...] lpfc_sli_handle_slow_ring_event_s4+0x1c4/0x240 [lpfc]
    [...] [...] lpfc_sli_handle_slow_ring_event+0x24/0x40 [lpfc]
    [...] [...] lpfc_do_work+0xd88/0x1970 [lpfc]
    [...] [...] kthread+0x108/0x130
    [...] [...] ret_from_kernel_thread+0x5c/0xbc
    &lt;...&gt;

Cc: stable@vger.kernel.org # v4.8
Fixes: 22466da5b4b7 ("lpfc: Fix possible NULL pointer dereference")
Reported-by: Harsha Thyagaraja &lt;hathyaga@in.ibm.com&gt;
Signed-off-by: Mauricio Faria de Oliveira &lt;mauricfo@linux.vnet.ibm.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes</title>
<updated>2016-11-22T22:27:06Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-11-22T22:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c65c945c31d071d1f8cd2c35541a6cdf80b5f835'/>
<id>urn:sha1:c65c945c31d071d1f8cd2c35541a6cdf80b5f835</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo()</title>
<updated>2016-11-22T22:18:09Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-11-18T11:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23b98e4b5fc5efd1d5d5f018bc7f954cd119f538'/>
<id>urn:sha1:23b98e4b5fc5efd1d5d5f018bc7f954cd119f538</id>
<content type='text'>
We accidentally allocate sizeof(u32) instead of sizeof(struct
be_cmd_get_session_resp).

Fixes: 50a4b824be9e ("scsi: be2iscsi: Fix to make boot discovery non-blocking")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed by: Jitendra Bhivare &lt;jitendra.bhivare@broadcom.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mpt3sas: Unblock device after controller reset</title>
<updated>2016-11-22T22:18:08Z</updated>
<author>
<name>Suganath Prabu S</name>
<email>suganath-prabu.subramani@broadcom.com</email>
</author>
<published>2016-11-17T10:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ff723ad0f87feba43dda45fdae71206063dd7d4'/>
<id>urn:sha1:7ff723ad0f87feba43dda45fdae71206063dd7d4</id>
<content type='text'>
While issuing any ATA passthrough command to firmware the driver will
block the device. But it will unblock the device only if the I/O
completes through the ISR path. If a controller reset occurs before
command completion the device will remain in blocked state.

Make sure we unblock the device following a controller reset if an ATA
passthrough command was queued.

[mkp: clarified patch description]

Cc: &lt;stable@vger.kernel.org&gt; # v4.4+
Fixes: ac6c2a93bd07 ("mpt3sas: Fix for SATA drive in blocked state, after diag reset")
Signed-off-by: Suganath Prabu S &lt;suganath-prabu.subramani@broadcom.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
