Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Aug 2010 22:15:15 +0000 (15:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Aug 2010 22:15:15 +0000 (15:15 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (276 commits)
  [SCSI] zfcp: Trigger logging in the FCP channel on qdio error conditions
  [SCSI] zfcp: Introduce experimental support for DIF/DIX
  [SCSI] zfcp: Enable data division support for FCP devices
  [SCSI] zfcp: Prevent access on uninitialized memory.
  [SCSI] zfcp: Post events through FC transport class
  [SCSI] zfcp: Cleanup QDIO attachment and improve processing.
  [SCSI] zfcp: Cleanup function parameters for sbal value.
  [SCSI] zfcp: Use correct width for timer_interval field
  [SCSI] zfcp: Remove SCSI device when removing unit
  [SCSI] zfcp: Use memdup_user and kstrdup
  [SCSI] zfcp: Fix retry after failed "open port" erp action
  [SCSI] zfcp: Fail erp after timeout
  [SCSI] zfcp: Use forced_reopen in terminate_rport_io callback
  [SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add
  [SCSI] zfcp: Do not try "forced close" when port is already closed
  [SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCED
  [SCSI] sd: add support for runtime PM
  [SCSI] implement runtime Power Management
  [SCSI] convert to the new PM framework
  [SCSI] Unify SAM_ and SAM_STAT_ macros
  ...

1  2 
MAINTAINERS
drivers/scsi/cxgb3i/cxgb3i_offload.c
drivers/scsi/fcoe/fcoe.c

diff --combined MAINTAINERS
index 7c3b67c34e52a4d5a98df91c60ca9183f6f11f4f,a1129bfd32c0f07c29c363b8e903bce74bcffeca..88ec0447a4f3e767a7b89cf9f50823566062e0e6
@@@ -313,9 -313,11 +313,9 @@@ S:        Maintaine
  F:    drivers/hwmon/adm1029.c
  
  ADM8211 WIRELESS DRIVER
 -M:    Michael Wu <flamingice@sourmilk.net>
  L:    linux-wireless@vger.kernel.org
  W:    http://linuxwireless.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/net/wireless/adm8211.*
  
  ADT746X FAN DRIVER
@@@ -894,13 -896,11 +894,13 @@@ S:      Maintaine
  
  ARM/SAMSUNG ARM ARCHITECTURES
  M:    Ben Dooks <ben-linux@fluff.org>
 +M:    Kukjin Kim <kgene.kim@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.fluff.org/ben/linux/
  S:    Maintained
 -F:    arch/arm/plat-s3c/
 +F:    arch/arm/plat-samsung/
  F:    arch/arm/plat-s3c24xx/
 +F:    arch/arm/plat-s5p/
  
  ARM/S3C2410 ARM ARCHITECTURE
  M:    Ben Dooks <ben-linux@fluff.org>
@@@ -1148,7 -1148,7 +1148,7 @@@ F:      drivers/mmc/host/atmel-mci.
  F:    drivers/mmc/host/atmel-mci-regs.h
  
  ATMEL AT91 / AT32 SERIAL DRIVER
 -M:    Haavard Skinnemoen <hskinnemoen@atmel.com>
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  S:    Supported
  F:    drivers/serial/atmel_serial.c
  
@@@ -1160,18 -1160,18 +1160,18 @@@ F:   drivers/video/atmel_lcdfb.
  F:    include/video/atmel_lcdc.h
  
  ATMEL MACB ETHERNET DRIVER
 -M:    Haavard Skinnemoen <hskinnemoen@atmel.com>
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  S:    Supported
  F:    drivers/net/macb.*
  
  ATMEL SPI DRIVER
 -M:    Haavard Skinnemoen <hskinnemoen@atmel.com>
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  S:    Supported
  F:    drivers/spi/atmel_spi.*
  
  ATMEL USBA UDC DRIVER
 -M:    Haavard Skinnemoen <hskinnemoen@atmel.com>
 -L:    kernel@avr32linux.org
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://avr32linux.org/twiki/bin/view/Main/AtmelUsbDeviceDriver
  S:    Supported
  F:    drivers/usb/gadget/atmel_usba_udc.*
@@@ -1367,7 -1367,7 +1367,7 @@@ BROADCOM BNX2X 10 GIGABIT ETHERNET DRIV
  M:    Eilon Greenstein <eilong@broadcom.com>
  L:    netdev@vger.kernel.org
  S:    Supported
 -F:    drivers/net/bnx2x*
 +F:    drivers/net/bnx2x/
  
  BROADCOM TG3 GIGABIT ETHERNET DRIVER
  M:    Matt Carlson <mcarlson@broadcom.com>
@@@ -1581,7 -1581,7 +1581,7 @@@ F:      include/linux/coda*.
  
  COMMON INTERNET FILE SYSTEM (CIFS)
  M:    Steve French <sfrench@samba.org>
 -L:    linux-cifs-client@lists.samba.org (moderated for non-subscribers)
 +L:    linux-cifs@vger.kernel.org
  L:    samba-technical@lists.samba.org (moderated for non-subscribers)
  W:    http://linux-cifs.samba.org/
  Q:    http://patchwork.ozlabs.org/project/linux-cifs-client/list/
@@@ -1769,13 -1769,6 +1769,13 @@@ W:    http://www.openfabrics.or
  S:    Supported
  F:    drivers/infiniband/hw/cxgb4/
  
 +CXGB4VF ETHERNET DRIVER (CXGB4VF)
 +M:    Casey Leedom <leedom@chelsio.com>
 +L:    netdev@vger.kernel.org
 +W:    http://www.chelsio.com
 +S:    Supported
 +F:    drivers/net/cxgb4vf/
 +
  CYBERPRO FB DRIVER
  M:    Russell King <linux@arm.linux.org.uk>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -2116,20 -2109,11 +2116,20 @@@ F:   drivers/edac/i5000_edac.
  
  EDAC-I5400
  M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i5400_edac.c
  
 +EDAC-I7CORE
 +M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +L:    linux-edac@vger.kernel.org
 +W:    bluesmoke.sourceforge.net
 +S:    Maintained
 +F:    drivers/edac/i7core_edac.c
 +F:    drivers/edac/edac_mce.c
 +F:    include/linux/edac_mce.h
 +
  EDAC-I82975X
  M:    Ranganathan Desikan <ravi@jetztechnologies.com>
  M:    "Arvind R." <arvind@jetztechnologies.com>
@@@ -2625,6 -2609,14 +2625,14 @@@ S:    Maintaine
  F:    Documentation/blockdev/cpqarray.txt
  F:    drivers/block/cpqarray.*
  
+ HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
+ M:    Stephen M. Cameron <scameron@beardog.cce.hp.com>
+ L:    iss_storagedev@hp.com
+ S:    Supported
+ F:    Documentation/scsi/hpsa.txt
+ F:    drivers/scsi/hpsa*.[ch]
+ F:    include/linux/cciss*.h
  HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss)
  M:    Mike Miller <mike.miller@hp.com>
  L:    iss_storagedev@hp.com
@@@ -2903,13 -2895,6 +2911,13 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    drivers/input/
  
 +INPUT MULTITOUCH (MT) PROTOCOL
 +M:    Henrik Rydberg <rydberg@euromail.se>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/input/multi-touch-protocol.txt
 +K:    \b(ABS|SYN)_MT_
 +
  INTEL IDLE DRIVER
  M:    Len Brown <lenb@kernel.org>
  L:    linux-pm@lists.linux-foundation.org
@@@ -3001,14 -2986,20 +3009,14 @@@ F:   drivers/net/ixgb
  F:    drivers/net/ixgbe/
  
  INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
 -M:    Reinette Chatre <reinette.chatre@intel.com>
 -M:    Intel Linux Wireless <ilw@linux.intel.com>
  L:    linux-wireless@vger.kernel.org
 -W:    http://ipw2100.sourceforge.net
 -S:    Odd Fixes
 +S:    Orphan
  F:    Documentation/networking/README.ipw2100
  F:    drivers/net/wireless/ipw2x00/ipw2100.*
  
  INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
 -M:    Reinette Chatre <reinette.chatre@intel.com>
 -M:    Intel Linux Wireless <ilw@linux.intel.com>
  L:    linux-wireless@vger.kernel.org
 -W:    http://ipw2200.sourceforge.net
 -S:    Odd Fixes
 +S:    Orphan
  F:    Documentation/networking/README.ipw2200
  F:    drivers/net/wireless/ipw2x00/ipw2200.*
  
@@@ -3396,7 -3387,7 +3404,7 @@@ KPROBE
  M:    Ananth N Mavinakayanahalli <ananth@in.ibm.com>
  M:    Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
  M:    "David S. Miller" <davem@davemloft.net>
 -M:    Masami Hiramatsu <mhiramat@redhat.com>
 +M:    Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
  S:    Maintained
  F:    Documentation/kprobes.txt
  F:    include/linux/kprobes.h
@@@ -3691,7 -3682,7 +3699,7 @@@ F:      include/linux/mv643xx.
  MARVELL MWL8K WIRELESS DRIVER
  M:    Lennert Buytenhek <buytenh@wantstofly.org>
  L:    linux-wireless@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/net/wireless/mwl8k.c
  
  MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
@@@ -3920,19 -3911,17 +3928,19 @@@ L:   netem@lists.linux-foundation.or
  S:    Maintained
  F:    net/sched/sch_netem.c
  
 -NETERION (S2IO) 10GbE DRIVER (xframe/vxge)
 -M:    Ramkrishna Vepa <ram.vepa@neterion.com>
 -M:    Rastapur Santosh <santosh.rastapur@neterion.com>
 -M:    Sivakumar Subramani <sivakumar.subramani@neterion.com>
 -M:    Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
 +NETERION 10GbE DRIVERS (s2io/vxge)
 +M:    Ramkrishna Vepa <ramkrishna.vepa@exar.com>
 +M:    Sivakumar Subramani <sivakumar.subramani@exar.com>
 +M:    Sreenivasa Honnur <sreenivasa.honnur@exar.com>
 +M:    Jon Mason <jon.mason@exar.com>
  L:    netdev@vger.kernel.org
  W:    http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous
  W:    http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
  S:    Supported
  F:    Documentation/networking/s2io.txt
  F:    drivers/net/s2io*
 +F:    Documentation/networking/vxge.txt
 +F:    drivers/net/vxge/
  
  NETFILTER/IPTABLES/IPCHAINS
  P:    Rusty Russell
@@@ -4231,7 -4220,6 +4239,7 @@@ OPEN FIRMWARE AND FLATTENED DEVICE TRE
  M:    Grant Likely <grant.likely@secretlab.ca>
  L:    devicetree-discuss@lists.ozlabs.org
  W:    http://fdt.secretlab.ca
 +T:    git git://git.secretlab.ca/git/linux-2.6.git
  S:    Maintained
  F:    drivers/of
  F:    include/linux/of*.h
@@@ -4279,9 -4267,10 +4287,9 @@@ F:     include/scsi/osd_
  F:    fs/exofs/
  
  P54 WIRELESS DRIVER
 -M:    Michael Wu <flamingice@sourmilk.net>
 +M:    Christian Lamparter <chunkeey@googlemail.com>
  L:    linux-wireless@vger.kernel.org
 -W:    http://prism54.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
 +W:    http://wireless.kernel.org/en/users/Drivers/p54
  S:    Maintained
  F:    drivers/net/wireless/p54/
  
@@@ -4543,7 -4532,7 +4551,7 @@@ PRISM54 WIRELESS DRIVE
  M:    "Luis R. Rodriguez" <mcgrof@gmail.com>
  L:    linux-wireless@vger.kernel.org
  W:    http://prism54.org
 -S:    Maintained
 +S:    Obsolete
  F:    drivers/net/wireless/prism54/
  
  PROMISE DC4030 CACHING DISK CONTROLLER DRIVER
@@@ -4645,12 -4634,6 +4653,12 @@@ M:    Robert Jarzmik <robert.jarzmik@free.
  L:    rtc-linux@googlegroups.com
  S:    Maintained
  
 +QLOGIC QLA1280 SCSI DRIVER
 +M:    Michael Reed <mdr@sgi.com>
 +L:    linux-scsi@vger.kernel.org
 +S:    Maintained
 +F:    drivers/scsi/qla1280.[ch]
 +
  QLOGIC QLA2XXX FC-SCSI DRIVER
  M:    Andrew Vasquez <andrew.vasquez@qlogic.com>
  M:    linux-driver@qlogic.com
@@@ -4739,8 -4722,9 +4747,8 @@@ S:      Maintaine
  F:    drivers/rapidio/
  
  RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER
 -M:    Corey Thomas <coreythomas@charter.net>
  L:    linux-wireless@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/net/wireless/ray*
  
  RCUTORTURE MODULE
@@@ -5066,14 -5050,6 +5074,14 @@@ S:    Supporte
  F:    include/linux/selinux*
  F:    security/selinux/
  
 +APPARMOR SECURITY MODULE
 +M:    John Johansen <john.johansen@canonical.com>
 +L:    apparmor@lists.ubuntu.com (subscribers-only, general discussion)
 +W:    apparmor.wiki.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev.git
 +S:    Supported
 +F:    security/apparmor/
 +
  SENSABLE PHANTOM
  M:    Jiri Slaby <jirislaby@gmail.com>
  S:    Maintained
@@@ -5349,7 -5325,6 +5357,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
  S:    Maintained
  F:    arch/sparc/
 +F:    drivers/sbus
  
  SPARC SERIAL DRIVERS
  M:    "David S. Miller" <davem@davemloft.net>
@@@ -5417,7 -5392,6 +5425,7 @@@ M:      David Brownell <dbrownell@users.sour
  M:    Grant Likely <grant.likely@secretlab.ca>
  L:    spi-devel-general@lists.sourceforge.net
  Q:    http://patchwork.kernel.org/project/spi-devel-general/list/
 +T:    git git://git.secretlab.ca/git/linux-2.6.git
  S:    Maintained
  F:    Documentation/spi/
  F:    drivers/spi/
@@@ -5618,7 -5592,7 +5626,7 @@@ L:      tomoyo-users-en@lists.sourceforge.j
  L:    tomoyo-dev@lists.sourceforge.jp (subscribers-only, for developers in Japanese)
  L:    tomoyo-users@lists.sourceforge.jp (subscribers-only, for users in Japanese)
  W:    http://tomoyo.sourceforge.jp/
 -T:    quilt http://svn.sourceforge.jp/svnroot/tomoyo/trunk/2.2.x/tomoyo-lsm/patches/
 +T:    quilt http://svn.sourceforge.jp/svnroot/tomoyo/trunk/2.3.x/tomoyo-lsm/patches/
  S:    Maintained
  F:    security/tomoyo/
  
@@@ -6073,9 -6047,10 +6081,9 @@@ F:     Documentation/video4linux/zc0301.tx
  F:    drivers/media/video/zc0301/
  
  USB ZD1201 DRIVER
 -M:    Jeroen Vreeken <pe1rxq@amsat.org>
 -L:    linux-usb@vger.kernel.org
 +L:    linux-wireless@vger.kernel.org
  W:    http://linux-lc100020.sourceforge.net
 -S:    Maintained
 +S:    Orphan
  F:    drivers/net/wireless/zd1201.*
  
  USB ZR364XX DRIVER
@@@ -6255,14 -6230,20 +6263,14 @@@ F:   drivers/mmc/host/wbsd.
  
  WATCHDOG DEVICE DRIVERS
  M:    Wim Van Sebroeck <wim@iguana.be>
 +L:    linux-watchdog@vger.kernel.org
 +W:    http://www.linux-watchdog.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
  S:    Maintained
  F:    Documentation/watchdog/
  F:    drivers/watchdog/
  F:    include/linux/watchdog.h
  
 -WAVELAN NETWORK DRIVER & WIRELESS EXTENSIONS
 -M:    Jean Tourrilhes <jt@hpl.hp.com>
 -L:    linux-wireless@vger.kernel.org
 -W:    http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/
 -S:    Maintained
 -F:    Documentation/networking/wavelan.txt
 -F:    drivers/staging/wavelan/
 -
  WD7000 SCSI DRIVER
  M:    Miroslav Zagorac <zaga@fly.cc.fer.hr>
  L:    linux-scsi@vger.kernel.org
index 3b6a06eebf7f25173e39138dcf894f4ec9248294,246a6c246ed97cd77da2a4a378511b733a704239..3ee13cf9556b0bf4d1c1dda2689e33e2f1f66041
@@@ -264,6 -264,7 +264,7 @@@ static void make_act_open_req(struct s3
        skb->priority = CPL_PRIORITY_SETUP;
        req = (struct cpl_act_open_req *)__skb_put(skb, sizeof(*req));
        req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
+       req->wr.wr_lo = 0;
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, atid));
        req->local_port = c3cn->saddr.sin_port;
        req->peer_port = c3cn->daddr.sin_port;
                           V_TX_CHANNEL(e->smt_idx));
        req->opt0l = htonl(calc_opt0l(c3cn));
        req->params = 0;
+       req->opt2 = 0;
  }
  
  static void fail_act_open(struct s3_conn *c3cn, int errno)
@@@ -379,6 -381,7 +381,7 @@@ static void send_abort_req(struct s3_co
  
        c3cn->cpl_abort_req = NULL;
        req = (struct cpl_abort_req *)skb->head;
+       memset(req, 0, sizeof(*req));
  
        skb->priority = CPL_PRIORITY_DATA;
        set_arp_failure_handler(skb, abort_arp_failure);
@@@ -406,6 -409,7 +409,7 @@@ static void send_abort_rpl(struct s3_co
        c3cn->cpl_abort_rpl = NULL;
  
        skb->priority = CPL_PRIORITY_DATA;
+       memset(rpl, 0, sizeof(*rpl));
        rpl->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_HOST_ABORT_CON_RPL));
        rpl->wr.wr_lo = htonl(V_WR_TID(c3cn->tid));
        OPCODE_TID(rpl) = htonl(MK_OPCODE_TID(CPL_ABORT_RPL, c3cn->tid));
@@@ -430,6 -434,7 +434,7 @@@ static u32 send_rx_credits(struct s3_co
  
        req = (struct cpl_rx_data_ack *)__skb_put(skb, sizeof(*req));
        req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
+       req->wr.wr_lo = 0;
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_RX_DATA_ACK, c3cn->tid));
        req->credit_dack = htonl(dack | V_RX_CREDITS(credits));
        skb->priority = CPL_PRIORITY_ACK;
@@@ -1587,7 -1592,7 +1592,7 @@@ cxgb3i_find_dev(struct net_device *dev
  
        err = ip_route_output_key(dev ? dev_net(dev) : &init_net, &rt, &fl);
        if (!err)
 -              return (&rt->u.dst)->dev;
 +              return (&rt->dst)->dev;
  
        return NULL;
  }
@@@ -1649,7 -1654,7 +1654,7 @@@ int cxgb3i_c3cn_connect(struct net_devi
                c3cn->saddr.sin_addr.s_addr = rt->rt_src;
  
        /* now commit destination to connection */
 -      c3cn->dst_cache = &rt->u.dst;
 +      c3cn->dst_cache = &rt->dst;
  
        /* try to establish an offloaded connection */
        dev = cxgb3_egress_dev(c3cn->dst_cache->dev, c3cn, 0);
diff --combined drivers/scsi/fcoe/fcoe.c
index 1a429ed6da9d722b41f5f979b789915a433ce063,ddd2ca27e00348d2bbeec2426d8c500fdfb9abdf..e79605a61155e03cbdd3c97f6d8674dfe214d45e
@@@ -117,9 -117,14 +117,14 @@@ static void fcoe_recv_frame(struct sk_b
  
  static void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *);
  
- module_param_call(create, fcoe_create, NULL, NULL, S_IWUSR);
+ module_param_call(create, fcoe_create, NULL, (void *)FIP_MODE_AUTO, S_IWUSR);
  __MODULE_PARM_TYPE(create, "string");
  MODULE_PARM_DESC(create, " Creates fcoe instance on a ethernet interface");
+ module_param_call(create_vn2vn, fcoe_create, NULL,
+                 (void *)FIP_MODE_VN2VN, S_IWUSR);
+ __MODULE_PARM_TYPE(create_vn2vn, "string");
+ MODULE_PARM_DESC(create_vn2vn, " Creates a VN_node to VN_node FCoE instance "
+                "on an Ethernet interface");
  module_param_call(destroy, fcoe_destroy, NULL, NULL, S_IWUSR);
  __MODULE_PARM_TYPE(destroy, "string");
  MODULE_PARM_DESC(destroy, " Destroys fcoe instance on a ethernet interface");
@@@ -315,7 -320,11 +320,11 @@@ static int fcoe_interface_setup(struct 
        dev_uc_add(netdev, flogi_maddr);
        if (fip->spma)
                dev_uc_add(netdev, fip->ctl_src_addr);
-       dev_mc_add(netdev, FIP_ALL_ENODE_MACS);
+       if (fip->mode == FIP_MODE_VN2VN) {
+               dev_mc_add(netdev, FIP_ALL_VN2VN_MACS);
+               dev_mc_add(netdev, FIP_ALL_P2P_MACS);
+       } else
+               dev_mc_add(netdev, FIP_ALL_ENODE_MACS);
  
        /*
         * setup the receive function from ethernet driver
  /**
   * fcoe_interface_create() - Create a FCoE interface on a net device
   * @netdev: The net device to create the FCoE interface on
+  * @fip_mode: The mode to use for FIP
   *
   * Returns: pointer to a struct fcoe_interface or NULL on error
   */
- static struct fcoe_interface *fcoe_interface_create(struct net_device *netdev)
+ static struct fcoe_interface *fcoe_interface_create(struct net_device *netdev,
+                                                   enum fip_state fip_mode)
  {
        struct fcoe_interface *fcoe;
        int err;
        /*
         * Initialize FIP.
         */
-       fcoe_ctlr_init(&fcoe->ctlr);
+       fcoe_ctlr_init(&fcoe->ctlr, fip_mode);
        fcoe->ctlr.send = fcoe_fip_send;
        fcoe->ctlr.update_mac = fcoe_update_src_mac;
        fcoe->ctlr.get_src_addr = fcoe_get_src_mac;
@@@ -401,7 -412,11 +412,11 @@@ void fcoe_interface_cleanup(struct fcoe
        dev_uc_del(netdev, flogi_maddr);
        if (fip->spma)
                dev_uc_del(netdev, fip->ctl_src_addr);
-       dev_mc_del(netdev, FIP_ALL_ENODE_MACS);
+       if (fip->mode == FIP_MODE_VN2VN) {
+               dev_mc_del(netdev, FIP_ALL_VN2VN_MACS);
+               dev_mc_del(netdev, FIP_ALL_P2P_MACS);
+       } else
+               dev_mc_del(netdev, FIP_ALL_ENODE_MACS);
  
        /* Tell the LLD we are done w/ FCoE */
        ops = netdev->netdev_ops;
@@@ -573,6 -588,50 +588,50 @@@ static int fcoe_get_wwn(struct net_devi
        return -EINVAL;
  }
  
+ /**
+  * fcoe_netdev_features_change - Updates the lport's offload flags based
+  * on the LLD netdev's FCoE feature flags
+  */
+ static void fcoe_netdev_features_change(struct fc_lport *lport,
+                                       struct net_device *netdev)
+ {
+       mutex_lock(&lport->lp_mutex);
+       if (netdev->features & NETIF_F_SG)
+               lport->sg_supp = 1;
+       else
+               lport->sg_supp = 0;
+       if (netdev->features & NETIF_F_FCOE_CRC) {
+               lport->crc_offload = 1;
+               FCOE_NETDEV_DBG(netdev, "Supports FCCRC offload\n");
+       } else {
+               lport->crc_offload = 0;
+       }
+       if (netdev->features & NETIF_F_FSO) {
+               lport->seq_offload = 1;
+               lport->lso_max = netdev->gso_max_size;
+               FCOE_NETDEV_DBG(netdev, "Supports LSO for max len 0x%x\n",
+                               lport->lso_max);
+       } else {
+               lport->seq_offload = 0;
+               lport->lso_max = 0;
+       }
+       if (netdev->fcoe_ddp_xid) {
+               lport->lro_enabled = 1;
+               lport->lro_xid = netdev->fcoe_ddp_xid;
+               FCOE_NETDEV_DBG(netdev, "Supports LRO for max xid 0x%x\n",
+                               lport->lro_xid);
+       } else {
+               lport->lro_enabled = 0;
+               lport->lro_xid = 0;
+       }
+       mutex_unlock(&lport->lp_mutex);
+ }
  /**
   * fcoe_netdev_config() - Set up net devive for SW FCoE
   * @lport:  The local port that is associated with the net device
@@@ -588,7 -647,6 +647,6 @@@ static int fcoe_netdev_config(struct fc
        u64 wwnn, wwpn;
        struct fcoe_interface *fcoe;
        struct fcoe_port *port;
-       int vid = 0;
  
        /* Setup lport private data to point to fcoe softc */
        port = lport_priv(lport);
                return -EINVAL;
  
        /* offload features support */
-       if (netdev->features & NETIF_F_SG)
-               lport->sg_supp = 1;
+       fcoe_netdev_features_change(lport, netdev);
  
-       if (netdev->features & NETIF_F_FCOE_CRC) {
-               lport->crc_offload = 1;
-               FCOE_NETDEV_DBG(netdev, "Supports FCCRC offload\n");
-       }
-       if (netdev->features & NETIF_F_FSO) {
-               lport->seq_offload = 1;
-               lport->lso_max = netdev->gso_max_size;
-               FCOE_NETDEV_DBG(netdev, "Supports LSO for max len 0x%x\n",
-                               lport->lso_max);
-       }
-       if (netdev->fcoe_ddp_xid) {
-               lport->lro_enabled = 1;
-               lport->lro_xid = netdev->fcoe_ddp_xid;
-               FCOE_NETDEV_DBG(netdev, "Supports LRO for max xid 0x%x\n",
-                               lport->lro_xid);
-       }
        skb_queue_head_init(&port->fcoe_pending_queue);
        port->fcoe_pending_queue_active = 0;
        setup_timer(&port->timer, fcoe_queue_timer, (unsigned long)lport);
        fcoe_link_speed_update(lport);
  
        if (!lport->vport) {
-               /*
-                * Use NAA 1&2 (FC-FS Rev. 2.0, Sec. 15) to generate WWNN/WWPN:
-                * For WWNN, we use NAA 1 w/ bit 27-16 of word 0 as 0.
-                * For WWPN, we use NAA 2 w/ bit 27-16 of word 0 from VLAN ID
-                */
-               if (netdev->priv_flags & IFF_802_1Q_VLAN)
-                       vid = vlan_dev_vlan_id(netdev);
                if (fcoe_get_wwn(netdev, &wwnn, NETDEV_FCOE_WWNN))
                        wwnn = fcoe_wwn_from_mac(fcoe->ctlr.ctl_src_addr, 1, 0);
                fc_set_wwnn(lport, wwnn);
                if (fcoe_get_wwn(netdev, &wwpn, NETDEV_FCOE_WWPN))
                        wwpn = fcoe_wwn_from_mac(fcoe->ctlr.ctl_src_addr,
-                                                2, vid);
+                                                2, 0);
                fc_set_wwpn(lport, wwpn);
        }
  
@@@ -967,7 -1000,7 +1000,7 @@@ static struct fc_lport *fcoe_if_create(
        }
  
        /* Initialize the library */
-       rc = fcoe_libfc_config(lport, &fcoe_libfc_fcn_templ);
+       rc = fcoe_libfc_config(lport, &fcoe->ctlr, &fcoe_libfc_fcn_templ, 1);
        if (rc) {
                FCOE_NETDEV_DBG(netdev, "Could not configure libfc for the "
                                "interface\n");
@@@ -1210,6 -1243,8 +1243,8 @@@ int fcoe_rcv(struct sk_buff *skb, struc
        struct fcoe_interface *fcoe;
        struct fc_frame_header *fh;
        struct fcoe_percpu_s *fps;
+       struct fcoe_port *port;
+       struct ethhdr *eh;
        unsigned int cpu;
  
        fcoe = container_of(ptype, struct fcoe_interface, fcoe_packet_type);
                        skb_tail_pointer(skb), skb_end_pointer(skb),
                        skb->csum, skb->dev ? skb->dev->name : "<NULL>");
  
-       /* check for FCOE packet type */
-       if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
-               FCOE_NETDEV_DBG(netdev, "Wrong FC type frame");
+       /* check for mac addresses */
+       eh = eth_hdr(skb);
+       port = lport_priv(lport);
+       if (compare_ether_addr(eh->h_dest, port->data_src_addr) &&
+           compare_ether_addr(eh->h_dest, fcoe->ctlr.ctl_src_addr) &&
+           compare_ether_addr(eh->h_dest, (u8[6])FC_FCOE_FLOGI_MAC)) {
+               FCOE_NETDEV_DBG(netdev, "wrong destination mac address:%pM\n",
+                               eh->h_dest);
+               goto err;
+       }
+       if (is_fip_mode(&fcoe->ctlr) &&
+           compare_ether_addr(eh->h_source, fcoe->ctlr.dest_addr)) {
+               FCOE_NETDEV_DBG(netdev, "wrong source mac address:%pM\n",
+                               eh->h_source);
                goto err;
        }
  
@@@ -1512,11 -1559,9 +1559,9 @@@ int fcoe_xmit(struct fc_lport *lport, s
        /* fill up mac and fcoe headers */
        eh = eth_hdr(skb);
        eh->h_proto = htons(ETH_P_FCOE);
+       memcpy(eh->h_dest, fcoe->ctlr.dest_addr, ETH_ALEN);
        if (fcoe->ctlr.map_dest)
-               fc_fcoe_set_mac(eh->h_dest, fh->fh_d_id);
-       else
-               /* insert GW address */
-               memcpy(eh->h_dest, fcoe->ctlr.dest_addr, ETH_ALEN);
+               memcpy(eh->h_dest + 3, fh->fh_d_id, 3);
  
        if (unlikely(fcoe->ctlr.flogi_oxid != FC_XID_UNKNOWN))
                memcpy(eh->h_source, fcoe->ctlr.ctl_src_addr, ETH_ALEN);
@@@ -1834,6 -1879,9 +1879,9 @@@ static int fcoe_device_notification(str
                schedule_work(&port->destroy_work);
                goto out;
                break;
+       case NETDEV_FEAT_CHANGE:
+               fcoe_netdev_features_change(lport, netdev);
+               break;
        default:
                FCOE_NETDEV_DBG(netdev, "Unknown event %ld "
                                "from netdev netlink\n", event);
@@@ -1918,8 -1966,8 +1966,8 @@@ static int fcoe_disable(const char *buf
        rtnl_unlock();
  
        if (fcoe) {
-               fc_fabric_logoff(fcoe->ctlr.lp);
                fcoe_ctlr_link_down(&fcoe->ctlr);
+               fcoe_clean_pending_queue(fcoe->ctlr.lp);
        } else
                rc = -ENODEV;
  
@@@ -1972,12 -2020,10 +2020,10 @@@ static int fcoe_enable(const char *buff
        fcoe = fcoe_hostlist_lookup_port(netdev);
        rtnl_unlock();
  
-       if (fcoe) {
-               if (!fcoe_link_ok(fcoe->ctlr.lp))
-                       fcoe_ctlr_link_up(&fcoe->ctlr);
-               rc = fc_fabric_login(fcoe->ctlr.lp);
-       } else
+       if (!fcoe)
                rc = -ENODEV;
+       else if (!fcoe_link_ok(fcoe->ctlr.lp))
+               fcoe_ctlr_link_up(&fcoe->ctlr);
  
        dev_put(netdev);
  out_nodev:
@@@ -2031,8 -2077,8 +2077,8 @@@ static int fcoe_destroy(const char *buf
                rc = -ENODEV;
                goto out_putdev;
        }
-       list_del(&fcoe->list);
        fcoe_interface_cleanup(fcoe);
+       list_del(&fcoe->list);
        /* RTNL mutex is dropped by fcoe_if_destroy */
        fcoe_if_destroy(fcoe->ctlr.lp);
  
@@@ -2070,6 -2116,7 +2116,7 @@@ static void fcoe_destroy_work(struct wo
   */
  static int fcoe_create(const char *buffer, struct kernel_param *kp)
  {
+       enum fip_state fip_mode = (enum fip_state)(long)kp->arg;
        int rc;
        struct fcoe_interface *fcoe;
        struct fc_lport *lport;
                goto out_putdev;
        }
  
-       fcoe = fcoe_interface_create(netdev);
+       fcoe = fcoe_interface_create(netdev, fip_mode);
        if (!fcoe) {
                rc = -ENOMEM;
                goto out_putdev;
@@@ -2521,6 -2568,8 +2568,8 @@@ static struct fc_seq *fcoe_elsct_send(s
        switch (op) {
        case ELS_FLOGI:
        case ELS_FDISC:
+               if (lport->point_to_multipoint)
+                       break;
                return fc_elsct_send(lport, did, fp, op, fcoe_flogi_resp,
                                     fip, timeout);
        case ELS_LOGO:
@@@ -2653,7 -2702,6 +2702,7 @@@ static void fcoe_get_lesb(struct fc_lpo
        u32 lfc, vlfc, mdac;
        struct fcoe_dev_stats *devst;
        struct fcoe_fc_els_lesb *lesb;
 +      struct rtnl_link_stats64 temp;
        struct net_device *netdev = fcoe_netdev(lport);
  
        lfc = 0;
        lesb->lesb_link_fail = htonl(lfc);
        lesb->lesb_vlink_fail = htonl(vlfc);
        lesb->lesb_miss_fka = htonl(mdac);
 -      lesb->lesb_fcs_error = htonl(dev_get_stats(netdev)->rx_crc_errors);
 +      lesb->lesb_fcs_error = htonl(dev_get_stats(netdev, &temp)->rx_crc_errors);
  }
  
  /**