aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_hwi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-02-20bnx2fc: HSI dependent changes for 7.2.xx FWBhanu Prakash Gollapudi1-3/+9
with Tx only section for single cached SGEs. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-17[SCSI] bnx2fc: No abort issued for REC when it times outBhanu Prakash Gollapudi1-2/+4
ABTS was not issued for timed out REC, as REC completion handler exits out if the IO completed. Check for timed out REC and issue ABTS before proceeding with further processing in REC completion handler. Also, initialize rec_retry and srr_retry before starting the IO. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Fix NULL pointer deref during arm_cq.Bhanu Prakash Gollapudi1-3/+7
There exists a race condition between CQ doorbell unmap and IO completion path that arms the CQ which causes a NULL dereference. Protect the ctx_base with cq_lock to avoid this. Also, wait for the CQ doorbell to be successfully mapped before arming the CQ. Also, do not count uncolicited CQ completions for free_sqes. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-28[SCSI] bnx2fc: Update copyright and bump version to 1.0.4Bhanu Prakash Gollapudi1-1/+1
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-28[SCSI] bnx2fc: Tx BDs cache in write tasksBhanu Prakash Gollapudi1-7/+22
When there is a single BD for the entire data to be transmitted, use the BD inside the SGL context and set the cached SGE indication in the task context Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-28[SCSI] bnx2fc: Do not arm CQ when there are no CQEsBhanu Prakash Gollapudi1-2/+4
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-28[SCSI] bnx2fc: HSI changes for tapeBhanu Prakash Gollapudi1-4/+26
Program the firmware task structure with init_flags indicating the device is 'sequence level error recovery' capable. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-28[SCSI] bnx2fc: Handle REC_TOV error code from firmwareBhanu Prakash Gollapudi1-29/+111
Driver decides to initiate REC on REC_TOV timer pop. The firmware maintains the REC timer and informs the driver as a firmware error message, which is an unsolicited event to the driver. Driver also issues REC on other unsolicited events from firmware that indicate data loss. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-28[SCSI] bnx2fc: Support 'sequence cleanup' taskBhanu Prakash Gollapudi1-0/+97
For the devices that support sequence level error recovery, based on the REC response, the firmware has to be informed about the offset from which the retransmission should happen. Driver initiates sequence cleanup task to firmware so that the firmware can program the task. Upon the sequence cleanup completion, SRR is issued to retransmit the sequence. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bnx2fc: Enable REC & CONF support for the sessionBhanu Prakash Gollapudi1-0/+12
Based on PRLI response, identify if the target is FCP-2 (seq level error recovery) capable, and appropriately set the corresponding CONF, REC flags when offloading the session. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bnx2fc: Introduce interface structure for each vlan interfaceBhanu Prakash Gollapudi1-43/+55
Currently, bnx2fc has a hba structure that can work with only a single vlan interface. When there is a change in vlan id, it does not have the capability to switch to different vlan interface. To solve this problem, a new structure called 'interface' has been introduced, and each hba can now have multiple interfaces, one per vlan id. Most of the patch is a moving the interface specific fields from hba to the interface structure, and appropriately modifying the dereferences. A list of interfaces (if_list) is maintained along with adapter list. During a create call, the interface structure is allocated and added to if_list and deleted & freed on a destroy call. Link events are propagated to all interfaces belonging to the hba. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-26[SCSI] bnx2fc: Replace printks with KERN_ALERT to KERN_ERR/KERN_INFOBhanu Prakash Gollapudi1-11/+12
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds1-1/+23
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (77 commits) [SCSI] fix crash in scsi_dispatch_cmd() [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu [SCSI] bfa: Update the driver version to 3.0.2.1 [SCSI] bfa: Driver and BSG enhancements. [SCSI] bfa: Added support to query PHY. [SCSI] bfa: Added HBA diagnostics support. [SCSI] bfa: Added support for flash configuration [SCSI] bfa: Added support to obtain SFP info. [SCSI] bfa: Added support for CEE info and stats query. [SCSI] bfa: Extend BSG interface. [SCSI] bfa: FCS bug fixes. [SCSI] bfa: DMA memory allocation enhancement. [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support. [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes. [SCSI] bfa: Added Fabric Assigned Address(FAA) support [SCSI] bfa: IOC bug fixes. [SCSI] bfa: Enable ASIC block configuration and query. [SCSI] bnx2i: Updated copyright and bump version [SCSI] bnx2i: Modified to skip CNIC registration if iSCSI is not supported ... Fix up some trivial conflicts in: - drivers/scsi/bnx2fc/{bnx2fc.h,bnx2fc_fcoe.c}: Crazy broadcom version number conflicts - drivers/target/tcm_fc/tfc_cmd.c Just trivial cleanups done on adjacent lines
2011-06-29[SCSI] bnx2fc: Fix kernel panic when deleting NPIV portsBhanu Prakash Gollapudi1-1/+23
Deleting NPIV port causes a kernel panic when the NPIV port is in the same zone as the physical port and shares the same LUN. This happens due to the fact that vport destroy and unsolicited ELS are scheduled to run on the same workqueue, and vport destroy destroys the lport and the unsolicited ELS tries to access the invalid lport. This patch fixes this issue by maintaining a list of valid lports and verifying if the lport is valid or not before accessing it. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-15New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fcVlad Zolotarov1-205/+237
New FW/HSI (7.0): - Added support to 578xx chips - Improved HSI - much less driver's direct access to the FW internal memory needed. New implementation of the HSI handling layer in the bnx2x (bnx2x_sp.c): - Introduced chip dependent objects that have chip independent interfaces for configuration of MACs, multicast addresses, Rx mode, indirection table, fast path queues and function initialization/cleanup. - Objects functionality is based on the private function pointers, which allows not only a per-chip but also PF/VF differentiation while still preserving the same interface towards the driver. - Objects interface is not influenced by the HSI changes which do not require providing new parameters keeping the code outside the bnx2x_sp.c invariant with regard to such HSI chnages. Changes in a CNIC, bnx2fc and bnx2i modules due to the new HSI. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
2011-05-01[SCSI] bnx2fc: introduce missing kfreeJulia Lawall1-0/+3
Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-03-23[SCSI] bnx2fc: Fix MTU issue by using static MTUBhanu Gollapudi1-1/+1
bnx2x now uses seperate MTUs for networking and FCoE. FCoE MTU is fixed to 2500 and bnx2fc now needs to match this logic by using FCOE_MTU instead of netdev->mtu. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-03-23[SCSI] bnx2fc: Call bnx2fc_return_rqe and bnx2fc_get_next_rqe with tgt lock heldNithin Sujir1-2/+11
tgt lock is needed during - bnx2fc_return_rqe to protect the rq_prod_idx. bnx2fc_get_next_rqe to protect rq_cons_idx Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-02-28[SCSI] bnx2fc: Broadcom FCoE offload driverBhanu Gollapudi1-0/+1868
This driver is for Broadcom Netxtreme II 57712 chip. The following patch contains the driver sources for bnx2fc driver. libfc/libfcoe changes to enable bnx2fc have already gone through the fcoe tree. bnx2fc is a SCSI low level driver that interfaces with SCSI midlayer, libfc, libfcoe, cnic modules. bnx2fc driver uses services of libfc for slow path operations such as FIP and fabric discovery. The fast path IO perations are performed after offloading the session information to the underlying FCoE firmware. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>