ISCSIUIO: Added code to support HP switch dependent MF mode

This feature is for bnx2x only and is not enabled.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed segfault observed after failing both MPIO paths

Various memory leaks were identified and resolved in the nic
cleanup path.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed a race condition between nic enabling/DHCP failure

Session recovery failure were observed during ifupdown/MTU change
stress testing with active sessions when DHCP fails.

The problem was caused by a race condition between the nic_enable
thread and the DHCP failure handler which causes subsequent
connection request to fail.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added support for the new net params

   Fixes
   -----
   1. Problem: Cont00049383 - No mechanism in iface file to support
               gateway/routing
      Change:  Added support for the additional network parameters
               as passed from the newer iscsi-util.
               These parameters include:
               IPv4: subnet_mask, gateway
               IPv6: ipv6_linklocal, ipv6_router,
                     ipv6_autocfg, linklocal_autocfg, router_autocfg
               VLAN: vlan_id, vlan_priority, vlan_state
               Other: mtu, port
      Impact:  All

   2. Problem: Cont00060806 - Unable to connect target using DHCP over
               tagged VLAN
      Change:  DHCP+VLAN is a new feature enhancement that was added
               alongside all other new iface parameters.
      Impact:  All

   Enhancements
   ------------
   1. Lock iscsid's connect request with path_req so connect requests
      with DHCP/Static will no longer override each other

   2. Fixed the if_down handler from global to nic specific

   3. Fixed various synchronization issues

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed VLAN id NL response

   Fixes
   -----
   1. Problem: Cont00061513 - Unable to connect to target over VLAN
               interface
      Change:  The VLAN id was not properly passed back to the CNIC
               driver for the offload request
      Impact:  All

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed the reconnect problem upon DHCPv4 acq failure

   Fixes
   -----
   1. Problem: Cont00061529 - Unable to connect to target after an
               initial failed login attempt until iscsi service is
               restarted
      Cause:   Upon a failed DHCPv4 acquisition due to the wrong VLAN
               tag in the initial iface setup, any iscsid connect request
               from the same NIC will get dropped due to a bug.
      Change:  Fixed the bug which prevented new iscsid connect requests
               from getting honored
      Impact:  All

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed the nic->nl_process thread access macro

Fixed the NL_PROCESS_NEXT_ENTRY macro to actually use the next entry

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed the bnx2x device open error handler

   Fixes
   -----
   1. Problem: Cont00061978 - Load/unload stress test fails
      Cause:   The bnx2x open request was failing due to the module
               request procedure.  However, the open failure was
               not being handled correctly.
      Change:  Fixed the device open error handling
      Impact:  5771X/578XX

   2. Change:  Added support for bnx2x version > 1.70.00

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed the login/logout stress failure due to packet buffer

    Fixes
    -----
    1. Problem: Cont00062170 - IPv6 login/logout stress fails
       Cause:   The packet buffer routine for IPv6 did not take
                network order <-> host order into consideration
       Change:  Added a htons call to compensate for the ntohs pair
       Impact:  All

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added connectivity fix for FLR/NPAR under ESX5.0:PDA

   Fixes
   -----
   1. Problem: Cont00061869 - Unable to setup an offload iSCSI
               connection with FLR/NPAR under ESX5.0:PDA
      Cause:   The physical function ID was previously extracted
               from the sysfs of the VM which might not be consistent
               to the actual physical setup due to the function
               remapping in the hypervisor
      Change:  Read the physical function ID directly from the BAR0
               ME register
      Impact:  All

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added iface_num passing via iscsi_uevent

   Enhancements
   ------------
   1. Added support for the new iface_num field in the iscsi_uevent
      path

   2. Fixed bug in the nic_iface search engine based on iface_num

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed the iface_num bug for VLAN connectivity

   Fixes
   -----
   1. Problem: Cont00062660 - Unable to login with VLAN iscsiuio
               on RHEL6.2
      Cause:   The open-iscsi util in RHEL6.2 has a bug which
               does not pass the correct iface_num to iscsiuio
      Change:  Added workaround to fall back to do the legacy
               VLAN support if iface_num and vlan_id = 0
      Impact:  RHEL6.2

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed the login problem with the new RHEL6.3 open-iscsi

   Fixes
   -----
   1. Problem: Cont00062805 - Cannot login to iSCSI targets on RHEL6.3
      Cause:   The problem was caused by a change made to the iface_rec
               structure in the RHEL6.3 inbox open-iscsi util
      Change:  The new changes is now incorporated
      Impact:  All

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added DHCPv6 request DUID link address + time support

   Fixes
   -----
   1. Problem: Cont00062993 - IPv6 DHCP with VLAN specification in
               iface file gets wrong address
      Cause:   The DHCPv6 request was using the same DUID as always
               so the non-VLAN DHCP server responded to our broadcast
               instead
      Change:  Changed the DHCPv6 request DUID to link address + time
               instead of link address alone
      Impact:  DHCPv6 operation

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added changes as discovered by Coverity

   Fixes
   -----
   1. Problem: RHEL BZ 734010/804580 - issues found by the Coverity
               scan
      Cause:   10 code issues were flagged for revision
      Change:  Fixed all area of concern
      Impact:  All

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed a bug in the IPv4 DHCP + VLAN procedure

   1. Problem: Cont00063177 - IPv4 DHCP with VLAN specification in
               iface file gets wrong address
      Cause:   The DHCPv4 handler was not discriminating the VLAN tag
               associated with the DHCP offers from multiple DHCP
               servers
      Change:  Changed the DHCPv4 handler to drop DHCP offer packets
               that doesn't match the VLAN tag of the intended DHCP
               discovery packet
      Impact:  DHCPv4 operation

   2. Fixed a bug in the bnx2x driver version read.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added VLAN priority and VLAN id = 1 support

VLAN priority is part of the new net params that got added to the
newer open-iscsi.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Changed the priority for VLAN configuration

1. vlan_id = 0 means no vlan
2. vlan_id != 0, but vlan_state = "disable" means no vlan

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Added fix for the Static IPv6 connecting with RA/LL

   Fixes
   -----
   1. Problem: Cont00063421 - Static IPv6 cannot connect via RA/LL
      Cause:   The router advertise and the linklocal address
               were corrupted due to the override capabilities
               added for the newer open-iscsi util
      Change:  Fixed the address override code
      Impact:  Static IPv6

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSIUIO: Fixed up and remove vlan_priority as a feature

The fw/hw is preventing the vlan_priority from being populated.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>