linux/include/scsi
Vasu Dev bc0e17f691 [SCSI] libfc, fcoe: fixed locking issues with lport->lp_mutex around lport->link_status
The fcoe_xmit could call fc_pause in case the pending skb queue len is larger
than FCOE_MAX_QUEUE_DEPTH, the fc_pause was trying to grab lport->lp_muex to
change lport->link_status and that had these issues :-

1. The fcoe_xmit was getting called with bh disabled, thus causing
"BUG: scheduling while atomic" when grabbing lport->lp_muex with bh disabled.

2. fc_linkup and fc_linkdown function calls lport_enter function with
lport->lp_mutex held and these enter function in turn calls fcoe_xmit to send
lport related FC frame, e.g. fc_linkup => fc_lport_enter_flogi to send flogi
req. In this case grabbing the same lport->lp_mutex again in fc_puase from
fcoe_xmit would cause deadlock.

The lport->lp_mutex was used for setting FC_PAUSE in fcoe_xmit path but
FC_PAUSE bit was not used anywhere beside just setting and clear this
bit in lport->link_status, instead used a separate field qfull in fc_lport
to eliminate need for lport->lp_mutex to track pending queue full condition
and in turn avoid above described two locking issues.

Also added check for lp->qfull in fc_fcp_lport_queue_ready to trigger
SCSI_MLQUEUE_HOST_BUSY when lp->qfull is set to prevent more scsi-ml cmds
while lp->qfull is set.

This patch eliminated FC_LINK_UP and FC_PAUSE and instead used dedicated
fields in fc_lport for this, this simplified all related conditional
code.

Also removed fc_pause and fc_unpause functions and instead used newly added
lport->qfull directly in fcoe.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-06 15:37:49 -06:00
..
fc [SCSI] FC protocol definition header files 2008-12-29 11:24:32 -06:00
fc_encode.h [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_frame.h [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_transport_fcoe.h [SCSI] fcoe: Fibre Channel over Ethernet 2008-12-29 11:24:33 -06:00
iscsi_if.h [SCSI] libiscsi_tcp: support padding offload 2008-12-29 11:24:23 -06:00
iscsi_proto.h [SCSI] iscsi_tcp: Enable any size command 2008-07-12 08:22:23 -05:00
libfc.h [SCSI] libfc, fcoe: fixed locking issues with lport->lp_mutex around lport->link_status 2009-03-06 15:37:49 -06:00
libfcoe.h [SCSI] fcoe: Fibre Channel over Ethernet 2008-12-29 11:24:33 -06:00
libiscsi_tcp.h [SCSI] iscsi_tcp: make padbuf non-static 2009-01-13 10:41:34 -06:00
libiscsi.h [SCSI] libiscsi: allow drivers to modify the itt sent to the target 2008-12-29 11:24:22 -06:00
libsas.h include: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:54 -04:00
libsrp.h [SCSI] tgt: convert libsrp and ibmvstgt to use srp_transport 2007-10-12 14:37:57 -04:00
sas_ata.h [SCSI] libsas: fix missing inlines in header file 2008-04-07 12:19:10 -05:00
sas.h [SCSI] libsas: Convert sas_proto users to sas_protocol 2008-01-11 18:22:41 -06:00
scsi_cmnd.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_dbg.h [SCSI] Fix device not ready printk 2007-10-12 14:51:56 -04:00
scsi_device.h [SCSI] add residual argument to scsi_execute and scsi_execute_req 2008-12-29 11:24:24 -06:00
scsi_devinfo.h Merge ../scsi-rc-fixes-2.6 2006-04-14 15:47:45 -05:00
scsi_dh.h [SCSI] scsi_dh: attach to hardware handler from dm-mpath 2008-07-26 15:14:53 -04:00
scsi_driver.h Revert "scsi: revert "[SCSI] Get rid of scsi_cmnd->done"" 2008-01-06 10:17:12 -08:00
scsi_eh.h [SCSI] scsi_eh_prep_cmnd should save scmd->underflow 2008-07-26 15:14:56 -04:00
scsi_host.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_ioctl.h [PATCH] don't mess with file in scsi_nonblockable_ioctl() 2008-10-21 07:47:28 -04:00
scsi_netlink_fc.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_netlink.h [SCSI] scsi_netlink: Add transport and LLD recieve and event support 2008-10-03 11:46:13 -05:00
scsi_tcq.h scsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map 2008-10-27 19:25:30 +01:00
scsi_tgt_if.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_tgt.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_transport_fc.h [SCSI] fc transport: restore missing dev_loss_tmo callback to LLDD 2009-01-06 09:43:33 -06:00
scsi_transport_iscsi.h [SCSI] libiscsi: pass opcode into alloc_pdu callout 2008-12-29 11:24:23 -06:00
scsi_transport_sas.h SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00
scsi_transport_spi.h [SCSI] spi transport class: export spi_dv_pending 2007-02-02 20:44:25 -06:00
scsi_transport_srp.h [SCSI] tgt: move tsk_mgmt_response callback to transport class 2007-10-12 14:38:01 -04:00
scsi_transport.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi.h [SCSI] scsi: add transport host byte errors (v3) 2008-10-13 09:28:48 -04:00
scsicam.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sg.h [SCSI] sg: Add target reset support 2008-07-12 08:22:32 -05:00
srp.h [SCSI] srp.h: Add I/O Class values 2006-06-17 20:37:38 -07:00