<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/scsi/bfa/bfa_ioc.h, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-02-27T02:16:48Z</updated>
<entry>
<title>scsi: bfa: Fix function pointer type mismatch for state machines</title>
<updated>2024-02-27T02:16:48Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-22T12:44:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=37126399da15e1d53da93c0282aca539bccc891b'/>
<id>urn:sha1:37126399da15e1d53da93c0282aca539bccc891b</id>
<content type='text'>
The bfa driver is full of state machines and a generic abstraction layer
for them. This relies on casting function pointers, but that is no longer
allowed when CONFIG_CFI_CLANG is enabled and causes a huge number of
warnings like:

drivers/scsi/bfa/bfad.c:169:3: error: cast from 'void (*)(struct bfad_s *, enum bfad_sm_event)' to 'bfa_sm_t' (aka 'void (*)(void *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
                bfa_sm_set_state(bfad, bfad_sm_created);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Rework the mechanism to no longer require the function pointer casts, by
having separate types for each individual state machine. This in turn
requires moving the enum definitions for each state machine into the header
files in order to define the typedef.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20240222124433.2046570-2-arnd@kernel.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Fix function pointer type mismatch for hcb_qe-&gt;cbfn</title>
<updated>2024-02-27T02:16:48Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-22T12:44:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b69600231f751304db914c63b937f7098ed2895c'/>
<id>urn:sha1:b69600231f751304db914c63b937f7098ed2895c</id>
<content type='text'>
Some callback functions used here take a boolean argument, others take a
status argument. This breaks KCFI type checking, so clang now warns about
the function pointer cast:

drivers/scsi/bfa/bfad_bsg.c:2138:29: error: cast from 'void (*)(void *, enum bfa_status)' to 'bfa_cb_cbfn_t' (aka 'void (*)(void *, enum bfa_boolean)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]

Assuming the code is actually correct here and the callers always match the
argument types of the callee, rework this to replace the explicit cast with
a union of the two pointer types. This does not change the behavior of the
code, so if something is actually broken here, a larger rework may be
necessary.

Fixes: 37ea0558b87a ("[SCSI] bfa: Added support to collect and reset fcport stats")
Fixes: 3ec4f2c8bff2 ("[SCSI] bfa: Added support to configure QOS and collect stats.")
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20240222124433.2046570-1-arnd@kernel.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292</title>
<updated>2019-06-05T15:36:38Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T14:18:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=52fa7bf9eadac744eff74d71234c785aade6032f'/>
<id>urn:sha1:52fa7bf9eadac744eff74d71234c785aade6032f</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license gpl version 2
  as published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 66 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.606369721@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: turn bfa_mem_{kva,dma}_setup into inline functions</title>
<updated>2016-11-22T03:28:17Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-11-16T15:14:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2244459070c8080bffcd9f9916ee45b9463b6b6d'/>
<id>urn:sha1:2244459070c8080bffcd9f9916ee45b9463b6b6d</id>
<content type='text'>
These two macros cause lots of warnings with gcc-7:

drivers/scsi/bfa/bfa_svc.c: In function 'bfa_fcxp_meminfo':
drivers/scsi/bfa/bfa_svc.c:521:103: error: '*' in boolean context, suggest '&amp;&amp;' instead [-Werror=int-in-bool-context]

Using inline functions makes them much more readable and avoids the
warnings.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Acked by: Anil Gurumurthy &lt;anil.gurumurthy@cavium.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>bfa: File header and user visible string changes</title>
<updated>2015-12-02T22:07:38Z</updated>
<author>
<name>Anil Gurumurthy</name>
<email>anil.gurumurthy@qlogic.com</email>
</author>
<published>2015-11-26T08:54:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=31e1d5695724829759c4b5d63cd643c9f01769cc'/>
<id>urn:sha1:31e1d5695724829759c4b5d63cd643c9f01769cc</id>
<content type='text'>
Signed-off-by: Sudarsana Kalluru &lt;sudarsana.kalluru@qlogic.com&gt;
Signed-off-by: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.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>bfa: Update copyright messages</title>
<updated>2015-12-02T22:05:45Z</updated>
<author>
<name>Anil Gurumurthy</name>
<email>anil.gurumurthy@qlogic.com</email>
</author>
<published>2015-11-26T08:54:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=889d0d42667c998a099028f845c0be074acb4b90'/>
<id>urn:sha1:889d0d42667c998a099028f845c0be074acb4b90</id>
<content type='text'>
Signed-off-by: Sudarsana Kalluru &lt;sudarsana.kalluru@qlogic.com&gt;
Signed-off-by: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.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>bfa: Fix undefined bit shift on big-endian architectures with 32-bit DMA address</title>
<updated>2014-07-25T21:16:54Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2014-06-08T22:33:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=03a6c3ff3282ee9fa893089304d951e0be93a144'/>
<id>urn:sha1:03a6c3ff3282ee9fa893089304d951e0be93a144</id>
<content type='text'>
bfa_swap_words() shifts its argument (assumed to be 64-bit) by 32 bits
each way.  In two places the argument type is dma_addr_t, which may be
32-bit, in which case the effect of the bit shift is undefined:

drivers/scsi/bfa/bfa_fcpim.c: In function 'bfa_ioim_send_ioreq':
drivers/scsi/bfa/bfa_fcpim.c:2497:4: warning: left shift count &gt;= width of type [enabled by default]
    addr = bfa_sgaddr_le(sg_dma_address(sg));
    ^
drivers/scsi/bfa/bfa_fcpim.c:2497:4: warning: right shift count &gt;= width of type [enabled by default]
drivers/scsi/bfa/bfa_fcpim.c:2509:4: warning: left shift count &gt;= width of type [enabled by default]
    addr = bfa_sgaddr_le(sg_dma_address(sg));
    ^
drivers/scsi/bfa/bfa_fcpim.c:2509:4: warning: right shift count &gt;= width of type [enabled by default]

Avoid this by adding casts to u64 in bfa_swap_words().

Compile-tested only.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.com&gt;
Cc: stable@vger.kernel.org
Fixes: f16a17507b09 ('[SCSI] bfa: remove all OS wrappers')
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] bfa: Firmware patch simplification</title>
<updated>2013-12-19T15:39:04Z</updated>
<author>
<name>Vijaya Mohan Guvva</name>
<email>vmohan@brocade.com</email>
</author>
<published>2013-11-21T09:37:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=28d358d01e1d27c17b6448935693b28cb5624bbe'/>
<id>urn:sha1:28d358d01e1d27c17b6448935693b28cb5624bbe</id>
<content type='text'>
This patch includes change to enable firmware patch simplication
feature. This feature is targeted to address the requirement to have
independent patch release for firmware. Prior to 3.2.3, releasing a
patch fix for firmware requires changes to bfa, to use new firmware
images. But with these changes, if the new firmware is flashed on to the
HBA with brocade adapter management utilites, driver uses the new
firmware after checking the patch release byte in the firmware version.

Signed-off-by: Vijaya Mohan Guvva &lt;vmohan@brocade.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] bfa: fru vpd date update changes</title>
<updated>2013-06-26T21:44:35Z</updated>
<author>
<name>Vijaya Mohan Guvva</name>
<email>vmohan@brocade.com</email>
</author>
<published>2013-05-13T09:33:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=079bcbc35ca9241abf212a795a000b2d6c2038cd'/>
<id>urn:sha1:079bcbc35ca9241abf212a795a000b2d6c2038cd</id>
<content type='text'>
1. While FRU VPD data update, inform firmware to send a completion event
   on I2C bus. Without this change, firmware used to send completion
   message on I2C bus for every chunk of FRU VPD update.
2. Support for FRU VPN update on CHINOOK2 cards.
3. Append port count to the model name to differentiate between single
   port and dual port model of 1860.
4. Update the size of the model name to 16bytes

Signed-off-by: Vijaya Mohan Guvva &lt;vmohan@brocade.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] bfa: kdump fix on 815 and 825 adapters</title>
<updated>2013-06-26T20:12:19Z</updated>
<author>
<name>Vijaya Mohan Guvva</name>
<email>vmohan@brocade.com</email>
</author>
<published>2013-05-13T09:33:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c679b599afa5dd38d20e058aa68bc94c1c1416a1'/>
<id>urn:sha1:c679b599afa5dd38d20e058aa68bc94c1c1416a1</id>
<content type='text'>
Root cause: When kernel crashes, On brocade 815/825 adapters,
 bfa IOC state machine and FW doesn't get a notification and
hence are not cleanly shutdown. So registers holding driver/IOC
state information are not reset back to valid disabled/parking
values. This causes subsequent driver initialization to fail
during kdump kernel boot.

Fix description: during the initialization of first PCI function, reset
corresponding register when unclean shutown is detect by reading chip
registers. This will make sure that ioc/fw gets clean re-initialization.

Signed-off-by: Vijaya Mohan Guvva &lt;vmohan@brocade.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
