rpms/kernel/F-11 linux-2.6-netdev-ehea-fix-page-alignment.patch, NONE, 1.1 linux-2.6-netdev-ehea-remove-from-list.patch, NONE, 1.1 kernel.spec, 1.1673, 1.1674 linux-2.6-netdev-ehea-fix-circular-locking.patch, 1.1, 1.2
Chuck Ebbert
cebbert at fedoraproject.org
Mon Jul 6 17:46:57 UTC 2009
- Previous message (by thread): rpms/frescobaldi/F-10 .cvsignore, 1.5, 1.6 frescobaldi.spec, 1.4, 1.5 sources, 1.5, 1.6
- Next message (by thread): rpms/kexec-tools/devel Makefile, 1.7, 1.8 kdump.init, 1.19, 1.20 kexec-tools.spec, 1.141, 1.142 sources, 1.18, 1.19 kdumpinit.rootfs, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6860
Modified Files:
kernel.spec linux-2.6-netdev-ehea-fix-circular-locking.patch
Added Files:
linux-2.6-netdev-ehea-fix-page-alignment.patch
linux-2.6-netdev-ehea-remove-from-list.patch
Log Message:
Additional fixes for bug #498854
linux-2.6-netdev-ehea-fix-page-alignment.patch:
--- NEW FILE linux-2.6-netdev-ehea-fix-page-alignment.patch ---
From: Thomas Klein <tklein at de.ibm.com>
Date: Wed, 21 Jan 2009 22:45:33 +0000 (-0800)
Subject: ehea: Fix mem allocations which require page alignment
X-Git-Tag: v2.6.30-rc1~662^2~930
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=3faf2693bd6800c2521799f6a9ae174d9f080ed2
ehea: Fix mem allocations which require page alignment
PAGE_SIZE allocations via slab are not guaranteed to be page-aligned. Fixed
all memory allocations where page alignment is required by firmware.
Signed-off-by: Thomas Klein <tklein at de.ibm.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index d0c2c45..dfcdd7f 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -308,7 +308,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev)
memset(stats, 0, sizeof(*stats));
- cb2 = kzalloc(PAGE_SIZE, GFP_ATOMIC);
+ cb2 = (void *)get_zeroed_page(GFP_ATOMIC);
if (!cb2) {
ehea_error("no mem for cb2");
goto out;
@@ -341,7 +341,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev)
stats->rx_packets = rx_packets;
out_herr:
- kfree(cb2);
+ free_page((unsigned long)cb2);
out:
return stats;
}
@@ -915,7 +915,7 @@ int ehea_sense_port_attr(struct ehea_port *port)
struct hcp_ehea_port_cb0 *cb0;
/* may be called via ehea_neq_tasklet() */
- cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC);
+ cb0 = (void *)get_zeroed_page(GFP_ATOMIC);
if (!cb0) {
ehea_error("no mem for cb0");
ret = -ENOMEM;
@@ -996,7 +996,7 @@ int ehea_sense_port_attr(struct ehea_port *port)
out_free:
if (ret || netif_msg_probe(port))
ehea_dump(cb0, sizeof(*cb0), "ehea_sense_port_attr");
- kfree(cb0);
+ free_page((unsigned long)cb0);
out:
return ret;
}
@@ -1007,7 +1007,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
u64 hret;
int ret = 0;
- cb4 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb4 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb4) {
ehea_error("no mem for cb4");
ret = -ENOMEM;
@@ -1075,7 +1075,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
if (!prop_carrier_state || (port->phy_link == EHEA_PHY_LINK_UP))
netif_carrier_on(port->netdev);
- kfree(cb4);
+ free_page((unsigned long)cb4);
out:
return ret;
}
@@ -1302,7 +1302,7 @@ static int ehea_configure_port(struct ehea_port *port)
struct hcp_ehea_port_cb0 *cb0;
ret = -ENOMEM;
- cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb0 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb0)
goto out;
@@ -1338,7 +1338,7 @@ static int ehea_configure_port(struct ehea_port *port)
ret = 0;
out_free:
- kfree(cb0);
+ free_page((unsigned long)cb0);
out:
return ret;
}
@@ -1748,7 +1748,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)
goto out;
}
- cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb0 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb0) {
ehea_error("no mem for cb0");
ret = -ENOMEM;
@@ -1793,7 +1793,7 @@ out_upregs:
out_upregs:
ehea_update_bcmc_registrations();
out_free:
- kfree(cb0);
+ free_page((unsigned long)cb0);
out:
return ret;
}
@@ -1817,7 +1817,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable)
if ((enable && port->promisc) || (!enable && !port->promisc))
return;
- cb7 = kzalloc(PAGE_SIZE, GFP_ATOMIC);
+ cb7 = (void *)get_zeroed_page(GFP_ATOMIC);
if (!cb7) {
ehea_error("no mem for cb7");
goto out;
@@ -1836,7 +1836,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable)
port->promisc = enable;
out:
- kfree(cb7);
+ free_page((unsigned long)cb7);
return;
}
@@ -2217,7 +2217,7 @@ static void ehea_vlan_rx_register(struct net_device *dev,
port->vgrp = grp;
- cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb1 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb1) {
ehea_error("no mem for cb1");
goto out;
@@ -2228,7 +2228,7 @@ static void ehea_vlan_rx_register(struct net_device *dev,
if (hret != H_SUCCESS)
ehea_error("modify_ehea_port failed");
- kfree(cb1);
+ free_page((unsigned long)cb1);
out:
return;
}
@@ -2241,7 +2241,7 @@ static void ehea_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
int index;
u64 hret;
- cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb1 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb1) {
ehea_error("no mem for cb1");
goto out;
@@ -2262,7 +2262,7 @@ static void ehea_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
if (hret != H_SUCCESS)
ehea_error("modify_ehea_port failed");
out:
- kfree(cb1);
+ free_page((unsigned long)cb1);
return;
}
@@ -2276,7 +2276,7 @@ static void ehea_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
vlan_group_set_device(port->vgrp, vid, NULL);
- cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb1 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb1) {
ehea_error("no mem for cb1");
goto out;
@@ -2297,7 +2297,7 @@ static void ehea_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
if (hret != H_SUCCESS)
ehea_error("modify_ehea_port failed");
out:
- kfree(cb1);
+ free_page((unsigned long)cb1);
return;
}
@@ -2309,7 +2309,7 @@ int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp)
u64 dummy64 = 0;
struct hcp_modify_qp_cb0 *cb0;
- cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb0 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb0) {
ret = -ENOMEM;
goto out;
@@ -2372,7 +2372,7 @@ int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp)
ret = 0;
out:
- kfree(cb0);
+ free_page((unsigned long)cb0);
return ret;
}
@@ -2664,7 +2664,7 @@ int ehea_stop_qps(struct net_device *dev)
u64 dummy64 = 0;
u16 dummy16 = 0;
- cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb0 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb0) {
ret = -ENOMEM;
goto out;
@@ -2716,7 +2716,7 @@ int ehea_stop_qps(struct net_device *dev)
ret = 0;
out:
- kfree(cb0);
+ free_page((unsigned long)cb0);
return ret;
}
@@ -2766,7 +2766,7 @@ int ehea_restart_qps(struct net_device *dev)
u64 dummy64 = 0;
u16 dummy16 = 0;
- cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb0 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb0) {
ret = -ENOMEM;
goto out;
@@ -2819,7 +2819,7 @@ int ehea_restart_qps(struct net_device *dev)
ehea_refill_rq3(pr, 0);
}
out:
- kfree(cb0);
+ free_page((unsigned long)cb0);
return ret;
}
@@ -2950,7 +2950,7 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
u64 hret;
int ret;
- cb = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb) {
ret = -ENOMEM;
goto out;
@@ -2967,7 +2967,7 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
ret = 0;
out_herr:
- kfree(cb);
+ free_page((unsigned long)cb);
out:
return ret;
}
@@ -2981,7 +2981,7 @@ int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo)
*jumbo = 0;
/* (Try to) enable *jumbo frames */
- cb4 = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ cb4 = (void *)get_zeroed_page(GFP_KERNEL);
if (!cb4) {
ehea_error("no mem for cb4");
ret = -ENOMEM;
@@ -3009,7 +3009,7 @@ int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo)
} else
ret = -EINVAL;
- kfree(cb4);
+ free_page((unsigned long)cb4);
}
out:
return ret;
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
index 49d766e..3747457 100644
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -1005,7 +1005,7 @@ void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
unsigned long ret;
u64 *rblock;
- rblock = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ rblock = (void *)get_zeroed_page(GFP_KERNEL);
if (!rblock) {
ehea_error("Cannot allocate rblock memory.");
return;
@@ -1022,5 +1022,5 @@ void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
else
ehea_error("Error data could not be fetched: %llX", res_handle);
- kfree(rblock);
+ free_page((unsigned long)rblock);
}
linux-2.6-netdev-ehea-remove-from-list.patch:
--- NEW FILE linux-2.6-netdev-ehea-remove-from-list.patch ---
From: Hannes Hering <hering2 at de.ibm.com>
Date: Wed, 11 Feb 2009 21:47:57 +0000 (-0800)
Subject: ehea: Fix: Remove adapter from adapter list in error path
X-Git-Tag: v2.6.30-rc1~662^2~743
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=51621fbdb1ea8709ab67170b54e71be6d9fa29ad
ehea: Fix: Remove adapter from adapter list in error path
Remove adapter from adapter list before freeing data structure in
error path.
Signed-off-by: Hannes Hering <hering2 at de.ibm.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 489fdb9..958dacb 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -3448,6 +3448,7 @@ out_kill_eq:
ehea_destroy_eq(adapter->neq);
out_free_ad:
+ list_del(&adapter->list);
kfree(adapter);
out:
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1673
retrieving revision 1.1674
diff -u -p -r1.1673 -r1.1674
--- kernel.spec 3 Jul 2009 02:37:03 -0000 1.1673
+++ kernel.spec 6 Jul 2009 17:46:56 -0000 1.1674
@@ -735,6 +735,8 @@ Patch1849: drm-i915-enable-mchbar.patch
Patch2000: linux-2.6-e1000-ich9.patch
# BZ #498854
Patch2010: linux-2.6-netdev-ehea-fix-circular-locking.patch
+Patch2012: linux-2.6-netdev-ehea-fix-page-alignment.patch
+Patch2013: linux-2.6-netdev-ehea-remove-from-list.patch
# linux1394 git patches
Patch2200: linux-2.6-firewire-git-update.patch
@@ -1404,6 +1406,8 @@ ApplyPatch linux-2.6-cdrom-door-status.p
ApplyPatch linux-2.6-e1000-ich9.patch
# bz 498854
ApplyPatch linux-2.6-netdev-ehea-fix-circular-locking.patch
+ApplyPatch linux-2.6-netdev-ehea-fix-page-alignment.patch
+ApplyPatch linux-2.6-netdev-ehea-remove-from-list.patch
ApplyPatch agp-set_memory_ucwb.patch
# Nouveau DRM + drm fixes
@@ -2092,6 +2096,9 @@ fi
# and build.
%changelog
+* Mon Jul 06 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.6-212
+- Additional fixes for bug #498854
+
* Thu Jul 02 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.6-211
- Fix NFSD null credentials bug (#494067)
- Remove null credentials debugging patch.
linux-2.6-netdev-ehea-fix-circular-locking.patch:
Index: linux-2.6-netdev-ehea-fix-circular-locking.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-netdev-ehea-fix-circular-locking.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- linux-2.6-netdev-ehea-fix-circular-locking.patch 8 Jun 2009 22:41:29 -0000 1.1
+++ linux-2.6-netdev-ehea-fix-circular-locking.patch 6 Jul 2009 17:46:57 -0000 1.2
@@ -24,7 +24,7 @@ index 029631c..6e317ca 100644
#define DRV_NAME "ehea"
-#define DRV_VERSION "EHEA_0096"
-+#define DRV_VERSION "EHEA_0096.1"
++#define DRV_VERSION "EHEA_0096.3"
/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
- Previous message (by thread): rpms/frescobaldi/F-10 .cvsignore, 1.5, 1.6 frescobaldi.spec, 1.4, 1.5 sources, 1.5, 1.6
- Next message (by thread): rpms/kexec-tools/devel Makefile, 1.7, 1.8 kdump.init, 1.19, 1.20 kexec-tools.spec, 1.141, 1.142 sources, 1.18, 1.19 kdumpinit.rootfs, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list