History log of /linux-master/drivers/net/ethernet/broadcom/cnic.h
Revision Date Author Comments
# bfe78793 01-Feb-2024 Chris Leech <cleech@redhat.com>

cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT

Use the UIO_MEM_DMA_COHERENT type to properly handle mmap for
dma_alloc_coherent buffers.

The cnic l2_ring and l2_buf mmaps have caused page refcount issues as
the dma_alloc_coherent no longer provide __GFP_COMP allocation as per
commit "dma-mapping: reject __GFP_COMP in dma_alloc_attrs".

Fix this by having the uio device use dma_mmap_coherent.

The bnx2 and bnx2x status block allocations are also dma_alloc_coherent,
and should use dma_mmap_coherent. They don't allocate multiple pages,
but this interface does not work correctly with an iommu enabled unless
dma_mmap_coherent is used.

Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Chris Leech <cleech@redhat.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20240201233400.3394996-3-cleech@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d7afae05 23-Jun-2014 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

cnic: Rebranding cnic driver.

o QLogic has acquired the NetXtremeII products and drivers from Broadcom.
This patch re-brands cnic driver as a QLogic driver

Signed-off-by: David S. Miller <davem@davemloft.net>


# c3661283 17-Mar-2014 Michael Chan <mchan@broadcom.com>

cnic: Update version to 2.5.20 and copyright year.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d15e2a92 01-Jan-2014 Eddie Wai <eddie.wai@broadcom.com>

cnic: Add a signature to indicate valid doorbell offset.

The buffer that is used to pass doorbell offset to the userspace UIO
driver may contain nonzero value in older versions of bnx2x driver.
Userspace cannot easily tell whether it contains a valid doorbell
offset or not. With the added signature, userspace will only use
the doorbell offset if the signature is present.

Update version to 2.5.19.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a5b3c4ae 02-Sep-2013 Michael Chan <mchan@broadcom.com>

cnic: Eliminate local copy of pfid.

Use bp->pfid from bnx2x instead to avoid duplication.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5bf945a8 02-Sep-2013 Michael Chan <mchan@broadcom.com>

cnic: Eliminate CNIC_PORT macro and port_mode in local struct.

Use BP_PORT and chip_port_mode directly from bnx2x.h to avoid duplication.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5e65789f 02-Sep-2013 Michael Chan <mchan@broadcom.com>

cnic: Redefine BNX2X_HW_CID using existing bnx2x macros

to avoid duplication of the same logic.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 104a43ed 02-Sep-2013 Michael Chan <mchan@broadcom.com>

cnic: Use CHIP_NUM macros from bnx2x.h

This eliminates duplication and ensures that all bnx2x chips will be
supported.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ca67a3cb 28-Jul-2013 Michael Chan <mchan@broadcom.com>

cnic: Update version to 2.5.17 and copyright year.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 68c64d20 06-Dec-2012 Michael Chan <mchan@broadcom.com>

cnic: Include bnx2x.h

by removing duplicate symbols and removing some redundant code.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 2bc4078e 06-Dec-2012 Michael Chan <mchan@broadcom.com>

bnx2: Add BNX2 prefix to descriptor structures and macros

for namespace consistency.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 51a8f54d 08-Sep-2012 Michael Chan <mchan@broadcom.com>

cnic: Allocate kcq resource only on devices that support FCoE.

To save memory and to exit IRQ loop quicker on devices that don't support
FCoE.

Reviewed-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 8cc0e028 08-Sep-2012 Michael Chan <mchan@broadcom.com>

cnic: Add function pointers to arm IRQ for different devices.

This will make it easier to exit IRQ loop and re-arm IRQ on devices that
don't support FCoE.

Reviewed-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# dcc7e3a6 26-Aug-2011 Michael Chan <mchan@broadcom.com>

cnic: Add timeout for ramrod replies.

If the bnx2x device has encountered parity errors, the chip will not DMA
any replies. Using wait_event_timeout() will allow us to make forward
progress and let bnx2x reset the chip.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# dc219a2e 26-Aug-2011 Michael Chan <mchan@broadcom.com>

cnic, bnx2fc: Increase maximum FCoE sessions.

Increase it to NVRAM configured limit or 1024 whichever is less.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# adfc5217 07-Apr-2011 Jeff Kirsher <jeffrey.t.kirsher@intel.com>

broadcom: Move the Broadcom drivers

Moves the drivers for Broadcom devices into
drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile
changes.

CC: Eilon Greenstein <eilong@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
CC: Matt Carlson <mcarlson@broadcom.com>
CC: Gary Zambrano <zambrano@broadcom.com>
CC: "Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>