You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: James S. <jsi...@us...> - 2002-02-28 17:42:28
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv9539 Modified Files: hpfb.c Log Message: Updated. Index: hpfb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/hpfb.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- hpfb.c 31 Aug 2001 18:12:45 -0000 1.7 +++ hpfb.c 28 Feb 2002 17:42:25 -0000 1.8 @@ -1,9 +1,6 @@ /* * HP300 Topcat framebuffer support (derived from macfb of all things) * Phil Blundell <ph...@gn...> 1998 - * - * Should this be moved to drivers/dio/video/ ? -- Peter Maydell - * No! -- Jes */ #include <linux/module.h> @@ -66,13 +63,9 @@ {0,0,0,0,0,0} }; -static int hpfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) -{ - return -EINVAL; -} - /* - * Set the palette. This may not work on all boards but only experimentation will tell. + * Set the palette. This may not work on all boards but only experimentation + * will tell. * XXX Doesn't work at all. */ static int hpfb_setcolreg(unsigned regno, unsigned red, unsigned green, @@ -91,27 +84,25 @@ return 0; } -void hpfb_copyarea(struct fb_info *info, int sx, int sy, unsigned int width, - unsigned int height, int dx, int dy) +void hpfb_copyarea(struct fb_info *info, struct fb_copyarea *area) { while (readb(fb_regs + BUSY) & fb_bitmask); writeb(0x3, fb_regs + WMRR); - writew(sx, fb_regs + SOURCE_X); - writew(sy, fb_regs + SOURCE_Y); - writew(dx, fb_regs + DEST_X); - writew(dy, fb_regs + DEST_Y); - writew(height, fb_regs + WHEIGHT); - writew(width, fb_regs + WWIDTH); + writew(area->sx, fb_regs + SOURCE_X); + writew(area->sy, fb_regs + SOURCE_Y); + writew(area->dx, fb_regs + DEST_X); + writew(area->dy, fb_regs + DEST_Y); + writew(area->height, fb_regs + WHEIGHT); + writew(area->width, fb_regs + WWIDTH); writeb(fb_bitmask, fb_regs + WMOVE); } static struct fb_ops hpfb_ops = { owner: THIS_MODULE, - fb_check_var: hpfb_check_var, fb_setcolreg: hpfb_setcolreg, - fb_fillrect: cfb_fillrect, + fb_fillrect: cfb_fillrect, fb_copyarea: hpfb_copyarea, - fb_imageblit: cfb_imageblit, + fb_imageblit: cfb_imageblit, }; #define TOPCAT_FBOMSB 0x5d @@ -136,17 +127,6 @@ writeb(0, base+0x4516); writeb(0x90, base+0x4206); #endif - - /* - * Fill in the available video resolution - */ - - hpfb_defined.xres = 1024; - hpfb_defined.yres = 768; - hpfb_defined.xres_virtual = 1024; - hpfb_defined.yres_virtual = 768; - hpfb_defined.bits_per_pixel = 8; - /* * Give the hardware a bit of a prod and work out how many bits per * pixel are supported. @@ -168,7 +148,7 @@ /* * Let there be consoles.. */ - fb_info.node = -1; + fb_info.node = NODEV; fb_info.fbops = &hpfb_ops; fb_info.flags = FBINFO_FLAG_DEFAULT; fb_info.var = hpfb_defined; |
From: James S. <jsi...@us...> - 2002-02-28 00:42:02
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio In directory usw-pr-cvs1:/tmp/cvs-serv23132 Modified Files: sun8042.c Log Message: More cleanups. Still a long way to go. Index: sun8042.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/sun8042.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- sun8042.c 28 Feb 2002 00:09:11 -0000 1.11 +++ sun8042.c 28 Feb 2002 00:41:59 -0000 1.12 @@ -134,7 +134,7 @@ return NULL; /* success */ } -void __init pcikbd_init_hw(void) +int __init sun8042_port_register(&i8042_kbd_values, &i8042_kbd_port) { struct linux_ebus *ebus; struct linux_ebus_device *edev; @@ -219,7 +219,7 @@ printk("8042: keyboard init failure [%s]\n", msg); } -int __init pcimouse_init(void) +int __init sun8042_port_register(&i8042_aux_values, &i8042_aux_port) { struct linux_ebus *ebus; struct linux_ebus_device *edev; @@ -228,7 +228,7 @@ if (pcikbd_mrcoffee) { if ((pcimouse_iobase = pcikbd_iobase) == 0) { printk("pcimouse_init: no 8042 given\n"); - goto do_enodev; + return -ENODEV; } pcimouse_irq = pcikbd_irq; } else { @@ -244,62 +244,27 @@ } } printk("pcimouse_init: no 8042 found\n"); - goto do_enodev; - + return -ENODEV; found: pcimouse_iobase = child->resource[0].start; pcimouse_irq = child->irqs[0]; } - queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); - if (!queue) { - printk("pcimouse_init: kmalloc(aux_queue) failed.\n"); - return -ENOMEM; - } - memset(queue, 0, sizeof(*queue)); - - init_waitqueue_head(&queue->proc_list); - if (request_irq(pcimouse_irq, &pcimouse_interrupt, SA_SHIRQ, "mouse", (void *)pcimouse_iobase)) { printk("8042: Cannot register IRQ %s\n", __irq_itoa(pcimouse_irq)); - goto do_enodev; + return -ENODEV; } printk("8042(mouse) at %lx (irq %s)\n", pcimouse_iobase, __irq_itoa(pcimouse_irq)); printk("8042: PS/2 auxiliary pointing device detected.\n"); - aux_present = 1; - pckbd_read_mask = AUX_STAT_OBF; - - misc_register(&psaux_mouse); - aux_start_atomic(); - pcimouse_outb(KBD_CCMD_MOUSE_ENABLE, pcimouse_iobase + KBD_CNTL_REG); - aux_write_ack(AUX_RESET); - aux_write_ack(AUX_SET_SAMPLE); - aux_write_ack(100); - aux_write_ack(AUX_SET_RES); - aux_write_ack(3); - aux_write_ack(AUX_SET_SCALE21); - poll_aux_status(); - pcimouse_outb(KBD_CCMD_MOUSE_DISABLE, pcimouse_iobase + KBD_CNTL_REG); - poll_aux_status(); - pcimouse_outb(KBD_CCMD_WRITE_MODE, pcimouse_iobase + KBD_CNTL_REG); - poll_aux_status(); - pcimouse_outb(AUX_INTS_OFF, pcimouse_iobase + KBD_DATA_REG); - poll_aux_status(); - aux_end_atomic(); - return 0; - -do_enodev: - misc_register(&psaux_no_mouse); - return -ENODEV; } -int __init ps2kbd_probe(void) +int __init sun8042_init(void) { int pnode, enode, node, dnode, xnode; int kbnode = 0, msnode = 0, bnode = 0; @@ -314,11 +279,11 @@ len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop)); if (len < 0) { printk("ps2kbd_probe: no name of root node\n"); - goto do_enodev; + return -ENODEV; } if (strncmp(prop, "SUNW,JavaStation-1", len) == 0) { pcikbd_mrcoffee = 1; /* Brain damage detected */ - goto found; + return 0; } #endif /* @@ -327,7 +292,7 @@ node = prom_getchild(prom_root_node); node = prom_searchsiblings(node, "aliases"); if (!node) - goto do_enodev; + return -ENODEV; len = prom_getproperty(node, "keyboard", prop, sizeof(prop)); if (len > 0) { @@ -335,7 +300,7 @@ kbnode = prom_finddevice(prop); } if (!kbnode) - goto do_enodev; + return -ENODEV; len = prom_getproperty(node, "mouse", prop, sizeof(prop)); if (len > 0) { @@ -343,7 +308,7 @@ msnode = prom_finddevice(prop); } if (!msnode) - goto do_enodev; + return -ENODEV; /* * Find matching EBus nodes... @@ -387,23 +352,17 @@ * Does it match? */ if ((xnode = prom_searchsiblings(dnode, PCI_KB_NAME1)) == kbnode) { - ++devices; + sun8042_port_register(&i8042_kbd_values, &i8042_kbd_port); } else if ((xnode = prom_searchsiblings(dnode, PCI_KB_NAME2)) == kbnode) { - ++devices; + sun8042_port_register(&i8042_kbd_values, &i8042_kbd_port); } if ((xnode = prom_searchsiblings(dnode, PCI_MS_NAME1)) == msnode) { - ++devices; + sun8042_port_register(&i8042_aux_values, &i8042_aux_port); } else if ((xnode = prom_searchsiblings(dnode, PCI_MS_NAME2)) == msnode) { - ++devices; + + sun8042_port_register(&i8042_aux_values, &i8042_aux_port); } - - /* - * Found everything we need? - */ - if (devices == 2) - goto found; - node = prom_getsibling(node); node = prom_searchsiblings(node, "8042"); } @@ -413,17 +372,5 @@ pnode = prom_getsibling(pnode); pnode = prom_searchsiblings(pnode, "pci"); } -do_enodev: - sunkbd_setinitfunc(pcimouse_no_init); - return -ENODEV; - -found: - sunkbd_setinitfunc(pcimouse_init); - sunkbd_setinitfunc(pcikbd_init); - kbd_ops.compute_shiftstate = pci_compute_shiftstate; - kbd_ops.setledstate = pci_setledstate; - kbd_ops.getledstate = pci_getledstate; - kbd_ops.setkeycode = pci_setkeycode; - kbd_ops.getkeycode = pci_getkeycode; return 0; } |
From: James S. <jsi...@us...> - 2002-02-28 00:09:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio In directory usw-pr-cvs1:/tmp/cvs-serv16174 Modified Files: sun8042.c Log Message: Cleanup of sparc platform. The hardware is the same as ix86 expect we use the prom to get info about th i8042 chipset(s). Index: sun8042.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/sun8042.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- sun8042.c 23 Jan 2002 06:23:02 -0000 1.10 +++ sun8042.c 28 Feb 2002 00:09:11 -0000 1.11 @@ -54,87 +54,6 @@ unsigned char pckbd_read_mask = KBD_STAT_OBF; -#define pcikbd_inb(x) inb(x) -#define pcikbd_outb(v,x) outb(v,x) - -static inline void kb_wait(void) -{ - unsigned long start = jiffies; - - do { - if(!(pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG) & KBD_STAT_IBF)) - return; - } while (jiffies - start < KBC_TIMEOUT); -} - -static void -pcikbd_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - unsigned char status; - - kbd_pt_regs = regs; - status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG); - do { - unsigned char scancode; - - if(status & pckbd_read_mask & KBD_STAT_MOUSE_OBF) - break; - scancode = pcikbd_inb(pcikbd_iobase + KBD_DATA_REG); - if((status & KBD_STAT_OBF) && do_acknowledge(scancode)) - handle_scancode(scancode, !(scancode & 0x80)); - status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG); - } while(status & KBD_STAT_OBF); - tasklet_schedule(&keyboard_tasklet); -} - -static int send_data(unsigned char data) -{ - int retries = 3; - unsigned long start; - - do { - kb_wait(); - acknowledge = resend = 0; - reply_expected = 1; - pcikbd_outb(data, pcikbd_iobase + KBD_DATA_REG); - start = jiffies; - do { - if(acknowledge) - return 1; - if(jiffies - start >= KBD_TIMEOUT) - return 0; - } while(!resend); - } while(retries-- > 0); - return 0; -} - -static int __init pcikbd_wait_for_input(void) -{ - int status, data; - unsigned long start = jiffies; - - do { - status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG); - if(!(status & KBD_STAT_OBF)) - continue; - data = pcikbd_inb(pcikbd_iobase + KBD_DATA_REG); - if(status & (KBD_STAT_GTO | KBD_STAT_PERR)) - continue; - return (data & 0xff); - } while(jiffies - start < KBD_INIT_TIMEOUT); - return -1; -} - -static void __init pcikbd_write(int address, int data) -{ - int status; - - do { - status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG); - } while (status & KBD_STAT_IBF); - pcikbd_outb(data, pcikbd_iobase + address); -} - #ifdef __sparc_v9__ static unsigned long pcibeep_iobase = 0; @@ -298,195 +217,6 @@ if(msg) printk("8042: keyboard init failure [%s]\n", msg); -} - -#define pcimouse_inb(x) inb(x) -#define pcimouse_outb(v,x) outb(v,x) - -/* - * PS/2 Aux Device - */ - -#define AUX_INTS_OFF (KBD_MODE_KCC | KBD_MODE_DISABLE_MOUSE | \ - KBD_MODE_SYS | KBD_MODE_KBD_INT) - -#define AUX_INTS_ON (KBD_MODE_KCC | KBD_MODE_SYS | \ - KBD_MODE_MOUSE_INT | KBD_MODE_KBD_INT) - -#define MAX_RETRIES 60 /* some aux operations take long time*/ - -/* - * Status polling - */ - -static int poll_aux_status(void) -{ - int retries=0; - - while ((pcimouse_inb(pcimouse_iobase + KBD_STATUS_REG) & - (KBD_STAT_IBF | KBD_STAT_OBF)) && retries < MAX_RETRIES) { - if ((pcimouse_inb(pcimouse_iobase + KBD_STATUS_REG) & AUX_STAT_OBF) - == AUX_STAT_OBF) - pcimouse_inb(pcimouse_iobase + KBD_DATA_REG); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout((5*HZ + 99) / 100); - retries++; - } - return (retries < MAX_RETRIES); -} - -/* - * Write to aux device - */ - -static void aux_write_dev(int val) -{ - poll_aux_status(); - pcimouse_outb(KBD_CCMD_WRITE_MOUSE, pcimouse_iobase + KBD_CNTL_REG);/* Write magic cookie */ - poll_aux_status(); - pcimouse_outb(val, pcimouse_iobase + KBD_DATA_REG); /* Write data */ - udelay(1); -} - -/* - * Write to device & handle returned ack - */ - -static int __init aux_write_ack(int val) -{ - aux_write_dev(val); - poll_aux_status(); - - if ((pcimouse_inb(pcimouse_iobase + KBD_STATUS_REG) & AUX_STAT_OBF) == AUX_STAT_OBF) - return (pcimouse_inb(pcimouse_iobase + KBD_DATA_REG)); - return 0; -} - -/* - * Write aux device command - */ - -static void aux_write_cmd(int val) -{ - poll_aux_status(); - pcimouse_outb(KBD_CCMD_WRITE_MODE, pcimouse_iobase + KBD_CNTL_REG); - poll_aux_status(); - pcimouse_outb(val, pcimouse_iobase + KBD_DATA_REG); -} - -/* - * Interrupt from the auxiliary device: a character - * is waiting in the keyboard/aux controller. - */ - -void pcimouse_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - int head = queue->head; - int maxhead = (queue->tail-1) & (AUX_BUF_SIZE-1); - - if ((pcimouse_inb(pcimouse_iobase + KBD_STATUS_REG) & AUX_STAT_OBF) != AUX_STAT_OBF) - return; - - queue->buf[head] = pcimouse_inb(pcimouse_iobase + KBD_DATA_REG); - if (head != maxhead) { - head++; - head &= AUX_BUF_SIZE-1; - } - queue->head = head; - aux_ready = 1; - if (queue->fasync) - kill_fasync(queue->fasync, SIGIO, POLL_IN); - wake_up_interruptible(&queue->proc_list); -} - -static int aux_release(struct inode * inode, struct file * file) -{ - aux_fasync(-1, file, 0); - if (--aux_count) - return 0; - aux_start_atomic(); - - /* Disable controller ints */ - aux_write_cmd(AUX_INTS_OFF); - poll_aux_status(); - - /* Disable Aux device */ - pcimouse_outb(KBD_CCMD_MOUSE_DISABLE, pcimouse_iobase + KBD_CNTL_REG); - poll_aux_status(); - aux_end_atomic(); - - MOD_DEC_USE_COUNT; - return 0; -} - -/* - * Install interrupt handler. - * Enable auxiliary device. - */ - -static int aux_open(struct inode * inode, struct file * file) -{ - if (!aux_present) - return -ENODEV; - - aux_start_atomic(); - if (aux_count++) { - aux_end_atomic(); - return 0; - } - if (!poll_aux_status()) { /* FIXME: Race condition */ - aux_count--; - aux_end_atomic(); - return -EBUSY; - } - queue->head = queue->tail = 0; /* Flush input queue */ - - MOD_INC_USE_COUNT; - - poll_aux_status(); - pcimouse_outb(KBD_CCMD_MOUSE_ENABLE, pcimouse_iobase+KBD_CNTL_REG); /* Enable Aux */ - aux_write_dev(AUX_ENABLE_DEV); /* Enable aux device */ - aux_write_cmd(AUX_INTS_ON); /* Enable controller ints */ - poll_aux_status(); - aux_end_atomic(); - - aux_ready = 0; - return 0; -} - -/* - * Write to the aux device. - */ - -static ssize_t aux_write(struct file * file, const char * buffer, - size_t count, loff_t *ppos) -{ - ssize_t retval = 0; - - if (count) { - ssize_t written = 0; - - aux_start_atomic(); - do { - char c; - if (!poll_aux_status()) - break; - pcimouse_outb(KBD_CCMD_WRITE_MOUSE, pcimouse_iobase + KBD_CNTL_REG); - if (!poll_aux_status()) - break; - get_user(c, buffer++); - pcimouse_outb(c, pcimouse_iobase + KBD_DATA_REG); - written++; - } while (--count); - aux_end_atomic(); - retval = -EIO; - if (written) { - retval = written; - file->f_dentry->d_inode->i_mtime = CURRENT_TIME; - } - } - - return retval; } int __init pcimouse_init(void) |
From: James S. <jsi...@us...> - 2002-02-28 00:01:00
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv14425 Modified Files: decvte.c Log Message: Missing a break. Index: decvte.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/decvte.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- decvte.c 20 Feb 2002 17:49:34 -0000 1.18 +++ decvte.c 28 Feb 2002 00:00:58 -0000 1.19 @@ -205,8 +205,8 @@ */ void vte_ed(struct vc_data *vc, int vpar) { - unsigned int count; - unsigned short * start; + unsigned short *start; + unsigned int count; switch (vpar) { case 0: /* erase from cursor to end of display */ @@ -1909,6 +1909,7 @@ switch (c) { case '0': /* DEC Special graphics */ G0_charset = GRAF_MAP; + break; #if 0 case '>': /* DEC Technical */ G0_charset = DEC_TECH_MAP; |
From: James S. <jsi...@us...> - 2002-02-27 23:57:45
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv13567 Modified Files: tty_io.c Log Message: Wrong test to see if we have a VT tty device. Fixed now. Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/tty_io.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- tty_io.c 20 Jan 2002 03:54:46 -0000 1.43 +++ tty_io.c 27 Feb 2002 23:57:43 -0000 1.44 @@ -1482,7 +1482,7 @@ if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg))) return 0; #ifdef CONFIG_VT - if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) { + if (tty->driver.subtype = SYSTEM_TYPE_CONSOLE) { struct vc_data *vc = (struct vc_data *) tty->driver_data; if (!vc || vc_resize(vc, tmp_ws.ws_col, tmp_ws.ws_row)) |
From: James S. <jsi...@us...> - 2002-02-27 23:56:13
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv12904 Modified Files: vt_kern.h Log Message: Fix to suppor up to 256 columns. Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/vt_kern.h,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- vt_kern.h 20 Jan 2002 03:54:46 -0000 1.64 +++ vt_kern.h 27 Feb 2002 23:56:10 -0000 1.65 @@ -134,7 +134,7 @@ unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ unsigned char vc_utf_count; int vc_utf_char; - unsigned int vc_tab_stop[5]; /* Tab stops. 160 columns. */ + unsigned int vc_tab_stop[8]; /* Tab stops. 256 columns. */ unsigned char vc_palette[16*3]; /* Colour palette for VGA+ */ unsigned int vc_translate; /* Current ACM */ unsigned char vc_G0_charset; |
From: johann d. <jd...@us...> - 2002-02-27 22:27:01
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb In directory usw-pr-cvs1:/tmp/cvs-serv21222 Modified Files: hid-core.c Log Message: Adapted to usb API changes. Added seemingly missing spin_unlock_irq_restore()s in completion handlers. Index: hid-core.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid-core.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- hid-core.c 21 Feb 2002 09:27:10 -0000 1.45 +++ hid-core.c 27 Feb 2002 22:26:58 -0000 1.46 @@ -49,6 +49,7 @@ #include <linux/hiddev.h> #endif + /* * Version Information */ @@ -990,7 +991,7 @@ dbg("submitting out urb"); - if (usb_submit_urb(hid->urbout)) { + if (usb_submit_urb(hid->urbout, GFP_ATOMIC)) { err("usb_submit_urb(out) failed"); return -1; } @@ -1021,7 +1022,7 @@ dbg("submitting ctrl urb"); - if (usb_submit_urb(hid->urbctrl)) { + if (usb_submit_urb(hid->urbctrl, GFP_ATOMIC)) { err("usb_submit_urb(ctrl) failed"); return -1; } @@ -1047,6 +1048,7 @@ if (hid->outhead != hid->outtail) { hid_submit_out(hid); + spin_unlock_irqrestore(&hid->outlock, flags); return; } @@ -1078,6 +1080,7 @@ if (hid->ctrlhead != hid->ctrltail) { hid_submit_ctrl(hid); + spin_unlock_irqrestore(&hid->ctrllock, flags); return; } @@ -1169,7 +1172,7 @@ hid->urbin->dev = hid->dev; - if (usb_submit_urb(hid->urbin)) + if (usb_submit_urb(hid->urbin, GFP_KERNEL)) return -EIO; return 0; @@ -1316,14 +1319,14 @@ if (endpoint->bEndpointAddress & USB_DIR_IN) { if (hid->urbin) continue; - if (!(hid->urbin = usb_alloc_urb(0))) + if (!(hid->urbin = usb_alloc_urb(0, GFP_KERNEL))) goto fail; pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); FILL_INT_URB(hid->urbin, dev, pipe, hid->inbuf, 0, hid_irq_in, hid, endpoint->bInterval); } else { if (hid->urbout) continue; - if (!(hid->urbout = usb_alloc_urb(0))) + if (!(hid->urbout = usb_alloc_urb(0, GFP_KERNEL))) goto fail; pipe = usb_sndbulkpipe(dev, endpoint->bEndpointAddress); FILL_BULK_URB(hid->urbout, dev, pipe, hid->outbuf, 0, hid_irq_out, hid); @@ -1365,7 +1368,7 @@ kfree(buf); - hid->urbctrl = usb_alloc_urb(0); + hid->urbctrl = usb_alloc_urb(0, GFP_KERNEL); FILL_CONTROL_URB(hid->urbctrl, dev, 0, (void*) &hid->cr, hid->ctrlbuf, 1, hid_ctrl, hid); return hid; |
From: johann d. <jd...@us...> - 2002-02-26 23:08:00
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce In directory usw-pr-cvs1:/tmp/cvs-serv17194 Modified Files: iforce-usb.c Log Message: Out urb completion handler calls usb_xmit, which means usb_submit_urb must be GFP_ATOMIC. Index: iforce-usb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce/iforce-usb.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- iforce-usb.c 10 Feb 2002 23:41:31 -0000 1.13 +++ iforce-usb.c 26 Feb 2002 23:07:56 -0000 1.14 @@ -64,7 +64,7 @@ } XMIT_INC(iforce->xmit.tail, n); - if ( (n=usb_submit_urb(&iforce->out, GFP_KERNEL)) ) { + if ( (n=usb_submit_urb(&iforce->out, GFP_ATOMIC)) ) { printk(KERN_WARNING "iforce-usb.c: iforce_usb_xmit: usb_submit_urb failed %d\n", n); } |
From: James S. <jsi...@us...> - 2002-02-26 20:14:32
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv5129 Modified Files: sysrq.c Log Message: Cleaned up Sysrq to make it more VT independent. Index: sysrq.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/sysrq.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- sysrq.c 20 Jan 2002 03:54:46 -0000 1.17 +++ sysrq.c 26 Feb 2002 20:14:27 -0000 1.18 @@ -23,13 +23,12 @@ #include <linux/major.h> #include <linux/reboot.h> #include <linux/sysrq.h> +#include <linux/vt_kern.h> #include <linux/quotaops.h> #include <linux/smp_lock.h> #include <linux/module.h> + #include <linux/spinlock.h> -#ifdef CONFIG_VT -#include <linux/vt_kern.h> -#endif #include <asm/ptrace.h> @@ -43,7 +42,8 @@ /* Loglevel sysrq handler */ static void sysrq_handle_loglevel(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ int i; i = key - '0'; console_loglevel = 7; @@ -60,13 +60,14 @@ /* SAK sysrq handler */ #ifdef CONFIG_VT static void sysrq_handle_SAK(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) + struct tty_struct *tty) { struct vc_data *vc = (struct vc_data *) tty->driver_data; if (tty) do_SAK(tty); - reset_vc(vc); + if ((tty->driver.subtype == SYSTEM_TYPE_CONSOLE) && vc) + reset_vc(vc->display_fg->fg_console); } static struct sysrq_key_op sysrq_SAK_op = { handler: sysrq_handle_SAK, @@ -78,11 +79,12 @@ /* unraw sysrq handler */ static void sysrq_handle_unraw(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { -#if CONFIG_VT - if (kbd) - kbd->kbdmode = VC_XLATE; -#endif + struct tty_struct *tty) +{ + struct vc_data *vc = (struct vc_data *) tty->driver_data; + + if ((tty->driver.subtype == SYSTEM_TYPE_CONSOLE) && vc) + vc->kbd_table.kbdmode = VC_XLATE; } static struct sysrq_key_op sysrq_unraw_op = { handler: sysrq_handle_unraw, @@ -93,7 +95,8 @@ /* reboot sysrq handler */ static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ machine_restart(NULL); } static struct sysrq_key_op sysrq_reboot_op = { @@ -102,8 +105,6 @@ action_msg: "Resetting", }; - - /* SYNC SYSRQ HANDLERS BLOCK */ /* do_emergency_sync helper function */ @@ -223,7 +224,8 @@ } static void sysrq_handle_sync(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ emergency_sync_scheduled = EMERG_SYNC; wakeup_bdflush(); } @@ -234,7 +236,8 @@ }; static void sysrq_handle_mountro(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ emergency_sync_scheduled = EMERG_REMOUNT; wakeup_bdflush(); } @@ -250,7 +253,8 @@ /* SHOW SYSRQ HANDLERS BLOCK */ static void sysrq_handle_showregs(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ if (pt_regs) show_regs(pt_regs); } @@ -262,7 +266,8 @@ static void sysrq_handle_showstate(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ show_state(); } static struct sysrq_key_op sysrq_showstate_op = { @@ -271,9 +276,9 @@ action_msg: "Show State", }; - static void sysrq_handle_showmem(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ show_mem(); } static struct sysrq_key_op sysrq_showmem_op = { @@ -305,7 +310,8 @@ } static void sysrq_handle_term(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ send_sig_all(SIGTERM, 0); console_loglevel = 8; } @@ -316,7 +322,8 @@ }; static void sysrq_handle_kill(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ send_sig_all(SIGKILL, 0); console_loglevel = 8; } @@ -327,7 +334,8 @@ }; static void sysrq_handle_killall(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ send_sig_all(SIGKILL, 1); console_loglevel = 8; } @@ -341,7 +349,7 @@ /* Key Operations table and lock */ -spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED; #define SYSRQ_KEY_TABLE_LENGTH 36 static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = { /* 0 */ &sysrq_loglevel_op, @@ -436,13 +444,13 @@ * and any other keycode arrives. */ -void handle_sysrq(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { +void handle_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty) +{ if (!sysrq_enabled) return; __sysrq_lock_table(); - __handle_sysrq_nolock(key, pt_regs, kbd, tty); + __handle_sysrq_nolock(key, pt_regs, tty); __sysrq_unlock_table(); } @@ -453,7 +461,8 @@ */ void __handle_sysrq_nolock(int key, struct pt_regs *pt_regs, - struct kbd_struct *kbd, struct tty_struct *tty) { + struct tty_struct *tty) +{ struct sysrq_key_op *op_p; int orig_log_level; int i, j; @@ -467,9 +476,9 @@ op_p = __sysrq_get_key_op(key); if (op_p) { - printk ("%s\n", op_p->action_msg); - console_loglevel = orig_log_level; - op_p->handler(key, pt_regs, kbd, tty); + printk ("%s\n", op_p->action_msg); + console_loglevel = orig_log_level; + op_p->handler(key, pt_regs, tty); } else { printk("HELP : "); /* Only print the help msg once per handler */ |
From: James S. <jsi...@us...> - 2002-02-26 20:14:18
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv5057 Added Files: sysrq.h Log Message: Cleaned up Sysrq to make it more VT independent. --- NEW FILE: sysrq.h --- /* -*- linux-c -*- * * $Id: sysrq.h,v 1.1 2002/02/26 20:14:12 jsimmons Exp $ * * Linux Magic System Request Key Hacks * * (c) 1997 Martin Mares <mj...@at...> * * (c) 2000 Crutcher Dunnavant <cru...@da...> * overhauled to use key registration * based upon discusions in irc://irc.openprojects.net/#kernelnewbies */ #ifndef __LINUX_SYSRQ_H__ #define __LINUX_SYSRQ_H__ #include <linux/config.h> struct pt_regs; struct tty_struct; struct sysrq_key_op { void (*handler)(int, struct pt_regs *, struct tty_struct *); char *help_msg; char *action_msg; }; #ifdef CONFIG_MAGIC_SYSRQ /* Generic SysRq interface -- you may call it from any device driver, supplying * ASCII code of the key, pointer to registers and kbd/tty structs (if they * are available -- else NULL's). */ void handle_sysrq(int, struct pt_regs *, struct tty_struct *); /* * Nonlocking version of handle sysrq, used by sysrq handlers that need to * call sysrq handlers */ void __handle_sysrq_nolock(int, struct pt_regs *, struct tty_struct *); /* * Sysrq registration manipulation functions */ void __sysrq_lock_table (void); void __sysrq_unlock_table (void); struct sysrq_key_op *__sysrq_get_key_op (int key); void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p); extern __inline__ int __sysrq_swap_key_ops_nolock(int key, struct sysrq_key_op *insert_op_p, struct sysrq_key_op *remove_op_p) { int retval; if (__sysrq_get_key_op(key) == remove_op_p) { __sysrq_put_key_op(key, insert_op_p); retval = 0; } else { retval = -1; } return retval; } extern __inline__ int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, struct sysrq_key_op *remove_op_p) { int retval; __sysrq_lock_table(); retval = __sysrq_swap_key_ops_nolock(key, insert_op_p, remove_op_p); __sysrq_unlock_table(); return retval; } static inline int register_sysrq_key(int key, struct sysrq_key_op *op_p) { return __sysrq_swap_key_ops(key, op_p, NULL); } static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op_p) { return __sysrq_swap_key_ops(key, NULL, op_p); } #else static inline int __reterr(void) { return -EINVAL; } #define register_sysrq_key(ig,nore) __reterr() #define unregister_sysrq_key(ig,nore) __reterr() #endif /* Deferred actions */ extern int emergency_sync_scheduled; #define EMERG_SYNC 1 #define EMERG_REMOUNT 2 void do_emergency_sync(void); #ifdef CONFIG_MAGIC_SYSRQ #define CHECK_EMERGENCY_SYNC \ if (emergency_sync_scheduled) \ do_emergency_sync(); #else #define CHECK_EMERGENCY_SYNC #endif #endif /* __LINUX_SYSRQ_H__ */ |
From: johann d. <jd...@us...> - 2002-02-25 20:18:20
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input In directory usw-pr-cvs1:/tmp/cvs-serv9765 Modified Files: Config.in Log Message: Small fix about incomplete dep_mbool statement for legacy /dev/psaux device. Hopefully got it right Index: Config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/Config.in,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- Config.in 22 Feb 2002 11:42:23 -0000 1.62 +++ Config.in 25 Feb 2002 20:18:13 -0000 1.63 @@ -10,7 +10,7 @@ comment 'Userland interfaces' dep_tristate ' Keyboard interface' CONFIG_INPUT_KEYBDEV $CONFIG_INPUT dep_tristate ' Mouse interface' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT -dep_mbool ' Provide legacy /dev/psaux device' CONFIG_INPUT_MOUSEDEV_PSAUX +dep_mbool ' Provide legacy /dev/psaux device' CONFIG_INPUT_MOUSEDEV_PSAUX $CONFIG_INPUT if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024 int ' Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768 |
From: James S. <jsi...@us...> - 2002-02-23 16:46:58
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx In directory usw-pr-cvs1:/tmp/cvs-serv7318 Modified Files: 3dfxfb.c Log Message: mistype. fixed now. Index: 3dfxfb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx/3dfxfb.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- 3dfxfb.c 23 Feb 2002 16:33:12 -0000 1.20 +++ 3dfxfb.c 23 Feb 2002 16:46:54 -0000 1.21 @@ -602,7 +602,7 @@ } hd = wd = (hdispend >> 3) - 1; - hs = (hsynsta >> 3) - 1; + hs = (hsyncsta >> 3) - 1; he = (hsyncend >> 3) - 1; ht = (htotal >> 3) - 1; hbs = hd; @@ -611,7 +611,7 @@ vbs = vd = info->var.yres - 1; vs = vd + info->var.lower_margin; ve = vs + info->var.vsync_len; - vbe = vt = ve + info->var.upper_margin - 1; + vbe = vt = ve + info->var.upper_margin - 1; /* this is all pretty standard VGA register stuffing */ reg.misc[0x00] = |
From: James S. <jsi...@us...> - 2002-02-23 16:44:46
|
Update of /cvsroot/linuxconsole/ruby/linux/kernel In directory usw-pr-cvs1:/tmp/cvs-serv6708/kernel Modified Files: printk.c Log Message: Now we flush individual consoles. Index: printk.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/kernel/printk.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- printk.c 23 Jan 2002 23:35:31 -0000 1.25 +++ printk.c 23 Feb 2002 16:44:43 -0000 1.26 @@ -319,7 +319,7 @@ static void call_console_drivers(struct console *con, unsigned long start, unsigned long end) { unsigned long cur_index, start_print; - static int msg_level = -1; + int msg_level = -1; if (((long)(start - end)) > 0) BUG(); @@ -445,6 +445,7 @@ * We own the drivers list. We can drop the lock and * let release_console_sem() print the text */ + con->con_start = con_start; spin_unlock(&console_lock); if ((con->flags & CON_ENABLED) && con->write) { if (!down_trylock(&con->lock)) @@ -452,6 +453,7 @@ } spin_lock(&console_lock); } + con_start = log_end; /* Flush all consoles */ spin_unlock(&console_lock); return printed_len; } @@ -528,11 +530,11 @@ for ( ; ; ) { spin_lock_irqsave(&logbuf_lock, flags); must_wake_klogd |= log_start - log_end; - if (con_start == log_end) + if (con->con_start == log_end) break; /* Nothing to print */ - _con_start = con_start; + _con_start = con->con_start; _log_end = log_end; - con_start = log_end; /* Flush */ + con->con_start = log_end; /* Flush current console */ spin_unlock_irqrestore(&logbuf_lock, flags); call_console_drivers(con, _con_start, _log_end); } |
From: James S. <jsi...@us...> - 2002-02-23 16:44:45
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv6708/include/linux Modified Files: console.h Log Message: Now we flush individual consoles. Index: console.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/console.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- console.h 20 Jan 2002 03:54:46 -0000 1.7 +++ console.h 23 Feb 2002 16:44:42 -0000 1.8 @@ -47,6 +47,7 @@ kdev_t (*device)(struct console *); int (*setup)(struct console *, char *); struct semaphore lock; + unsigned long con_start; short flags; short index; int cflag; |
From: James S. <jsi...@us...> - 2002-02-23 16:44:45
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv6708/drivers/video Modified Files: fbgen2.c Log Message: Now we flush individual consoles. Index: fbgen2.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbgen2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- fbgen2.c 7 Nov 2001 19:43:51 -0000 1.1 +++ fbgen2.c 23 Feb 2002 16:44:42 -0000 1.2 @@ -164,9 +164,9 @@ oldgreen = info->var.green; oldalpha = info->var.transp; - if (info->fbops->fb_set_par) - info->fbops->fb_set_par(info); info->var = *var; + if (info->fbops->fb_set_par) + info->fbops->fb_set_par(info); fbgen2_set_disp(con, info); if (info->changevar) (*info->changevar)(con); |
From: James S. <jsi...@us...> - 2002-02-23 16:33:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx In directory usw-pr-cvs1:/tmp/cvs-serv3677 Modified Files: 3dfxfb.c Log Message: Updates. Index: 3dfxfb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx/3dfxfb.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- 3dfxfb.c 13 Feb 2002 19:40:20 -0000 1.19 +++ 3dfxfb.c 23 Feb 2002 16:33:12 -0000 1.20 @@ -72,9 +72,9 @@ #include <linux/nvram.h> #include <asm/io.h> #include <linux/timer.h> +#include <linux/spinlock.h> #include <video/tdfx.h> -#include <linux/spinlock.h> #ifndef PCI_DEVICE_ID_3DFX_VOODOO5 #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 @@ -147,12 +147,8 @@ u_int transp, struct fb_info *info); static int tdfxfb_blank(int blank, struct fb_info *info); static int tdfxfb_pan_display(struct fb_var_screeninfo *var,struct fb_info *fb); -static void tdfxfb_fillrect(struct fb_info *info, int x, int y, - unsigned int width, unsigned int height, - unsigned long color, int rop); -static void tdfxfb_copyarea(struct fb_info *info, int sx, int sy, - unsigned int width, unsigned int height, - int dx, int dy); +static void tdfxfb_fillrect(struct fb_info *info, struct fb_fillrect *rect); +static void tdfxfb_copyarea(struct fb_info *info, struct fb_copyarea *area); static void tdfxfb_imageblit(struct fb_info *info, struct fb_image *image); static struct fb_ops tdfxfb_ops = { @@ -566,11 +562,11 @@ static int tdfxfb_set_par(struct fb_info *info) { struct tdfx_par *par = (struct tdfx_par *) info->par; - struct banshee_reg reg; - u32 cpp; + u32 hdispend, hsyncsta, hsyncend, htotal; u32 hd, hs, he, ht, hbs, hbe; u32 vd, vs, ve, vt, vbs, vbe; - u32 wd; + struct banshee_reg reg; + u32 wd, cpp; int fout; int freq; @@ -590,30 +586,32 @@ reg.dacmode = 0; reg.vidcfg &= ~VIDCFG_2X; + hdispend = info->var.xres; + hsyncsta = hdispend + info->var.right_margin; + hsyncend = hsyncsta + info->var.hsync_len; + htotal = hsyncend + info->var.left_margin; + if (freq > par->max_pixclock/2) { freq = freq > par->max_pixclock ? par->max_pixclock : freq; reg.dacmode |= DACMODE_2X; reg.vidcfg |= VIDCFG_2X; - par->hdispend >>= 1; - par->hsyncsta >>= 1; - par->hsyncend >>= 1; - par->htotal >>= 1; + hdispend >>= 1; + hsyncsta >>= 1; + hsyncend >>= 1; + htotal >>= 1; } - wd = (info->var.xres >> 3) - 1; - hd = (info->var.xres >> 3) - 1; - hs = ((info->var.xres + info->var.right_margin) >> 3) - 1; - he = ((info->var.xres + info->var.right_margin + info->var.hsync_len) >> 3) - 1; - ht = ((info->var.xres + info->var.right_margin + info->var.hsync_len + info->var.left_margin) >> 3) - 1; + hd = wd = (hdispend >> 3) - 1; + hs = (hsynsta >> 3) - 1; + he = (hsyncend >> 3) - 1; + ht = (htotal >> 3) - 1; hbs = hd; hbe = ht; - vd = info->var.yres - 1; - vs = info->var.yres + info->var.lower_margin - 1; - ve = info->var.yres + info->var.lower_margin + info->var.vsync_len - 1; - vt = info->var.yres + info->var.lower_margin + info->var.vsync_len + info->var.upper_margin - 2; - vbs = vd; - vbe = vt; + vbs = vd = info->var.yres - 1; + vs = vd + info->var.lower_margin; + ve = vs + info->var.vsync_len; + vbe = vt = ve + info->var.upper_margin - 1; /* this is all pretty standard VGA register stuffing */ reg.misc[0x00] = @@ -769,14 +767,6 @@ #endif do_write_regs(®); - if (reg.vidcfg & VIDCFG_2X) { - par->hdispend <<= 1; - par->hsyncsta <<= 1; - par->hsyncend <<= 1; - par->htotal <<= 1; - } - memcpy(info->par, par, sizeof(struct tdfx_par)); - /* Now change fb_fix_screeninfo according to changes in par */ info->fix.line_length = info->var.xres * ((info->var.bits_per_pixel + 7)>>3); info->fix.visual = (info->var.bits_per_pixel == 8) @@ -1015,52 +1005,48 @@ /* * FillRect 2D command (solidfill or invert (via ROP_XOR)) */ -static void tdfxfb_fillrect(struct fb_info *info, int x, int y, - unsigned int width, unsigned int height, - unsigned long color, int rop) +static void tdfxfb_fillrect(struct fb_info *info, struct fb_fillrect *rect) { u32 bpp = info->var.bits_per_pixel; u32 stride = info->fix.line_length; u32 fmt= stride | ((bpp+((bpp==8) ? 0 : 8)) << 13); int tdfx_rop; - if (rop == ROP_COPY) + if (rect->rop == ROP_COPY) tdfx_rop = TDFX_ROP_COPY; else tdfx_rop = TDFX_ROP_XOR; banshee_make_room(5); tdfx_outl(DSTFORMAT, fmt); - tdfx_outl(COLORFORE, color); + tdfx_outl(COLORFORE, rect->color); tdfx_outl(COMMAND_2D, COMMAND_2D_FILLRECT | (tdfx_rop << 24)); - tdfx_outl(DSTSIZE, width | (height << 16)); - tdfx_outl(LAUNCH_2D, x | (y << 16)); + tdfx_outl(DSTSIZE, rect->width | (rect->height << 16)); + tdfx_outl(LAUNCH_2D, rect->dx | (rect->dy << 16)); banshee_wait_idle(); } /* * Screen-to-Screen BitBlt 2D command (for the bmove fb op.) */ -static void tdfxfb_copyarea(struct fb_info *info, int sx, int sy, - unsigned int width, unsigned int height, - int dx, int dy) +static void tdfxfb_copyarea(struct fb_info *info, struct fb_copyarea *area) { u32 bpp = info->var.bits_per_pixel; u32 stride = info->fix.line_length; u32 blitcmd = COMMAND_2D_S2S_BITBLT | (TDFX_ROP_COPY << 24); u32 fmt= stride | ((bpp+((bpp==8) ? 0 : 8)) << 13); - if (sx <= dx) { + if (area->sx <= area->dx) { //-X blitcmd |= BIT(14); - sx += width-1; - dx += width-1; + area->sx += area->width - 1; + area->dx += area->width - 1; } - if (sy <= dy) { + if (area->sy <= area->dy) { //-Y blitcmd |= BIT(15); - sy += height-1; - dy += height-1; + area->sy += area->height - 1; + area->dy += area->height - 1; } banshee_make_room(6); @@ -1068,9 +1054,9 @@ tdfx_outl(SRCFORMAT, fmt); tdfx_outl(DSTFORMAT, fmt); tdfx_outl(COMMAND_2D, blitcmd); - tdfx_outl(DSTSIZE, width | (height << 16)); - tdfx_outl(DSTXY, dx | (dy << 16)); - tdfx_outl(LAUNCH_2D, sx | (sy << 16)); + tdfx_outl(DSTSIZE, area->width | (area->height << 16)); + tdfx_outl(DSTXY, area->dx | (area->dy << 16)); + tdfx_outl(LAUNCH_2D, area->sx | (area->sy << 16)); banshee_wait_idle(); } @@ -1094,7 +1080,7 @@ } tdfx_outl(SRCXY, 0); - tdfx_outl(DSTXY, pixmap->x | (pixmap->y << 16)); + tdfx_outl(DSTXY, pixmap->dx | (pixmap->dy << 16)); tdfx_outl(COMMAND_2D, COMMAND_2D_H2S_BITBLT | (TDFX_ROP_COPY << 24)); tdfx_outl(SRCFORMAT, srcfmt); tdfx_outl(DSTFORMAT, dstfmt); @@ -1149,7 +1135,7 @@ /* Configure the default fb_fix_screeninfo first */ memset(&fb_info, 0, sizeof(fb_info)); - fb_info.par = &default_par; + switch (pdev->device) { case PCI_DEVICE_ID_3DFX_BANSHEE: strcat(tdfx_fix.id, " Banshee"); @@ -1168,7 +1154,7 @@ tdfx_fix.mmio_start = pci_resource_start(pdev, 0); tdfx_fix.mmio_len = 1 << 24; default_par.regbase_virt = ioremap_nocache(tdfx_fix.mmio_start, 1 << 24); - if(!default_par.regbase_virt) { + if (!default_par.regbase_virt) { printk("fb: Can't remap %s register area.\n", tdfx_fix.id); return -ENXIO; } @@ -1182,7 +1168,7 @@ } tdfx_fix.smem_start = pci_resource_start(pdev, 1); - if(!(tdfx_fix.smem_len = do_lfb_size(pdev->device))) { + if (!(tdfx_fix.smem_len = do_lfb_size(pdev->device))) { iounmap(default_par.regbase_virt); printk("fb: Can't count %s memory.\n", tdfx_fix.id); return -ENXIO; @@ -1200,7 +1186,7 @@ fb_info.screen_base = ioremap_nocache(tdfx_fix.smem_start, tdfx_fix.smem_len); - if(!fb_info.screen_base) { + if (!fb_info.screen_base) { printk("fb: Can't remap %s framebuffer.\n", tdfx_fix.id); iounmap(default_par.regbase_virt); return -ENXIO; @@ -1229,9 +1215,10 @@ tdfx_fix.ypanstep = nopan ? 0 : 1; tdfx_fix.ywrapstep = nowrap ? 0 : 1; - fb_info.node = -1; + fb_info.node = NODEV; fb_info.fbops = &tdfxfb_ops; - fb_info.fix = tdfx_fix; + fb_info.fix = tdfx_fix; + fb_info.par = &default_par; fb_info.pseudo_palette = psuedo_palette; fb_info.flags = FBINFO_FLAG_DEFAULT; @@ -1253,7 +1240,6 @@ printk("tdfxfb: can't register framebuffer\n"); return -ENXIO; } - return 0; } |
From: Vojtech P. <vo...@us...> - 2002-02-22 11:42:26
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input In directory usw-pr-cvs1:/tmp/cvs-serv18065 Modified Files: mousedev.c Config.in Log Message: Add support for /dev/psaux so that X doesn't break when you don't edit XF86Config and switch kernels. Index: mousedev.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mousedev.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- mousedev.c 24 Jan 2002 19:54:08 -0000 1.40 +++ mousedev.c 22 Feb 2002 11:42:23 -0000 1.41 @@ -225,7 +225,14 @@ static int mousedev_open(struct inode * inode, struct file * file) { struct mousedev_list *list; - int i = minor(inode->i_rdev) - MOUSEDEV_MINOR_BASE; + int i; + +#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX + if (major(inode->i_rdev) == MISC_MAJOR)) + i = MOUSEDEV_MIX; + else +#endif + i = minor(inode->i_rdev) - MOUSEDEV_MINOR_BASE; if (i >= MOUSEDEV_MINORS || !mousedev_table[i]) return -ENODEV; @@ -494,6 +501,12 @@ id_table: mousedev_ids, }; +#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX +static struct miscdevice psaux_mouse = { + PSMOUSE_MINOR, "psaux", &mousedev_fops +}; +#endif + static int __init mousedev_init(void) { input_register_handler(&mousedev_handler); @@ -504,6 +517,9 @@ mousedev_mix.exist = 1; mousedev_mix.minor = MOUSEDEV_MIX; mousedev_mix.devfs = input_register_minor("mice", MOUSEDEV_MIX, MOUSEDEV_MINOR_BASE); +#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX + misc_register(&psaux_mouse) +#endif printk(KERN_INFO "mice: PS/2 mouse device common for all mice\n"); @@ -512,6 +528,9 @@ static void __exit mousedev_exit(void) { +#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX + misc_deregister(&psaux_mouse) +#endif input_unregister_minor(mousedev_mix.devfs); input_unregister_handler(&mousedev_handler); } Index: Config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/Config.in,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- Config.in 23 Jan 2002 05:49:24 -0000 1.61 +++ Config.in 22 Feb 2002 11:42:23 -0000 1.62 @@ -10,6 +10,7 @@ comment 'Userland interfaces' dep_tristate ' Keyboard interface' CONFIG_INPUT_KEYBDEV $CONFIG_INPUT dep_tristate ' Mouse interface' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT +dep_mbool ' Provide legacy /dev/psaux device' CONFIG_INPUT_MOUSEDEV_PSAUX if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024 int ' Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768 |
From: Vojtech P. <vo...@us...> - 2002-02-22 11:41:52
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/other In directory usw-pr-cvs1:/tmp/cvs-serv17943/other Added Files: ati_remote.c Log Message: Add ati remote driver. --- NEW FILE: ati_remote.c --- /* * * Copyright (c) 2002 Vladimir Dergachev * * USB ATI Remote support * */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Should you need to contact me, the author, you can do so either by * e-mail - mail your message to vo...@mi... * * This driver was derived from usbati_remote and usbkbd drivers by Vojtech Pavlik */ #include <linux/kernel.h> #include <linux/slab.h> #include <linux/input.h> #include <linux/module.h> #include <linux/init.h> #include <linux/usb.h> /* * Version Information */ #define DRIVER_VERSION "v0.1" #define DRIVER_AUTHOR "Vladimir Dergachev <vo...@mi...>" #define DRIVER_DESC "USB ATI Remote driver" MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); /* Get hi and low bytes of a 16-bits int */ #define HI(a) ((unsigned char)((a) >> 8)) #define LO(a) ((unsigned char)((a) & 0xff)) struct ati_remote { unsigned char data[8]; char name[128]; unsigned char old[2]; unsigned long old_jiffies; struct usb_device *usbdev; struct input_dev dev; struct urb irq, out; wait_queue_head_t wait; devrequest dr; int open; }; static char init1[]={ 0x01, 0x00, 0x20, 0x14 }; static char init2[]={ 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 }; #define KIND_END 0 #define KIND_LITERAL 1 #define KIND_FILTERED 2 #define KIND_LU 3 #define KIND_RU 4 #define KIND_LD 5 #define KIND_RD 6 #define KIND_ACCEL 7 static struct { short kind; unsigned char data1, data2; int type; unsigned int code; int value; } ati_remote_translation_table[]={ {KIND_LITERAL, 0x3d, 0x78, EV_KEY, BTN_LEFT, 1}, /* left ati_remote button */ {KIND_LITERAL, 0x3e, 0x79, EV_KEY, BTN_LEFT, 0}, {KIND_LITERAL, 0x41, 0x7c, EV_KEY, BTN_RIGHT, 1}, /* right ati_remote button */ {KIND_LITERAL, 0x42, 0x7d, EV_KEY, BTN_RIGHT, 0}, /* ati_remote */ {KIND_ACCEL, 0x35, 0x70, EV_REL, REL_X, -1}, /* left */ {KIND_ACCEL, 0x36, 0x71, EV_REL, REL_X, 1}, /* right */ {KIND_ACCEL, 0x37, 0x72, EV_REL, REL_Y, -1}, /* up */ {KIND_ACCEL, 0x38, 0x73, EV_REL, REL_Y, 1}, /* down */ {KIND_LU, 0x39, 0x74, EV_REL, 0, 0}, /* left up */ {KIND_RU, 0x3a, 0x75, EV_REL, 0, 0}, /* right up */ {KIND_LD, 0x3c, 0x77, EV_REL, 0, 0}, /* left down */ {KIND_RD, 0x3b, 0x76, EV_REL, 0, 0}, /* right down */ /* keyboard.. */ {KIND_FILTERED, 0xe2, 0x1d, EV_KEY, KEY_LEFT, 1}, /* key left */ {KIND_FILTERED, 0xe4, 0x1f, EV_KEY, KEY_RIGHT, 1}, /* key right */ {KIND_FILTERED, 0xe7, 0x22, EV_KEY, KEY_DOWN, 1}, /* key down */ {KIND_FILTERED, 0xdf, 0x1a, EV_KEY, KEY_UP, 1}, /* key left */ {KIND_FILTERED, 0xe3, 0x1e, EV_KEY, KEY_ENTER, 1}, /* key enter */ {KIND_FILTERED, 0xd2, 0x0d, EV_KEY, KEY_1, 1}, {KIND_FILTERED, 0xd3, 0x0e, EV_KEY, KEY_2, 1}, {KIND_FILTERED, 0xd4, 0x0f, EV_KEY, KEY_3, 1}, {KIND_FILTERED, 0xd5, 0x10, EV_KEY, KEY_4, 1}, {KIND_FILTERED, 0xd6, 0x11, EV_KEY, KEY_5, 1}, {KIND_FILTERED, 0xd7, 0x12, EV_KEY, KEY_6, 1}, {KIND_FILTERED, 0xd8, 0x13, EV_KEY, KEY_7, 1}, {KIND_FILTERED, 0xd9, 0x14, EV_KEY, KEY_8, 1}, {KIND_FILTERED, 0xda, 0x15, EV_KEY, KEY_9, 1}, {KIND_FILTERED, 0xdc, 0x17, EV_KEY, KEY_0, 1}, {KIND_FILTERED, 0xdd, 0x18, EV_KEY, KEY_KPENTER, 1}, /* key "checkbox" */ {KIND_FILTERED, 0xc5, 0x00, EV_KEY, KEY_A, 1}, {KIND_FILTERED, 0xc6, 0x01, EV_KEY, KEY_B, 1}, {KIND_FILTERED, 0xde, 0x19, EV_KEY, KEY_C, 1}, {KIND_FILTERED, 0xe0, 0x1b, EV_KEY, KEY_D, 1}, {KIND_FILTERED, 0xe6, 0x21, EV_KEY, KEY_E, 1}, {KIND_FILTERED, 0xe8, 0x23, EV_KEY, KEY_F, 1}, {KIND_FILTERED, 0xdb, 0x16, EV_KEY, KEY_MENU, 1}, /* key menu */ {KIND_FILTERED, 0xc7, 0x02, EV_KEY, KEY_POWER, 1}, /* key power */ {KIND_FILTERED, 0xc8, 0x03, EV_KEY, KEY_PROG1, 1}, /* key TV */ {KIND_FILTERED, 0xc9, 0x04, EV_KEY, KEY_PROG2, 1}, /* key DVD */ {KIND_FILTERED, 0xca, 0x05, EV_KEY, KEY_WWW, 1}, /* key Web */ {KIND_FILTERED, 0xcb, 0x06, EV_KEY, KEY_BOOKMARKS, 1}, /* key "open book" */ {KIND_FILTERED, 0xcc, 0x07, EV_KEY, KEY_EDIT, 1}, /* key "hand" */ {KIND_FILTERED, 0xe1, 0x1c, EV_KEY, KEY_COFFEE, 1}, /* key "timer" */ {KIND_FILTERED, 0xce, 0x09, EV_KEY, KEY_VOLUMEDOWN, 1}, {KIND_FILTERED, 0xcd, 0x08, EV_KEY, KEY_VOLUMEUP, 1}, {KIND_FILTERED, 0xcf, 0x0a, EV_KEY, KEY_MUTE, 1}, {KIND_FILTERED, 0xd1, 0x0c, EV_KEY, KEY_PAGEDOWN, 1}, /* prev channel*/ {KIND_FILTERED, 0xd0, 0x0b, EV_KEY, KEY_PAGEUP, 1}, /* next channel */ {KIND_FILTERED, 0xec, 0x27, EV_KEY, KEY_RECORD, 1}, {KIND_FILTERED, 0xea, 0x25, EV_KEY, KEY_PLAYCD, 1}, /* ke pay */ {KIND_FILTERED, 0xe9, 0x24, EV_KEY, KEY_REWIND, 1}, {KIND_FILTERED, 0xeb, 0x26, EV_KEY, KEY_FORWARD, 1}, {KIND_FILTERED, 0xed, 0x28, EV_KEY, KEY_STOP, 1}, {KIND_FILTERED, 0xee, 0x29, EV_KEY, KEY_PAUSE, 1}, {KIND_FILTERED, 0xe5, 0x20, EV_KEY, KEY_FRONT, 1}, /* maximize */ {KIND_END, 0x00, 0x00, EV_MAX+1, 0, 0} /* END */ }; /* * Send a packet of bytes to the device */ static void send_packet(struct ati_remote *ati_remote, u16 cmd, unsigned char* data) { DECLARE_WAITQUEUE(wait, current); int timeout = HZ; /* 1 second */ memcpy(ati_remote->out.transfer_buffer + 1, data, LO(cmd)); ((char*)ati_remote->out.transfer_buffer)[0] = HI(cmd); ati_remote->out.transfer_buffer_length = LO(cmd) + 1; ati_remote->out.dev = ati_remote->usbdev; set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&ati_remote->wait, &wait); if (usb_submit_urb(&ati_remote->out)) { set_current_state(TASK_RUNNING); remove_wait_queue(&ati_remote->wait, &wait); return; } while (timeout && ati_remote->out.status == -EINPROGRESS) timeout = schedule_timeout(timeout); set_current_state(TASK_RUNNING); remove_wait_queue(&ati_remote->wait, &wait); if (!timeout) usb_unlink_urb(&ati_remote->out); } static void ati_remote_irq(struct urb *urb) { struct ati_remote *ati_remote = urb->context; unsigned char *data = ati_remote->data; struct input_dev *dev = &ati_remote->dev; int i; int accel; if (urb->status) return; if(urb->actual_length==4){ if((data[0]!=0x14)||(data[3]!=0xf0)) printk("** weird key=%02x%02x%02x%02x\n", data[0], data[1], data[2], data[3]); } else if(urb->actual_length==1){ if((data[0]!=(unsigned char)0xff)&&(data[0]!=0x00)) printk("** weird byte=0x%02x\n", data[0]); } else { printk("length=%d %02x %02x %02x %02x %02x %02x %02x %02x\n", urb->actual_length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); } accel=1; if((ati_remote->old[0]==data[1])&&(ati_remote->old[1]==data[2])){ if(ati_remote->old_jiffies+4*HZ<jiffies)accel=8; else if(ati_remote->old_jiffies+3*HZ<jiffies)accel=6; else if(ati_remote->old_jiffies+2*HZ<jiffies)accel=4; else if(ati_remote->old_jiffies+HZ<jiffies)accel=3; else if(ati_remote->old_jiffies+(HZ>>1)<jiffies)accel=2; } if((urb->actual_length==4) && (data[0]==0x14) && (data[3]==0xf0)){ for(i=0;ati_remote_translation_table[i].kind!=KIND_END;i++){ if((ati_remote_translation_table[i].data1==data[1]) && (ati_remote_translation_table[i].data2==data[2])){ switch(ati_remote_translation_table[i].kind){ case KIND_LITERAL: input_event(dev, ati_remote_translation_table[i].type, ati_remote_translation_table[i].code, ati_remote_translation_table[i].value); break; case KIND_ACCEL: input_event(dev, ati_remote_translation_table[i].type, ati_remote_translation_table[i].code, ati_remote_translation_table[i].value*accel); break; case KIND_LU: input_report_rel(dev, REL_X, -accel); input_report_rel(dev, REL_Y, -accel); break; case KIND_RU: input_report_rel(dev, REL_X, accel); input_report_rel(dev, REL_Y, -accel); break; case KIND_LD: input_report_rel(dev, REL_X, -accel); input_report_rel(dev, REL_Y, accel); break; case KIND_RD: input_report_rel(dev, REL_X, accel); input_report_rel(dev, REL_Y, accel); break; case KIND_FILTERED: if((ati_remote->old[0]==data[1])&&(ati_remote->old[1]==data[2])&&((ati_remote->old_jiffies+(HZ>>2))>jiffies)){ return; } input_event(dev, ati_remote_translation_table[i].type, ati_remote_translation_table[i].code, 1); input_event(dev, ati_remote_translation_table[i].type, ati_remote_translation_table[i].code, 0); break; default: printk("kind=%d\n", ati_remote_translation_table[i].kind); } break; } } if(ati_remote_translation_table[i].kind==KIND_END){ printk("** unknown key=%02x%02x\n", data[1], data[2]); } if((ati_remote->old[0]!=data[1])||(ati_remote->old[1]!=data[2])) ati_remote->old_jiffies=jiffies; ati_remote->old[0]=data[1]; ati_remote->old[1]=data[2]; } } static int ati_remote_open(struct input_dev *dev) { struct ati_remote *ati_remote = dev->private; printk("ati_remote_open %d\n", ati_remote->open); if (ati_remote->open++) return 0; ati_remote->irq.dev = ati_remote->usbdev; if (usb_submit_urb(&ati_remote->irq)) return -EIO; printk("done: ati_remote_open now open=%d\n", ati_remote->open); return 0; } static void ati_remote_close(struct input_dev *dev) { struct ati_remote *ati_remote = dev->private; if (!--ati_remote->open) usb_unlink_urb(&ati_remote->irq); } static void ati_remote_usb_out(struct urb *urb) { struct ati_remote *ati_remote = urb->context; if (urb->status) return; if (waitqueue_active(&ati_remote->wait)) wake_up(&ati_remote->wait); } static void *ati_remote_probe(struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id) { struct usb_interface *iface; struct usb_interface_descriptor *interface; struct usb_endpoint_descriptor *endpoint, *epout; struct ati_remote *ati_remote; int pipe, maxp; char *buf; int i; iface = &dev->actconfig->interface[ifnum]; interface = &iface->altsetting[iface->act_altsetting]; if (interface->bNumEndpoints != 2) return NULL; /* use the first endpoint only for now */ endpoint = interface->endpoint + 0; if (!(endpoint->bEndpointAddress & 0x80)) return NULL; if ((endpoint->bmAttributes & 3) != 3) return NULL; epout = interface->endpoint + 1; pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); printk("maxp=%d endpoint=0x%02x\n", maxp, endpoint->bEndpointAddress); usb_set_idle(dev, interface->bInterfaceNumber, 0, 0); if (!(ati_remote = kmalloc(sizeof(struct ati_remote)+32, GFP_KERNEL))) return NULL; memset(ati_remote, 0, sizeof(struct ati_remote)+32); ati_remote->usbdev = dev; for(i=0;ati_remote_translation_table[i].kind!=KIND_END;i++) if(ati_remote_translation_table[i].type==EV_KEY) set_bit(ati_remote_translation_table[i].code, ati_remote->dev.keybit); clear_bit(BTN_LEFT, ati_remote->dev.keybit); clear_bit(BTN_RIGHT, ati_remote->dev.keybit); ati_remote->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); ati_remote->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); ati_remote->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y); ati_remote->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_SIDE) | BIT(BTN_EXTRA); ati_remote->dev.relbit[0] |= BIT(REL_WHEEL); ati_remote->dev.private = ati_remote; ati_remote->dev.open = ati_remote_open; ati_remote->dev.close = ati_remote_close; ati_remote->dev.name = ati_remote->name; ati_remote->dev.idbus = BUS_USB; ati_remote->dev.idvendor = dev->descriptor.idVendor; ati_remote->dev.idproduct = dev->descriptor.idProduct; ati_remote->dev.idversion = dev->descriptor.bcdDevice; init_waitqueue_head(&ati_remote->wait); ati_remote->dr.requesttype = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; ati_remote->dr.index = 0; ati_remote->dr.length = 16; ati_remote->old[0]=0; ati_remote->old[1]=0; ati_remote->old_jiffies=jiffies; if (!(buf = kmalloc(63, GFP_KERNEL))) { kfree(ati_remote); return NULL; } if (dev->descriptor.iManufacturer && usb_string(dev, dev->descriptor.iManufacturer, buf, 63) > 0) strcat(ati_remote->name, buf); if (dev->descriptor.iProduct && usb_string(dev, dev->descriptor.iProduct, buf, 63) > 0) sprintf(ati_remote->name, "%s %s", ati_remote->name, buf); if (!strlen(ati_remote->name)) sprintf(ati_remote->name, "USB HIDBP Mouse %04x:%04x", ati_remote->dev.idvendor, ati_remote->dev.idproduct); kfree(buf); FILL_INT_URB(&ati_remote->irq, dev, pipe, ati_remote->data, maxp > 8 ? 8 : maxp, ati_remote_irq, ati_remote, endpoint->bInterval); FILL_INT_URB(&ati_remote->out, dev, usb_sndintpipe(dev, epout->bEndpointAddress), ati_remote + 1, 32, ati_remote_usb_out, ati_remote, epout->bInterval); input_register_device(&ati_remote->dev); printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n", ati_remote->dev.number, ati_remote->name, dev->bus->busnum, dev->devnum, ifnum); send_packet(ati_remote, 0x8004, init1); send_packet(ati_remote, 0x8007, init2); usb_unlink_urb(&(ati_remote->out)); return ati_remote; } static void ati_remote_disconnect(struct usb_device *dev, void *ptr) { struct ati_remote *ati_remote = ptr; usb_unlink_urb(&ati_remote->irq); input_unregister_device(&ati_remote->dev); kfree(ati_remote); } static struct usb_device_id ati_remote_id_table [] = { { USB_DEVICE(0x0bc7, 0x004) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, ati_remote_id_table); static struct usb_driver ati_remote_driver = { name: "ati_remote", probe: ati_remote_probe, disconnect: ati_remote_disconnect, id_table: ati_remote_id_table, }; static int __init ati_remote_init(void) { usb_register(&ati_remote_driver); info(DRIVER_VERSION ":" DRIVER_DESC); return 0; } static void __exit ati_remote_exit(void) { usb_deregister(&ati_remote_driver); } module_init(ati_remote_init); module_exit(ati_remote_exit); |
From: Vojtech P. <vo...@us...> - 2002-02-22 11:41:19
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/other In directory usw-pr-cvs1:/tmp/cvs-serv17851/other Log Message: Directory /cvsroot/linuxconsole/ruby/linux/drivers/input/other added to the repository |
From: Vojtech P. <vo...@us...> - 2002-02-21 09:27:16
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb In directory usw-pr-cvs1:/tmp/cvs-serv15315 Modified Files: hid-core.c Log Message: Fix the probing table. Index: hid-core.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid-core.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- hid-core.c 12 Feb 2002 21:29:49 -0000 1.44 +++ hid-core.c 21 Feb 2002 09:27:10 -0000 1.45 @@ -1456,7 +1456,8 @@ } static struct usb_device_id hid_usb_ids [] = { - { bInterfaceClass: USB_INTERFACE_CLASS_HID }, + { match_flags: USB_DEVICE_ID_MATCH_INT_CLASS, + bInterfaceClass: USB_INTERFACE_CLASS_HID }, { } /* Terminating entry */ }; |
From: James S. <jsi...@us...> - 2002-02-20 19:03:47
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv24790 Modified Files: vt.c Log Message: A possible oops fixed in do_write_con. Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- vt.c 20 Feb 2002 17:49:34 -0000 1.119 +++ vt.c 20 Feb 2002 19:03:44 -0000 1.120 @@ -1016,7 +1016,7 @@ static int error; if (!error) { error = 1; - printk("con_write: tty %d not allocated\n", cons_num); + printk("con_write: tty %d not allocated\n", minor(tty->device)); } return 0; } |
From: James S. <jsi...@us...> - 2002-02-20 18:00:55
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv25122 Modified Files: input.h Log Message: Added Franz brightness up/down key codes. Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/input.h,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- input.h 3 Feb 2002 20:03:11 -0000 1.62 +++ input.h 20 Feb 2002 18:00:53 -0000 1.63 @@ -324,6 +324,8 @@ #define KEY_SHOP 221 #define KEY_ALTERASE 222 #define KEY_CANCEL 223 +#define KEY_BRIGHTNESSDOWN 224 +#define KEY_BRIGHTNESSUP 225 #define KEY_UNKNOWN 240 |
From: James S. <jsi...@us...> - 2002-02-20 17:49:37
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv20643/include/linux Modified Files: kbd_kern.h Log Message: Cleanup of keyboard key macros. Index: kbd_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/kbd_kern.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- kbd_kern.h 15 Feb 2002 23:20:49 -0000 1.12 +++ kbd_kern.h 20 Feb 2002 17:49:34 -0000 1.13 @@ -78,52 +78,52 @@ tasklet_schedule(&keyboard_tasklet); } -static inline int vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline int get_kbd_mode(struct kbd_struct *kbd, int flag) { return ((kbd->modeflags >> flag) & 1); } -static inline int vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline int get_kbd_led(struct kbd_struct *kbd, int flag) { return ((kbd->ledflagstate >> flag) & 1); } -static inline void set_vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline void set_kbd_mode(struct kbd_struct *kbd, int flag) { kbd->modeflags |= 1 << flag; } -static inline void set_vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline void set_kbd_led(struct kbd_struct *kbd, int flag) { kbd->ledflagstate |= 1 << flag; } -static inline void clr_vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline void clr_kbd_mode(struct kbd_struct *kbd, int flag) { kbd->modeflags &= ~(1 << flag); } -static inline void clr_vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline void clr_kbd_led(struct kbd_struct *kbd, int flag) { kbd->ledflagstate &= ~(1 << flag); } -static inline void chg_vc_kbd_lock(struct kbd_struct * kbd, int flag) +static inline void chg_kbd_lock(struct kbd_struct *kbd, int flag) { kbd->lockstate ^= 1 << flag; } -static inline void chg_vc_kbd_slock(struct kbd_struct * kbd, int flag) +static inline void chg_kbd_slock(struct kbd_struct *kbd, int flag) { kbd->slockstate ^= 1 << flag; } -static inline void chg_vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline void chg_kbd_mode(struct kbd_struct *kbd, int flag) { kbd->modeflags ^= 1 << flag; } -static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline void chg_kbd_led(struct kbd_struct *kbd, int flag) { kbd->ledflagstate ^= 1 << flag; } |
From: James S. <jsi...@us...> - 2002-02-20 17:49:37
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv20643/drivers/char Modified Files: decvte.c keyboard.c vt.c vt_ioctl.c Log Message: Cleanup of keyboard key macros. Index: decvte.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/decvte.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- decvte.c 18 Aug 2001 22:20:44 -0000 1.17 +++ decvte.c 20 Feb 2002 17:49:34 -0000 1.18 @@ -493,9 +493,9 @@ if (priv4) switch(par[i]) { case 1: /* DECCKM - Cursor keys mode */ if (on_off) - set_vc_kbd_mode(&vc->kbd_table, VC_CKMODE); + set_kbd_mode(&vc->kbd_table, VC_CKMODE); else - clr_vc_kbd_mode(&vc->kbd_table, VC_CKMODE); + clr_kbd_mode(&vc->kbd_table, VC_CKMODE); break; case 2: /* DECANM - ANSI mode */ break; @@ -527,9 +527,9 @@ case 8: /* DECARM - Autorepeat mode */ decarm = on_off; if (on_off) - set_vc_kbd_mode(&vc->kbd_table, VC_REPEAT); + set_kbd_mode(&vc->kbd_table, VC_REPEAT); else - clr_vc_kbd_mode(&vc->kbd_table, VC_REPEAT); + clr_kbd_mode(&vc->kbd_table, VC_REPEAT); break; case 9: report_mouse = on_off ? 1 : 0; @@ -547,9 +547,9 @@ case 66: /* DECNKM - Numeric keybad mode */ decnkm = on_off; if (on_off) - set_vc_kbd_mode(&vc->kbd_table, VC_APPLIC); + set_kbd_mode(&vc->kbd_table, VC_APPLIC); else - clr_vc_kbd_mode(&vc->kbd_table, VC_APPLIC); + clr_kbd_mode(&vc->kbd_table, VC_APPLIC); break; case 67: /* DECBKM - Backarrow key mode */ break; @@ -574,9 +574,9 @@ break; case 20: /* Lf, Enter == CrLf/Lf */ if (on_off) - set_vc_kbd_mode(&vc->kbd_table, VC_CRLF); + set_kbd_mode(&vc->kbd_table, VC_CRLF); else - clr_vc_kbd_mode(&vc->kbd_table, VC_CRLF); + clr_kbd_mode(&vc->kbd_table, VC_CRLF); break; } } @@ -971,10 +971,10 @@ irm = 0; /* replace */ lnm = 0; /* line feed */ - set_vc_kbd_mode(&vc->kbd_table, VC_REPEAT); - clr_vc_kbd_mode(&vc->kbd_table, VC_CKMODE); - clr_vc_kbd_mode(&vc->kbd_table, VC_APPLIC); - clr_vc_kbd_mode(&vc->kbd_table, VC_CRLF); + set_kbd_mode(&vc->kbd_table, VC_REPEAT); + clr_kbd_mode(&vc->kbd_table, VC_CKMODE); + clr_kbd_mode(&vc->kbd_table, VC_APPLIC); + clr_kbd_mode(&vc->kbd_table, VC_CRLF); vc->kbd_table.lockstate = KBD_DEFLOCK; vc->kbd_table.slockstate = 0; vc->kbd_table.ledmode = LED_SHOW_FLAGS; @@ -1098,7 +1098,7 @@ * DEC VT series processes FF as LF. */ vte_lf(vc); - if (!vc_kbd_mode(&vc->kbd_table, VC_CRLF)) + if (!get_kbd_mode(&vc->kbd_table, VC_CRLF)) return; case 0x0d: /* CR - Carriage return */ vte_cr(vc); @@ -1272,11 +1272,11 @@ return; case '=': /* DECKPAM - Keypad application mode */ decnkm = 1; - set_vc_kbd_mode(&vc->kbd_table, VC_APPLIC); + set_kbd_mode(&vc->kbd_table, VC_APPLIC); return; case '>': /* DECKPNM - Keypad numeric mode */ decnkm = 0; - clr_vc_kbd_mode(&vc->kbd_table, VC_APPLIC); + clr_kbd_mode(&vc->kbd_table, VC_APPLIC); return; /* ===== C1 control functions ===== */ Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- keyboard.c 20 Feb 2002 17:45:27 -0000 1.70 +++ keyboard.c 20 Feb 2002 17:49:34 -0000 1.71 @@ -996,7 +996,7 @@ rep = (down == 2); - if (rep && (!vc_kbd_mode(&vc->kbd_table, VC_REPEAT) || (tty && + if (rep && (!get_kbd_mode(&vc->kbd_table, VC_REPEAT) || (tty && (!L_ECHO(tty) && tty->driver.chars_in_buffer(tty))))) { /* * Don't repeat a key if the input buffers are not empty and the @@ -1030,7 +1030,7 @@ if (type == KT_LETTER) { type = KT_LATIN; - if (vc_kbd_led(&vc->kbd_table, VC_CAPSLOCK)) { + if (get_kbd_led(&vc->kbd_table, VC_CAPSLOCK)) { key_map = key_maps[shift_final ^ (1 << KG_SHIFT)]; if (key_map) keysym = key_map[keycode]; Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- vt.c 23 Jan 2002 23:21:30 -0000 1.118 +++ vt.c 20 Feb 2002 17:49:34 -0000 1.119 @@ -103,11 +103,6 @@ */ int (*console_blank_hook)(int); -/* keyboard macros */ -#define set_kbd(kbd_table, x) set_vc_kbd_mode(kbd_table, x) -#define clr_kbd(kbd_table, x) clr_vc_kbd_mode(kbd_table, x) -#define is_kbd(kbd_table, x) vc_kbd_mode(kbd_table, x) - /* * Console cursor handling */ @@ -1292,7 +1287,7 @@ if (!tty || !vc) return; - set_vc_kbd_led(&vc->kbd_table, VC_SCROLLOCK); + set_kbd_led(&vc->kbd_table, VC_SCROLLOCK); set_leds(); } @@ -1305,7 +1300,7 @@ if (!tty || !vc) return; - clr_vc_kbd_led(&vc->kbd_table, VC_SCROLLOCK); + clr_kbd_led(&vc->kbd_table, VC_SCROLLOCK); set_leds(); } Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt_ioctl.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- vt_ioctl.c 14 Nov 2001 17:51:33 -0000 1.65 +++ vt_ioctl.c 20 Feb 2002 17:49:34 -0000 1.66 @@ -786,10 +786,10 @@ case KDSKBMETA: switch(arg) { case K_METABIT: - clr_vc_kbd_mode(kbd, VC_META); + clr_kbd_mode(kbd, VC_META); break; case K_ESCPREFIX: - set_vc_kbd_mode(kbd, VC_META); + set_kbd_mode(kbd, VC_META); break; default: return -EINVAL; @@ -797,7 +797,7 @@ return 0; case KDGKBMETA: - ucval = (vc_kbd_mode(kbd, VC_META) ? K_ESCPREFIX : K_METABIT); + ucval = (get_kbd_mode(kbd, VC_META) ? K_ESCPREFIX : K_METABIT); setint: return put_user(ucval, (int *)arg); |
From: James S. <jsi...@us...> - 2002-02-20 17:45:30
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv19106 Modified Files: keyboard.c Log Message: Minimize diff with code in DJ tree. Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- keyboard.c 24 Jan 2002 15:21:19 -0000 1.69 +++ keyboard.c 20 Feb 2002 17:45:27 -0000 1.70 @@ -47,6 +47,7 @@ #include <linux/init.h> #include <linux/slab.h> +#include <linux/kbd_kern.h> #include <linux/kbd_diacr.h> #include <linux/vt_kern.h> #include <linux/consolemap.h> @@ -96,6 +97,7 @@ * Variables/functions exported for vt_ioctl.c */ +/* maximum values each key_handler can handle */ const int max_vals[] = { 255, SIZE(func_table) - 1, SIZE(fn_handler) - 1, NR_PAD - 1, NR_DEAD - 1, 255, 3, NR_SHIFT - 1, 255, NR_ASCII - 1, NR_LOCK - 1, @@ -134,14 +136,14 @@ static unsigned long key_down[256/BITS_PER_LONG]; /* keyboard key bitmap */ static unsigned char shift_down[NR_SHIFT]; /* shift state counters.. */ static int dead_key_next; -static int npadch = -1; /* -1 or number assembled on pad */ +static int npadch = -1; /* -1 or number assembled on pad */ static unsigned char diacr; -static char rep; /* flag telling character repeat */ +static char rep; /* flag telling character repeat */ pm_callback pm_kbd_request_override = NULL; typedef void (pm_kbd_func) (void); static struct pm_dev *pm_kbd; -static unsigned char ledstate = 0xff; /* undefined */ +static unsigned char ledstate = 0xff; /* undefined */ static unsigned char ledioctl; static struct ledptr { @@ -227,7 +229,7 @@ void to_utf8(struct vc_data *vc, ushort c) { if (c < 0x80) - /* 0******* */ + /* 0******* */ put_queue(vc, c); else if (c < 0x800) { /* 110***** 10****** */ @@ -338,7 +340,7 @@ diacr = 0; } put_queue(vc, 13); - if (vc_kbd_mode(&vc->kbd_table, VC_CRLF)) + if (get_kbd_mode(&vc->kbd_table, VC_CRLF)) put_queue(vc, 10); } @@ -346,14 +348,14 @@ { if (rep) return; - chg_vc_kbd_led(&vc->kbd_table, VC_CAPSLOCK); + chg_kbd_led(&vc->kbd_table, VC_CAPSLOCK); } static void fn_caps_on(struct vc_data *vc) { if (rep) return; - set_vc_kbd_led(&vc->kbd_table, VC_CAPSLOCK); + set_kbd_led(&vc->kbd_table, VC_CAPSLOCK); } static void fn_show_ptregs(struct vc_data *vc) @@ -368,6 +370,7 @@ if (rep || !tty) return; + /* * Note: SCROLLOCK will be set (cleared) by stop_tty (start_tty); * these routines are also activated by ^S/^Q. @@ -381,7 +384,7 @@ static void fn_num(struct vc_data *vc) { - if (vc_kbd_mode(&vc->kbd_table, VC_APPLIC)) + if (get_kbd_mode(&vc->kbd_table, VC_APPLIC)) applkey(vc, 'P', 1); else fn_bare_num(vc); @@ -396,7 +399,7 @@ static void fn_bare_num(struct vc_data *vc) { if (!rep) - chg_vc_kbd_led(&vc->kbd_table, VC_NUMLOCK); + chg_kbd_led(&vc->kbd_table, VC_NUMLOCK); } static void fn_lastcons(struct vc_data *vc) @@ -517,7 +520,6 @@ /* * Special key handlers */ - static void k_ignore(struct vc_data *vc, unsigned char value, char up_flag) { } @@ -528,12 +530,14 @@ return; if (value >= SIZE(fn_handler)) return; - if ((vc->kbd_table.kbdmode == VC_RAW || vc->kbd_table.kbdmode == VC_MEDIUMRAW) && value != K_SAK) + if ((vc->kbd_table.kbdmode == VC_RAW || + vc->kbd_table.kbdmode == VC_MEDIUMRAW) && + value != K_SAK) return; /* SAK is allowed even in raw mode */ fn_handler[value](vc); } -static void k_lowercase(struct vc_data *vc, unsigned char value, char up_flag) +static void k_lowercase(struct vc_data *vc, unsigned char value, char up_flag) { printk(KERN_ERR "keyboard.c: k_lowercase was called - impossible\n"); } @@ -602,7 +606,7 @@ if (up_flag) return; - applkey(vc, cur_chars[value], vc_kbd_mode(&vc->kbd_table, VC_CKMODE)); + applkey(vc, cur_chars[value], get_kbd_mode(&vc->kbd_table, VC_CKMODE)); } static void k_pad(struct vc_data *vc, unsigned char value, char up_flag) @@ -614,12 +618,12 @@ return; /* no action, if this is a key release */ /* kludge... shift forces cursor/number keys */ - if (vc_kbd_mode(&vc->kbd_table, VC_APPLIC) && !shift_down[KG_SHIFT]) { + if (get_kbd_mode(&vc->kbd_table, VC_APPLIC) && !shift_down[KG_SHIFT]) { applkey(vc, app_map[value], 1); return; } - if (!vc_kbd_led(&vc->kbd_table, VC_NUMLOCK)) + if (!get_kbd_led(&vc->kbd_table, VC_NUMLOCK)) switch (value) { case KVAL(K_PCOMMA): case KVAL(K_PDOT): @@ -653,13 +657,13 @@ k_fn(vc, KVAL(K_PGUP), 0); return; case KVAL(K_P5): - applkey(vc,'G', vc_kbd_mode(&vc->kbd_table, + applkey(vc, 'G', get_kbd_mode(&vc->kbd_table, VC_APPLIC)); return; } put_8bit(vc, pad_chars[value]); - if (value == KVAL(K_PENTER) && vc_kbd_mode(&vc->kbd_table, VC_CRLF)) + if (value == KVAL(K_PENTER) && get_kbd_mode(&vc->kbd_table, VC_CRLF)) put_queue(vc, 10); } @@ -673,11 +677,10 @@ * Mimic typewriter: * a CapsShift key acts like Shift but undoes CapsLock */ - if (value == KVAL(K_CAPSSHIFT)) { value = KVAL(K_SHIFT); if (!up_flag) - clr_vc_kbd_led(&vc->kbd_table, VC_CAPSLOCK); + clr_kbd_led(&vc->kbd_table, VC_CAPSLOCK); } if (up_flag) { @@ -709,7 +712,8 @@ { if (up_flag) return; - if (vc_kbd_mode(&vc->kbd_table, VC_META)) { + + if (get_kbd_mode(&vc->kbd_table, VC_META)) { put_queue(vc, '\033'); put_queue(vc, value); } else @@ -723,10 +727,10 @@ if (up_flag) return; - if (value < 10) { + if (value < 10) { /* decimal input of code, while Alt depressed */ base = 10; - } else { + } else { /* hexadecimal input of code, while AltGr depressed */ value -= 10; base = 16; @@ -743,18 +747,20 @@ if (up_flag || rep) return; if (value >= NR_LOCK) { - /* Change the lock state and - set the CapsLock LED to the new state */ - unsigned char mask; + /* + * Change the lock state and + * set the CapsLock LED to the new state + */ + unsigned char mask; - mask = 1 << (value -= NR_LOCK); - if ((vc->kbd_table.lockstate ^= mask) & mask) - set_vc_kbd_led(&vc->kbd_table, VC_CAPSLOCK); - else - clr_vc_kbd_led(&vc->kbd_table, VC_CAPSLOCK); - } else { - /* Just change the lock state */ - chg_vc_kbd_lock(&vc->kbd_table, value); + mask = 1 << (value -= NR_LOCK); + if ((vc->kbd_table.lockstate ^= mask) & mask) + set_kbd_led(&vc->kbd_table, VC_CAPSLOCK); + else + clr_kbd_led(&vc->kbd_table, VC_CAPSLOCK); + } else { + /* Just change the lock state */ + chg_kbd_lock(&vc->kbd_table, value); } } @@ -763,11 +769,11 @@ k_shift(vc, value, up_flag); if (up_flag || rep) return; - chg_vc_kbd_slock(&vc->kbd_table, value); + chg_kbd_slock(&vc->kbd_table, value); /* try to make Alt, oops, AltGr and such work */ if (!key_maps[vc->kbd_table.lockstate ^ vc->kbd_table.slockstate]) { vc->kbd_table.slockstate = 0; - chg_vc_kbd_slock(&vc->kbd_table, value); + chg_kbd_slock(&vc->kbd_table, value); } } @@ -776,8 +782,8 @@ * or (ii) whatever pattern of lights people want to show using KDSETLED, * or (iii) specified bits of specified words in kernel memory. */ - -unsigned char getledstate(void) { +unsigned char getledstate(void) +{ return ledstate; } @@ -791,8 +797,8 @@ set_leds(); } -void register_leds(struct kbd_struct *kbd, unsigned int led,unsigned int *addr, - unsigned int mask) +void register_leds(struct kbd_struct *kbd, unsigned int led, + unsigned int *addr, unsigned int mask) { if (led < 3) { ledptrs[led].addr = addr; |