README changes for flashnode submode support for host mode.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Manpage changes for flashnode submode support for host mode.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
iscsiadm: Add flash node mgmt support.

This support lets the user manage the target entries in adapter flash and
perform various operations like add, delete, login, logout,
and update the target information.

The sysfs entries will look as cited below:
        /sys/bus/iscsi_flashnode/devices/flashnode_sess-<host_no>:<flashnode_id>/<session attrs>
        /sys/bus/iscsi_flashnode/devices/flashnode_conn-<host_no>:<flashnode_id>:<conn_id>/<conn attrs>

Operations using iscsiadm:
=========================

List all target nodes stored in the FLASH of the adapter
\# iscsiadm -m host -H hostno -C flashnode -o show

View all parameters of one particular flash node
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -o show

Update an entry and commit to adapter FLASH
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -n <name> -v <value> -o update

Multiple name, value pairs can be specified in a single command for update operation

Delete an entry
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx>  -o delete

Create a new entry
\# iscsiadm -m host -H hostno -C flashnode -o new -A <ipv4/ipv6>
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -n <name> -v <value> -o update

Example, create new entry:
\#iscsiadm -m host -H 7 -C flashnode -o new -A ipv4
Flashnode index: 2

New flashnode for host7 added

\#iscsiadm -m host -H 7 -C flashnode -o show
qla4xxx: [0] 192.168.1.12:3260,2 iqn.2002-03.com.compellent:5000d310004b0716
qla4xxx: [1] 192.168.1.12:3260,2
qla4xxx: [2]

Here - The newly created entry is at flashnode_idx 2, use it to update the entry

\# iscsiadm -m host -H 7 -C flashnode -x 2 -o update flashnode.conn[0].ipaddress -v 192.168.1.13
\#iscsiadm -m host -H 7 -C flashnode -o show
qla4xxx: [0] 192.168.1.12:3260,2 iqn.2002-03.com.compellent:5000d310004b0716
qla4xxx: [1] 192.168.1.12:3260,2
qla4xxx: [2] 192.168.1.13:3260,0

Login
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx>  -o login

Logout
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx>  -o logout
\# iscsiadm -m session -r sid -u

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
iscsid: fix iscsid segfault during qla4xxx login

If the kernel sends multiple ISCSI_KEVENT_CONN_LOGIN_STATE
events for the same login event iscsid will segault.

When we get a conn error we will set the r_stage to reopen, then when
session_conn_process_login handles the first login event we set the r_stage
to R_STAGE_NO_CHANGE. But then it looks like if we get a second login event
r_stage is no_change and session_conn_process_login will run again and
call mgmt_ipc_write_rsp on a bad qtask.
Updated RPM script to handle latest patch (bnc#810208)
Updated spec file to match current SP3
Final update of rpm script for flash support