<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/scsi/fnic/vnic_dev.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/scsi/fnic/vnic_dev.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/scsi/fnic/vnic_dev.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-01-13T04:32:53Z</updated>
<entry>
<title>scsi: fnic: Fix memleak in vnic_dev_init_devcmd2</title>
<updated>2021-01-13T04:32:53Z</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2020-12-25T08:35:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d6e3ae76728ccde49271d9f5acfebbea0c5625a3'/>
<id>urn:sha1:d6e3ae76728ccde49271d9f5acfebbea0c5625a3</id>
<content type='text'>
When ioread32() returns 0xFFFFFFFF, we should execute cleanup functions
like other error handling paths before returning.

Link: https://lore.kernel.org/r/20201225083520.22015-1-dinghao.liu@zju.edu.cn
Acked-by: Karan Tilak Kumar &lt;kartilak@cisco.com&gt;
Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fnic: make some symbols static</title>
<updated>2020-04-17T17:48:03Z</updated>
<author>
<name>Jason Yan</name>
<email>yanaijie@huawei.com</email>
</author>
<published>2020-04-15T09:38:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=363f4d937501ba464d8a8248983dcfffabe69ea7'/>
<id>urn:sha1:363f4d937501ba464d8a8248983dcfffabe69ea7</id>
<content type='text'>
Fix the following sparse warning:

drivers/scsi/fnic/vnic_dev.c:257:5: warning: symbol 'vnic_dev_cmd1' was
not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:319:5: warning: symbol 'vnic_dev_cmd2' was
not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:414:5: warning: symbol
'vnic_dev_init_devcmd1' was not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:425:5: warning: symbol
'vnic_dev_init_devcmd2' was not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:495:6: warning: symbol
'vnic_dev_deinit_devcmd2' was not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:506:5: warning: symbol
'vnic_dev_cmd_no_proxy' was not declared. Should it be static?

Link: https://lore.kernel.org/r/20200415093809.9365-1-yanaijie@huawei.com
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&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:59Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-01-07T20:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/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: make array dev_cmd_err static const, makes object smaller</title>
<updated>2019-10-01T02:45:36Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-09-06T16:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/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: Enable fnic devcmd2 interface</title>
<updated>2019-01-23T02:18:35Z</updated>
<author>
<name>Satish Kharat</name>
<email>satishkh@cisco.com</email>
</author>
<published>2019-01-18T22:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e119d14ca38c146846e400182252c22df002db56'/>
<id>urn:sha1:e119d14ca38c146846e400182252c22df002db56</id>
<content type='text'>
This patch adds changes to check if fnic devcmd2 interface is exported by
the firmware. If devcmd2 interfaces is exported, driver starts using it
else falls back to fnic devcmd1 interface.

Signed-off-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: Adding devcmd2 init and posting interfaces</title>
<updated>2019-01-23T02:18:35Z</updated>
<author>
<name>Satish Kharat</name>
<email>satishkh@cisco.com</email>
</author>
<published>2019-01-18T22:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0a2fdd2215e1fa3b417792bd6e9cb719822cbfb6'/>
<id>urn:sha1:0a2fdd2215e1fa3b417792bd6e9cb719822cbfb6</id>
<content type='text'>
This patch adds fnic devcmd2 interfaces for initialization and posting
commands to fw.

Signed-off-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: fnic devcmd2 controller definitions</title>
<updated>2019-01-23T02:18:34Z</updated>
<author>
<name>Satish Kharat</name>
<email>satishkh@cisco.com</email>
</author>
<published>2019-01-18T22:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c10cb44eaadbd13adee60d4cb8a2b8462e79fe2'/>
<id>urn:sha1:6c10cb44eaadbd13adee60d4cb8a2b8462e79fe2</id>
<content type='text'>
This patch adds the fnic devcmd2 controller definitions.

Signed-off-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: switch to generic DMA API</title>
<updated>2018-10-18T01:58:52Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-10-10T16:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7f9b0f774fdf26a5d76363d889ba587e242a497b'/>
<id>urn:sha1:7f9b0f774fdf26a5d76363d889ba587e242a497b</id>
<content type='text'>
Switch from the legacy PCI DMA API to the generic DMA API.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&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>scsi: fnic: use kernel's '%pM' format option to print MAC</title>
<updated>2016-11-08T22:29:57Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2016-10-22T17:32:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=36fe90b0f0bdc9d030e88ba2153f3c8d6b6a5964'/>
<id>urn:sha1:36fe90b0f0bdc9d030e88ba2153f3c8d6b6a5964</id>
<content type='text'>
Instead of supplying each byte through stack let's use %pM specifier.

Cc: Hiral Patel &lt;hiralpat@cisco.com&gt;
Cc: Suma Ramars &lt;sramars@cisco.com&gt;
Acked-by: Tom Tucker &lt;tom@opengridcomputing.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] fnic: FIP VLAN Discovery Feature Support</title>
<updated>2013-05-02T14:30:40Z</updated>
<author>
<name>Hiral Patel</name>
<email>hiralpat@cisco.com</email>
</author>
<published>2013-02-26T00:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d3c995f1dcf938f1084388d92b8fb97bec366566'/>
<id>urn:sha1:d3c995f1dcf938f1084388d92b8fb97bec366566</id>
<content type='text'>
FIP VLAN discovery discovers the FCoE VLAN that will be used by all other FIP
protocols as well as by the FCoE encapsulation for Fibre Channel payloads on
the established virtual link. One of the goals of FC-BB-5 was to be as
nonintrusive as possible on initiators and targets, and therefore FIP VLAN
discovery occurs in the native VLAN used by the initiator or target to
exchange Ethernet traffic. The FIP VLAN discovery protocol is the only FIP
protocol running on the native VLAN; all other FIP protocols run on the
discovered FCoE VLANs.

If an administrator has manually configured FCoE VLANs on ENodes and FCFs,
there is no need to use this protocol. FIP and FCoE will run over the
configured VLANs.

An ENode without FCoE VLANs configuration would use this automated discovery
protocol to discover over which VLANs FCoE is running.

The ENode sends a FIP VLAN discovery request to a multicast MAC address called
All-FCF-MACs, which is a multicast MAC address to which all FCFs listen.

All FCFs that can be reached in the native VLAN of the ENode are expected to
respond on the same VLAN with a response that lists one or more FCoE VLANs
that are available for the ENode's VN_Port login. This protocol has the sole
purpose of allowing the ENode to discover all the available FCoE VLANs.

Now the ENode may enable a subset of these VLANs for FCoE Running the FIP
protocol in these VLANs on a per VLAN basis. And FCoE data transactions also
would occur on this VLAN. Hence, Except for FIP VLAN discovery, all other FIP
and FCoE traffic runs on the selected FCoE VLAN.  Its only the FIP VLAN
Discovery protocol that is permitted to run on the Default native VLAN of the
system.

[**** NOTE ****]
We are working on moving this feature definitions and functionality to libfcoe
module. We need this patch to be approved, as Suse is looking forward to merge
this feature in SLES 11 SP3 release.  Once this patch is approved, we will
submit patch which should move vlan discovery feature to libfoce.

[Fengguang Wu &lt;fengguang.wu@intel.com&gt;: kmalloc cast removal]
Signed-off-by: Anantha Prakash T &lt;atungara@cisco.com&gt;
Signed-off-by: Hiral Patel &lt;hiralpat@cisco.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
