diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-07-25 15:58:48 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-07-25 15:58:48 -0400 |
commit | 8407884dd9164ec18ed2afc00f56b87e36c51fcf (patch) | |
tree | b6ea42c231d7d39f454de28a068d78ce11709770 /drivers/scsi/fcoe | |
parent | dc7f71f486f4f5fa96f6dcf86833da020cde8a11 (diff) | |
parent | bdc0077af574800d24318b6945cf2344e8dbb050 (diff) |
Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream
Two bits were appended to the end of the bitfield
list in struct scsi_device. Resolve that conflict
by including both bits.
Conflicts:
include/scsi/scsi_device.h
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 36 | ||||
-rw-r--r-- | drivers/scsi/fcoe/fcoe_ctlr.c | 13 | ||||
-rw-r--r-- | drivers/scsi/fcoe/fcoe_sysfs.c | 2 | ||||
-rw-r--r-- | drivers/scsi/fcoe/fcoe_transport.c | 12 |
4 files changed, 32 insertions, 31 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index fe30b1b65e1d..078d262ac7cc 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1529,7 +1529,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, | |||
1529 | 1529 | ||
1530 | return 0; | 1530 | return 0; |
1531 | err: | 1531 | err: |
1532 | per_cpu_ptr(lport->dev_stats, get_cpu())->ErrorFrames++; | 1532 | per_cpu_ptr(lport->stats, get_cpu())->ErrorFrames++; |
1533 | put_cpu(); | 1533 | put_cpu(); |
1534 | err2: | 1534 | err2: |
1535 | kfree_skb(skb); | 1535 | kfree_skb(skb); |
@@ -1569,7 +1569,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) | |||
1569 | struct ethhdr *eh; | 1569 | struct ethhdr *eh; |
1570 | struct fcoe_crc_eof *cp; | 1570 | struct fcoe_crc_eof *cp; |
1571 | struct sk_buff *skb; | 1571 | struct sk_buff *skb; |
1572 | struct fcoe_dev_stats *stats; | 1572 | struct fc_stats *stats; |
1573 | struct fc_frame_header *fh; | 1573 | struct fc_frame_header *fh; |
1574 | unsigned int hlen; /* header length implies the version */ | 1574 | unsigned int hlen; /* header length implies the version */ |
1575 | unsigned int tlen; /* trailer length */ | 1575 | unsigned int tlen; /* trailer length */ |
@@ -1680,7 +1680,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) | |||
1680 | skb_shinfo(skb)->gso_size = 0; | 1680 | skb_shinfo(skb)->gso_size = 0; |
1681 | } | 1681 | } |
1682 | /* update tx stats: regardless if LLD fails */ | 1682 | /* update tx stats: regardless if LLD fails */ |
1683 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1683 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1684 | stats->TxFrames++; | 1684 | stats->TxFrames++; |
1685 | stats->TxWords += wlen; | 1685 | stats->TxWords += wlen; |
1686 | put_cpu(); | 1686 | put_cpu(); |
@@ -1714,7 +1714,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport, | |||
1714 | struct fcoe_interface *fcoe; | 1714 | struct fcoe_interface *fcoe; |
1715 | struct fc_frame_header *fh; | 1715 | struct fc_frame_header *fh; |
1716 | struct sk_buff *skb = (struct sk_buff *)fp; | 1716 | struct sk_buff *skb = (struct sk_buff *)fp; |
1717 | struct fcoe_dev_stats *stats; | 1717 | struct fc_stats *stats; |
1718 | 1718 | ||
1719 | /* | 1719 | /* |
1720 | * We only check CRC if no offload is available and if it is | 1720 | * We only check CRC if no offload is available and if it is |
@@ -1745,7 +1745,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport, | |||
1745 | return 0; | 1745 | return 0; |
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1748 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1749 | stats->InvalidCRCCount++; | 1749 | stats->InvalidCRCCount++; |
1750 | if (stats->InvalidCRCCount < 5) | 1750 | if (stats->InvalidCRCCount < 5) |
1751 | printk(KERN_WARNING "fcoe: dropping frame with CRC error\n"); | 1751 | printk(KERN_WARNING "fcoe: dropping frame with CRC error\n"); |
@@ -1762,7 +1762,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) | |||
1762 | u32 fr_len; | 1762 | u32 fr_len; |
1763 | struct fc_lport *lport; | 1763 | struct fc_lport *lport; |
1764 | struct fcoe_rcv_info *fr; | 1764 | struct fcoe_rcv_info *fr; |
1765 | struct fcoe_dev_stats *stats; | 1765 | struct fc_stats *stats; |
1766 | struct fcoe_crc_eof crc_eof; | 1766 | struct fcoe_crc_eof crc_eof; |
1767 | struct fc_frame *fp; | 1767 | struct fc_frame *fp; |
1768 | struct fcoe_port *port; | 1768 | struct fcoe_port *port; |
@@ -1793,7 +1793,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) | |||
1793 | */ | 1793 | */ |
1794 | hp = (struct fcoe_hdr *) skb_network_header(skb); | 1794 | hp = (struct fcoe_hdr *) skb_network_header(skb); |
1795 | 1795 | ||
1796 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1796 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1797 | if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { | 1797 | if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { |
1798 | if (stats->ErrorFrames < 5) | 1798 | if (stats->ErrorFrames < 5) |
1799 | printk(KERN_WARNING "fcoe: FCoE version " | 1799 | printk(KERN_WARNING "fcoe: FCoE version " |
@@ -1851,23 +1851,25 @@ static int fcoe_percpu_receive_thread(void *arg) | |||
1851 | 1851 | ||
1852 | set_user_nice(current, -20); | 1852 | set_user_nice(current, -20); |
1853 | 1853 | ||
1854 | retry: | ||
1854 | while (!kthread_should_stop()) { | 1855 | while (!kthread_should_stop()) { |
1855 | 1856 | ||
1856 | spin_lock_bh(&p->fcoe_rx_list.lock); | 1857 | spin_lock_bh(&p->fcoe_rx_list.lock); |
1857 | skb_queue_splice_init(&p->fcoe_rx_list, &tmp); | 1858 | skb_queue_splice_init(&p->fcoe_rx_list, &tmp); |
1858 | spin_unlock_bh(&p->fcoe_rx_list.lock); | ||
1859 | |||
1860 | while ((skb = __skb_dequeue(&tmp)) != NULL) | ||
1861 | fcoe_recv_frame(skb); | ||
1862 | 1859 | ||
1863 | spin_lock_bh(&p->fcoe_rx_list.lock); | 1860 | if (!skb_queue_len(&tmp)) { |
1864 | if (!skb_queue_len(&p->fcoe_rx_list)) { | ||
1865 | set_current_state(TASK_INTERRUPTIBLE); | 1861 | set_current_state(TASK_INTERRUPTIBLE); |
1866 | spin_unlock_bh(&p->fcoe_rx_list.lock); | 1862 | spin_unlock_bh(&p->fcoe_rx_list.lock); |
1867 | schedule(); | 1863 | schedule(); |
1868 | set_current_state(TASK_RUNNING); | 1864 | set_current_state(TASK_RUNNING); |
1869 | } else | 1865 | goto retry; |
1870 | spin_unlock_bh(&p->fcoe_rx_list.lock); | 1866 | } |
1867 | |||
1868 | spin_unlock_bh(&p->fcoe_rx_list.lock); | ||
1869 | |||
1870 | while ((skb = __skb_dequeue(&tmp)) != NULL) | ||
1871 | fcoe_recv_frame(skb); | ||
1872 | |||
1871 | } | 1873 | } |
1872 | return 0; | 1874 | return 0; |
1873 | } | 1875 | } |
@@ -1970,7 +1972,7 @@ static int fcoe_device_notification(struct notifier_block *notifier, | |||
1970 | struct fcoe_ctlr *ctlr; | 1972 | struct fcoe_ctlr *ctlr; |
1971 | struct fcoe_interface *fcoe; | 1973 | struct fcoe_interface *fcoe; |
1972 | struct fcoe_port *port; | 1974 | struct fcoe_port *port; |
1973 | struct fcoe_dev_stats *stats; | 1975 | struct fc_stats *stats; |
1974 | u32 link_possible = 1; | 1976 | u32 link_possible = 1; |
1975 | u32 mfs; | 1977 | u32 mfs; |
1976 | int rc = NOTIFY_OK; | 1978 | int rc = NOTIFY_OK; |
@@ -2024,7 +2026,7 @@ static int fcoe_device_notification(struct notifier_block *notifier, | |||
2024 | if (link_possible && !fcoe_link_ok(lport)) | 2026 | if (link_possible && !fcoe_link_ok(lport)) |
2025 | fcoe_ctlr_link_up(ctlr); | 2027 | fcoe_ctlr_link_up(ctlr); |
2026 | else if (fcoe_ctlr_link_down(ctlr)) { | 2028 | else if (fcoe_ctlr_link_down(ctlr)) { |
2027 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 2029 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
2028 | stats->LinkFailureCount++; | 2030 | stats->LinkFailureCount++; |
2029 | put_cpu(); | 2031 | put_cpu(); |
2030 | fcoe_clean_pending_queue(lport); | 2032 | fcoe_clean_pending_queue(lport); |
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index d68d57241ee6..2ebe03a4b51d 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c | |||
@@ -788,11 +788,11 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) | |||
788 | unsigned long deadline; | 788 | unsigned long deadline; |
789 | unsigned long sel_time = 0; | 789 | unsigned long sel_time = 0; |
790 | struct list_head del_list; | 790 | struct list_head del_list; |
791 | struct fcoe_dev_stats *stats; | 791 | struct fc_stats *stats; |
792 | 792 | ||
793 | INIT_LIST_HEAD(&del_list); | 793 | INIT_LIST_HEAD(&del_list); |
794 | 794 | ||
795 | stats = per_cpu_ptr(fip->lp->dev_stats, get_cpu()); | 795 | stats = per_cpu_ptr(fip->lp->stats, get_cpu()); |
796 | 796 | ||
797 | list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { | 797 | list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { |
798 | deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2; | 798 | deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2; |
@@ -1104,8 +1104,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
1104 | struct fc_frame_header *fh = NULL; | 1104 | struct fc_frame_header *fh = NULL; |
1105 | struct fip_desc *desc; | 1105 | struct fip_desc *desc; |
1106 | struct fip_encaps *els; | 1106 | struct fip_encaps *els; |
1107 | struct fcoe_dev_stats *stats; | ||
1108 | struct fcoe_fcf *sel; | 1107 | struct fcoe_fcf *sel; |
1108 | struct fc_stats *stats; | ||
1109 | enum fip_desc_type els_dtype = 0; | 1109 | enum fip_desc_type els_dtype = 0; |
1110 | u8 els_op; | 1110 | u8 els_op; |
1111 | u8 sub; | 1111 | u8 sub; |
@@ -1249,7 +1249,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
1249 | fr_dev(fp) = lport; | 1249 | fr_dev(fp) = lport; |
1250 | fr_encaps(fp) = els_dtype; | 1250 | fr_encaps(fp) = els_dtype; |
1251 | 1251 | ||
1252 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1252 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1253 | stats->RxFrames++; | 1253 | stats->RxFrames++; |
1254 | stats->RxWords += skb->len / FIP_BPW; | 1254 | stats->RxWords += skb->len / FIP_BPW; |
1255 | put_cpu(); | 1255 | put_cpu(); |
@@ -1353,7 +1353,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
1353 | ntoh24(vp->fd_fc_id)); | 1353 | ntoh24(vp->fd_fc_id)); |
1354 | if (vn_port && (vn_port == lport)) { | 1354 | if (vn_port && (vn_port == lport)) { |
1355 | mutex_lock(&fip->ctlr_mutex); | 1355 | mutex_lock(&fip->ctlr_mutex); |
1356 | per_cpu_ptr(lport->dev_stats, | 1356 | per_cpu_ptr(lport->stats, |
1357 | get_cpu())->VLinkFailureCount++; | 1357 | get_cpu())->VLinkFailureCount++; |
1358 | put_cpu(); | 1358 | put_cpu(); |
1359 | fcoe_ctlr_reset(fip); | 1359 | fcoe_ctlr_reset(fip); |
@@ -1383,8 +1383,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
1383 | * followed by physical port | 1383 | * followed by physical port |
1384 | */ | 1384 | */ |
1385 | mutex_lock(&fip->ctlr_mutex); | 1385 | mutex_lock(&fip->ctlr_mutex); |
1386 | per_cpu_ptr(lport->dev_stats, | 1386 | per_cpu_ptr(lport->stats, get_cpu())->VLinkFailureCount++; |
1387 | get_cpu())->VLinkFailureCount++; | ||
1388 | put_cpu(); | 1387 | put_cpu(); |
1389 | fcoe_ctlr_reset(fip); | 1388 | fcoe_ctlr_reset(fip); |
1390 | mutex_unlock(&fip->ctlr_mutex); | 1389 | mutex_unlock(&fip->ctlr_mutex); |
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c index 2bc163198d33..5e751689a089 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c | |||
@@ -102,7 +102,7 @@ static int fcoe_str_to_dev_loss(const char *buf, unsigned long *val) | |||
102 | int ret; | 102 | int ret; |
103 | 103 | ||
104 | ret = kstrtoul(buf, 0, val); | 104 | ret = kstrtoul(buf, 0, val); |
105 | if (ret || *val < 0) | 105 | if (ret) |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | /* | 107 | /* |
108 | * Check for overflow; dev_loss_tmo is u32 | 108 | * Check for overflow; dev_loss_tmo is u32 |
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index b46f43dced78..ac76d8a042d7 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c | |||
@@ -89,7 +89,7 @@ void __fcoe_get_lesb(struct fc_lport *lport, | |||
89 | { | 89 | { |
90 | unsigned int cpu; | 90 | unsigned int cpu; |
91 | u32 lfc, vlfc, mdac; | 91 | u32 lfc, vlfc, mdac; |
92 | struct fcoe_dev_stats *devst; | 92 | struct fc_stats *stats; |
93 | struct fcoe_fc_els_lesb *lesb; | 93 | struct fcoe_fc_els_lesb *lesb; |
94 | struct rtnl_link_stats64 temp; | 94 | struct rtnl_link_stats64 temp; |
95 | 95 | ||
@@ -99,10 +99,10 @@ void __fcoe_get_lesb(struct fc_lport *lport, | |||
99 | lesb = (struct fcoe_fc_els_lesb *)fc_lesb; | 99 | lesb = (struct fcoe_fc_els_lesb *)fc_lesb; |
100 | memset(lesb, 0, sizeof(*lesb)); | 100 | memset(lesb, 0, sizeof(*lesb)); |
101 | for_each_possible_cpu(cpu) { | 101 | for_each_possible_cpu(cpu) { |
102 | devst = per_cpu_ptr(lport->dev_stats, cpu); | 102 | stats = per_cpu_ptr(lport->stats, cpu); |
103 | lfc += devst->LinkFailureCount; | 103 | lfc += stats->LinkFailureCount; |
104 | vlfc += devst->VLinkFailureCount; | 104 | vlfc += stats->VLinkFailureCount; |
105 | mdac += devst->MissDiscAdvCount; | 105 | mdac += stats->MissDiscAdvCount; |
106 | } | 106 | } |
107 | lesb->lesb_link_fail = htonl(lfc); | 107 | lesb->lesb_link_fail = htonl(lfc); |
108 | lesb->lesb_vlink_fail = htonl(vlfc); | 108 | lesb->lesb_vlink_fail = htonl(vlfc); |
@@ -502,7 +502,7 @@ static int __init fcoe_transport_init(void) | |||
502 | return 0; | 502 | return 0; |
503 | } | 503 | } |
504 | 504 | ||
505 | static int __exit fcoe_transport_exit(void) | 505 | static int fcoe_transport_exit(void) |
506 | { | 506 | { |
507 | struct fcoe_transport *ft; | 507 | struct fcoe_transport *ft; |
508 | 508 | ||