summaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.h
Commit message (Collapse)AuthorAgeFilesLines
* cnic: Add support for 57712 deviceMichael Chan2010-10-141-0/+22
| | | | | | | | | | Add new interrupt ack functions and other hardware interface logic to support the new device. Update version to 2.2.6. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add cnic_uio_dev structMichael Chan2010-10-141-10/+19
| | | | | | | | and put all uio related structures and ring buffers in it. This allows uio operations to be done independent of the cnic device structures. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Defer iscsi connection cleanupMichael Chan2010-10-141-0/+3
| | | | | | | | | | | | | The bnx2x devices require a 2 second quiet time before sending the last RAMROD command to destroy a connection. This sleep wait adds up to a long delay when iscsid is serially destroying maultiple connections. Create a workqueue to perform the final connection cleanup in the background to speed up the process. This significantly speeds up the process as the wait time can be done in parallel for multiple connections. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Convert ctx_flags to bit fieldsMichael Chan2010-10-141-2/+2
| | | | | | | so that we can additional bit definitions without requiring a spinlock. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x, cnic, bnx2i: use new FW/HSIDmitry Kravkov2010-10-061-10/+41
| | | | | | | | | | | | | | | | This is the new FW HSI blob and the relevant definitions without logic changes. It also included code adaptation for new HSI. New features are not enabled. New FW/HSI includes: - Support for 57712 HW - Future support for VF (not used) - Improvements in FW interrupts scheme - FW FCoE hooks (stubs for future usage) Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Fine-tune ring init code.Michael Chan2010-10-061-0/+1
| | | | | | | | | | Initialize the rings only during cnic_uio_open() and shut them down during cnic_uio_close(). Check for the new bit CNIC_LCL_FL_RINGS_INITED before checking for ring interrupt. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Use pfid for internal memory offsets.Michael Chan2010-10-061-0/+1
| | | | | | | | | | The pfid (physical function ID) is the same as PCI function on production devices. The pfid for future devices will be different and will be used for internal memory offsets. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Pass cp pointer to BNX2X_HW_CID.Michael Chan2010-10-061-3/+6
| | | | | | | | Preparation work for upcoming firmware interface changes. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Unify kcq allocation for all devices.Michael Chan2010-06-251-8/+11
| | | | | | | | | By creating a common data stucture kcq_info for all devices, the kcq (kernel completion queue) for all devices can be allocated by common code. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Fine-tune CID memory space calculation.Michael Chan2010-06-251-1/+3
| | | | | | | | | | | | The current code makes assumptions about the CID (context ID) memory space and starting CID that may not be always correct when firmware changes. In particular, BNX2_ISCSI_START_CID may not always be fixed. We now calculate cp->max_cid_space and cp->iscsi_start_cid dynamically instead of using fixed constants. The unused cp->max_iscsi_conn is also eliminated. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Return SPQ credit to bnx2x after ring setup and shutdown.Michael Chan2010-05-181-0/+5
| | | | | | | | | | | | | Everytime the iSCSI ring finishes setup or shutdown, we need to return the SPQ (slow path queue) credit to the bnx2x driver. Without this step, the SPQ will eventually be full causing iSCSI to fail. This can happen after 3 or 4 MTU changes for example. Add code to wait for these slow path commands to complete in the RX ring and return the SPQ credit to bnx2x. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Convert cnic_local_flags to atomic ops.Michael Chan2010-05-181-3/+2
| | | | | | | | | It is easier to expand the flags for other purposes because it does not require a spin_lock. The next bug fix patch needs a flag in cnic_local_flags. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Update version to 2.1.1.Michael Chan2010-02-261-1/+1
| | | | | | | And update copyright to 2010. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Use union for the status blocks of different devices.Michael Chan2010-02-261-3/+6
| | | | | | | | | | We only need to assign the status block address once and it also saves space in the structure. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Finetune iSCSI connection set up.Eddie Wai2010-02-261-1/+1
| | | | | | | | | Initialize IP ID and handle some additional connection errors. Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add bnx2x data structures.Michael Chan2009-10-111-0/+64
| | | | | | | | Add hardware and software structures for bnx2x devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Fix locking in start/stop calls.Michael Chan2009-08-151-0/+1
| | | | | | | | | | | | The slow path ulp_start and ulp_stop calls to the bnx2i driver are sleepable calls and therefore should not be protected using rcu_read_lock. Fix it by using mutex and setting a bit during these calls. cnic_unregister_device() will now wait for the bit to clear before completing the call. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCSI] cnic: Add new Broadcom CNIC driver.Michael Chan2009-06-091-0/+299
The CNIC driver controls BNX2 hardware rings and resources used by iSCSI. Most hardware resources for iSCSI are separate from those used for ethernet networking. iSCSI uses a separate MAC address and IP address. The CNIC driver creates a UIO interface to handle the non-offloaded packets such as ARP, etc in userspace. Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
OpenPOWER on IntegriCloud