aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-03-31Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds1-2/+2
Pull SCSI updates from James Bottomley: "This is primarily another round of driver updates (lpfc, bfa, fcoe, ipr) plus a new ufshcd driver. There shouldn't be anything controversial in here (The final deletion of scsi proc_ops which caused some build breakage has been held over until the next merge window to give us more time to stabilise it). I'm afraid, with me moving continents at exactly the wrong time, anything submitted after the merge window opened has been held over to the next merge window." * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (63 commits) [SCSI] ipr: Driver version 2.5.3 [SCSI] ipr: Increase alignment boundary of command blocks [SCSI] ipr: Increase max concurrent oustanding commands [SCSI] ipr: Remove unnecessary memory barriers [SCSI] ipr: Remove unnecessary interrupt clearing on new adapters [SCSI] ipr: Fix target id allocation re-use problem [SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revision [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up [SCSI] bfa: Update the driver version to 3.0.23.0 [SCSI] bfa: BSG and User interface fixes. [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario. [SCSI] bfa: Move service parameter programming logic into firmware. [SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation. [SCSI] bfa: Flash controller IOC pll init fixes. [SCSI] bfa: Serialize the IOC hw semaphore unlock logic. [SCSI] bfa: Modify ISR to process pending completions [SCSI] bfa: Add fc host issue lip support [SCSI] mpt2sas: remove extraneous sas_log_info messages [SCSI] libfc: fcoe_transport_create fails in single-CPU environment [SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2] ...
2012-03-28[SCSI] bnx2fc: Remove bh disable in softirq contextNeil Horman1-2/+2
As with the fcoe sw transport, the bnx2fc packet handler function runs only in softirq context. Theres no need to disable bottom halves here Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds1-0/+1
Pull networking fixes from David Miller: 1) L2TP doesn't get autoloaded when you try to open an L2TP socket due to a missing module alias, fix from Benjamin LaHaise. 2) Netlabel and RDS should propagate gfp flags given to them by callers, fixes from Dan Carpeneter. 3) Recursive locking fix in usbnet wasn't bulletproof and can result in objects going away mid-flight due to races, fix from Ming Lei. 4) Fix up some confusion about a bool module parameter in netfilter's iptable_filter and ip6table_filter, from Rusty Russell. 5) If SKB recycling is used via napi_reuse_skb() we end up with different amounts of headroom reserved than we had at the original SKB allocation. Fix from Eric Dumazet. 6) Fix races in TG3 driver ring refilling, from Michael Chan. 7) We have callbacks for IPSEC replay notifiers, but some call sites were not using the ops method and instead were calling one of the implementations directly. Oops. Fix from Steffen Klassert. 8) Fix IP address validation properly in the bonding driver, the previous fix only works with netlink where the subnet mask and IP address are changed in one atomic operation. When 'ifconfig' ioctls are used the IP address and the subnet mask are changed in two distinct operations. Fix from Andy Gospodarek. 9) Provide a sky2 module operation to work around power management issues with some BIOSes. From Stephen Hemminger. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: usbnet: consider device busy at each recieved packet bonding: remove entries for master_ip and vlan_ip and query devices instead netfilter: remove forward module param confusion. usbnet: don't clear urb->dev in tx_complete usbnet: increase URB reference count before usb_unlink_urb xfrm: Access the replay notify functions via the registered callbacks xfrm: Remove unused xfrm_state from xfrm_state_check_space RDS: use gfp flags from caller in conn_alloc() netlabel: use GFP flags from caller instead of GFP_ATOMIC l2tp: enable automatic module loading for l2tp_ppp cnic: Fix parity error code conflict tg3: Fix RSS ring refill race condition sky2: override for PCI legacy power management net: fix napi_reuse_skb() skb reserve
2012-03-22Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2-8/+20
SCSI updates from James Bottomley: "The update includes the usual assortment of driver updates (lpfc, qla2xxx, qla4xxx, bfa, bnx2fc, bnx2i, isci, fcoe, hpsa) plus a huge amount of infrastructure work in the SAS library and transport class as well as an iSCSI update. There's also a new SCSI based virtio driver." * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (177 commits) [SCSI] qla4xxx: Update driver version to 5.02.00-k15 [SCSI] qla4xxx: trivial cleanup [SCSI] qla4xxx: Fix sparse warning [SCSI] qla4xxx: Add support for multiple session per host. [SCSI] qla4xxx: Export CHAP index as sysfs attribute [SCSI] scsi_transport: Export CHAP index as sysfs attribute [SCSI] qla4xxx: Add support to display CHAP list and delete CHAP entry [SCSI] iscsi_transport: Add support to display CHAP list and delete CHAP entry [SCSI] pm8001: fix endian issue with code optimization. [SCSI] pm8001: Fix possible racing condition. [SCSI] pm8001: Fix bogus interrupt state flag issue. [SCSI] ipr: update PCI ID definitions for new adapters [SCSI] qla2xxx: handle default case in qla2x00_request_firmware() [SCSI] isci: improvements in driver unloading routine [SCSI] isci: improve phy event warnings [SCSI] isci: debug, provide state-enum-to-string conversions [SCSI] scsi_transport_sas: 'enable' phys on reset [SCSI] libsas: don't recover end devices attached to disabled phys [SCSI] libsas: fixup target_port_protocols for expanders that don't report sata [SCSI] libsas: set attached device type and target protocols for local phys ...
2012-03-22Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds1-3/+1
Pull SCSI target updates from Nicholas Bellinger: "This contains the usual set of updates and bugfixes to target-core + existing fabric module code, along with a handful of the patches destined for v3.3 stable. It also contains the necessary target-core infrastructure pieces required to run using tcm_qla2xxx.ko WWPNs with the new Qlogic Fibre Channel fabric module currently queued in target-pending/for-next-merge, and coming for round 2. The highlights for this series include: - Add target_submit_tmr() helper function for fabric task management (andy) - Convert tcm_fc to use target_submit_tmr() (andy) - Replace target core various cmd flags with a transport state (hch) - Convert loopback to use workqueue submission (hch) - Convert target core to use array_zalloc for tpg_lun_list (joern) - Convert target core to use array_zalloc for device_list (joern) - Add target core support for TMR_ABORT_TASK (nab) - Add target core se_sess->sess_kref + get/put helpers (nab) - Add target core se_node_acl->acl_kref for ->acl_free_comp usage (nab) - Convert iscsi-target to use target_put_session + sess_kref (nab) - Fix tcm_fc fc_exch memory leak in ft_send_resp_status (nab) - Fix ib_srpt srpt_handle_cmd send_ioctx->ioctx_kref leak on exception (nab) - Fix target core up handling of short INQUIRY buffers (roland) - Untangle target-core front-end and back-end meanings of max_sectors attribute (roland) - Set loopback residual field for SCSI commands (roland) - Fix target-core 16-bit target ports for SET TARGET PORT GROUPS emulation (roland) Thanks again to Andy, Christoph, Joern, Roland, and everyone who has contributed this round!" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (64 commits) ib_srpt: Fix srpt_handle_cmd send_ioctx->ioctx_kref leak on exception loopback: Fix transport_generic_allocate_tasks error handling iscsi-target: remove improper externs iscsi-target: Remove unused variables in iscsi_target_parameters.c target: remove obvious warnings target: Use array_zalloc for device_list target: Use array_zalloc for tpg_lun_list target: Fix sense code for unsupported SERVICE ACTION IN target: Remove hack to make READ CAPACITY(10) lie if thin provisioning is enabled target: Bump core version to v4.1.0-rc2-ml + fabric versions tcm_fc: Fix fc_exch memory leak in ft_send_resp_status target: Drop unused legacy target_core_fabric_ops API callers iscsi-target: Convert to use target_put_session + sess_kref target: Convert se_node_acl->acl_group removal to use ->acl_kref target: Add se_node_acl->acl_kref for ->acl_free_comp usage target: Add se_node_acl->acl_free_comp for NodeACL release path target: Add se_sess->sess_kref + get/put helpers target: Convert session_lock to irqsave target: Fix typo in drivers/target iscsi-target: Fix dynamic -> explict NodeACL pointer reference ...
2012-03-21cnic: Fix parity error code conflictMichael Chan1-0/+1
The recently added parity error handling used an error code that was already defined for a different error. This could lead to bnx2x firmware assert. We need to fix this with new error codes that are defined for parity error only. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-21Merge branch 'kmap_atomic' of git://github.com/congwang/linuxLinus Torvalds1-3/+2
Pull kmap_atomic cleanup from Cong Wang. It's been in -next for a long time, and it gets rid of the (no longer used) second argument to k[un]map_atomic(). Fix up a few trivial conflicts in various drivers, and do an "evil merge" to catch some new uses that have come in since Cong's tree. * 'kmap_atomic' of git://github.com/congwang/linux: (59 commits) feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal highmem: kill all __kmap_atomic() [swarren@nvidia.com: highmem: Fix ARM build break due to __kmap_atomic rename] drbd: remove the second argument of k[un]map_atomic() zcache: remove the second argument of k[un]map_atomic() gma500: remove the second argument of k[un]map_atomic() dm: remove the second argument of k[un]map_atomic() tomoyo: remove the second argument of k[un]map_atomic() sunrpc: remove the second argument of k[un]map_atomic() rds: remove the second argument of k[un]map_atomic() net: remove the second argument of k[un]map_atomic() mm: remove the second argument of k[un]map_atomic() lib: remove the second argument of k[un]map_atomic() power: remove the second argument of k[un]map_atomic() kdb: remove the second argument of k[un]map_atomic() udf: remove the second argument of k[un]map_atomic() ubifs: remove the second argument of k[un]map_atomic() squashfs: remove the second argument of k[un]map_atomic() reiserfs: remove the second argument of k[un]map_atomic() ocfs2: remove the second argument of k[un]map_atomic() ntfs: remove the second argument of k[un]map_atomic() ...
2012-03-20scsi: remove the second argument of k[un]map_atomic()Cong Wang1-3/+2
Signed-off-by: Cong Wang <amwang@redhat.com>
2012-02-25scsi: Use struct scsi_lun in fc/fcp.hAndy Grover1-3/+1
This allows us to use scsilun_to_int without an ugly cast. Fix up places that use scsilun_to_int on fcp->fc_lun accordingly. In fc target, this leaves ft_cmd.lun unused, so remove it. Signed-off-by: Andy Grover <agrover@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Kiran Patil <kiran.patil@intel.com> Cc: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-02-20bnx2fc: HSI dependent changes for 7.2.xx FWBhanu Prakash Gollapudi2-4/+10
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>
2012-02-19[SCSI] bnx2fc: Bumped version to 1.0.10Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: NPIV ports go offline when interface is brought down & upBhanu Prakash Gollapudi2-2/+11
When there are 255 NPIV ports, and the interface is brought down & up, both physical and NPIV ports are logged off and never logged back in. Since discovery happens on single CPU, XID resources on that CPU will be limited, which when exhausted the discovery fails. Increase the XID resource range to ensure that the discovery completes successfully. Also ensure that fc_exch_mgr_alloc() doesn't fail on the system that has lower number of CPUs. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: Handle LOGO flooding from the targetBhanu Prakash Gollapudi2-2/+4
Host drops sessions when flood of unsolicited LOGOs are received from the target. Because of unsufficient PLOGI retries, upon exceeding the retry count of 3, the target sessions are dropped. Increased the retry count to 255 to allow sufficient retries in this scenario. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: fix panic in bnx2fc_post_io_reqBhanu Prakash Gollapudi1-2/+3
System panics while accessing stale pointer - timer_work_queue - in the IO path before bnx2fc_stop is called. Fix is to destroy the workqueue after the destroy operation is complete. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-30[SCSI] bnx2fc: Bumped version to 1.0.9Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-30[SCSI] bnx2fc: Handle SRR LS_ACC drop scenarioBhanu Prakash Gollapudi1-11/+12
When SRR LS_ACC is dropped, the driver was not issuing ABTS for SRR when it times out. Since the target received SRR, it was able to send the XFER_RDY and the the original IO request completed successfully. In this condition ABTS was not sent during bnx2fc_srr_compl(). Fix this by first checking for ELS timeout and issue ABTS before checking if original IO request is complete. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-30[SCSI] bnx2fc: Handle ABTS timeout during ulp timeoutBhanu Prakash Gollapudi2-0/+40
If the IO and the corresponding ABTS are not responded by a target, cleanup the IO and issue explicit logout when ulp timer expires while waiting for ABTS to complete. Wait for the session to be ready before returning to the SCSI layer. If the session is not ready let the SCSI-ml escalate the error recovery. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds6-108/+218
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits) [SCSI] qla4xxx: export address/port of connection (fix udev disk names) [SCSI] ipr: Fix BUG on adapter dump timeout [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer [SCSI] hpsa: change confusing message to be more clear [SCSI] iscsi class: fix vlan configuration [SCSI] qla4xxx: fix data alignment and use nl helpers [SCSI] iscsi class: fix link local mispelling [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA [SCSI] aacraid: use lower snprintf() limit [SCSI] lpfc 8.3.27: Change driver version to 8.3.27 [SCSI] lpfc 8.3.27: T10 additions for SLI4 [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes [SCSI] megaraid_sas: Changelog and version update [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts ...
2011-10-16[SCSI] bnx2fc: Bumped version to 1.0.8Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16[SCSI] bnx2fc: Return error statistics of remote peerBhanu Prakash Gollapudi1-0/+20
Add support for get_lesb so that the valid statistics are returned by the remote peer when RLS command is issued. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16[SCSI] bnx2fc: call ctlr_link_up only when the interface is enabledBhanu Prakash Gollapudi1-0/+2
Link may not be up when the driver receives ulp_start event, and hence fcoe_ctlr_link_up is not called. Call fcoe_ctlr_link_up during indicate_netevent only when the interface is enabled. (It has to be called when enabled because that is an indication that the vlan discovery is completed). Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-22[SCSI] bnx2fc: Bumped version to 1.0.7Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-22[SCSI] bnx2fc: Handle bnx2fc_map_sg failureBhanu Prakash Gollapudi1-5/+15
Gracefully handle bnx2fc_map_sg failure, so that queuecommand returns host busy and SCSI-ml can retry the IO. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-22[SCSI] bnx2fc: Replace scsi_dma_map() with dma_map_sg().Bhanu Prakash Gollapudi1-1/+4
scsi_dma_map doesn't work for NPIV since vport dev isn't fully initialized. For more details: http://marc.info/?l=linux-scsi&m=118312448030633&w=2 and commit - c59fd9ebc46da8d48b76955d4d48e3597f8c8726. Signed-off-by: Nithin Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: Bumped version to 1.0.6Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: Fix FW assert during RSCN stress testsBhanu Prakash Gollapudi1-3/+1
Firmware asserts when the same CQE is armed twice. This scenario happens during RSCN stress tests as driver incorrects arms the CQ after the session is offloaded. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: Fix panic caused because of incorrect errror handling in create().Bhanu Prakash Gollapudi1-5/+10
Driver incorrectly calls bnx2fc_interface_cleanup() when bnx2fc_if_create fails which accesses bad pointer. Handle bnx2fc_if_create failure by directly calling bnx2fc_net_cleanup. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: Avoid calling bnx2fc_if_destroy with unnecessary locksBhanu Prakash Gollapudi1-6/+2
It is not required to hold rtnl_lock and bnx2fc_dev_lock when calling bnx2fc_if_destroy, as the locking is only required to serialize creation and deletion of fcoe instances. More importantly, this unnecessary locking causes deadlock as bnx2fc_if_destroy calls fc_remove_host holding rtnl_lock. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: Validate vlan id in NETDEV_UNREGISTER handlerNithin Nayak Sujir1-3/+3
When bnx2fc receives an UNREGISTER event on a vlan interface it calls destroy on all interfaces that matches the physical interface. Add vlan_id check to destroy only the vlan interface that generated the event. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: No abort issued for REC when it times outBhanu Prakash Gollapudi2-14/+18
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-09-17[SCSI] bnx2fc: Send solicitation only after vlan discovery is completeBhanu Prakash Gollapudi2-4/+18
Link up event is generated to the driver even before vlan discovery has started. Because of this driver can send discovery solicitation on a stale vlan. Call fcoe_ctlr_link_up() only when the driver is in enabled state, which implies the vlan discovery is complete before sending solicitation. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-17[SCSI] bnx2fc: Reset max receive frame size during link upBhanu Prakash Gollapudi1-0/+2
If the max receive frame size is changed during link down, the driver uses the same value after linkup unless it is reset to default. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-15net: consolidate and fix ethtool_ops->get_settings callingJiri Pirko1-1/+3
This patch does several things: - introduces __ethtool_get_settings which is called from ethtool code and from drivers as well. Put ASSERT_RTNL there. - dev_ethtool_get_settings() is replaced by __ethtool_get_settings() - changes calling in drivers so rtnl locking is respected. In iboe_get_rate was previously ->get_settings() called unlocked. This fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same problem. Also fixed by calling __dev_get_by_index() instead of dev_get_by_index() and holding rtnl_lock for both calls. - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create() so bnx2fc_if_create() and fcoe_if_create() are called locked as they are from other places. - use __ethtool_get_settings() in bonding code Signed-off-by: Jiri Pirko <jpirko@redhat.com> v2->v3: -removed dev_ethtool_get_settings() -added ASSERT_RTNL into __ethtool_get_settings() -prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock around it and __ethtool_get_settings() call v1->v2: add missing export_symbol Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> [except FCoE bits] Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-29[SCSI] bnx2fc: Need not schedule destroy_work from __bnx2fc_destroyBhanu Prakash Gollapudi1-11/+6
Since it is already called in the right context with rtnl_lock and dev_mutex held. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-28cnic, bnx2fc: Increase maximum FCoE sessions.Michael Chan1-1/+1
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>
2011-08-27[SCSI] bnx2fc: Bump version to 1.0.5Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Prevent creating of NPIV port with duplicate WWNBhanu Prakash Gollapudi1-0/+11
This patch adds a validation step before allowing creation of a new NPIV port. It checks whether the WWPN passed for the new NPIV port to be created is unique for the given physical port. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Obtain WWNN/WWPN from the shared memoryBhanu Prakash Gollapudi1-5/+9
bnx2x driver would obtain the WWNN/WWPN from the shared memory and can be obtained by the bnx2fc driver via ndo_fcoe_get_wwn. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Drop incoming ABTSBhanu Prakash Gollapudi1-0/+8
As an initiator, driver need not handle incoming ABTS. It initiates an ABTS if any IO requests time out. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: code cleanup in bnx2fc_offload_sessionBhanu Prakash Gollapudi1-4/+3
- Free session resources before rport logoff - Do not free session resources in bnx2fc_alloc_session_resc() as it is handled in caller's error handling path. - Do not call bnx2fc_free_session_resc() if bnx2fc_init_tgt() fails as cq_lock is not yet initialized. 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 Gollapudi2-11/+18
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-08-27[SCSI] bnx2fc: IO errors when receiving unsolicited LOGOBhanu Prakash Gollapudi1-6/+0
During the unsolicited LOGO processing, the session is uploaded and offloaded after the relogin is complete. In between any new IOs are errored back as the upload completion flag is set. Upon exhausting the retry count, the application fails the IOs. Return target busy for all the cases when session is not ready. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Do not reuse the fcoe connection id immediatelyBhanu Prakash Gollapudi1-1/+0
CFC_DELETE is issued 2 secs after CONN_TERM is completed. If the session is uploaded and offloaded immediately, it has to wait for the connection id to be available. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Clear DESTROY_CMPL flag after firmware destroyBhanu Prakash Gollapudi1-2/+3
Since this flag was never cleared, the driver does not wait for firmware destroy completions, causing missed KCQEs. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Handle NETDEV_UNREGISTER for vlan devicesBhanu Prakash Gollapudi1-35/+57
Since the driver holds the reference for vlan netdev, the reference has to be released by the driver when the vlan device is removed. Driver handles this in NETDEV_UNREGISTER event. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Reorganize cleanup code between interface_cleanup and if_destoryBhanu Prakash Gollapudi1-24/+23
Move interface specific cleanup functionality to from bnx2fc_if_destroy to bnx2fc_interface_cleanup. Do not access interface/hba in bnx2fc_if_destroy as by the time this function is called interface may already be destroyed. This patch is in preparation to handle NETDEV_UNREGISTER on a vlan device. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Change function names of bnx2fc_netdev_setup/bnx2fc_netdev_cleanupBhanu Prakash Gollapudi1-6/+6
Change them to bnx2fc_interface_setup/bnx2fc_interface_cleanup in preperation for the patches to follow. Interface specific cleanup functionality will be moved to bnx2fc_interface_cleanup. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Do not attempt destroying NPIV port twiceBhanu Prakash Gollapudi1-0/+12
When NPIV ports are created/deleted rapidly there is a race condition between bnx2fc_vport_destroy() from sysfs and bnx2fc_flogi_resp(), which could try to delete the NPIV port from the list twice. Fix is to loop through the list of NPIV ports to find a match, and only when it exists remove it. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Remove erroneous kref_get on IO requestBhanu Prakash Gollapudi1-1/+0
During sequence cleanup, an additional reference for an IO has been taken. Because of this, the IO is never released into the free list. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27[SCSI] bnx2fc: Enable bsg_request support for bnx2fcBhanu Prakash Gollapudi1-0/+2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>