diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
commit | d0b2f91bede3bd5e3d24dd6803e56eee959c1797 (patch) | |
tree | 7fee4ab0509879c373c4f2cbd5b8a5be5b4041ee /drivers/scsi/fnic | |
parent | e914f8eb445e8f74b00303c19c2ffceaedd16a05 (diff) |
Linux-libre 4.8.2-gnupck-4.8.2-gnu
Diffstat (limited to 'drivers/scsi/fnic')
-rw-r--r-- | drivers/scsi/fnic/fnic_fcs.c | 14 | ||||
-rw-r--r-- | drivers/scsi/fnic/fnic_fip.h | 8 |
2 files changed, 7 insertions, 15 deletions
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 67669a9e7..3b7da66e2 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -359,7 +359,7 @@ static void fnic_fcoe_send_vlan_req(struct fnic *fnic) vlan->fip.fip_ver = FIP_VER_ENCAPS(FIP_VER); vlan->fip.fip_op = htons(FIP_OP_VLAN); - vlan->fip.fip_subcode = FIP_SC_VL_REQ; + vlan->fip.fip_subcode = FIP_SC_VL_NOTE; vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); vlan->desc.mac.fd_desc.fip_dtype = FIP_DT_MAC; @@ -551,7 +551,7 @@ static int fnic_fcoe_handle_fip_frame(struct fnic *fnic, struct sk_buff *skb) goto drop; /* pass it on to fcoe */ ret = 1; - } else if (op == FIP_OP_VLAN && sub == FIP_SC_VL_REP) { + } else if (op == FIP_OP_VLAN && sub == FIP_SC_VL_NOTE) { /* set the vlan as used */ fnic_fcoe_process_vlan_resp(fnic, skb); ret = 0; @@ -954,8 +954,8 @@ int fnic_alloc_rq_frame(struct vnic_rq *rq) skb_put(skb, len); pa = pci_map_single(fnic->pdev, skb->data, len, PCI_DMA_FROMDEVICE); - r = pci_dma_mapping_error(fnic->pdev, pa); - if (r) { + if (pci_dma_mapping_error(fnic->pdev, pa)) { + r = -ENOMEM; printk(KERN_ERR "PCI mapping failed with error %d\n", r); goto free_skb; } @@ -1093,8 +1093,8 @@ static int fnic_send_frame(struct fnic *fnic, struct fc_frame *fp) pa = pci_map_single(fnic->pdev, eth_hdr, tot_len, PCI_DMA_TODEVICE); - ret = pci_dma_mapping_error(fnic->pdev, pa); - if (ret) { + if (pci_dma_mapping_error(fnic->pdev, pa)) { + ret = -ENOMEM; printk(KERN_ERR "DMA map failed with error %d\n", ret); goto free_skb_on_err; } @@ -1308,7 +1308,7 @@ void fnic_handle_fip_timer(struct fnic *fnic) } spin_unlock_irqrestore(&fnic->fnic_lock, flags); - if (fnic->ctlr.mode == FIP_ST_NON_FIP) + if (fnic->ctlr.mode == FIP_MODE_NON_FIP) return; spin_lock_irqsave(&fnic->vlans_lock, flags); diff --git a/drivers/scsi/fnic/fnic_fip.h b/drivers/scsi/fnic/fnic_fip.h index 87e74c2ab..7761f33ab 100644 --- a/drivers/scsi/fnic/fnic_fip.h +++ b/drivers/scsi/fnic/fnic_fip.h @@ -26,14 +26,6 @@ #define FINC_MAX_FLOGI_REJECTS 8 -/* - * FIP_DT_VLAN descriptor. - */ -struct fip_vlan_desc { - struct fip_desc fd_desc; - __be16 fd_vlan; -} __attribute__((packed)); - struct vlan { __be16 vid; __be16 type; |