iscsiuio: Remove autogenerated files from tracking

We should not track autogenerated files; this only leads
to pointless merge errors.

Signed-off-by: Hannes Reinecke <hare@suse.de>
iscsiuio: Update automake files

The automake files from iscsiuio are somewhat oldish.
So update them to the current standard.

Signed-off-by: Hannes Reinecke <hare@suse.de>
iscsiuio: Add .gitignore files

Add .gitignore to ignore autogenerated files.

Signed-off-by: Hannes Reinecke <hare@suse.de>
iscsiuio: fix compilation

Add missing $(AM_CFLAGS) to lib_iscsi_uip_a_CFLAGS.
Add missing DESTDIR

Several Makefile targets are missing DESTDIR, making it
hard for packagers.

Signed-off-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
iscsi tools: set non negotiated params early.

This patch has the iscsi tools pass down the non-negotiated
iscsi settings before doing iscsi login. This allows the
drivers to get info that might be neede to setup the session
early.

This patch also adds the missing discovery_sess param to
the non negotiated params.
iscsiadm: Fix the hostno check for stats submode of host mode

This fixes the condition where hostno value of 0 was being treated
as invalid.

Signed-off-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
iscsiadm: Fix the compile time warning

This fixes the following compile time warning message:

iscsiadm.c:2248: warning: passing argument 1 of 'print_host_stats' from incompatible pointer type

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
ISCSIUIO: Fixed a pthread resc leak from excessive session recovery

A pthread resource leak was discovered in the ongoing pthread
creation code during the session recovery process.  These pthreads
were erroneously created as joinable instead of having the intended
detached attribute.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
iscsid: Fix handling of iscsi async events.

When iscsi targets send 32 or more iscsi async event pdus the
initiator will run out of memory for events and this message:

BUG: iscsid: Can not allocate memory for receive context.

will be logged non stop. iscsid will then not be able to
complate any more requests because it is stuck in a endless loop
printing that message.

This fixes the problem by having iscsid handle an event after it
has read it in from netlink or the mgmt ipc. Previously we would
queue all events then handle them.
be2iscsi: Fix MaxXmitDataLenght of the driver.

 Issue :
 During login negotiation if the MaxRecvDataSegmenLen given by the
 target is 0, then MRDSL default value of 8K should be considered.
 Some old targets close the CXN if the PDU received size is greater
 than the MaxRecvDataSegmentLen set during negotiation.

 Fix :
 When target is not sending MaxRecvDataSegmentLen in the negotiated
 params the value is 0. be2iscsi was setting max_xmit_dlength to 64k
 in this case. This fix sets the MaxRecvDataSegmentLen=8k if during
 negotiation the MaxRecvDataSegmentLen=0

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Fix StatSN in Open-iSCSI Stack.

 When LIO target is used, STATSN in login response can be in
 the range 0x0 - 0xFFFFFFFF. Open-iSCSI Stack had the type
 as ISCSI_INT for StatSN, so StatSN used to get reset to 0.

 Adding new type ISCSI_UINT feild to fix this issue.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>