History log of /linux-master/drivers/scsi/csiostor/csio_hw.c
Revision Date Author Comments
# 44f4daf8 02-Aug-2020 Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()

On an error exit path, a negative error code should be returned instead of
a positive return value.

Link: https://lore.kernel.org/r/20200802111531.5065-1-tianjia.zhang@linux.alibaba.com
Fixes: f40e74ffa3de ("csiostor:firmware upgrade fix")
Cc: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# df561f66 23-Aug-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

treewide: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>


# 085d46fd 23-Jul-2020 Lee Jones <lee.jones@linaro.org>

scsi: csiostor: Mark known unused variable as __always_unused

Fixes the following W=1 kernel build warning(s):

drivers/scsi/csiostor/csio_hw.c: In function ‘csio_hw_get_vpd_params’:
drivers/scsi/csiostor/csio_hw.c:309:8: warning: variable ‘s’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200723122446.1329773-22-lee.jones@linaro.org
Cc: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 63e40c55 12-Sep-2019 Arkadiusz Drabczyk <arkadiusz@drabczyk.org>

scsi: csiostor: Fix spelling typos

Fix several spelling typos in comments in csio_hw.c.

Link: https://lore.kernel.org/r/20190912172546.16489-1-arkadiusz@drabczyk.org
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 68bdc630 11-Aug-2018 Varun Prakash <varun@chelsio.com>

scsi: csiostor: fix incorrect port capabilities

- use be32_to_cpu() instead of ntohs() for 32 bit port capabilities.

- add a new function fwcaps32_to_caps16() to convert 32 bit port
capabilities to 16 bit port capabilities.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 89809b02 11-Aug-2018 Varun Prakash <varun@chelsio.com>

scsi: csiostor: add a check for NULL pointer after kmalloc()

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 46a75118 01-Aug-2018 Arjun Vynipadath <arjun@chelsio.com>

scsi: csiostor: update csio_get_flash_params()

- Updates csio_get_flash_params() to take care of ISSI, Macronix and
Winbond FLASH parts.

- Assume flash part size to be 4MB if it cannot be identified

Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 1d19023f 23-May-2018 Ganesh Goudar <ganeshgr@chelsio.com>

cxgb4: change the port capability bits definition

MDI Port Capabilities bit definitions were inconsistent with
regard to the MDI enum values. 2 bits used to define MDI in
the port capabilities are not really separable, it's a 2-bit
field with 4 different values. Change the port capability bit
definitions to be "AUTO" and "STRAIGHT" in order to get them
to line up with the enum's.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# e1735d9a 11-Mar-2018 Varun Prakash <varun@chelsio.com>

scsi: csiostor: add support for 32 bit port capabilities

32 bit port capabilities are required to support new speeds which can
not be supported using 16 bit port capabilities.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# fa60a31b 22-Oct-2017 Kees Cook <keescook@chromium.org>

scsi: csiostor: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: Varun Prakash <varun@chelsio.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>


# 82f0fd06 31-Jul-2017 Varun Prakash <varun@chelsio.com>

scsi: csiostor: fail probe if fw does not support FCoE

Fail probe if FCoE capability is not enabled in the firmware.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 96e6c633 31-May-2017 Varun Prakash <varun@chelsio.com>

scsi: csiostor: add check for supported fw version

T6 FCoE support is added in fw version 1.16.45.0 so return error if fw
version < 1.16.45.0 for T6 adapters.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 4bbd458e 18-May-2017 Varun Prakash <varun@chelsio.com>

scsi: csiostor: add support for Chelsio T6 adapters

Enable probe for T6 adapters, add code to flash T6 firmware and firmware
config file, use T6 specific macros.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a351e40b 17-May-2017 Varun Prakash <varun@chelsio.com>

scsi: csiostor: fix use after free in csio_hw_use_fwconfig()

mbp pointer is passed to csio_hw_validate_caps() so call mempool_free()
after calling csio_hw_validate_caps().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Fixes: 541c571fa2fd ("csiostor:Use firmware version from cxgb4/t4fw_version.h")
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# ea47ebf1 14-Apr-2015 Dan Carpenter <dan.carpenter@oracle.com>

csiostor: fix an error code in csio_hw_init()

We should return -ENOMEM if kzalloc() fails here instead of returning
success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>


# 541c571f 03-Feb-2015 Praveen Madhavan <praveenm@chelsio.com>

csiostor:Use firmware version from cxgb4/t4fw_version.h

This patch is to use firmware version macros from t4fw_version.h
and also enables 40g T5 adapter.

Signed-off-by: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 216ce69c 27-Jan-2015 Praveen Madhavan <praveenm@chelsio.com>

csiostor:T5 Firmware fix and cleanup.

This patch fix is to use default firmware configuration files
present in the adapter incase if not available in standard
/lib/firmware/* dir. Additional cleanup is done to reuse flash
related defines from cxgb4 header file.

Please apply over net-next since it depends on previous commit.

Signed-off-by: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 3fb4c22e 16-Jan-2015 Praveen Madhavan <praveenm@chelsio.com>

csiostor:Remove T4 FCoE Support.

We found a subtle issue with FCoE on T4 very late in the game
and decided not to productize FCoE on T4 and therefore there
are no customers that will be impacted by this change. Hence
T4 FCoE support is removed. FCoE supported only on T5 cards.

changes in v2:
- Make the commit message more clearer.

Signed-off-by: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 78890ed7 09-Jan-2015 Praveen Madhavan <praveenm@chelsio.com>

csiostor:fix sparse warnings

This patch fixes sparse warning reported by kbuild.
Apply this on net-next since it depends on previous commit.

drivers/scsi/csiostor/csio_hw.c:259:17: sparse: cast to restricted __le32
drivers/scsi/csiostor/csio_hw.c:536:31: sparse: incorrect type in assignment
(different base types)
drivers/scsi/csiostor/csio_hw.c:536:31: expected unsigned int [unsigned]
[usertype] <noident>
drivers/scsi/csiostor/csio_hw.c:536:31: got restricted __be32 [usertype]
<noident>
>> drivers/scsi/csiostor/csio_hw.c:2012:5: sparse: symbol 'csio_hw_prep_fw' was
not declared. Should it be static?

Signed-off-by: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# f40e74ff 07-Jan-2015 Praveen Madhavan <praveenm@chelsio.com>

csiostor:firmware upgrade fix

This patch fixes removes older means of upgrading Firmware using MAJOR version
and adds newer interface version checking mechanism.

Please apply this patch on net-next since it depends on previous commits.

Signed-off-by: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 0d804338 05-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4/cxgb4vf/csiostor: Cleanup PL, XGMAC, SF and MC related register defines

This patch cleanups all PL, XGMAC and SF related macros/register defines
that are defined in t4_regs.h and the affected files

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 837e4a42 05-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4/csiostor: Cleanup TP, MPS and TCAM related register defines

This patch cleanups all TP, MPS and TCAM related macros/register defines
that are defined in t4_regs.h and the affected files

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 89c3a86c 05-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4/cxg4vf/csiostor: Cleanup MC, MA and CIM related register defines

This patch cleanups all MC, MA and CIM related macros/register defines that are
defined in t4_regs.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# f061de42 05-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4/cxgb4vf/csiostor: Cleanup SGE and PCI related register defines

This patch cleansup remaining SGE related macros/register defines and all PCI
related ones that are defined in t4_regs.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# f612b815 05-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

RDMA/cxgb4/cxgb4vf/csiostor: Cleanup SGE register defines

This patch cleanups all SGE related macros/register defines that are
defined in t4_regs.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 666224d4 10-Dec-2014 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call

Remove use of calls into t4_fw_hello() with MASTER_MUST, which results in
FW_HELLO_CMD_MASTERFORCE being set. The firmware doesn't support this and of
course any existing PF Drivers will totally go for a toss.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b2e1a3f0 20-Nov-2014 Hariprasad Shenai <hariprasad@chelsio.com>

RDMA/cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to PCIE, RSS and FW

This patch cleanups all PCIE, RSS & FW related macros/register defines that are
defined in t4fw_api.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5167865a 20-Nov-2014 Hariprasad Shenai <hariprasad@chelsio.com>

RDMA/cxgb4/csiostor: Cleansup FW related macros/register defines for PF/VF and LDST

This patch cleanups PF/VF and LDST related macros/register defines that are
defined in t4fw_api.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# e2ac9628 06-Nov-2014 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4: Cleanup macros so they follow the same style and look consistent, part 2

Various patches have ended up changing the style of the symbolic macros/register
defines to different style.

As a result, the current kernel.org files are a mix of different macro styles.
Since this macro/register defines is used by different drivers a
few patch series have ended up adding duplicate macro/register define entries
with different styles. This makes these register define/macro files a complete
mess and we want to make them clean and consistent. This patch cleans up a part
of it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ad4d35f8 05-Sep-2013 Yijing Wang <wangyijing@huawei.com>

[SCSI] csiostor: Use pcie_capability_clear_and_set_word() to simplify code

pci_is_pcie() and pcie_capability_clear_and_set_word() make it trivial
to set the PCIe Completion Timeout, so just fold the
csio_set_pcie_completion_timeout() function into its caller.

[bhelgaas: changelog, fold csio_set_pcie_completion_timeout() into caller]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Naresh Kumar Inna <naresh@chelsio.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jesper Juhl <jj@chaosbits.net>


# 49c12413 17-May-2013 Naresh Kumar Inna <naresh@chelsio.com>

[SCSI] csiostor: Retain default adapter configuration in absence of config file.

- Retain firmware defined configuration settings in the absence of
user-provided configuration by eliminating the global RSS and the
PF/VF capabilities mailbox commands.
- Remove S_IRUGO from sysfs parameters that don't have 'show'
functionality.

Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 162cca5e 15-Mar-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn>

[SCSI] csiostor: remove unused variable in csio_process_fwevtq_entry()

The variable 'data' is initialized but never used
otherwise, so remove the unused variable.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 7cc16380 13-Mar-2013 Arvind Bhushan <arvindb@chelsio.com>

csiostor: Cleanup chip specific operations.

This patch removes chip specific operations from the common hardware
paths, as well as the Makefile change to accomodate the new files.

Signed-off-by: Arvind Bhushan <arvindb@chelsio.com>
Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 02db3db5 26-Dec-2012 Jesper Juhl <jj@chaosbits.net>

[SCSI] csiostor: Don't leak mem or fail to release firmware in csio_hw_flash_config()

If kzalloc() or csio_hw_check_fwconfig() fail we may leave the
csio_hw_flash_config() function without freeing allocated memory or
firmware. This should take care of the leaks.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 5036f0a0 20-Nov-2012 Naresh Kumar Inna <naresh@chelsio.com>

[SCSI] csiostor: Fix sparse warnings.

This patch fixes sparse warnings related to endian-ness, which were
reported by the 0-day kernel build and testing tool.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# a3667aae 15-Nov-2012 Naresh Kumar Inna <naresh@chelsio.com>

[SCSI] csiostor: Chelsio FCoE offload driver

Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>