aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-14 20:48:55 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-14 20:48:55 -0400
commit2acab771b7e676125cb8c96b61dcdefe9ba67e57 (patch)
tree86227af3c9ad0d90823e5488a86f7f453ed1837a /scripts
parent201e06279823c73242de987f192f43d2b30e5331 (diff)
parent64541d19702cfdb7ea946fdc20faee849f6874b1 (diff)
Merge branch 'master'
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/lxdialog/checklist.c19
-rw-r--r--scripts/mod/modpost.c13
2 files changed, 18 insertions, 14 deletions
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index db07ae73e051..be0200e9cdaf 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -196,8 +196,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
196 196
197 print_buttons(dialog, height, width, 0); 197 print_buttons(dialog, height, width, 0);
198 198
199 wnoutrefresh(list);
200 wnoutrefresh(dialog); 199 wnoutrefresh(dialog);
200 wnoutrefresh(list);
201 doupdate(); 201 doupdate();
202 202
203 while (key != ESC) { 203 while (key != ESC) {
@@ -225,12 +225,11 @@ int dialog_checklist(const char *title, const char *prompt, int height,
225 } 225 }
226 scroll--; 226 scroll--;
227 print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE); 227 print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE);
228 wnoutrefresh(list);
229
230 print_arrows(dialog, choice, item_no, 228 print_arrows(dialog, choice, item_no,
231 scroll, box_y, box_x + check_x + 5, list_height); 229 scroll, box_y, box_x + check_x + 5, list_height);
232 230
233 wrefresh(dialog); 231 wnoutrefresh(dialog);
232 wrefresh(list);
234 233
235 continue; /* wait for another key press */ 234 continue; /* wait for another key press */
236 } else 235 } else
@@ -252,12 +251,12 @@ int dialog_checklist(const char *title, const char *prompt, int height,
252 scroll++; 251 scroll++;
253 print_item(list, items[(scroll + max_choice - 1) * 3 + 1], 252 print_item(list, items[(scroll + max_choice - 1) * 3 + 1],
254 status[scroll + max_choice - 1], max_choice - 1, TRUE); 253 status[scroll + max_choice - 1], max_choice - 1, TRUE);
255 wnoutrefresh(list);
256 254
257 print_arrows(dialog, choice, item_no, 255 print_arrows(dialog, choice, item_no,
258 scroll, box_y, box_x + check_x + 5, list_height); 256 scroll, box_y, box_x + check_x + 5, list_height);
259 257
260 wrefresh(dialog); 258 wnoutrefresh(dialog);
259 wrefresh(list);
261 260
262 continue; /* wait for another key press */ 261 continue; /* wait for another key press */
263 } else 262 } else
@@ -271,8 +270,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
271 choice = i; 270 choice = i;
272 print_item(list, items[(scroll + choice) * 3 + 1], 271 print_item(list, items[(scroll + choice) * 3 + 1],
273 status[scroll + choice], choice, TRUE); 272 status[scroll + choice], choice, TRUE);
274 wnoutrefresh(list); 273 wnoutrefresh(dialog);
275 wrefresh(dialog); 274 wrefresh(list);
276 } 275 }
277 continue; /* wait for another key press */ 276 continue; /* wait for another key press */
278 } 277 }
@@ -306,8 +305,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
306 print_item(list, items[(scroll + i) * 3 + 1], 305 print_item(list, items[(scroll + i) * 3 + 1],
307 status[scroll + i], i, i == choice); 306 status[scroll + i], i, i == choice);
308 } 307 }
309 wnoutrefresh(list); 308 wnoutrefresh(dialog);
310 wrefresh(dialog); 309 wrefresh(list);
311 310
312 for (i = 0; i < item_no; i++) 311 for (i = 0; i < item_no; i++)
313 if (status[i]) 312 if (status[i])
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 7e8079a34adf..cd00e9f07589 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -492,17 +492,19 @@ static int strrcmp(const char *s, const char *sub)
492 * These functions may often be marked __init and we do not want to 492 * These functions may often be marked __init and we do not want to
493 * warn here. 493 * warn here.
494 * the pattern is identified by: 494 * the pattern is identified by:
495 * tosec = .init.text | .exit.text 495 * tosec = .init.text | .exit.text | .init.data
496 * fromsec = .data 496 * fromsec = .data
497 * atsym = *_driver, *_ops, *_probe, *probe_one 497 * atsym = *_driver, *_template, *_sht, *_ops, *_probe, *probe_one
498 **/ 498 **/
499static int secref_whitelist(const char *tosec, const char *fromsec, 499static int secref_whitelist(const char *tosec, const char *fromsec,
500 const char *atsym) 500 const char *atsym)
501{ 501{
502 int f1 = 1, f2 = 1; 502 int f1 = 1, f2 = 1;
503 const char **s; 503 const char **s;
504 const char *pat2sym[] = { 504 const char *pat2sym[] = {
505 "_driver", 505 "_driver",
506 "_template", /* scsi uses *_template a lot */
507 "_sht", /* scsi also used *_sht to some extent */
506 "_ops", 508 "_ops",
507 "_probe", 509 "_probe",
508 "_probe_one", 510 "_probe_one",
@@ -522,7 +524,8 @@ static int secref_whitelist(const char *tosec, const char *fromsec,
522 524
523 /* Check for pattern 2 */ 525 /* Check for pattern 2 */
524 if ((strcmp(tosec, ".init.text") != 0) && 526 if ((strcmp(tosec, ".init.text") != 0) &&
525 (strcmp(tosec, ".exit.text") != 0)) 527 (strcmp(tosec, ".exit.text") != 0) &&
528 (strcmp(tosec, ".init.data") != 0))
526 f2 = 0; 529 f2 = 0;
527 if (strcmp(fromsec, ".data") != 0) 530 if (strcmp(fromsec, ".data") != 0)
528 f2 = 0; 531 f2 = 0;
@@ -820,6 +823,7 @@ static int exit_section(const char *name)
820 * For our future {in}sanity, add a comment that this is the ppc .opd 823 * For our future {in}sanity, add a comment that this is the ppc .opd
821 * section, not the ia64 .opd section. 824 * section, not the ia64 .opd section.
822 * ia64 .opd should not point to discarded sections. 825 * ia64 .opd should not point to discarded sections.
826 * [.rodata] like for .init.text we ignore .rodata references -same reason
823 **/ 827 **/
824static int exit_section_ref_ok(const char *name) 828static int exit_section_ref_ok(const char *name)
825{ 829{
@@ -829,6 +833,7 @@ static int exit_section_ref_ok(const char *name)
829 ".exit.text", 833 ".exit.text",
830 ".exit.data", 834 ".exit.data",
831 ".init.text", 835 ".init.text",
836 ".rodata",
832 ".opd", /* See comment [OPD] */ 837 ".opd", /* See comment [OPD] */
833 ".toc1", /* used by ppc64 */ 838 ".toc1", /* used by ppc64 */
834 ".altinstructions", 839 ".altinstructions",
X 0x10 #define C_REFRESH_STATS 0x11 /* * Descriptor flags */ #define BD_FLG_TCP_UDP_SUM 0x01 #define BD_FLG_IP_SUM 0x02 #define BD_FLG_END 0x04 #define BD_FLG_MORE 0x08 #define BD_FLG_JUMBO 0x10 #define BD_FLG_UCAST 0x20 #define BD_FLG_MCAST 0x40 #define BD_FLG_BCAST 0x60 #define BD_FLG_TYP_MASK 0x60 #define BD_FLG_IP_FRAG 0x80 #define BD_FLG_IP_FRAG_END 0x100 #define BD_FLG_VLAN_TAG 0x200 #define BD_FLG_FRAME_ERROR 0x400 #define BD_FLG_COAL_NOW 0x800 #define BD_FLG_MINI 0x1000 /* * Ring Control block flags */ #define RCB_FLG_TCP_UDP_SUM 0x01 #define RCB_FLG_IP_SUM 0x02 #define RCB_FLG_NO_PSEUDO_HDR 0x08 #define RCB_FLG_VLAN_ASSIST 0x10 #define RCB_FLG_COAL_INT_ONLY 0x20 #define RCB_FLG_TX_HOST_RING 0x40 #define RCB_FLG_IEEE_SNAP_SUM 0x80 #define RCB_FLG_EXT_RX_BD 0x100 #define RCB_FLG_RNG_DISABLE 0x200 /* * TX ring - maximum TX ring entries for Tigon I's is 128 */ #define MAX_TX_RING_ENTRIES 256 #define TIGON_I_TX_RING_ENTRIES 128 #define TX_RING_SIZE (MAX_TX_RING_ENTRIES * sizeof(struct tx_desc)) #define TX_RING_BASE 0x3800 struct tx_desc{ aceaddr addr; u32 flagsize; #if 0 /* * This is in PCI shared mem and must be accessed with readl/writel * real layout is: */ #if __LITTLE_ENDIAN u16 flags; u16 size; u16 vlan; u16 reserved; #else u16 size; u16 flags; u16 reserved; u16 vlan; #endif #endif u32 vlanres; }; #define RX_STD_RING_ENTRIES 512 #define RX_STD_RING_SIZE (RX_STD_RING_ENTRIES * sizeof(struct rx_desc)) #define RX_JUMBO_RING_ENTRIES 256 #define RX_JUMBO_RING_SIZE (RX_JUMBO_RING_ENTRIES *sizeof(struct rx_desc)) #define RX_MINI_RING_ENTRIES 1024 #define RX_MINI_RING_SIZE (RX_MINI_RING_ENTRIES *sizeof(struct rx_desc)) #define RX_RETURN_RING_ENTRIES 2048 #define RX_RETURN_RING_SIZE (RX_MAX_RETURN_RING_ENTRIES * \ sizeof(struct rx_desc)) struct rx_desc{ aceaddr addr; #ifdef __LITTLE_ENDIAN u16 size; u16 idx; #else u16 idx; u16 size; #endif #ifdef __LITTLE_ENDIAN u16 flags; u16 type; #else u16 type; u16 flags; #endif #ifdef __LITTLE_ENDIAN u16 tcp_udp_csum; u16 ip_csum; #else u16 ip_csum; u16 tcp_udp_csum; #endif #ifdef __LITTLE_ENDIAN u16 vlan; u16 err_flags; #else u16 err_flags; u16 vlan; #endif u32 reserved; u32 opague; }; /* * This struct is shared with the NIC firmware. */ struct ring_ctrl { aceaddr rngptr; #ifdef __LITTLE_ENDIAN u16 flags; u16 max_len; #else u16 max_len; u16 flags; #endif u32 pad; }; struct ace_mac_stats { u32 excess_colls; u32 coll_1; u32 coll_2; u32 coll_3; u32 coll_4; u32 coll_5; u32 coll_6; u32 coll_7; u32 coll_8; u32 coll_9; u32 coll_10; u32 coll_11; u32 coll_12; u32 coll_13; u32 coll_14; u32 coll_15; u32 late_coll; u32 defers; u32 crc_err; u32 underrun; u32 crs_err; u32 pad[3]; u32 drop_ula; u32 drop_mc; u32 drop_fc; u32 drop_space; u32 coll; u32 kept_bc; u32 kept_mc; u32 kept_uc; }; struct ace_info { union { u32 stats[256]; } s; struct ring_ctrl evt_ctrl; struct ring_ctrl cmd_ctrl; struct ring_ctrl tx_ctrl; struct ring_ctrl rx_std_ctrl; struct ring_ctrl rx_jumbo_ctrl; struct ring_ctrl rx_mini_ctrl; struct ring_ctrl rx_return_ctrl; aceaddr evt_prd_ptr; aceaddr rx_ret_prd_ptr; aceaddr tx_csm_ptr; aceaddr stats2_ptr; }; struct ring_info { struct sk_buff *skb; DECLARE_PCI_UNMAP_ADDR(mapping) }; /* * Funny... As soon as we add maplen on alpha, it starts to work * much slower. Hmm... is it because struct does not fit to one cacheline? * So, split tx_ring_info. */ struct tx_ring_info { struct sk_buff *skb; DECLARE_PCI_UNMAP_ADDR(mapping) DECLARE_PCI_UNMAP_LEN(maplen) }; /* * struct ace_skb holding the rings of skb's. This is an awful lot of * pointers, but I don't see any other smart mode to do this in an * efficient manner ;-( */ struct ace_skb { struct tx_ring_info tx_skbuff[MAX_TX_RING_ENTRIES]; struct ring_info rx_std_skbuff[RX_STD_RING_ENTRIES]; struct ring_info rx_mini_skbuff[RX_MINI_RING_ENTRIES]; struct ring_info rx_jumbo_skbuff[RX_JUMBO_RING_ENTRIES]; }; /* * Struct private for the AceNIC. * * Elements are grouped so variables used by the tx handling goes * together, and will go into the same cache lines etc. in order to * avoid cache line contention between the rx and tx handling on SMP. * * Frequently accessed variables are put at the beginning of the * struct to help the compiler generate better/shorter code. */ struct ace_private { struct ace_info *info; struct ace_regs __iomem *regs; /* register base */ struct ace_skb *skb; dma_addr_t info_dma; /* 32/64 bit */ int version, link; int promisc, mcast_all; /* * TX elements */ struct tx_desc *tx_ring; u32 tx_prd; volatile u32 tx_ret_csm; int tx_ring_entries; /* * RX elements */ unsigned long std_refill_busy __attribute__ ((aligned (SMP_CACHE_BYTES))); unsigned long mini_refill_busy, jumbo_refill_busy; atomic_t cur_rx_bufs; atomic_t cur_mini_bufs; atomic_t cur_jumbo_bufs; u32 rx_std_skbprd, rx_mini_skbprd, rx_jumbo_skbprd; u32 cur_rx; struct rx_desc *rx_std_ring; struct rx_desc *rx_jumbo_ring; struct rx_desc *rx_mini_ring; struct rx_desc *rx_return_ring; #if ACENIC_DO_VLAN struct vlan_group *vlgrp; #endif int tasklet_pending, jumbo; struct tasklet_struct ace_tasklet; struct event *evt_ring; volatile u32 *evt_prd, *rx_ret_prd, *tx_csm; dma_addr_t tx_ring_dma; /* 32/64 bit */ dma_addr_t rx_ring_base_dma; dma_addr_t evt_ring_dma; dma_addr_t evt_prd_dma, rx_ret_prd_dma, tx_csm_dma; unsigned char *trace_buf; struct pci_dev *pdev; struct net_device *next; volatile int fw_running; int board_idx; u16 pci_command; u8 pci_latency; const char *name; #ifdef INDEX_DEBUG spinlock_t debug_lock __attribute__ ((aligned (SMP_CACHE_BYTES))); u32 last_tx, last_std_rx, last_mini_rx; #endif struct net_device_stats stats; int pci_using_dac; }; #define TX_RESERVED MAX_SKB_FRAGS static inline int tx_space (struct ace_private *ap, u32 csm, u32 prd) { return (csm - prd - 1) & (ACE_TX_RING_ENTRIES(ap) - 1); } #define tx_free(ap) tx_space((ap)->tx_ret_csm, (ap)->tx_prd, ap) #define tx_ring_full(ap, csm, prd) (tx_space(ap, csm, prd) <= TX_RESERVED) static inline void set_aceaddr(aceaddr *aa, dma_addr_t addr) { u64 baddr = (u64) addr; aa->addrlo = baddr & 0xffffffff; aa->addrhi = baddr >> 32; wmb(); } static inline void ace_set_txprd(struct ace_regs __iomem *regs, struct ace_private *ap, u32 value) { #ifdef INDEX_DEBUG unsigned long flags; spin_lock_irqsave(&ap->debug_lock, flags); writel(value, &regs->TxPrd); if (value == ap->last_tx) printk(KERN_ERR "AceNIC RACE ALERT! writing identical value " "to tx producer (%i)\n", value); ap->last_tx = value; spin_unlock_irqrestore(&ap->debug_lock, flags); #else writel(value, &regs->TxPrd); #endif wmb(); } static inline void ace_mask_irq(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(1, &regs->MaskInt); else writel(readl(&regs->HostCtrl) | MASK_INTS, &regs->HostCtrl); ace_sync_irq(dev->irq); } static inline void ace_unmask_irq(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(0, &regs->MaskInt); else writel(readl(&regs->HostCtrl) & ~MASK_INTS, &regs->HostCtrl); } /* * Prototypes */ static int ace_init(struct net_device *dev); static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs); static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs); static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs); static irqreturn_t ace_interrupt(int irq, void *dev_id); static int ace_load_firmware(struct net_device *dev); static int ace_open(struct net_device *dev); static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev); static int ace_close(struct net_device *dev); static void ace_tasklet(unsigned long dev); static void ace_dump_trace(struct ace_private *ap); static void ace_set_multicast_list(struct net_device *dev); static int ace_change_mtu(struct net_device *dev, int new_mtu); static int ace_set_mac_addr(struct net_device *dev, void *p); static void ace_set_rxtx_parms(struct net_device *dev, int jumbo); static int ace_allocate_descriptors(struct net_device *dev); static void ace_free_descriptors(struct net_device *dev); static void ace_init_cleanup(struct net_device *dev); static struct net_device_stats *ace_get_stats(struct net_device *dev); static int read_eeprom_byte(struct net_device *dev, unsigned long offset); #if ACENIC_DO_VLAN static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp); #endif #endif /* _ACENIC_H_ */