Merge tag 'pinctrl-v3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[cascardo/linux.git] / drivers / scsi / bnx2fc / bnx2fc_fcoe.c
index 2262c75..e861f28 100644 (file)
@@ -412,6 +412,7 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
        struct fc_frame_header *fh;
        struct fcoe_rcv_info *fr;
        struct fcoe_percpu_s *bg;
+       struct sk_buff *tmp_skb;
        unsigned short oxid;
 
        interface = container_of(ptype, struct bnx2fc_interface,
@@ -424,6 +425,12 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
                goto err;
        }
 
+       tmp_skb = skb_share_check(skb, GFP_ATOMIC);
+       if (!tmp_skb)
+               goto err;
+
+       skb = tmp_skb;
+
        if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
                printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
                goto err;
@@ -2784,7 +2791,7 @@ static struct scsi_host_template bnx2fc_shost_template = {
        .eh_target_reset_handler = bnx2fc_eh_target_reset, /* tgt reset */
        .eh_host_reset_handler  = fc_eh_host_reset,
        .slave_alloc            = fc_slave_alloc,
-       .change_queue_depth     = fc_change_queue_depth,
+       .change_queue_depth     = scsi_change_queue_depth,
        .change_queue_type      = scsi_change_queue_type,
        .this_id                = -1,
        .cmd_per_lun            = 3,
@@ -2792,6 +2799,7 @@ static struct scsi_host_template bnx2fc_shost_template = {
        .sg_tablesize           = BNX2FC_MAX_BDS_PER_CMD,
        .max_sectors            = 1024,
        .use_blk_tags           = 1,
+       .track_queue_depth      = 1,
 };
 
 static struct libfc_function_template bnx2fc_libfc_fcn_templ = {