summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] bnx2fc: IO completion not processed due to missed wakeupBhanu Gollapudi2011-03-231-6/+4
| | | | | | | | | | | | | | | | | | | | | Driver does not detect a new CQE (completion queue entry) if a thread receives the wakup when it is in TASK_RUNNING state. Fix is to set the state to TASK_INTERRUPTIBLE while holding the fp_work_lock. Also, Use __set_current_task() since it is now set inside a spinlock with synchronization. Two other related optimizations: 1. After we exit the while (!kthread_should_stop()) loop, use __set_current_state() since synchronization is no longer needed. 2. Remove set_current_state(TASK_RUNNING) after schedule() since it should always be TASK_RUNNING after schedule(). Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2fc: Bump version to 1.0.1Nithin Sujir2011-03-232-2/+2
| | | | | | | 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>
* [SCSI] bnx2fc: Remove unnecessary module state checksBhanu Gollapudi2011-03-231-23/+0
| | | | | | | | | The check for module state MODULE_STATE_LIVE is no longer required for LLDs, as libfcoe transport takes care of it. Reference: http://marc.info/?l=linux-scsi&m=129989565903046&w=2 Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2fc: Fix MTU issue by using static MTUBhanu Gollapudi2011-03-233-36/+6
| | | | | | | | | 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>
* [SCSI] bnx2fc: Remove network bonding checkingMichael Chan2011-03-231-7/+0
| | | | | | | | | | | bnx2fc only operates on bnx2x hardware devices and not master bonding devices, so there is no need to check for bonding. Even if the bnx2x device is "enslaved" into a bonding device, FCoE is unaffected as it has its own MAC address and queues. 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>
* [SCSI] bnx2fc: Call bnx2fc_return_rqe and bnx2fc_get_next_rqe with tgt lock heldNithin Sujir2011-03-231-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>
* [SCSI] bnx2fc: common free list for cleanup commandsBhanu Gollapudi2011-03-233-32/+58
| | | | | | | | | | | | | | | | | | | Cleanup commands are issued to the firmware to cleanup any stuck ios that are supposed to be implicitly aborted. In the worst case we can have all scsi ios filling up the free_list and we may not be able to allocate cleanup tasks. So the driver has to reserve free_list entries to be able to allocate the cleanup tasks. This reserve free_list common to all cpus is allocated as one additional entry in the per cpu free_lists. In bnx2fc_cmd_alloc(), there is a related fix to use get_cpu() for the free_list_index. This will prevent using the wrong index if the CPU is preempted. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2fc: Remove rtnl_trylock/restart_syscall checksNithin Sujir2011-03-231-14/+5
| | | | | | | | | | Call rtnl_lock instead of rtnl_trylock & restart_syscall. This is bnx2fc counterpart of fcoe fixes, here is the reference: https://lists.open-fcoe.org/pipermail/devel/2011-March/011199.html Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2fc: Avoid holding cq_lock when iounmap() is calledBhanu Gollapudi2011-03-231-2/+2
| | | | | | | | | | | | | | | With kernel debugging enabled, holding cq_lock when calling bnx2fc_free_session_resc() which calls iounmap() leads to a warning stack trace [INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected]. iounmap() grabs a HARDIRQ-unsafe vmlist lock, so holding spin_lock_bh(cq_lock) when calling iounmap() will trigger the LOCKDEP warning. Since cq_lock is required only to guard against deletion, hold the lock just before freeing the cq. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2fc: Broadcom FCoE offload driverBhanu Gollapudi2011-02-2811-0/+9476
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>
OpenPOWER on IntegriCloud