]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/60026_xen3-fixup-sfc.patch1
Corrected links and text on ids.cgi
[people/teissler/ipfire-2.x.git] / src / patches / 60026_xen3-fixup-sfc.patch1
1 Subject: Fix Xen build wrt. SFC files coming from Solarflare.
2 From: jbeulich@novell.com
3 Patch-mainline: obsolete
4
5 Index: head-2008-04-15/drivers/xen/sfc_netback/accel_solarflare.c
6 ===================================================================
7 --- head-2008-04-15.orig/drivers/xen/sfc_netback/accel_solarflare.c 2008-04-18 18:23:11.000000000 +0200
8 +++ head-2008-04-15/drivers/xen/sfc_netback/accel_solarflare.c 2008-04-18 18:24:46.000000000 +0200
9 @@ -173,7 +173,7 @@ static int efx_device_to_efab_nic_index(
10 int i;
11
12 for (i = 0; i < EFHW_MAX_NR_DEVS; i++) {
13 - struct efhw_nic *nic = efrm_nic_table.nic[i];
14 + struct efhw_nic *nic = efrm_nic_tablep->nic[i];
15
16 /*
17 * It's possible for the nic structure to have not
18 Index: head-2008-04-15/drivers/xen/sfc_netback/ci/efrm/nic_table.h
19 ===================================================================
20 --- head-2008-04-15.orig/drivers/xen/sfc_netback/ci/efrm/nic_table.h 2008-02-20 09:32:49.000000000 +0100
21 +++ head-2008-04-15/drivers/xen/sfc_netback/ci/efrm/nic_table.h 2008-04-18 18:25:47.000000000 +0200
22 @@ -62,21 +62,21 @@ struct efrm_nic_table {
23 };
24
25 /* Resource driver structures used by other drivers as well */
26 -extern struct efrm_nic_table efrm_nic_table;
27 +extern struct efrm_nic_table *efrm_nic_tablep;
28
29 static inline void efrm_nic_table_hold(void)
30 {
31 - atomic_inc(&efrm_nic_table.ref_count);
32 + atomic_inc(&efrm_nic_tablep->ref_count);
33 }
34
35 static inline void efrm_nic_table_rele(void)
36 {
37 - atomic_dec(&efrm_nic_table.ref_count);
38 + atomic_dec(&efrm_nic_tablep->ref_count);
39 }
40
41 static inline int efrm_nic_table_held(void)
42 {
43 - return (atomic_read(&efrm_nic_table.ref_count) != 0);
44 + return (atomic_read(&efrm_nic_tablep->ref_count) != 0);
45 }
46
47 /* Run code block _x multiple times with variable nic set to each
48 @@ -86,13 +86,13 @@ static inline int efrm_nic_table_held(vo
49 for ((_nic_i) = (efrm_nic_table_hold(), 0); \
50 (_nic_i) < EFHW_MAX_NR_DEVS || (efrm_nic_table_rele(), 0); \
51 (_nic_i)++) \
52 - if (((_nic) = efrm_nic_table.nic[_nic_i]))
53 + if (((_nic) = efrm_nic_tablep->nic[_nic_i]))
54
55 #define EFRM_FOR_EACH_NIC_IN_SET(_set, _i, _nic) \
56 for ((_i) = (efrm_nic_table_hold(), 0); \
57 (_i) < EFHW_MAX_NR_DEVS || (efrm_nic_table_rele(), 0); \
58 ++(_i)) \
59 - if (((_nic) = efrm_nic_table.nic[_i]) && \
60 + if (((_nic) = efrm_nic_tablep->nic[_i]) && \
61 efrm_nic_set_read((_set), (_i)))
62
63 #endif /* __CI_EFRM_NIC_TABLE_H__ */