diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index c6b31775e26b..6ad696101418 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -92,7 +92,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev) | |||
92 | 92 | ||
93 | memset(stats, 0, sizeof(*stats)); | 93 | memset(stats, 0, sizeof(*stats)); |
94 | 94 | ||
95 | cb2 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 95 | cb2 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
96 | if (!cb2) { | 96 | if (!cb2) { |
97 | ehea_error("no mem for cb2"); | 97 | ehea_error("no mem for cb2"); |
98 | goto out; | 98 | goto out; |
@@ -586,8 +586,8 @@ int ehea_sense_port_attr(struct ehea_port *port) | |||
586 | u64 hret; | 586 | u64 hret; |
587 | struct hcp_ehea_port_cb0 *cb0; | 587 | struct hcp_ehea_port_cb0 *cb0; |
588 | 588 | ||
589 | cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 589 | cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC); /* May be called via */ |
590 | if (!cb0) { | 590 | if (!cb0) { /* ehea_neq_tasklet() */ |
591 | ehea_error("no mem for cb0"); | 591 | ehea_error("no mem for cb0"); |
592 | ret = -ENOMEM; | 592 | ret = -ENOMEM; |
593 | goto out; | 593 | goto out; |
@@ -670,7 +670,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed) | |||
670 | u64 hret; | 670 | u64 hret; |
671 | int ret = 0; | 671 | int ret = 0; |
672 | 672 | ||
673 | cb4 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 673 | cb4 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
674 | if (!cb4) { | 674 | if (!cb4) { |
675 | ehea_error("no mem for cb4"); | 675 | ehea_error("no mem for cb4"); |
676 | ret = -ENOMEM; | 676 | ret = -ENOMEM; |
@@ -765,8 +765,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe) | |||
765 | 765 | ||
766 | if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) { | 766 | if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) { |
767 | if (!netif_carrier_ok(port->netdev)) { | 767 | if (!netif_carrier_ok(port->netdev)) { |
768 | ret = ehea_sense_port_attr( | 768 | ret = ehea_sense_port_attr(port); |
769 | adapter->port[portnum]); | ||
770 | if (ret) { | 769 | if (ret) { |
771 | ehea_error("failed resensing port " | 770 | ehea_error("failed resensing port " |
772 | "attributes"); | 771 | "attributes"); |
@@ -818,7 +817,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe) | |||
818 | netif_stop_queue(port->netdev); | 817 | netif_stop_queue(port->netdev); |
819 | break; | 818 | break; |
820 | default: | 819 | default: |
821 | ehea_error("unknown event code %x", ec); | 820 | ehea_error("unknown event code %x, eqe=0x%lX", ec, eqe); |
822 | break; | 821 | break; |
823 | } | 822 | } |
824 | } | 823 | } |
@@ -986,7 +985,7 @@ static int ehea_configure_port(struct ehea_port *port) | |||
986 | struct hcp_ehea_port_cb0 *cb0; | 985 | struct hcp_ehea_port_cb0 *cb0; |
987 | 986 | ||
988 | ret = -ENOMEM; | 987 | ret = -ENOMEM; |
989 | cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 988 | cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
990 | if (!cb0) | 989 | if (!cb0) |
991 | goto out; | 990 | goto out; |
992 | 991 | ||
@@ -1444,7 +1443,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1444 | goto out; | 1443 | goto out; |
1445 | } | 1444 | } |
1446 | 1445 | ||
1447 | cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1446 | cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
1448 | if (!cb0) { | 1447 | if (!cb0) { |
1449 | ehea_error("no mem for cb0"); | 1448 | ehea_error("no mem for cb0"); |
1450 | ret = -ENOMEM; | 1449 | ret = -ENOMEM; |
@@ -1502,7 +1501,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable) | |||
1502 | if ((enable && port->promisc) || (!enable && !port->promisc)) | 1501 | if ((enable && port->promisc) || (!enable && !port->promisc)) |
1503 | return; | 1502 | return; |
1504 | 1503 | ||
1505 | cb7 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1504 | cb7 = kzalloc(PAGE_SIZE, GFP_ATOMIC); |
1506 | if (!cb7) { | 1505 | if (!cb7) { |
1507 | ehea_error("no mem for cb7"); | 1506 | ehea_error("no mem for cb7"); |
1508 | goto out; | 1507 | goto out; |
@@ -1606,7 +1605,7 @@ static void ehea_add_multicast_entry(struct ehea_port* port, u8* mc_mac_addr) | |||
1606 | struct ehea_mc_list *ehea_mcl_entry; | 1605 | struct ehea_mc_list *ehea_mcl_entry; |
1607 | u64 hret; | 1606 | u64 hret; |
1608 | 1607 | ||
1609 | ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_KERNEL); | 1608 | ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_ATOMIC); |
1610 | if (!ehea_mcl_entry) { | 1609 | if (!ehea_mcl_entry) { |
1611 | ehea_error("no mem for mcl_entry"); | 1610 | ehea_error("no mem for mcl_entry"); |
1612 | return; | 1611 | return; |
@@ -1841,7 +1840,7 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1841 | 1840 | ||
1842 | if (netif_msg_tx_queued(port)) { | 1841 | if (netif_msg_tx_queued(port)) { |
1843 | ehea_info("post swqe on QP %d", pr->qp->init_attr.qp_nr); | 1842 | ehea_info("post swqe on QP %d", pr->qp->init_attr.qp_nr); |
1844 | ehea_dump(swqe, sizeof(*swqe), "swqe"); | 1843 | ehea_dump(swqe, 512, "swqe"); |
1845 | } | 1844 | } |
1846 | 1845 | ||
1847 | ehea_post_swqe(pr->qp, swqe); | 1846 | ehea_post_swqe(pr->qp, swqe); |
@@ -1871,7 +1870,7 @@ static void ehea_vlan_rx_register(struct net_device *dev, | |||
1871 | 1870 | ||
1872 | port->vgrp = grp; | 1871 | port->vgrp = grp; |
1873 | 1872 | ||
1874 | cb1 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1873 | cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
1875 | if (!cb1) { | 1874 | if (!cb1) { |
1876 | ehea_error("no mem for cb1"); | 1875 | ehea_error("no mem for cb1"); |
1877 | goto out; | 1876 | goto out; |
@@ -1900,7 +1899,7 @@ static void ehea_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | |||
1900 | int index; | 1899 | int index; |
1901 | u64 hret; | 1900 | u64 hret; |
1902 | 1901 | ||
1903 | cb1 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1902 | cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
1904 | if (!cb1) { | 1903 | if (!cb1) { |
1905 | ehea_error("no mem for cb1"); | 1904 | ehea_error("no mem for cb1"); |
1906 | goto out; | 1905 | goto out; |
@@ -1936,7 +1935,7 @@ static void ehea_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
1936 | if (port->vgrp) | 1935 | if (port->vgrp) |
1937 | port->vgrp->vlan_devices[vid] = NULL; | 1936 | port->vgrp->vlan_devices[vid] = NULL; |
1938 | 1937 | ||
1939 | cb1 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1938 | cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
1940 | if (!cb1) { | 1939 | if (!cb1) { |
1941 | ehea_error("no mem for cb1"); | 1940 | ehea_error("no mem for cb1"); |
1942 | goto out; | 1941 | goto out; |
@@ -1969,7 +1968,7 @@ int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) | |||
1969 | u64 dummy64 = 0; | 1968 | u64 dummy64 = 0; |
1970 | struct hcp_modify_qp_cb0* cb0; | 1969 | struct hcp_modify_qp_cb0* cb0; |
1971 | 1970 | ||
1972 | cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1971 | cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
1973 | if (!cb0) { | 1972 | if (!cb0) { |
1974 | ret = -ENOMEM; | 1973 | ret = -ENOMEM; |
1975 | goto out; | 1974 | goto out; |
@@ -2270,7 +2269,7 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | |||
2270 | u64 hret; | 2269 | u64 hret; |
2271 | int ret; | 2270 | int ret; |
2272 | 2271 | ||
2273 | cb = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 2272 | cb = kzalloc(PAGE_SIZE, GFP_KERNEL); |
2274 | if (!cb) { | 2273 | if (!cb) { |
2275 | ret = -ENOMEM; | 2274 | ret = -ENOMEM; |
2276 | goto out; | 2275 | goto out; |
@@ -2341,7 +2340,7 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2341 | goto out; | 2340 | goto out; |
2342 | 2341 | ||
2343 | /* Enable Jumbo frames */ | 2342 | /* Enable Jumbo frames */ |
2344 | cb4 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 2343 | cb4 = kzalloc(PAGE_SIZE, GFP_KERNEL); |
2345 | if (!cb4) { | 2344 | if (!cb4) { |
2346 | ehea_error("no mem for cb4"); | 2345 | ehea_error("no mem for cb4"); |
2347 | } else { | 2346 | } else { |