alistair23-linux/drivers/infiniband
Bart Van Assche c996bb47bb IB/srp: Make receive buffer handling more robust
The current strategy in ib_srp for posting receive buffers is:

 * Post one buffer after channel establishment.
 * Post one buffer before sending an SRP_CMD or SRP_TSK_MGMT to the target.

As a result, only the first non-SRP_RSP information unit from the
target will be processed.  If that first information unit is an
SRP_T_LOGOUT, it will be processed.  On the other hand, if the
initiator receives an SRP_CRED_REQ or SRP_AER_REQ before it receives a
SRP_T_LOGOUT, the SRP_T_LOGOUT won't be processed.

We can fix this inconsistency by changing the strategy for posting
receive buffers to:

 * Post all receive buffers after channel establishment.
 * After a receive buffer has been consumed and processed, post it again.

A side effect is that the ib_post_recv() call is moved out of the SCSI
command processing path.  Since __srp_post_recv() is not called
directly any more, get rid of it and move the code directly into
srp_post_recv().  Also, move srp_post_recv() up in the file to avoid a
forward declaration.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2010-08-04 11:47:39 -07:00
..
core IB/ucm: Use memdup_user() 2010-05-25 21:10:57 -07:00
hw IB/qib: Use request_firmware() to load SD7220 firmware 2010-07-08 13:27:05 -07:00
ulp IB/srp: Make receive buffer handling more robust 2010-08-04 11:47:39 -07:00
Kconfig IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
Makefile IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00