<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-op-linux/drivers/scsi/fnic, branch master</title>
<subtitle>Blackbird™ Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/'/>
<updated>2020-01-21T04:58:14+00:00</updated>
<entry>
<title>scsi: fnic: do not queue commands during fwreset</title>
<updated>2020-01-21T04:58:14+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2020-01-16T10:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=0e2209629fec427ba75a6351486153a9feddd36b'/>
<id>urn:sha1:0e2209629fec427ba75a6351486153a9feddd36b</id>
<content type='text'>
When a link is going down the driver will be calling fnic_cleanup_io(),
which will traverse all commands and calling 'done' for each found command.
While the traversal is handled under the host_lock, calling 'done' happens
after the host_lock is being dropped.

As fnic_queuecommand_lck() is being called with the host_lock held, it
might well be that it will pick the command being selected for abortion
from the above routine and enqueue it for sending, but then 'done' is being
called on that very command from the above routine.

Which of course confuses the hell out of the scsi midlayer.

So fix this by not queueing commands when fnic_cleanup_io is active.

Link: https://lore.kernel.org/r/20200116102053.62755-1-hare@suse.de
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: fix invalid stack access</title>
<updated>2020-01-16T03:59:59+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-01-07T20:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=42ec15ceaea74b5f7a621fc6686cbf69ca66c4cf'/>
<id>urn:sha1:42ec15ceaea74b5f7a621fc6686cbf69ca66c4cf</id>
<content type='text'>
gcc -O3 warns that some local variables are not properly initialized:

drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_hang_notify':
drivers/scsi/fnic/vnic_dev.c:511:16: error: 'a0' is used uninitialized in this function [-Werror=uninitialized]
  vdev-&gt;args[0] = *a0;
  ~~~~~~~~~~~~~~^~~~~
drivers/scsi/fnic/vnic_dev.c:691:6: note: 'a0' was declared here
  u64 a0, a1;
      ^~
drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized]
  vdev-&gt;args[1] = *a1;
  ~~~~~~~~~~~~~~^~~~~
drivers/scsi/fnic/vnic_dev.c:691:10: note: 'a1' was declared here
  u64 a0, a1;
          ^~
drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_mac_addr':
drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized]
  vdev-&gt;args[1] = *a1;
  ~~~~~~~~~~~~~~^~~~~
drivers/scsi/fnic/vnic_dev.c:698:10: note: 'a1' was declared here
  u64 a0, a1;
          ^~

Apparently the code relies on the local variables occupying adjacent memory
locations in the same order, but this is of course not guaranteed.

Use an array of two u64 variables where needed to make it work correctly.

I suspect there is also an endianness bug here, but have not digged in deep
enough to be sure.

Fixes: 5df6d737dd4b ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA")
Fixes: mmtom ("init/Kconfig: enable -O3 for all arches")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200107201602.4096790-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: fix use after free</title>
<updated>2019-11-06T05:04:02+00:00</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2019-11-04T15:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=ec990306f77fd4c58c3b27cc3b3c53032d6e6670'/>
<id>urn:sha1:ec990306f77fd4c58c3b27cc3b3c53032d6e6670</id>
<content type='text'>
The memory chunk io_req is released by mempool_free. Accessing
io_req-&gt;start_time will result in a use after free bug. The variable
start_time is a backup of the timestamp. So, use start_time here to
avoid use after free.

Link: https://lore.kernel.org/r/1572881182-37664-1-git-send-email-bianpan2016@163.com
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Satish Kharat &lt;satishkh@cisco.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: make array dev_cmd_err static const, makes object smaller</title>
<updated>2019-10-01T02:45:36+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-09-06T16:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=b23c640c33b8ab10060b8d243d1aa817e5eb00dc'/>
<id>urn:sha1:b23c640c33b8ab10060b8d243d1aa817e5eb00dc</id>
<content type='text'>
Don't populate the array dev_cmd_err on the stack but instead make it
static const. Makes the object code smaller by 80 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  21461	   1564	      0	  23025	   59f1	drivers/scsi/fnic/vnic_dev.o

After:
   text	   data	    bss	    dec	    hex	filename
  21318	   1628	      0	  22946	   59a2	drivers/scsi/fnic/vnic_dev.o

(gcc version 9.2.1, amd64)

Link: https://lore.kernel.org/r/20190906163945.3889-1-colin.king@canonical.com
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: fix msix interrupt allocation</title>
<updated>2019-09-07T19:29:12+00:00</updated>
<author>
<name>Govindarajulu Varadarajan</name>
<email>gvaradar@cisco.com</email>
</author>
<published>2019-08-27T21:13:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=3ec24fb4c035e9cbb2f02a48640a09aa913442a2'/>
<id>urn:sha1:3ec24fb4c035e9cbb2f02a48640a09aa913442a2</id>
<content type='text'>
pci_alloc_irq_vectors() returns number of vectors allocated.  Fix the check
for error condition.

Fixes: cca678dfbad49 ("scsi: fnic: switch to pci_alloc_irq_vectors")
Link: https://lore.kernel.org/r/20190827211340.1095-1-gvaradar@cisco.com
Signed-off-by: Govindarajulu Varadarajan &lt;gvaradar@cisco.com&gt;
Acked-by: Satish Kharat &lt;satishkh@cisco.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: print port speed only at driver init or speed change</title>
<updated>2019-08-30T07:32:35+00:00</updated>
<author>
<name>John Pittman</name>
<email>jpittman@redhat.com</email>
</author>
<published>2019-08-23T14:08:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=90302e95a4e185ee0ef5c2e78cf6112149c74908'/>
<id>urn:sha1:90302e95a4e185ee0ef5c2e78cf6112149c74908</id>
<content type='text'>
Port speed printing was added by commit d948e6383ec3 ("scsi: fnic: Add port
speed stat to fnic debug stats"). As currently configured, this will cause
the port speed to be printed to syslog every 2 seconds. To prevent log
spamming, only print the vnic port speed at driver initialization and if
the speed changes. Also clean up a small typo in fnic_trace.c.

Fixes: d948e6383ec3 ("scsi: fnic: Add port speed stat to fnic debug stats")
Signed-off-by: John Pittman &lt;jpittman@redhat.com&gt;
Reviewed-by: Satish Kharat &lt;satishkh@cisco.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: remove redundant assignment of variable rc</title>
<updated>2019-08-20T01:51:00+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-08-13T13:23:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=9730ddfb123db3f37ace7571176661257712c99b'/>
<id>urn:sha1:9730ddfb123db3f37ace7571176661257712c99b</id>
<content type='text'>
Variable ret is initialized to a value that is never read and it is
re-assigned later and immediately returns. Clean up the code by removing
rc and just returning 0.

[mkp: typo]

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Karan Tilak Kumar &lt;kartilak@cisco.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: Remove set but not used variable 'vdev'</title>
<updated>2019-01-29T06:16:09+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-01-25T02:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=f2aecc1d38ff26f972d8c825ccc1f5152b79e203'/>
<id>urn:sha1:f2aecc1d38ff26f972d8c825ccc1f5152b79e203</id>
<content type='text'>
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/fnic/vnic_wq.c: In function 'vnic_wq_alloc_bufs':
drivers/scsi/fnic/vnic_wq.c:50:19: warning:
 variable 'vdev' set but not used [-Wunused-but-set-variable]

drivers/scsi/fnic/vnic_rq.c: In function 'vnic_rq_alloc_bufs':
drivers/scsi/fnic/vnic_rq.c:30:19: warning:
 variable 'vdev' set but not used [-Wunused-but-set-variable]

Never used since introduction.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Acked-by: Satish Kharat &lt;satishkh@cisco.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: no need to check return value of debugfs_create functions</title>
<updated>2019-01-29T05:40:53+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-01-22T15:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=1dbaa379a419343dab5f99f253d8225b5ab4f939'/>
<id>urn:sha1:1dbaa379a419343dab5f99f253d8225b5ab4f939</id>
<content type='text'>
When calling debugfs functions, there is no need to ever check the return
value.  The function can work or not, but the code logic should never do
something different based on this.

Cc: Satish Kharat &lt;satishkh@cisco.com&gt;
Cc: Sesidhar Baddela &lt;sebaddel@cisco.com&gt;
Cc: Karan Tilak Kumar &lt;kartilak@cisco.com&gt;
Cc: "James E.J. Bottomley" &lt;jejb@linux.ibm.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Satish Kharat &lt;satishkh@cisco.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: Update fnic driver version to 1.6.0.47</title>
<updated>2019-01-23T02:18:35+00:00</updated>
<author>
<name>Satish Kharat</name>
<email>satishkh@cisco.com</email>
</author>
<published>2019-01-18T22:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=f03dc9cfc86f7b6a1bb403adeab5543349db1ffc'/>
<id>urn:sha1:f03dc9cfc86f7b6a1bb403adeab5543349db1ffc</id>
<content type='text'>
Update fnic driver to version 1.6.0.47.

Signed-off-by: Satish Kharat &lt;satishkh@cisco.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
