[SCSI] libfc: reduce can_queue for all FCP frame allocation failures
authorVasu Dev <vasu.dev@intel.com>
Tue, 3 Nov 2009 19:48:00 +0000 (11:48 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 4 Dec 2009 18:01:09 +0000 (12:01 -0600)
commitc46be11a683acc1ccf86883ea906f171b90ff29a
tree5c9766a2e6f1403acd3b8ceec281ef6803df418c
parenta7bbc7f40aa01eefef3d367349e1e6e87881a305
[SCSI] libfc: reduce can_queue for all FCP frame allocation failures

Currently can_queue is reduced only if frame alloc fails
during fc_fcp_send_data but frame alloc can fail at several
other places in FCP data path and can_queue needs to be
reduced for any FCP frame alloc failure.

This patch adds fc_fcp_frame_alloc for all FCP frame allocations
and if fc_frame_alloc fails in fc_fcp_frame_alloc then reduce
can_queue in fc_fcp_frame_alloc, this will reduce can_queue for
all FCP frame alloc failures.

This required moving fc_fcp_reduce_can_queue up, to build without
adding its prototype. Also renamed fc_fcp_reduce_can_queue to
fc_fcp_can_queue_ramp_down.

Removes fc_fcp_reduce_can_queue calling from fc_fcp_recv since
not needed with added fc_fcp_frame_alloc reducing can_queue.

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@suse.de>
drivers/scsi/libfc/fc_fcp.c