diff options
author | Paul Mackerras <paulus@samba.org> | 2006-05-19 01:02:42 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-19 01:02:42 -0400 |
commit | 3c06da5ae5358e9d325d541a053e1059e9654bcc (patch) | |
tree | 04c953cc82fe57cff248ac523095cd4f0d9611a7 /drivers/char | |
parent | 4d1f3f25d9c303d1ce63b42cc94c54ac0ab2e950 (diff) | |
parent | a54c9d30dbb06391ec4422aaf0e1dc2c8c53bd3e (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 10 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 11 | ||||
-rw-r--r-- | drivers/char/rio/host.h | 9 | ||||
-rw-r--r-- | drivers/char/rio/rioboot.c | 1 | ||||
-rw-r--r-- | drivers/char/rio/rioctrl.c | 43 | ||||
-rw-r--r-- | drivers/char/rio/rioioctl.h | 56 | ||||
-rw-r--r-- | drivers/char/tpm/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm.h | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 2 |
10 files changed, 51 insertions, 87 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 402296670d3a..78d928f9d9f1 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -291,7 +291,7 @@ config SX | |||
291 | 291 | ||
292 | config RIO | 292 | config RIO |
293 | tristate "Specialix RIO system support" | 293 | tristate "Specialix RIO system support" |
294 | depends on SERIAL_NONSTANDARD && !64BIT | 294 | depends on SERIAL_NONSTANDARD |
295 | help | 295 | help |
296 | This is a driver for the Specialix RIO, a smart serial card which | 296 | This is a driver for the Specialix RIO, a smart serial card which |
297 | drives an outboard box that can support up to 128 ports. Product | 297 | drives an outboard box that can support up to 128 ports. Product |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 02114a0bd0d9..128b2632512d 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -1981,10 +1981,6 @@ static int __init cmm_init(void) | |||
1981 | if (!cmm_class) | 1981 | if (!cmm_class) |
1982 | return -1; | 1982 | return -1; |
1983 | 1983 | ||
1984 | rc = pcmcia_register_driver(&cm4000_driver); | ||
1985 | if (rc < 0) | ||
1986 | return rc; | ||
1987 | |||
1988 | major = register_chrdev(0, DEVICE_NAME, &cm4000_fops); | 1984 | major = register_chrdev(0, DEVICE_NAME, &cm4000_fops); |
1989 | if (major < 0) { | 1985 | if (major < 0) { |
1990 | printk(KERN_WARNING MODULE_NAME | 1986 | printk(KERN_WARNING MODULE_NAME |
@@ -1992,6 +1988,12 @@ static int __init cmm_init(void) | |||
1992 | return -1; | 1988 | return -1; |
1993 | } | 1989 | } |
1994 | 1990 | ||
1991 | rc = pcmcia_register_driver(&cm4000_driver); | ||
1992 | if (rc < 0) { | ||
1993 | unregister_chrdev(major, DEVICE_NAME); | ||
1994 | return rc; | ||
1995 | } | ||
1996 | |||
1995 | return 0; | 1997 | return 0; |
1996 | } | 1998 | } |
1997 | 1999 | ||
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 29efa64580a8..47a8465bf95b 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -724,16 +724,19 @@ static int __init cm4040_init(void) | |||
724 | if (!cmx_class) | 724 | if (!cmx_class) |
725 | return -1; | 725 | return -1; |
726 | 726 | ||
727 | rc = pcmcia_register_driver(&reader_driver); | ||
728 | if (rc < 0) | ||
729 | return rc; | ||
730 | |||
731 | major = register_chrdev(0, DEVICE_NAME, &reader_fops); | 727 | major = register_chrdev(0, DEVICE_NAME, &reader_fops); |
732 | if (major < 0) { | 728 | if (major < 0) { |
733 | printk(KERN_WARNING MODULE_NAME | 729 | printk(KERN_WARNING MODULE_NAME |
734 | ": could not get major number\n"); | 730 | ": could not get major number\n"); |
735 | return -1; | 731 | return -1; |
736 | } | 732 | } |
733 | |||
734 | rc = pcmcia_register_driver(&reader_driver); | ||
735 | if (rc < 0) { | ||
736 | unregister_chrdev(major, DEVICE_NAME); | ||
737 | return rc; | ||
738 | } | ||
739 | |||
737 | return 0; | 740 | return 0; |
738 | } | 741 | } |
739 | 742 | ||
diff --git a/drivers/char/rio/host.h b/drivers/char/rio/host.h index 3ec73d1a279a..179cdbea712b 100644 --- a/drivers/char/rio/host.h +++ b/drivers/char/rio/host.h | |||
@@ -33,12 +33,6 @@ | |||
33 | #ifndef __rio_host_h__ | 33 | #ifndef __rio_host_h__ |
34 | #define __rio_host_h__ | 34 | #define __rio_host_h__ |
35 | 35 | ||
36 | #ifdef SCCS_LABELS | ||
37 | #ifndef lint | ||
38 | static char *_host_h_sccs_ = "@(#)host.h 1.2"; | ||
39 | #endif | ||
40 | #endif | ||
41 | |||
42 | /* | 36 | /* |
43 | ** the host structure - one per host card in the system. | 37 | ** the host structure - one per host card in the system. |
44 | */ | 38 | */ |
@@ -77,9 +71,6 @@ struct Host { | |||
77 | #define RC_STARTUP 1 | 71 | #define RC_STARTUP 1 |
78 | #define RC_RUNNING 2 | 72 | #define RC_RUNNING 2 |
79 | #define RC_STUFFED 3 | 73 | #define RC_STUFFED 3 |
80 | #define RC_SOMETHING 4 | ||
81 | #define RC_SOMETHING_NEW 5 | ||
82 | #define RC_SOMETHING_ELSE 6 | ||
83 | #define RC_READY 7 | 74 | #define RC_READY 7 |
84 | #define RUN_STATE 7 | 75 | #define RUN_STATE 7 |
85 | /* | 76 | /* |
diff --git a/drivers/char/rio/rioboot.c b/drivers/char/rio/rioboot.c index acda9326c2ef..290143addd34 100644 --- a/drivers/char/rio/rioboot.c +++ b/drivers/char/rio/rioboot.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/termios.h> | 35 | #include <linux/termios.h> |
36 | #include <linux/serial.h> | 36 | #include <linux/serial.h> |
37 | #include <linux/vmalloc.h> | ||
37 | #include <asm/semaphore.h> | 38 | #include <asm/semaphore.h> |
38 | #include <linux/generic_serial.h> | 39 | #include <linux/generic_serial.h> |
39 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
diff --git a/drivers/char/rio/rioctrl.c b/drivers/char/rio/rioctrl.c index d31aba62bb7f..75b2557c37ec 100644 --- a/drivers/char/rio/rioctrl.c +++ b/drivers/char/rio/rioctrl.c | |||
@@ -1394,14 +1394,17 @@ int RIOPreemptiveCmd(struct rio_info *p, struct Port *PortP, u8 Cmd) | |||
1394 | return RIO_FAIL; | 1394 | return RIO_FAIL; |
1395 | } | 1395 | } |
1396 | 1396 | ||
1397 | if (((int) ((char) PortP->InUse) == -1) || !(CmdBlkP = RIOGetCmdBlk())) { | 1397 | if ((PortP->InUse == (typeof(PortP->InUse))-1) || |
1398 | rio_dprintk(RIO_DEBUG_CTRL, "Cannot allocate command block for command %d on port %d\n", Cmd, PortP->PortNum); | 1398 | !(CmdBlkP = RIOGetCmdBlk())) { |
1399 | rio_dprintk(RIO_DEBUG_CTRL, "Cannot allocate command block " | ||
1400 | "for command %d on port %d\n", Cmd, PortP->PortNum); | ||
1399 | return RIO_FAIL; | 1401 | return RIO_FAIL; |
1400 | } | 1402 | } |
1401 | 1403 | ||
1402 | rio_dprintk(RIO_DEBUG_CTRL, "Command blk %p - InUse now %d\n", CmdBlkP, PortP->InUse); | 1404 | rio_dprintk(RIO_DEBUG_CTRL, "Command blk %p - InUse now %d\n", |
1405 | CmdBlkP, PortP->InUse); | ||
1403 | 1406 | ||
1404 | PktCmdP = (struct PktCmd_M *) &CmdBlkP->Packet.data[0]; | 1407 | PktCmdP = (struct PktCmd_M *)&CmdBlkP->Packet.data[0]; |
1405 | 1408 | ||
1406 | CmdBlkP->Packet.src_unit = 0; | 1409 | CmdBlkP->Packet.src_unit = 0; |
1407 | if (PortP->SecondBlock) | 1410 | if (PortP->SecondBlock) |
@@ -1425,38 +1428,46 @@ int RIOPreemptiveCmd(struct rio_info *p, struct Port *PortP, u8 Cmd) | |||
1425 | 1428 | ||
1426 | switch (Cmd) { | 1429 | switch (Cmd) { |
1427 | case MEMDUMP: | 1430 | case MEMDUMP: |
1428 | rio_dprintk(RIO_DEBUG_CTRL, "Queue MEMDUMP command blk %p (addr 0x%x)\n", CmdBlkP, (int) SubCmd.Addr); | 1431 | rio_dprintk(RIO_DEBUG_CTRL, "Queue MEMDUMP command blk %p " |
1432 | "(addr 0x%x)\n", CmdBlkP, (int) SubCmd.Addr); | ||
1429 | PktCmdP->SubCommand = MEMDUMP; | 1433 | PktCmdP->SubCommand = MEMDUMP; |
1430 | PktCmdP->SubAddr = SubCmd.Addr; | 1434 | PktCmdP->SubAddr = SubCmd.Addr; |
1431 | break; | 1435 | break; |
1432 | case FCLOSE: | 1436 | case FCLOSE: |
1433 | rio_dprintk(RIO_DEBUG_CTRL, "Queue FCLOSE command blk %p\n", CmdBlkP); | 1437 | rio_dprintk(RIO_DEBUG_CTRL, "Queue FCLOSE command blk %p\n", |
1438 | CmdBlkP); | ||
1434 | break; | 1439 | break; |
1435 | case READ_REGISTER: | 1440 | case READ_REGISTER: |
1436 | rio_dprintk(RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) command blk %p\n", (int) SubCmd.Addr, CmdBlkP); | 1441 | rio_dprintk(RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) " |
1442 | "command blk %p\n", (int) SubCmd.Addr, CmdBlkP); | ||
1437 | PktCmdP->SubCommand = READ_REGISTER; | 1443 | PktCmdP->SubCommand = READ_REGISTER; |
1438 | PktCmdP->SubAddr = SubCmd.Addr; | 1444 | PktCmdP->SubAddr = SubCmd.Addr; |
1439 | break; | 1445 | break; |
1440 | case RESUME: | 1446 | case RESUME: |
1441 | rio_dprintk(RIO_DEBUG_CTRL, "Queue RESUME command blk %p\n", CmdBlkP); | 1447 | rio_dprintk(RIO_DEBUG_CTRL, "Queue RESUME command blk %p\n", |
1448 | CmdBlkP); | ||
1442 | break; | 1449 | break; |
1443 | case RFLUSH: | 1450 | case RFLUSH: |
1444 | rio_dprintk(RIO_DEBUG_CTRL, "Queue RFLUSH command blk %p\n", CmdBlkP); | 1451 | rio_dprintk(RIO_DEBUG_CTRL, "Queue RFLUSH command blk %p\n", |
1452 | CmdBlkP); | ||
1445 | CmdBlkP->PostFuncP = RIORFlushEnable; | 1453 | CmdBlkP->PostFuncP = RIORFlushEnable; |
1446 | break; | 1454 | break; |
1447 | case SUSPEND: | 1455 | case SUSPEND: |
1448 | rio_dprintk(RIO_DEBUG_CTRL, "Queue SUSPEND command blk %p\n", CmdBlkP); | 1456 | rio_dprintk(RIO_DEBUG_CTRL, "Queue SUSPEND command blk %p\n", |
1457 | CmdBlkP); | ||
1449 | break; | 1458 | break; |
1450 | 1459 | ||
1451 | case MGET: | 1460 | case MGET: |
1452 | rio_dprintk(RIO_DEBUG_CTRL, "Queue MGET command blk %p\n", CmdBlkP); | 1461 | rio_dprintk(RIO_DEBUG_CTRL, "Queue MGET command blk %p\n", |
1462 | CmdBlkP); | ||
1453 | break; | 1463 | break; |
1454 | 1464 | ||
1455 | case MSET: | 1465 | case MSET: |
1456 | case MBIC: | 1466 | case MBIC: |
1457 | case MBIS: | 1467 | case MBIS: |
1458 | CmdBlkP->Packet.data[4] = (char) PortP->ModemLines; | 1468 | CmdBlkP->Packet.data[4] = (char) PortP->ModemLines; |
1459 | rio_dprintk(RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command blk %p\n", CmdBlkP); | 1469 | rio_dprintk(RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command " |
1470 | "blk %p\n", CmdBlkP); | ||
1460 | break; | 1471 | break; |
1461 | 1472 | ||
1462 | case WFLUSH: | 1473 | case WFLUSH: |
@@ -1465,12 +1476,14 @@ int RIOPreemptiveCmd(struct rio_info *p, struct Port *PortP, u8 Cmd) | |||
1465 | ** allowed then we should not bother sending any more to the | 1476 | ** allowed then we should not bother sending any more to the |
1466 | ** RTA. | 1477 | ** RTA. |
1467 | */ | 1478 | */ |
1468 | if ((int) ((char) PortP->WflushFlag) == (int) -1) { | 1479 | if (PortP->WflushFlag == (typeof(PortP->WflushFlag))-1) { |
1469 | rio_dprintk(RIO_DEBUG_CTRL, "Trashed WFLUSH, WflushFlag about to wrap!"); | 1480 | rio_dprintk(RIO_DEBUG_CTRL, "Trashed WFLUSH, " |
1481 | "WflushFlag about to wrap!"); | ||
1470 | RIOFreeCmdBlk(CmdBlkP); | 1482 | RIOFreeCmdBlk(CmdBlkP); |
1471 | return (RIO_FAIL); | 1483 | return (RIO_FAIL); |
1472 | } else { | 1484 | } else { |
1473 | rio_dprintk(RIO_DEBUG_CTRL, "Queue WFLUSH command blk %p\n", CmdBlkP); | 1485 | rio_dprintk(RIO_DEBUG_CTRL, "Queue WFLUSH command " |
1486 | "blk %p\n", CmdBlkP); | ||
1474 | CmdBlkP->PostFuncP = RIOWFlushMark; | 1487 | CmdBlkP->PostFuncP = RIOWFlushMark; |
1475 | } | 1488 | } |
1476 | break; | 1489 | break; |
diff --git a/drivers/char/rio/rioioctl.h b/drivers/char/rio/rioioctl.h index 14b83fae75c8..e8af5b30519e 100644 --- a/drivers/char/rio/rioioctl.h +++ b/drivers/char/rio/rioioctl.h | |||
@@ -33,10 +33,6 @@ | |||
33 | #ifndef __rioioctl_h__ | 33 | #ifndef __rioioctl_h__ |
34 | #define __rioioctl_h__ | 34 | #define __rioioctl_h__ |
35 | 35 | ||
36 | #ifdef SCCS_LABELS | ||
37 | static char *_rioioctl_h_sccs_ = "@(#)rioioctl.h 1.2"; | ||
38 | #endif | ||
39 | |||
40 | /* | 36 | /* |
41 | ** RIO device driver - user ioctls and associated structures. | 37 | ** RIO device driver - user ioctls and associated structures. |
42 | */ | 38 | */ |
@@ -44,55 +40,13 @@ static char *_rioioctl_h_sccs_ = "@(#)rioioctl.h 1.2"; | |||
44 | struct portStats { | 40 | struct portStats { |
45 | int port; | 41 | int port; |
46 | int gather; | 42 | int gather; |
47 | ulong txchars; | 43 | unsigned long txchars; |
48 | ulong rxchars; | 44 | unsigned long rxchars; |
49 | ulong opens; | 45 | unsigned long opens; |
50 | ulong closes; | 46 | unsigned long closes; |
51 | ulong ioctls; | 47 | unsigned long ioctls; |
52 | }; | 48 | }; |
53 | 49 | ||
54 | |||
55 | #define rIOC ('r'<<8) | ||
56 | #define TCRIOSTATE (rIOC | 1) | ||
57 | #define TCRIOXPON (rIOC | 2) | ||
58 | #define TCRIOXPOFF (rIOC | 3) | ||
59 | #define TCRIOXPCPS (rIOC | 4) | ||
60 | #define TCRIOXPRINT (rIOC | 5) | ||
61 | #define TCRIOIXANYON (rIOC | 6) | ||
62 | #define TCRIOIXANYOFF (rIOC | 7) | ||
63 | #define TCRIOIXONON (rIOC | 8) | ||
64 | #define TCRIOIXONOFF (rIOC | 9) | ||
65 | #define TCRIOMBIS (rIOC | 10) | ||
66 | #define TCRIOMBIC (rIOC | 11) | ||
67 | #define TCRIOTRIAD (rIOC | 12) | ||
68 | #define TCRIOTSTATE (rIOC | 13) | ||
69 | |||
70 | /* | ||
71 | ** 15.10.1998 ARG - ESIL 0761 part fix | ||
72 | ** Add RIO ioctls for manipulating RTS and CTS flow control, (as LynxOS | ||
73 | ** appears to not support hardware flow control). | ||
74 | */ | ||
75 | #define TCRIOCTSFLOWEN (rIOC | 14) /* enable CTS flow control */ | ||
76 | #define TCRIOCTSFLOWDIS (rIOC | 15) /* disable CTS flow control */ | ||
77 | #define TCRIORTSFLOWEN (rIOC | 16) /* enable RTS flow control */ | ||
78 | #define TCRIORTSFLOWDIS (rIOC | 17) /* disable RTS flow control */ | ||
79 | |||
80 | /* | ||
81 | ** 09.12.1998 ARG - ESIL 0776 part fix | ||
82 | ** Definition for 'RIOC' also appears in daemon.h, so we'd better do a | ||
83 | ** #ifndef here first. | ||
84 | ** 'RIO_QUICK_CHECK' also #define'd here as this ioctl is now | ||
85 | ** allowed to be used by customers. | ||
86 | ** | ||
87 | ** 05.02.1999 ARG - | ||
88 | ** This is what I've decied to do with ioctls etc., which are intended to be | ||
89 | ** invoked from users applications : | ||
90 | ** Anything that needs to be defined here will be removed from daemon.h, that | ||
91 | ** way it won't end up having to be defined/maintained in two places. The only | ||
92 | ** consequence of this is that this file should now be #include'd by daemon.h | ||
93 | ** | ||
94 | ** 'stats' ioctls now #define'd here as they are to be used by customers. | ||
95 | */ | ||
96 | #define RIOC ('R'<<8)|('i'<<16)|('o'<<24) | 50 | #define RIOC ('R'<<8)|('i'<<16)|('o'<<24) |
97 | 51 | ||
98 | #define RIO_QUICK_CHECK (RIOC | 105) | 52 | #define RIO_QUICK_CHECK (RIOC | 105) |
diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig index 1efde3b27619..fe00c7dfb649 100644 --- a/drivers/char/tpm/Kconfig +++ b/drivers/char/tpm/Kconfig | |||
@@ -22,7 +22,7 @@ config TCG_TPM | |||
22 | 22 | ||
23 | config TCG_TIS | 23 | config TCG_TIS |
24 | tristate "TPM Interface Specification 1.2 Interface" | 24 | tristate "TPM Interface Specification 1.2 Interface" |
25 | depends on TCG_TPM | 25 | depends on TCG_TPM && PNPACPI |
26 | ---help--- | 26 | ---help--- |
27 | If you have a TPM security chip that is compliant with the | 27 | If you have a TPM security chip that is compliant with the |
28 | TCG TIS 1.2 TPM specification say Yes and it will be accessible | 28 | TCG TIS 1.2 TPM specification say Yes and it will be accessible |
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 54a4c804e25f..050ced247f68 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h | |||
@@ -140,7 +140,7 @@ extern int tpm_pm_resume(struct device *); | |||
140 | extern struct dentry ** tpm_bios_log_setup(char *); | 140 | extern struct dentry ** tpm_bios_log_setup(char *); |
141 | extern void tpm_bios_log_teardown(struct dentry **); | 141 | extern void tpm_bios_log_teardown(struct dentry **); |
142 | #else | 142 | #else |
143 | static inline struct dentry* tpm_bios_log_setup(char *name) | 143 | static inline struct dentry ** tpm_bios_log_setup(char *name) |
144 | { | 144 | { |
145 | return NULL; | 145 | return NULL; |
146 | } | 146 | } |
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index b9cae9a238bb..f621168f38ae 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -55,7 +55,7 @@ enum tis_int_flags { | |||
55 | }; | 55 | }; |
56 | 56 | ||
57 | enum tis_defaults { | 57 | enum tis_defaults { |
58 | TIS_MEM_BASE = 0xFED4000, | 58 | TIS_MEM_BASE = 0xFED40000, |
59 | TIS_MEM_LEN = 0x5000, | 59 | TIS_MEM_LEN = 0x5000, |
60 | TIS_SHORT_TIMEOUT = 750, /* ms */ | 60 | TIS_SHORT_TIMEOUT = 750, /* ms */ |
61 | TIS_LONG_TIMEOUT = 2000, /* 2 sec */ | 61 | TIS_LONG_TIMEOUT = 2000, /* 2 sec */ |