1 diff -urN xen-4.6.5/tools/firmware/etherboot/patches/drivers-fixes.patch xen-4.6.5.build/tools/firmware/etherboot/patches/drivers-fixes.patch
2 --- xen-4.6.5/tools/firmware/etherboot/patches/drivers-fixes.patch 1970-01-01 01:00:00.000000000 +0100
3 +++ xen-4.6.5.build/tools/firmware/etherboot/patches/drivers-fixes.patch 2017-04-14 14:57:04.905408377 +0200
5 +--- a/src/drivers/net/via-rhine.c~ 2011-12-11 03:28:04.000000000 +0100
6 ++++ b/src/drivers/net/via-rhine.c 2017-04-14 14:19:52.286247054 +0200
8 + // if (tp->chip_id == 0x3065)
9 + if( tp->chip_revision < 0x80 && tp->chip_revision >=0x40 )
10 + intr_status |= inb(nic->ioaddr + IntrStatus2) << 16;
11 +- intr_status = (intr_status & ~DEFAULT_INTR);
12 +- if ( action == ENABLE )
13 +- intr_status = intr_status | DEFAULT_INTR;
14 +- outw(intr_status, nic->ioaddr + IntrEnable);
16 ++ intr_status = (intr_status & ~DEFAULT_INTR);
17 ++ intr_status = intr_status | DEFAULT_INTR;
18 ++ outw(intr_status, nic->ioaddr + IntrEnable);
21 + outw(0x0010, nic->ioaddr + 0x84);
23 +--- a/src/drivers/net/skge.c~ 2011-12-11 03:28:04.000000000 +0100
24 ++++ b/src/drivers/net/skge.c 2017-04-14 14:24:41.466448500 +0200
26 + /* Avoid conditionals by using array */
27 + static const int txqaddr[] = { Q_XA1, Q_XA2 };
28 + static const int rxqaddr[] = { Q_R1, Q_R2 };
29 +-static const u32 rxirqmask[] = { IS_R1_F, IS_R2_F };
30 +-static const u32 txirqmask[] = { IS_XA1_F, IS_XA2_F };
31 +-static const u32 napimask[] = { IS_R1_F|IS_XA1_F, IS_R2_F|IS_XA2_F };
32 + static const u32 portmask[] = { IS_PORT_1, IS_PORT_2 };
34 + /* Determine supported/advertised modes based on hardware.
35 +@@ -1921,8 +1918,6 @@
36 + skge->tx_ring.to_clean = e;
39 +-static const u8 pause_mc_addr[ETH_ALEN] = { 0x1, 0x80, 0xc2, 0x0, 0x0, 0x1 };
41 + static inline u16 phy_length(const struct skge_hw *hw, u32 status)
43 + if (hw->chip_id == CHIP_ID_GENESIS)
44 +--- a/src/drivers/net/sis190.c~ 2011-12-11 03:28:04.000000000 +0100
45 ++++ b/src/drivers/net/sis190.c 2017-04-14 14:26:03.937456678 +0200
47 + static const u32 sis190_intr_mask =
48 + RxQEmpty | RxQInt | TxQ1Int | TxQ0Int | RxHalt | TxHalt | LinkChange;
51 +- * Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
52 +- * The chips use a 64 element hash table based on the Ethernet CRC.
54 +-static const int multicast_filter_limit = 32;
56 + static void __mdio_cmd(void *ioaddr, u32 ctl)
59 +--- a/src/drivers/net/via-velocity.c~ 2011-12-11 03:28:04.000000000 +0100
60 ++++ b/src/drivers/net/via-velocity.c 2017-04-14 14:29:33.906690274 +0200
62 + 2: indicate the rxfifo threshold is 1024 bytes.
63 + 3: indicate the rxfifo threshold is store & forward.
65 +-VELOCITY_PARAM(rx_thresh, "Receive fifo threshold");
66 ++//VELOCITY_PARAM(rx_thresh, "Receive fifo threshold");
68 + #define DMA_LENGTH_MIN 0
69 + #define DMA_LENGTH_MAX 7
70 +--- a/src/drivers/net/e1000/e1000_phy.c~ 2011-12-11 03:28:04.000000000 +0100
71 ++++ b/src/drivers/net/e1000/e1000_phy.c 2017-04-14 14:40:51.169290852 +0200
72 +@@ -167,18 +167,18 @@
73 + if (!(phy->ops.read_reg))
76 +- ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
79 ++ ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
83 +- phy->id = (u32)(phy_id << 16);
85 +- ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
88 ++ phy->id = (u32)(phy_id << 16);
90 ++ ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
94 +- phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
95 +- phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
96 ++ phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
97 ++ phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
101 +--- a/src/drivers/net/igb/igb_phy.c~ 2011-12-11 03:28:04.000000000 +0100
102 ++++ b/src/drivers/net/igb/igb_phy.c 2017-04-14 14:43:20.841332677 +0200
104 + if (!(phy->ops.read_reg))
107 +- ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
110 ++ ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
114 +- phy->id = (u32)(phy_id << 16);
116 +- ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
119 ++ phy->id = (u32)(phy_id << 16);
121 ++ ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
125 +- phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
126 +- phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
127 ++ phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
128 ++ phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
132 +--- a/src/drivers/net/ath/ath5k/ath5k_reset.c~ 2011-12-11 03:28:04.000000000 +0100
133 ++++ b/src/drivers/net/ath/ath5k/ath5k_reset.c 2017-04-14 14:44:37.299026150 +0200
134 +@@ -135,13 +135,6 @@
139 +- * index into rates for control rates, we can set it up like this because
140 +- * this is only used for AR5212 and we know it supports G mode
142 +-static const unsigned int control_rates[] =
143 +- { 0, 1, 1, 1, 4, 4, 6, 6, 8, 8, 8, 8 };
146 + * ath5k_hw_write_rate_duration - fill rate code to duration table
148 +--- a/src/drivers/net/ath/ath5k/ath5k.c~ 2011-12-11 03:28:04.000000000 +0100
149 ++++ b/src/drivers/net/ath/ath5k/ath5k.c 2017-04-14 14:46:52.610822110 +0200
151 + PCI_ROM(0x168c, 0x001d, "ath2417", "Atheros 2417 Nala", AR5K_AR5212),
156 + static const struct ath5k_srev_name srev_names[] = {
157 + { "5210", AR5K_VERSION_MAC, AR5K_SREV_AR5210 },
159 + { "5133", AR5K_VERSION_RAD, AR5K_SREV_RAD_5133 },
160 + { "xxxxx", AR5K_VERSION_RAD, AR5K_SREV_UNKNOWN },
164 + #define ATH5K_SPMBL_NO 1
165 + #define ATH5K_SPMBL_YES 2
166 +--- a/src/drivers/net/ath/ath5k/ath5k_phy.c~ 2011-12-11 03:28:04.000000000 +0100
167 ++++ b/src/drivers/net/ath/ath5k/ath5k_phy.c 2017-04-14 14:50:38.760444548 +0200
168 +@@ -1219,12 +1219,12 @@
170 + /* Update radio registers */
171 + ath5k_hw_reg_write(ah, (phy_sig & ~(AR5K_PHY_SIG_FIRPWR)) |
172 +- AR5K_REG_SM(-1, AR5K_PHY_SIG_FIRPWR), AR5K_PHY_SIG);
173 ++ AR5K_REG_SM(-1U, AR5K_PHY_SIG_FIRPWR), AR5K_PHY_SIG);
175 + ath5k_hw_reg_write(ah, (phy_agc & ~(AR5K_PHY_AGCCOARSE_HI |
176 + AR5K_PHY_AGCCOARSE_LO)) |
177 +- AR5K_REG_SM(-1, AR5K_PHY_AGCCOARSE_HI) |
178 +- AR5K_REG_SM(-127, AR5K_PHY_AGCCOARSE_LO), AR5K_PHY_AGCCOARSE);
179 ++ AR5K_REG_SM(-1U, AR5K_PHY_AGCCOARSE_HI) |
180 ++ AR5K_REG_SM(-127U, AR5K_PHY_AGCCOARSE_LO), AR5K_PHY_AGCCOARSE);
182 + ath5k_hw_reg_write(ah, (phy_sat & ~(AR5K_PHY_ADCSAT_ICNT |
183 + AR5K_PHY_ADCSAT_THR)) |
184 +--- a/src/drivers/net/ath/ath9k/ath9k_eeprom.c~ 2011-12-11 03:28:04.000000000 +0100
185 ++++ b/src/drivers/net/ath/ath9k/ath9k_eeprom.c 2017-04-14 14:56:36.021706193 +0200
187 + /* FIXME: array overrun? */
188 + for (i = 0; i < numXpdGains; i++) {
189 + minPwrT4[i] = data_9287[idxL].pwrPdg[i][0];
190 +- maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
191 ++ maxPwrT4[i] = data_9287[idxL].pwrPdg[i][intercepts - 1];
192 + ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
193 + data_9287[idxL].pwrPdg[i],
194 + data_9287[idxL].vpdPdg[i],
196 + } else if (eeprom_4k) {
197 + for (i = 0; i < numXpdGains; i++) {
198 + minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
199 +- maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4];
200 ++ maxPwrT4[i] = data_4k[idxL].pwrPdg[i][intercepts - 1];
201 + ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
202 + data_4k[idxL].pwrPdg[i],
203 + data_4k[idxL].vpdPdg[i],
206 + for (i = 0; i < numXpdGains; i++) {
207 + minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
208 +- maxPwrT4[i] = data_def[idxL].pwrPdg[i][4];
209 ++ maxPwrT4[i] = data_def[idxL].pwrPdg[i][intercepts - 1];
210 + ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
211 + data_def[idxL].pwrPdg[i],
212 + data_def[idxL].vpdPdg[i],
213 diff -urN xen-4.6.5/tools/firmware/etherboot/patches/have-strtok.patch xen-4.6.5.build/tools/firmware/etherboot/patches/have-strtok.patch
214 --- xen-4.6.5/tools/firmware/etherboot/patches/have-strtok.patch 1970-01-01 01:00:00.000000000 +0100
215 +++ xen-4.6.5.build/tools/firmware/etherboot/patches/have-strtok.patch 2017-04-14 14:07:35.483912837 +0200
217 +--- a/src/core/stringextra.c~ 2011-12-11 03:28:04.000000000 +0100
218 ++++ b/src/core/stringextra.c 2017-04-14 14:07:03.470188756 +0200
223 +-#ifndef __HAVE_ARCH_STRTOK
226 + * strtok - Split a string into tokens
227 + * @s: The string to be searched
228 diff -urN xen-4.6.5/tools/firmware/etherboot/patches/mucurses-fix.patch xen-4.6.5.build/tools/firmware/etherboot/patches/mucurses-fix.patch
229 --- xen-4.6.5/tools/firmware/etherboot/patches/mucurses-fix.patch 1970-01-01 01:00:00.000000000 +0100
230 +++ xen-4.6.5.build/tools/firmware/etherboot/patches/mucurses-fix.patch 2017-04-14 14:59:46.177462840 +0200
232 +--- a/src/hci/mucurses/windows.c~ 2011-12-11 03:28:04.000000000 +0100
233 ++++ b/src/hci/mucurses/windows.c 2017-04-14 14:59:23.907179591 +0200
235 + * @ret rc return status code
237 + int delwin ( WINDOW *win ) {
238 +- if ( win == NULL )
241 + /* I think we should blank the region covered by the window -
242 + ncurses doesn't do this, but they have a buffer, so they
243 + may just be deleting from an offscreen context whereas we
245 + WINDOW *derwin ( WINDOW *parent, int nlines, int ncols,
246 + int begin_y, int begin_x ) {
248 +- if ( parent == NULL )
250 + if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL )
252 + if ( ( (unsigned)ncols > parent->width ) ||
255 + WINDOW *dupwin ( WINDOW *orig ) {
257 +- if ( orig == NULL )
259 + if ( ( copy = malloc( sizeof( WINDOW ) ) ) == NULL )
261 + copy->scr = orig->scr;
263 + * @ret rc return status code
265 + int mvwin ( WINDOW *win, int y, int x ) {
266 +- if ( win == NULL )
268 + if ( ( ( (unsigned)y + win->height ) > LINES ) ||
269 + ( ( (unsigned)x + win->width ) > COLS ) )
272 + WINDOW *subwin ( WINDOW *parent, int nlines, int ncols,
273 + int begin_y, int begin_x ) {
275 +- if ( parent == NULL )
277 + if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL )
279 + child = newwin( nlines, ncols, begin_y, begin_x );
280 diff -urN xen-4.6.5/tools/firmware/etherboot/patches/series xen-4.6.5.build/tools/firmware/etherboot/patches/series
281 --- xen-4.6.5/tools/firmware/etherboot/patches/series 2017-03-07 17:19:05.000000000 +0100
282 +++ xen-4.6.5.build/tools/firmware/etherboot/patches/series 2017-04-14 14:59:51.384195712 +0200
288 +unused-variable.patch
291 diff -urN xen-4.6.5/tools/firmware/etherboot/patches/unused-variable.patch xen-4.6.5.build/tools/firmware/etherboot/patches/unused-variable.patch
292 --- xen-4.6.5/tools/firmware/etherboot/patches/unused-variable.patch 1970-01-01 01:00:00.000000000 +0100
293 +++ xen-4.6.5.build/tools/firmware/etherboot/patches/unused-variable.patch 2017-04-14 14:15:17.032883274 +0200
295 +--- a/src/include/nic.h~ 2017-04-14 14:13:09.000000000 +0200
296 ++++ b/src/include/nic.h 2017-04-14 14:13:37.061661840 +0200
300 + #define DRIVER(_name_text,_unused2,_unused3,_name,_probe,_disable) \
301 +- static const char _name ## _text[] = _name_text; \
302 ++ static __attribute__ (( unused )) const char \
303 ++ _name ## _text[] = _name_text; \
304 + static inline int \
305 + _name ## _probe ( struct nic *nic, void *hwdev ) { \
306 + return _probe ( nic, hwdev ); \