History log of /linux-master/drivers/scsi/cxgbi/libcxgbi.h
Revision Date Author Comments
# 80602aca 22-Mar-2023 Bart Van Assche <bvanassche@acm.org>

scsi: iscsi: Declare SCSI host template const

Make it explicit that the SCSI host template is not modified.

Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-50-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 5794a390 15-Feb-2023 Jesper Juhl <jesperjuhl76@gmail.com>

scsi: cxgbi: Remove unneeded version.h include

Remove unneeded version.h include pointed out by 'make versioncheck'.

Link: https://lore.kernel.org/r/820137c2-decc-3d78-f170-7f1c0571fbb7@gmail.com
Signed-off-by: Jesper Juhl <jesperjuhl76@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# ee9108fe 01-Aug-2020 Denis Efremov <efremov@linux.com>

scsi: libcxgbi: Use kvzalloc instead of opencoded kzalloc/vzalloc

Remove cxgbi_alloc_big_mem(), cxgbi_free_big_mem() functions and use
kvzalloc/kvfree instead. __GFP_NOWARN added to kvzalloc() call because we
already print a warning in case of allocation fail.

Link: https://lore.kernel.org/r/20200801133123.61834-1-efremov@linux.com
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# e33c2482 29-Jun-2020 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: Add support for iSCSI segmentation offload

T5/T6 adapters support iSCSI segmentation offload.

To transmit iSCSI PDUs using ISO driver provides iSCSI header and data
scatterlist to the adapter, adapter forms multiple iSCSI PDUs and transmits
them.

[mkp: checkpatch]

Link: https://lore.kernel.org/r/1593448871-2972-1-git-send-email-varun@chelsio.com
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a248384e 10-Jun-2019 Varun Prakash <varun@chelsio.com>

cxgb4/libcxgb/cxgb4i/cxgbit: enable eDRAM page pods for iSCSI

Page pods are used for direct data placement, this patch
enables eDRAM page pods if firmware supports this feature.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 9e8f1c79 10-Jan-2019 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: add wait_for_completion()

In case of ->set_param() and ->bind_conn() cxgb4i driver does not wait for
cmd completion, this can create race conditions, to avoid this add
wait_for_completion().

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


# b5a5fe4e 13-Sep-2018 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: add DCB support for iSCSI connections

Add IEEE and CEE DCBX support for iSCSI connections.

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


# 22698483 11-Oct-2017 Varun Prakash <varun@chelsio.com>

scsi: libcxgbi: simplify task->hdr allocation for mgmt cmds

In case of mgmt cmds, task->hdr is dereferenced after transmitting the
pdu in iscsi_tcp_task_xmit(). To handle this case current code
increments the Tx skb reference count and frees the skb in
cxgbi_cleanup_task(). In some error cases this results in skb leak.

To fix this in case of mgmt cmds, allocate a separate buffer for iSCSI
hdr and free this buffer in cxgbi_cleanup_task().

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


# 6c9e2770 22-Jun-2017 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: assign rxqs in round robin mode

Assign rxq to TCP connections in round robin mode to use all available
rxqs.

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


# e0f8e8cf 27-May-2017 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: libcxgbi: in error case RST tcp conn

If logout response is not received and ->ep_disconnect() is called then
close tcp conn by RST instead of FIN to cleanup conn resources
immediately.

Also move ->csk_push_tx_frames() above 'done:' to avoid calling
->csk_push_tx_frames() in error cases.

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


# 75b61250 16-May-2017 Varun Prakash <varun@chelsio.com>

scsi: libcxgbi: fix skb use after free

skb->data is assigned to task->hdr in cxgbi_conn_alloc_pdu(),
skb gets freed after tx but task->hdr is still dereferenced in
iscsi_tcp_task_xmit() to avoid this call skb_get() after allocating skb
and free the skb in cxgbi_cleanup_task() or before allocating new skb in
cxgbi_conn_alloc_pdu().

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


# 2c935bc5 14-Nov-2016 Peter Zijlstra <peterz@infradead.org>

locking/atomic, kref: Add kref_read()

Since we need to change the implementation, stop exposing internals.

Provide kref_read() to read the current reference count; typically
used for debug messages.

Kills two anti-patterns:

atomic_read(&kref->refcount)
kref->refcount.counter

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>


# 1fe1fdb0 07-Dec-2016 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: libcxgbi: add missing module_put()

Add module_put() in cxgbi_sock_act_open_req_arp_failure() to release
module reference in case of arp failure, also check return value of
try_module_get() before posting active open hw cmd.

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


# 44830d8f 01-Dec-2016 Varun Prakash <varun@chelsio.com>

scsi: cxgb4i: libcxgbi: cxgb4: add T6 iSCSI completion feature

T6 adapters reduce number of completions to host by generating single
completion for all the directly placed(DDP) iSCSI pdus in a sequence.

This patch adds new structure for completion hw cmd (struct
cpl_rx_iscsi_cmp) and implements T6 completion feature.

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


# 71f7a00b 21-Jul-2016 Varun Prakash <varun@chelsio.com>

cxgb4i,libcxgbi: add iSCSI DDP support

Add iSCSI DDP support in cxgb4i driver
using common iSCSI DDP Page Pod Manager.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5999299f 21-Jul-2016 Varun Prakash <varun@chelsio.com>

cxgb3i,cxgb4i,libcxgbi: remove iSCSI DDP support

Remove old ddp code from cxgb3i,cxgb4i,libcxgbi.

Next two commits adds DDP support using
common iSCSI DDP Page Pod Manager.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 32a78fac 30-Jun-2015 Pekka Enberg <penberg@kernel.org>

libcxgbi: use kvfree() in cxgbi_free_big_mem()

Use kvfree() instead of open-coding it.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Cc: "James E.J. Bottomley" <JBottomley@odin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 1149a5ed 10-Apr-2015 Karen Xie <kxie@chelsio.com>

cxgbi: update copyright to 2015

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>


# 81daf10c 10-Apr-2015 Karen Xie <kxie@chelsio.com>

cxgbi: use per-connection link-speed dependent send/recv windows

For adapters supporting both 10G and 40G use per-connection send/recv window
and calculate the size based on the link speed.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>


# 84944d8c 11-Dec-2014 Karen Xie <kxie@chelsio.com>

cxgb4i: fix tx immediate data credit check

Only data skbs need the wr header added while control skbs do not. Make sure
they are treated differently.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# dd9ad67e 16-Oct-2014 Anish Bhatt <anish@chelsio.com>

libcxgbi : support ipv6 address host_param

libcxgbi was always returning an ipv4 address for ISCSI_HOST_PARAM_IPADDRESS,
return appropriate address based on address family

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 078efae0 15-Sep-2014 Anish Bhatt <anish@chelsio.com>

[SCSI] cxgb4i: avoid holding mutex in interrupt context

cxgbi_inet6addr_handler() can be called in interrupt context, so use rcu
protected list while finding netdev. This is observed as a scheduling in
atomic oops when running over ipv6.

Fixes: fc8d0590d914 ("libcxgbi: Add ipv6 api to driver")
Fixes: 759a0cc5a3e1 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api")

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 576b5863 15-Sep-2014 Anish Bhatt <anish@chelsio.com>

cxgb4i: avoid holding mutex in interrupt context

cxgbi_inet6addr_handler() can be called in interrupt context, so use rcu
protected list while finding netdev

Applies on top of core-for-3.18

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>

Fixes: fc8d0590d914 ("libcxgbi: Add ipv6 api to driver")
Fixes: 759a0cc5a3e1 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6
api")
Signed-off-by: Christoph Hellwig <hch@lst.de>


# fc8d0590 17-Jul-2014 Anish Bhatt <anish@chelsio.com>

libcxgbi: Add ipv6 api to driver

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: Manoj Malviya <manojmalviya@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 1abf635d 25-Jun-2014 Hannes Reinecke <hare@suse.de>

scsi: use 64-bit value for 'max_luns'

Now that we're using 64-bit LUNs internally we need to increase
the size of max_luns to 64 bits, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 8be04b93 19-Jun-2013 Joe Perches <joe@perches.com>

treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks

Don't emit OOM warnings when k.alloc calls fail when
there there is a v.alloc immediately afterwards.

Converted a kmalloc/vmalloc with memset to kzalloc/vzalloc.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 587a1f16 23-Jul-2011 Al Viro <viro@zeniv.linux.org.uk>

switch ->is_visible() to returning umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 6a39a16a 19-Oct-2011 Ian Campbell <Ian.Campbell@citrix.com>

cxgbi: convert to SKB paged frag API.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: Karen Xie <kxie@chelsio.com>
Cc: linux-scsi@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>


# 3128c6c7 25-Jul-2011 Mike Christie <michaelc@cs.wisc.edu>

[SCSI] iscsi cls: sysfs group is_visible callout for conn attrs

The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and drivers to use the attribute container
sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# c71b9b66 16-Feb-2011 Mike Christie <michaelc@cs.wisc.edu>

[SCSI] cxgbi: convert to use iscsi_conn_get_addr_param

This has cxgbi use the iscsi_conn_get_addr_param helper
and the get ep callback.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# b8ce8b59 07-Jan-2011 kxie@chelsio.com <kxie@chelsio.com>

[SCSI] cxgbi: get rid of gl_skb in cxgbi_ddp_info

Remove gl_skb from cxgbi_ddp_info as it is only used by cxgb3i.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# e27d6169 23-Sep-2010 kxie@chelsio.com <kxie@chelsio.com>

[SCSI] cxgb4i: connection and ddp setting update

Update cxgb4i connection setting and pagepod programming.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 0b3d8947 23-Sep-2010 kxie@chelsio.com <kxie@chelsio.com>

[SCSI] cxgb3i: fixed connection over vlan

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# e3d2ad8c 23-Sep-2010 kxie@chelsio.com <kxie@chelsio.com>

[SCSI] libcxgbi: pdu read fixes

Fixed the locking and releasing skb in the case of error in the pdu
read path, and added define iscsi_task_cxgbi_data to access the
private data inside the iscsi_task.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 24d3f95a 23-Sep-2010 kxie@chelsio.com <kxie@chelsio.com>

[SCSI] cxgbi: rename alloc_cpl to alloc_wr

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 9ba682f0 16-Aug-2010 kxie@chelsio.com <kxie@chelsio.com>

[SCSI] libcxgbi: common library for cxgb3i and cxgb4i

[PATCH v5 1/3] libcxgbi: common library for cxgb3i and cxgb4i

From: Karen Xie <kxie@chelsio.com>

Extracts common functions to libcxgbi.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>