diff options
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 6 | ||||
-rw-r--r-- | drivers/scsi/fcoe/fcoe_transport.c | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 34c8d82b7423..a1c0ddd53aa9 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1517,7 +1517,7 @@ int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) | |||
1517 | return -ENOMEM; | 1517 | return -ENOMEM; |
1518 | } | 1518 | } |
1519 | frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; | 1519 | frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; |
1520 | cp = kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ) | 1520 | cp = kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ) |
1521 | + frag->page_offset; | 1521 | + frag->page_offset; |
1522 | } else { | 1522 | } else { |
1523 | cp = (struct fcoe_crc_eof *)skb_put(skb, tlen); | 1523 | cp = (struct fcoe_crc_eof *)skb_put(skb, tlen); |
@@ -2045,7 +2045,7 @@ int fcoe_link_speed_update(struct fc_lport *lport) | |||
2045 | struct net_device *netdev = fcoe_netdev(lport); | 2045 | struct net_device *netdev = fcoe_netdev(lport); |
2046 | struct ethtool_cmd ecmd; | 2046 | struct ethtool_cmd ecmd; |
2047 | 2047 | ||
2048 | if (!dev_ethtool_get_settings(netdev, &ecmd)) { | 2048 | if (!__ethtool_get_settings(netdev, &ecmd)) { |
2049 | lport->link_supported_speeds &= | 2049 | lport->link_supported_speeds &= |
2050 | ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); | 2050 | ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); |
2051 | if (ecmd.supported & (SUPPORTED_1000baseT_Half | | 2051 | if (ecmd.supported & (SUPPORTED_1000baseT_Half | |
@@ -2454,7 +2454,9 @@ static int fcoe_vport_create(struct fc_vport *vport, bool disabled) | |||
2454 | } | 2454 | } |
2455 | 2455 | ||
2456 | mutex_lock(&fcoe_config_mutex); | 2456 | mutex_lock(&fcoe_config_mutex); |
2457 | rtnl_lock(); | ||
2457 | vn_port = fcoe_if_create(fcoe, &vport->dev, 1); | 2458 | vn_port = fcoe_if_create(fcoe, &vport->dev, 1); |
2459 | rtnl_unlock(); | ||
2458 | mutex_unlock(&fcoe_config_mutex); | 2460 | mutex_unlock(&fcoe_config_mutex); |
2459 | 2461 | ||
2460 | if (IS_ERR(vn_port)) { | 2462 | if (IS_ERR(vn_port)) { |
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index 41068e8748e7..dac8e39a5188 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c | |||
@@ -105,11 +105,12 @@ u32 fcoe_fc_crc(struct fc_frame *fp) | |||
105 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { | 105 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { |
106 | frag = &skb_shinfo(skb)->frags[i]; | 106 | frag = &skb_shinfo(skb)->frags[i]; |
107 | off = frag->page_offset; | 107 | off = frag->page_offset; |
108 | len = frag->size; | 108 | len = skb_frag_size(frag); |
109 | while (len > 0) { | 109 | while (len > 0) { |
110 | clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); | 110 | clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); |
111 | data = kmap_atomic(frag->page + (off >> PAGE_SHIFT), | 111 | data = kmap_atomic( |
112 | KM_SKB_DATA_SOFTIRQ); | 112 | skb_frag_page(frag) + (off >> PAGE_SHIFT), |
113 | KM_SKB_DATA_SOFTIRQ); | ||
113 | crc = crc32(crc, data + (off & ~PAGE_MASK), clen); | 114 | crc = crc32(crc, data + (off & ~PAGE_MASK), clen); |
114 | kunmap_atomic(data, KM_SKB_DATA_SOFTIRQ); | 115 | kunmap_atomic(data, KM_SKB_DATA_SOFTIRQ); |
115 | off += clen; | 116 | off += clen; |