Commit 575a2929815bca197983a22fe6d072534d219be4

Authored by Linus Torvalds

Merge tag 'tty-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver fixes from Greg KH:
 "Here are a number of small tty/serial driver fixes for 3.15-rc2.  Also
  in here are some Documentation file removals for drivers that we
  removed a long time ago, no need to keep it around any longer.

  All of these have been in linux-next for a bit"

* tag 'tty-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  Revert "serial: 8250, disable "too much work" messages"
  serial: amba-pl011: fix regression, causing an Oops on rmmod
  tty: Fix help text of SYNCLINK_CS
  tty: fix memleak in alloc_pid
  ttyprintk: Allow built as a module
  ttyprintk: Fix wrong tty_unregister_driver() call in the error path
  serial: 8250, disable "too much work" messages
  Documentation/serial: Delete obsolete driver documentation
  serial: omap: Fix missing pm_runtime_resume handling by simplifying code
  serial_core: Fix pm imbalance on unbind
  serial: pl011: change Rx burst size to half of trigger level
  serial: timberdale: Depend on X86_32
  serial: st-asc: Fix SysRq char handling
  Revert "serial: clps711x: Give a chance to perform useful tasks during wait loop"
  serial_core: Fix conditional start_tx on ring buffer not empty
  serial: efm32: use $vendor,$device scheme for compatible string
  serial: omap: free the wakeup settings in remove

Showing 21 changed files Side-by-side Diff

Documentation/devicetree/bindings/serial/efm32-uart.txt
1 1 * Energymicro efm32 UART
2 2  
3 3 Required properties:
4   -- compatible : Should be "efm32,uart"
  4 +- compatible : Should be "energymicro,efm32-uart"
5 5 - reg : Address and length of the register set
6 6 - interrupts : Should contain uart interrupt
7 7  
... ... @@ -13,7 +13,7 @@
13 13 Example:
14 14  
15 15 uart@0x4000c400 {
16   - compatible = "efm32,uart";
  16 + compatible = "energymicro,efm32-uart";
17 17 reg = <0x4000c400 0x400>;
18 18 interrupts = <15>;
19 19 efm32,location = <0>;
Documentation/kernel-parameters.txt
... ... @@ -804,13 +804,6 @@
804 804 dhash_entries= [KNL]
805 805 Set number of hash buckets for dentry cache.
806 806  
807   - digi= [HW,SERIAL]
808   - IO parameters + enable/disable command.
809   -
810   - digiepca= [HW,SERIAL]
811   - See drivers/char/README.epca and
812   - Documentation/serial/digiepca.txt.
813   -
814 807 disable= [IPV6]
815 808 See Documentation/networking/ipv6.txt.
816 809  
... ... @@ -2939,9 +2932,6 @@
2939 2932 rhash_entries= [KNL,NET]
2940 2933 Set number of hash buckets for route cache
2941 2934  
2942   - riscom8= [HW,SERIAL]
2943   - Format: <io_board1>[,<io_board2>[,...<io_boardN>]]
2944   -
2945 2935 ro [KNL] Mount root device read-only on boot
2946 2936  
2947 2937 root= [KNL] Root filesystem
... ... @@ -3082,9 +3072,6 @@
3082 3072  
3083 3073 sonypi.*= [HW] Sony Programmable I/O Control Device driver
3084 3074 See Documentation/laptops/sonypi.txt
3085   -
3086   - specialix= [HW,SERIAL] Specialix multi-serial port adapter
3087   - See Documentation/serial/specialix.txt.
3088 3075  
3089 3076 spia_io_base= [HW,MTD]
3090 3077 spia_fio_base=
Documentation/magic-number.txt
... ... @@ -63,8 +63,6 @@
63 63 PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h
64 64 CMAGIC 0x0111 user include/linux/a.out.h
65 65 MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h
66   -RISCOM8_MAGIC 0x0907 riscom_port drivers/char/riscom8.h
67   -SPECIALIX_MAGIC 0x0907 specialix_port drivers/char/specialix_io8.h
68 66 HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c
69 67 APM_BIOS_MAGIC 0x4101 apm_user arch/x86/kernel/apm_32.c
70 68 CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h
... ... @@ -82,7 +80,6 @@
82 80 X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h
83 81 SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h
84 82 AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h
85   -ESP_MAGIC 0x53ee esp_struct drivers/char/esp.h
86 83 TTY_MAGIC 0x5401 tty_struct include/linux/tty.h
87 84 MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c
88 85 TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h
89 86  
... ... @@ -94,13 +91,10 @@
94 91 RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
95 92 USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
96 93 CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
97   -A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
98 94 RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
99 95 LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
100 96 GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
101 97 RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c
102   -RIO_MAGIC 0x12345678 gs_port drivers/char/rio/rio_linux.c
103   -SX_MAGIC 0x12345678 gs_port drivers/char/sx.h
104 98 NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h
105 99 RED_MAGIC2 0x170fc2a5 (any) mm/slab.c
106 100 BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c
... ... @@ -116,7 +110,6 @@
116 110 CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c
117 111 ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h
118 112 SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c
119   -STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h
120 113 CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c
121 114 SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
122 115 COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
123 116  
... ... @@ -127,10 +120,8 @@
127 120 SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128 121 GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
129 122 RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
130   -STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h
131 123 EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c
132 124 HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h
133   -EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h
134 125 PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h
135 126 KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h
136 127 I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c
137 128  
138 129  
... ... @@ -142,17 +133,14 @@
142 133 LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h
143 134 OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h
144 135 M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c
145   -STL_PANELMAGIC 0x7ef621a1 stlpanel include/linux/stallion.h
146 136 VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c
147 137 KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c
148 138 PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h
149 139 NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
150   -STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h
151 140 ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
152 141 SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
153 142 CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h
154 143 DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
155   -STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h
156 144 YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
157 145 CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c
158 146 QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c
Documentation/serial/00-INDEX
... ... @@ -2,24 +2,16 @@
2 2 - this file.
3 3 README.cycladesZ
4 4 - info on Cyclades-Z firmware loading.
5   -digiepca.txt
6   - - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
7 5 driver
8 6 - intro to the low level serial driver.
9 7 moxa-smartio
10 8 - file with info on installing/using Moxa multiport serial driver.
11 9 n_gsm.txt
12 10 - GSM 0710 tty multiplexer howto.
13   -riscom8.txt
14   - - notes on using the RISCom/8 multi-port serial driver.
15 11 rocket.txt
16 12 - info on the Comtrol RocketPort multiport serial driver.
17 13 serial-rs485.txt
18 14 - info about RS485 structures and support in the kernel.
19   -specialix.txt
20   - - info on hardware/driver for specialix IO8+ multiport serial card.
21   -sx.txt
22   - - info on the Specialix SX/SI multiport serial driver.
23 15 tty.txt
24 16 - guide to the locking policies of the tty layer.
Documentation/serial/digiepca.txt
1   -NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at
2   -http://www.digi.com for PCI cards. They no longer maintain this driver,
3   -and have no 2.6 driver for ISA cards.
4   -
5   -This driver requires a number of user-space tools. They can be acquired from
6   -http://www.digi.com, but only works with 2.4 kernels.
7   -
8   -
9   -The Digi Intl. epca driver.
10   -----------------------------
11   -The Digi Intl. epca driver for Linux supports the following boards:
12   -
13   -Digi PC/Xem, PC/Xr, PC/Xe, PC/Xi, PC/Xeve
14   -Digi EISA/Xem, PCI/Xem, PCI/Xr
15   -
16   -Limitations:
17   -------------
18   -Currently the driver only autoprobes for supported PCI boards.
19   -
20   -The Linux MAKEDEV command does not support generating the Digiboard
21   -Devices. Users executing digiConfig to setup EISA and PC series cards
22   -will have their device nodes automatically constructed (cud?? for ~CLOCAL,
23   -and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO
24   -prompt, or those users booting PCI cards may use buildDIGI to construct
25   -the necessary nodes.
26   -
27   -Notes:
28   -------
29   -This driver may be configured via LILO. For users who have already configured
30   -their driver using digiConfig, configuring from LILO will override previous
31   -settings. Multiple boards may be configured by issuing multiple LILO command
32   -lines. For examples see the bottom of this document.
33   -
34   -Device names start at 0 and continue up. Beware of this as previous Digi
35   -drivers started device names with 1.
36   -
37   -PCI boards are auto-detected and configured by the driver. PCI boards will
38   -be allocated device numbers (internally) beginning with the lowest PCI slot
39   -first. In other words a PCI card in slot 3 will always have higher device
40   -nodes than a PCI card in slot 1.
41   -
42   -LILO config examples:
43   ----------------------
44   -Using LILO's APPEND command, a string of comma separated identifiers or
45   -integers can be used to configure supported boards. The six values in order
46   -are:
47   -
48   - Enable/Disable this card or Override,
49   - Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2),
50   - EISA/Xem (3), PC/64Xe (4), PC/Xi (5),
51   - Enable/Disable alternate pin arrangement,
52   - Number of ports on this card,
53   - I/O Port where card is configured (in HEX if using string identifiers),
54   - Base of memory window (in HEX if using string identifiers),
55   -
56   -NOTE : PCI boards are auto-detected and configured. Do not attempt to
57   -configure PCI boards with the LILO append command. If you wish to override
58   -previous configuration data (As set by digiConfig), but you do not wish to
59   -configure any specific card (Example if there are PCI cards in the system)
60   -the following override command will accomplish this:
61   --> append="digi=2"
62   -
63   -Samples:
64   - append="digiepca=E,PC/Xe,D,16,200,D0000"
65   - or
66   - append="digi=1,0,0,16,512,851968"
67   -
68   -Supporting Tools:
69   ------------------
70   -Supporting tools include digiDload, digiConfig, buildPCI, and ditty. See
71   -drivers/char/README.epca for more details. Note,
72   -this driver REQUIRES that digiDload be executed prior to it being used.
73   -Failure to do this will result in an ENODEV error.
74   -
75   -Documentation:
76   ---------------
77   -Complete documentation for this product may be found in the tool package.
78   -
79   -Sources of information and support:
80   ------------------------------------
81   -Digi Intl. support site for this product:
82   -
83   --> http://www.digi.com
84   -
85   -Acknowledgments:
86   -----------------
87   -Much of this work (And even text) was derived from a similar document
88   -supporting the original public domain DigiBoard driver Copyright (C)
89   -1994,1995 Troy De Jongh. Many thanks to Christoph Lameter
90   -(christoph@lameter.com) and Mike McLagan (mike.mclagan@linux.org) who authored
91   -and contributed to the original document.
92   -
93   -Changelog:
94   -----------
95   -10-29-04: Update status of driver, remove dead links in document
96   - James Nelson <james4765@gmail.com>
97   -
98   -2000 (?) Original Document
Documentation/serial/riscom8.txt
1   -* NOTE - this is an unmaintained driver. The original author cannot be located.
2   -
3   -SDL Communications is now SBS Technologies, and does not have any
4   -information on these ancient ISA cards on their website.
5   -
6   -James Nelson <james4765@gmail.com> - 12-12-2004
7   -
8   - This is the README for RISCom/8 multi-port serial driver
9   - (C) 1994-1996 D.Gorodchanin
10   - See file LICENSE for terms and conditions.
11   -
12   -NOTE: English is not my native language.
13   - I'm sorry for any mistakes in this text.
14   -
15   -Misc. notes for RISCom/8 serial driver, in no particular order :)
16   -
17   -1) This driver can support up to 4 boards at time.
18   - Use string "riscom8=0xXXX,0xXXX,0xXXX,0xXXX" at LILO prompt, for
19   - setting I/O base addresses for boards. If you compile driver
20   - as module use modprobe options "iobase=0xXXX iobase1=0xXXX iobase2=..."
21   -
22   -2) The driver partially supports famous 'setserial' program, you can use almost
23   - any of its options, excluding port & irq settings.
24   -
25   -3) There are some misc. defines at the beginning of riscom8.c, please read the
26   - comments and try to change some of them in case of problems.
27   -
28   -4) I consider the current state of the driver as BETA.
29   -
30   -5) SDL Communications WWW page is http://www.sdlcomm.com.
31   -
32   -6) You can use the MAKEDEV program to create RISCom/8 /dev/ttyL* entries.
33   -
34   -7) Minor numbers for first board are 0-7, for second 8-15, etc.
35   -
36   -22 Apr 1996.
Documentation/serial/specialix.txt
1   -
2   - specialix.txt -- specialix IO8+ multiport serial driver readme.
3   -
4   -
5   -
6   - Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl)
7   -
8   - Specialix pays for the development and support of this driver.
9   - Please DO contact io8-linux@specialix.co.uk if you require
10   - support.
11   -
12   - This driver was developed in the BitWizard linux device
13   - driver service. If you require a linux device driver for your
14   - product, please contact devices@BitWizard.nl for a quote.
15   -
16   - This code is firmly based on the riscom/8 serial driver,
17   - written by Dmitry Gorodchanin. The specialix IO8+ card
18   - programming information was obtained from the CL-CD1865 Data
19   - Book, and Specialix document number 6200059: IO8+ Hardware
20   - Functional Specification, augmented by document number 6200088:
21   - Merak Hardware Functional Specification. (IO8+/PCI is also
22   - called Merak)
23   -
24   -
25   - This program is free software; you can redistribute it and/or
26   - modify it under the terms of the GNU General Public License as
27   - published by the Free Software Foundation; either version 2 of
28   - the License, or (at your option) any later version.
29   -
30   - This program is distributed in the hope that it will be
31   - useful, but WITHOUT ANY WARRANTY; without even the implied
32   - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
33   - PURPOSE. See the GNU General Public License for more details.
34   -
35   - You should have received a copy of the GNU General Public
36   - License along with this program; if not, write to the Free
37   - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
38   - USA.
39   -
40   -
41   -Intro
42   -=====
43   -
44   -
45   -This file contains some random information, that I like to have online
46   -instead of in a manual that can get lost. Ever misplace your Linux
47   -kernel sources? And the manual of one of the boards in your computer?
48   -
49   -
50   -Addresses and interrupts
51   -========================
52   -
53   -Address dip switch settings:
54   -The dip switch sets bits 2-9 of the IO address.
55   -
56   - 9 8 7 6 5 4 3 2
57   - +-----------------+
58   - 0 | X X X X X X X |
59   - | | = IoBase = 0x100
60   - 1 | X |
61   - +-----------------+ ------ RS232 connectors ---->
62   -
63   - | | |
64   - edge connector
65   - | | |
66   - V V V
67   -
68   -Base address 0x100 caused a conflict in one of my computers once. I
69   -haven't the foggiest why. My Specialix card is now at 0x180. My
70   -other computer runs just fine with the Specialix card at 0x100....
71   -The card occupies 4 addresses, but actually only two are really used.
72   -
73   -The PCI version doesn't have any dip switches. The BIOS assigns
74   -an IO address.
75   -
76   -The driver now still autoprobes at 0x100, 0x180, 0x250 and 0x260. If
77   -that causes trouble for you, please report that. I'll remove
78   -autoprobing then.
79   -
80   -The driver will tell the card what IRQ to use, so you don't have to
81   -change any jumpers to change the IRQ. Just use a command line
82   -argument (irq=xx) to the insmod program to set the interrupt.
83   -
84   -The BIOS assigns the IRQ on the PCI version. You have no say in what
85   -IRQ to use in that case.
86   -
87   -If your specialix cards are not at the default locations, you can use
88   -the kernel command line argument "specialix=io0,irq0,io1,irq1...".
89   -Here "io0" is the io address for the first card, and "irq0" is the
90   -irq line that the first card should use. And so on.
91   -
92   -Examples.
93   -
94   -You use the driver as a module and have three cards at 0x100, 0x250
95   -and 0x180. And some way or another you want them detected in that
96   -order. Moreover irq 12 is taken (e.g. by your PS/2 mouse).
97   -
98   - insmod specialix.o iobase=0x100,0x250,0x180 irq=9,11,15
99   -
100   -The same three cards, but now in the kernel would require you to
101   -add
102   -
103   - specialix=0x100,9,0x250,11,0x180,15
104   -
105   -to the command line. This would become
106   -
107   - append="specialix=0x100,9,0x250,11,0x180,15"
108   -
109   -in your /etc/lilo.conf file if you use lilo.
110   -
111   -The Specialix driver is slightly odd: It allows you to have the second
112   -or third card detected without having a first card. This has
113   -advantages and disadvantages. A slot that isn't filled by an ISA card,
114   -might be filled if a PCI card is detected. Thus if you have an ISA
115   -card at 0x250 and a PCI card, you would get:
116   -
117   -sx0: specialix IO8+ Board at 0x100 not found.
118   -sx1: specialix IO8+ Board at 0x180 not found.
119   -sx2: specialix IO8+ board detected at 0x250, IRQ 12, CD1865 Rev. B.
120   -sx3: specialix IO8+ Board at 0x260 not found.
121   -sx0: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B.
122   -
123   -This would happen if you don't give any probe hints to the driver.
124   -If you would specify:
125   -
126   - specialix=0x250,11
127   -
128   -you'd get the following messages:
129   -
130   -sx0: specialix IO8+ board detected at 0x250, IRQ 11, CD1865 Rev. B.
131   -sx1: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B.
132   -
133   -ISA probing is aborted after the IO address you gave is exhausted, and
134   -the PCI card is now detected as the second card. The ISA card is now
135   -also forced to IRQ11....
136   -
137   -
138   -Baud rates
139   -==========
140   -
141   -The rev 1.2 and below boards use a CL-CD1864. These chips can only
142   -do 64kbit. The rev 1.3 and newer boards use a CL-CD1865. These chips
143   -are officially capable of 115k2.
144   -
145   -The Specialix card uses a 25MHz crystal (in times two mode, which in
146   -fact is a divided by two mode). This is not enough to reach the rated
147   -115k2 on all ports at the same time. With this clock rate you can only
148   -do 37% of this rate. This means that at 115k2 on all ports you are
149   -going to lose characters (The chip cannot handle that many incoming
150   -bits at this clock rate.) (Yes, you read that correctly: there is a
151   -limit to the number of -=bits=- per second that the chip can handle.)
152   -
153   -If you near the "limit" you will first start to see a graceful
154   -degradation in that the chip cannot keep the transmitter busy at all
155   -times. However with a central clock this slow, you can also get it to
156   -miss incoming characters. The driver will print a warning message when
157   -you are outside the official specs. The messages usually show up in
158   -the file /var/log/messages .
159   -
160   -The specialix card cannot reliably do 115k2. If you use it, you have
161   -to do "extensive testing" (*) to verify if it actually works.
162   -
163   -When "mgetty" communicates with my modem at 115k2 it reports:
164   -got: +++[0d]ATQ0V1H0[0d][0d][8a]O[cb][0d][8a]
165   - ^^^^ ^^^^ ^^^^
166   -
167   -The three characters that have the "^^^" under them have suffered a
168   -bit error in the highest bit. In conclusion: I've tested it, and found
169   -that it simply DOESN'T work for me. I also suspect that this is also
170   -caused by the baud rate being just a little bit out of tune.
171   -
172   -I upgraded the crystal to 66Mhz on one of my Specialix cards. Works
173   -great! Contact me for details. (Voids warranty, requires a steady hand
174   -and more such restrictions....)
175   -
176   -
177   -(*) Cirrus logic CD1864 databook, page 40.
178   -
179   -
180   -Cables for the Specialix IO8+
181   -=============================
182   -
183   -The pinout of the connectors on the IO8+ is:
184   -
185   - pin short direction long name
186   - name
187   - Pin 1 DCD input Data Carrier Detect
188   - Pin 2 RXD input Receive
189   - Pin 3 DTR/RTS output Data Terminal Ready/Ready To Send
190   - Pin 4 GND - Ground
191   - Pin 5 TXD output Transmit
192   - Pin 6 CTS input Clear To Send
193   -
194   -
195   - -- 6 5 4 3 2 1 --
196   - | |
197   - | |
198   - | |
199   - | |
200   - +----- -----+
201   - |__________|
202   - clip
203   -
204   - Front view of an RJ12 connector. Cable moves "into" the paper.
205   - (the plug is ready to plug into your mouth this way...)
206   -
207   -
208   - NULL cable. I don't know who is going to use these except for
209   - testing purposes, but I tested the cards with this cable. (It
210   - took quite a while to figure out, so I'm not going to delete
211   - it. So there! :-)
212   -
213   -
214   - This end goes This end needs
215   - straight into the some twists in
216   - RJ12 plug. the wiring.
217   - IO8+ RJ12 IO8+ RJ12
218   - 1 DCD white -
219   - - - 1 DCD
220   - 2 RXD black 5 TXD
221   - 3 DTR/RTS red 6 CTS
222   - 4 GND green 4 GND
223   - 5 TXD yellow 2 RXD
224   - 6 CTS blue 3 DTR/RTS
225   -
226   -
227   - Same NULL cable, but now sorted on the second column.
228   -
229   - 1 DCD white -
230   - - - 1 DCD
231   - 5 TXD yellow 2 RXD
232   - 6 CTS blue 3 DTR/RTS
233   - 4 GND green 4 GND
234   - 2 RXD black 5 TXD
235   - 3 DTR/RTS red 6 CTS
236   -
237   -
238   -
239   - This is a modem cable usable for hardware handshaking:
240   - RJ12 DB25 DB9
241   - 1 DCD white 8 DCD 1 DCD
242   - 2 RXD black 3 RXD 2 RXD
243   - 3 DTR/RTS red 4 RTS 7 RTS
244   - 4 GND green 7 GND 5 GND
245   - 5 TXD yellow 2 TXD 3 TXD
246   - 6 CTS blue 5 CTS 8 CTS
247   - +---- 6 DSR 6 DSR
248   - +---- 20 DTR 4 DTR
249   -
250   - This is a modem cable usable for software handshaking:
251   - It allows you to reset the modem using the DTR ioctls.
252   - I (REW) have never tested this, "but xxxxxxxxxxxxx
253   - says that it works." If you test this, please
254   - tell me and I'll fill in your name on the xxx's.
255   -
256   - RJ12 DB25 DB9
257   - 1 DCD white 8 DCD 1 DCD
258   - 2 RXD black 3 RXD 2 RXD
259   - 3 DTR/RTS red 20 DTR 4 DTR
260   - 4 GND green 7 GND 5 GND
261   - 5 TXD yellow 2 TXD 3 TXD
262   - 6 CTS blue 5 CTS 8 CTS
263   - +---- 6 DSR 6 DSR
264   - +---- 4 RTS 7 RTS
265   -
266   - I bought a 6 wire flat cable. It was colored as indicated.
267   - Check that yours is the same before you trust me on this.
268   -
269   -
270   -Hardware handshaking issues.
271   -============================
272   -
273   -The driver can be told to operate in two different ways. The default
274   -behaviour is specialix.sx_rtscts = 0 where the pin behaves as DTR when
275   -hardware handshaking is off. It behaves as the RTS hardware
276   -handshaking signal when hardware handshaking is selected.
277   -
278   -When you use this, you have to use the appropriate cable. The
279   -cable will either be compatible with hardware handshaking or with
280   -software handshaking. So switching on the fly is not really an
281   -option.
282   -
283   -I actually prefer to use the "specialix.sx_rtscts=1" option.
284   -This makes the DTR/RTS pin always an RTS pin, and ioctls to
285   -change DTR are always ignored. I have a cable that is configured
286   -for this.
287   -
288   -
289   -Ports and devices
290   -=================
291   -
292   -Port 0 is the one furthest from the card-edge connector.
293   -
294   -Devices:
295   -
296   -You should make the devices as follows:
297   -
298   -bash
299   -cd /dev
300   -for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \
301   - 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
302   -do
303   - echo -n "$i "
304   - mknod /dev/ttyW$i c 75 $i
305   - mknod /dev/cuw$i c 76 $i
306   -done
307   -echo ""
308   -
309   -If your system doesn't come with these devices preinstalled, bug your
310   -linux-vendor about this. They have had ample time to get this
311   -implemented by now.
312   -
313   -You cannot have more than 4 boards in one computer. The card only
314   -supports 4 different interrupts. If you really want this, contact me
315   -about this and I'll give you a few tips (requires soldering iron)....
316   -
317   -If you have enough PCI slots, you can probably use more than 4 PCI
318   -versions of the card though....
319   -
320   -The PCI version of the card cannot adhere to the mechanical part of
321   -the PCI spec because the 8 serial connectors are simply too large. If
322   -it doesn't fit in your computer, bring back the card.
323   -
324   -
325   -------------------------------------------------------------------------
326   -
327   -
328   - Fixed bugs and restrictions:
329   - - During initialization, interrupts are blindly turned on.
330   - Having a shadow variable would cause an extra memory
331   - access on every IO instruction.
332   - - The interrupt (on the card) should be disabled when we
333   - don't allocate the Linux end of the interrupt. This allows
334   - a different driver/card to use it while all ports are not in
335   - use..... (a la standard serial port)
336   - == An extra _off variant of the sx_in and sx_out macros are
337   - now available. They don't set the interrupt enable bit.
338   - These are used during initialization. Normal operation uses
339   - the old variant which enables the interrupt line.
340   - - RTS/DTR issue needs to be implemented according to
341   - specialix' spec.
342   - I kind of like the "determinism" of the current
343   - implementation. Compile time flag?
344   - == Ok. Compile time flag! Default is how Specialix likes it.
345   - == Now a config time flag! Gets saved in your config file. Neat!
346   - - Can you set the IO address from the lilo command line?
347   - If you need this, bug me about it, I'll make it.
348   - == Hah! No bugging needed. Fixed! :-)
349   - - Cirrus logic hasn't gotten back to me yet why the CD1865 can
350   - and the CD1864 can't do 115k2. I suspect that this is
351   - because the CD1864 is not rated for 33MHz operation.
352   - Therefore the CD1864 versions of the card can't do 115k2 on
353   - all ports just like the CD1865 versions. The driver does
354   - not block 115k2 on CD1864 cards.
355   - == I called the Cirrus Logic representative here in Holland.
356   - The CD1864 databook is identical to the CD1865 databook,
357   - except for an extra warning at the end. Similar Bit errors
358   - have been observed in testing at 115k2 on both an 1865 and
359   - a 1864 chip. I see no reason why I would prohibit 115k2 on
360   - 1864 chips and not do it on 1865 chips. Actually there is
361   - reason to prohibit it on BOTH chips. I print a warning.
362   - If you use 115k2, you're on your own.
363   - - A spiky CD may send spurious HUPs. Also in CLOCAL???
364   - -- A fix for this turned out to be counter productive.
365   - Different fix? Current behaviour is acceptable?
366   - -- Maybe the current implementation is correct. If anybody
367   - gets bitten by this, please report, and it will get fixed.
368   -
369   - -- Testing revealed that when in CLOCAL, the problem doesn't
370   - occur. As warned for in the CD1865 manual, the chip may
371   - send modem intr's on a spike. We could filter those out,
372   - but that would be a cludge anyway (You'd still risk getting
373   - a spurious HUP when two spikes occur.).....
374   -
375   -
376   -
377   - Bugs & restrictions:
378   - - This is a difficult card to autoprobe.
379   - You have to WRITE to the address register to even
380   - read-probe a CD186x register. Disable autodetection?
381   - -- Specialix: any suggestions?
Documentation/serial/sx.txt
1   -
2   - sx.txt -- specialix SX/SI multiport serial driver readme.
3   -
4   -
5   -
6   - Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl)
7   -
8   - Specialix pays for the development and support of this driver.
9   - Please DO contact support@specialix.co.uk if you require
10   - support.
11   -
12   - This driver was developed in the BitWizard linux device
13   - driver service. If you require a linux device driver for your
14   - product, please contact devices@BitWizard.nl for a quote.
15   -
16   - (History)
17   - There used to be an SI driver by Simon Allan. This is a complete
18   - rewrite from scratch. Just a few lines-of-code have been snatched.
19   -
20   - (Sources)
21   - Specialix document number 6210028: SX Host Card and Download Code
22   - Software Functional Specification.
23   -
24   - (Copying)
25   - This program is free software; you can redistribute it and/or
26   - modify it under the terms of the GNU General Public License as
27   - published by the Free Software Foundation; either version 2 of
28   - the License, or (at your option) any later version.
29   -
30   - This program is distributed in the hope that it will be
31   - useful, but WITHOUT ANY WARRANTY; without even the implied
32   - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
33   - PURPOSE. See the GNU General Public License for more details.
34   -
35   - You should have received a copy of the GNU General Public
36   - License along with this program; if not, write to the Free
37   - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
38   - USA.
39   -
40   - (Addendum)
41   - I'd appreciate it that if you have fixes, that you send them
42   - to me first.
43   -
44   -
45   -Introduction
46   -============
47   -
48   -This file contains some random information, that I like to have online
49   -instead of in a manual that can get lost. Ever misplace your Linux
50   -kernel sources? And the manual of one of the boards in your computer?
51   -
52   -
53   -Theory of operation
54   -===================
55   -
56   -An important thing to know is that the driver itself doesn't have the
57   -firmware for the card. This means that you need the separate package
58   -"sx_firmware". For now you can get the source at
59   -
60   - ftp://ftp.bitwizard.nl/specialix/sx_firmware_<version>.tgz
61   -
62   -The firmware load needs a "misc" device, so you'll need to enable the
63   -"Support for user misc device modules" in your kernel configuration.
64   -The misc device needs to be called "/dev/specialix_sxctl". It needs
65   -misc major 10, and minor number 167 (assigned by HPA). The section
66   -on creating device files below also creates this device.
67   -
68   -After loading the sx.o module into your kernel, the driver will report
69   -the number of cards detected, but because it doesn't have any
70   -firmware, it will not be able to determine the number of ports. Only
71   -when you then run "sx_firmware" will the firmware be downloaded and
72   -the rest of the driver initialized. At that time the sx_firmware
73   -program will report the number of ports installed.
74   -
75   -In contrast with many other multi port serial cards, some of the data
76   -structures are only allocated when the card knows the number of ports
77   -that are connected. This means we won't waste memory for 120 port
78   -descriptor structures when you only have 8 ports. If you experience
79   -problems due to this, please report them: I haven't seen any.
80   -
81   -
82   -Interrupts
83   -==========
84   -
85   -A multi port serial card, would generate a horrendous amount of
86   -interrupts if it would interrupt the CPU for every received
87   -character. Even more than 10 years ago, the trick not to use
88   -interrupts but to poll the serial cards was invented.
89   -
90   -The SX card allow us to do this two ways. First the card limits its
91   -own interrupt rate to a rate that won't overwhelm the CPU. Secondly,
92   -we could forget about the cards interrupt completely and use the
93   -internal timer for this purpose.
94   -
95   -Polling the card can take up to a few percent of your CPU. Using the
96   -interrupts would be better if you have most of the ports idle. Using
97   -timer-based polling is better if your card almost always has work to
98   -do. You save the separate interrupt in that case.
99   -
100   -In any case, it doesn't really matter all that much.
101   -
102   -The most common problem with interrupts is that for ISA cards in a PCI
103   -system the BIOS has to be told to configure that interrupt as "legacy
104   -ISA". Otherwise the card can pull on the interrupt line all it wants
105   -but the CPU won't see this.
106   -
107   -If you can't get the interrupt to work, remember that polling mode is
108   -more efficient (provided you actually use the card intensively).
109   -
110   -
111   -Allowed Configurations
112   -======================
113   -
114   -Some configurations are disallowed. Even though at a glance they might
115   -seem to work, they are known to lockup the bus between the host card
116   -and the device concentrators. You should respect the drivers decision
117   -not to support certain configurations. It's there for a reason.
118   -
119   -Warning: Seriously technical stuff ahead. Executive summary: Don't use
120   -SX cards except configured at a 64k boundary. Skip the next paragraph.
121   -
122   -The SX cards can theoretically be placed at a 32k boundary. So for
123   -instance you can put an SX card at 0xc8000-0xd7fff. This is not a
124   -"recommended configuration". ISA cards have to tell the bus controller
125   -how they like their timing. Due to timing issues they have to do this
126   -based on which 64k window the address falls into. This means that the
127   -32k window below and above the SX card have to use exactly the same
128   -timing as the SX card. That reportedly works for other SX cards. But
129   -you're still left with two useless 32k windows that should not be used
130   -by anybody else.
131   -
132   -
133   -Configuring the driver
134   -======================
135   -
136   -PCI cards are always detected. The driver auto-probes for ISA cards at
137   -some sensible addresses. Please report if the auto-probe causes trouble
138   -in your system, or when a card isn't detected.
139   -
140   -I'm afraid I haven't implemented "kernel command line parameters" yet.
141   -This means that if the default doesn't work for you, you shouldn't use
142   -the compiled-into-the-kernel version of the driver. Use a module
143   -instead. If you convince me that you need this, I'll make it for
144   -you. Deal?
145   -
146   -I'm afraid that the module parameters are a bit clumsy. If you have a
147   -better idea, please tell me.
148   -
149   -You can specify several parameters:
150   -
151   - sx_poll: number of jiffies between timer-based polls.
152   -
153   - Set this to "0" to disable timer based polls.
154   - Initialization of cards without a working interrupt
155   - will fail.
156   -
157   - Set this to "1" if you want a polling driver.
158   - (on Intel: 100 polls per second). If you don't use
159   - fast baud rates, you might consider a value like "5".
160   - (If you don't know how to do the math, use 1).
161   -
162   - sx_slowpoll: Number of jiffies between timer-based polls.
163   - Set this to "100" to poll once a second.
164   - This should get the card out of a stall if the driver
165   - ever misses an interrupt. I've never seen this happen,
166   - and if it does, that's a bug. Tell me.
167   -
168   - sx_maxints: Number of interrupts to request from the card.
169   - The card normally limits interrupts to about 100 per
170   - second to offload the host CPU. You can increase this
171   - number to reduce latency on the card a little.
172   - Note that if you give a very high number you can overload
173   - your CPU as well as the CPU on the host card. This setting
174   - is inaccurate and not recommended for SI cards (But it
175   - works).
176   -
177   - sx_irqmask: The mask of allowable IRQs to use. I suggest you set
178   - this to 0 (disable IRQs all together) and use polling if
179   - the assignment of IRQs becomes problematic. This is defined
180   - as the sum of (1 << irq) 's that you want to allow. So
181   - sx_irqmask of 8 (1 << 3) specifies that only irq 3 may
182   - be used by the SX driver. If you want to specify to the
183   - driver: "Either irq 11 or 12 is ok for you to use", then
184   - specify (1 << 11) | (1 << 12) = 0x1800 .
185   -
186   - sx_debug: You can enable different sorts of debug traces with this.
187   - At "-1" all debugging traces are active. You'll get several
188   - times more debugging output than you'll get characters
189   - transmitted.
190   -
191   -
192   -Baud rates
193   -==========
194   -
195   -Theoretically new SXDCs should be capable of more than 460k
196   -baud. However the line drivers usually give up before that. Also the
197   -CPU on the card may not be able to handle 8 channels going at full
198   -blast at that speed. Moreover, the buffers are not large enough to
199   -allow operation with 100 interrupts per second. You'll have to realize
200   -that the card has a 256 byte buffer, so you'll have to increase the
201   -number of interrupts per second if you have more than 256*100 bytes
202   -per second to transmit. If you do any performance testing in this
203   -area, I'd be glad to hear from you...
204   -
205   -(Psst Linux users..... I think the Linux driver is more efficient than
206   -the driver for other OSes. If you can and want to benchmark them
207   -against each other, be my guest, and report your findings...... :-)
208   -
209   -
210   -Ports and devices
211   -=================
212   -
213   -Port 0 is the top connector on the module closest to the host
214   -card. Oh, the ports on the SXDCs and TAs are labelled from 1 to 8
215   -instead of from 0 to 7, as they are numbered by linux. I'm stubborn in
216   -this: I know for sure that I wouldn't be able to calculate which port
217   -is which anymore if I would change that....
218   -
219   -
220   -Devices:
221   -
222   -You should make the device files as follows:
223   -
224   -#!/bin/sh
225   -# (I recommend that you cut-and-paste this into a file and run that)
226   -cd /dev
227   -t=0
228   -mknod specialix_sxctl c 10 167
229   -while [ $t -lt 64 ]
230   - do
231   - echo -n "$t "
232   - mknod ttyX$t c 32 $t
233   - mknod cux$t c 33 $t
234   - t=`expr $t + 1`
235   -done
236   -echo ""
237   -rm /etc/psdevtab
238   -ps > /dev/null
239   -
240   -
241   -This creates 64 devices. If you have more, increase the constant on
242   -the line with "while". The devices start at 0, as is customary on
243   -Linux. Specialix seems to like starting the numbering at 1.
244   -
245   -If your system doesn't come with these devices pre-installed, bug your
246   -linux-vendor about this. They should have these devices
247   -"pre-installed" before the new millennium. The "ps" stuff at the end
248   -is to "tell" ps that the new devices exist.
249   -
250   -Officially the maximum number of cards per computer is 4. This driver
251   -however supports as many cards in one machine as you want. You'll run
252   -out of interrupts after a few, but you can switch to polled operation
253   -then. At about 256 ports (More than 8 cards), we run out of minor
254   -device numbers. Sorry. I suggest you buy a second computer.... (Or
255   -switch to RIO).
256   -
257   -------------------------------------------------------------------------
258   -
259   -
260   - Fixed bugs and restrictions:
261   - - Hangup processing.
262   - -- Done.
263   -
264   - - the write path in generic_serial (lockup / oops).
265   - -- Done (Ugly: not the way I want it. Copied from serial.c).
266   -
267   - - write buffer isn't flushed at close.
268   - -- Done. I still seem to lose a few chars at close.
269   - Sorry. I think that this is a firmware issue. (-> Specialix)
270   -
271   - - drain hardware before changing termios
272   - - Change debug on the fly.
273   - - ISA free irq -1. (no firmware loaded).
274   - - adding c8000 as a probe address. Added warning.
275   - - Add a RAMtest for the RAM on the card.c
276   - - Crash when opening a port "way" of the number of allowed ports.
277   - (for example opening port 60 when there are only 24 ports attached)
278   - - Sometimes the use-count strays a bit. After a few hours of
279   - testing the use count is sometimes "3". If you are not like
280   - me and can remember what you did to get it that way, I'd
281   - appreciate an Email. Possibly fixed. Tell me if anyone still
282   - sees this.
283   - - TAs don't work right if you don't connect all the modem control
284   - signals. SXDCs do. T225 firmware problem -> Specialix.
285   - (Mostly fixed now, I think. Tell me if you encounter this!)
286   -
287   - Bugs & restrictions:
288   -
289   - - Arbitrary baud rates. Requires firmware update. (-> Specialix)
290   -
291   - - Low latency (mostly firmware, -> Specialix)
Documentation/zh_CN/magic-number.txt
... ... @@ -63,8 +63,6 @@
63 63 PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h
64 64 CMAGIC 0x0111 user include/linux/a.out.h
65 65 MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h
66   -RISCOM8_MAGIC 0x0907 riscom_port drivers/char/riscom8.h
67   -SPECIALIX_MAGIC 0x0907 specialix_port drivers/char/specialix_io8.h
68 66 HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c
69 67 APM_BIOS_MAGIC 0x4101 apm_user arch/x86/kernel/apm_32.c
70 68 CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h
... ... @@ -82,7 +80,6 @@
82 80 X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h
83 81 SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h
84 82 AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h
85   -ESP_MAGIC 0x53ee esp_struct drivers/char/esp.h
86 83 TTY_MAGIC 0x5401 tty_struct include/linux/tty.h
87 84 MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c
88 85 TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h
89 86  
... ... @@ -94,13 +91,10 @@
94 91 RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
95 92 USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
96 93 CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
97   -A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
98 94 RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
99 95 LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
100 96 GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
101 97 RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c
102   -RIO_MAGIC 0x12345678 gs_port drivers/char/rio/rio_linux.c
103   -SX_MAGIC 0x12345678 gs_port drivers/char/sx.h
104 98 NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h
105 99 RED_MAGIC2 0x170fc2a5 (any) mm/slab.c
106 100 BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c
... ... @@ -116,7 +110,6 @@
116 110 CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c
117 111 ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h
118 112 SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c
119   -STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h
120 113 CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c
121 114 SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
122 115 COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
123 116  
... ... @@ -127,10 +120,8 @@
127 120 SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128 121 GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
129 122 RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
130   -STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h
131 123 EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c
132 124 HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h
133   -EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h
134 125 PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h
135 126 KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h
136 127 I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c
137 128  
138 129  
... ... @@ -142,17 +133,14 @@
142 133 LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h
143 134 OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h
144 135 M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c
145   -STL_PANELMAGIC 0x7ef621a1 stlpanel include/linux/stallion.h
146 136 VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c
147 137 KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c
148 138 PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h
149 139 NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
150   -STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h
151 140 ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
152 141 SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
153 142 CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h
154 143 DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
155   -STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h
156 144 YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
157 145 CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c
158 146 QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c
drivers/char/Kconfig
... ... @@ -40,7 +40,7 @@
40 40 source "drivers/tty/serial/Kconfig"
41 41  
42 42 config TTY_PRINTK
43   - bool "TTY driver to output user messages via printk"
  43 + tristate "TTY driver to output user messages via printk"
44 44 depends on EXPERT && TTY
45 45 default n
46 46 ---help---
drivers/char/pcmcia/Kconfig
... ... @@ -15,7 +15,7 @@
15 15  
16 16 This driver may be built as a module ( = code which can be
17 17 inserted in and removed from the running kernel whenever you want).
18   - The module will be called synclinkmp. If you want to do that, say M
  18 + The module will be called synclink_cs. If you want to do that, say M
19 19 here.
20 20  
21 21 config CARDMAN_4000
drivers/char/ttyprintk.c
... ... @@ -17,7 +17,7 @@
17 17 #include <linux/device.h>
18 18 #include <linux/serial.h>
19 19 #include <linux/tty.h>
20   -#include <linux/export.h>
  20 +#include <linux/module.h>
21 21  
22 22 struct ttyprintk_port {
23 23 struct tty_port port;
24 24  
25 25  
26 26  
... ... @@ -210,11 +210,20 @@
210 210 return 0;
211 211  
212 212 error:
213   - tty_unregister_driver(ttyprintk_driver);
214 213 put_tty_driver(ttyprintk_driver);
215 214 tty_port_destroy(&tpk_port.port);
216   - ttyprintk_driver = NULL;
217 215 return ret;
218 216 }
  217 +
  218 +static void __exit ttyprintk_exit(void)
  219 +{
  220 + tty_unregister_driver(ttyprintk_driver);
  221 + put_tty_driver(ttyprintk_driver);
  222 + tty_port_destroy(&tpk_port.port);
  223 +}
  224 +
219 225 device_initcall(ttyprintk_init);
  226 +module_exit(ttyprintk_exit);
  227 +
  228 +MODULE_LICENSE("GPL");
drivers/tty/serial/Kconfig
... ... @@ -1226,6 +1226,7 @@
1226 1226 config SERIAL_TIMBERDALE
1227 1227 tristate "Support for timberdale UART"
1228 1228 select SERIAL_CORE
  1229 + depends on X86_32 || COMPILE_TEST
1229 1230 ---help---
1230 1231 Add support for UART controller on timberdale.
1231 1232  
drivers/tty/serial/amba-pl011.c
... ... @@ -318,7 +318,7 @@
318 318 .src_addr = uap->port.mapbase + UART01x_DR,
319 319 .src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE,
320 320 .direction = DMA_DEV_TO_MEM,
321   - .src_maxburst = uap->fifosize >> 1,
  321 + .src_maxburst = uap->fifosize >> 2,
322 322 .device_fc = false,
323 323 };
324 324  
... ... @@ -2176,6 +2176,7 @@
2176 2176 static int pl011_remove(struct amba_device *dev)
2177 2177 {
2178 2178 struct uart_amba_port *uap = amba_get_drvdata(dev);
  2179 + bool busy = false;
2179 2180 int i;
2180 2181  
2181 2182 uart_remove_one_port(&amba_reg, &uap->port);
2182 2183  
... ... @@ -2183,9 +2184,12 @@
2183 2184 for (i = 0; i < ARRAY_SIZE(amba_ports); i++)
2184 2185 if (amba_ports[i] == uap)
2185 2186 amba_ports[i] = NULL;
  2187 + else if (amba_ports[i])
  2188 + busy = true;
2186 2189  
2187 2190 pl011_dma_remove(uap);
2188   - uart_unregister_driver(&amba_reg);
  2191 + if (!busy)
  2192 + uart_unregister_driver(&amba_reg);
2189 2193 return 0;
2190 2194 }
2191 2195  
drivers/tty/serial/clps711x.c
... ... @@ -368,16 +368,12 @@
368 368 static void uart_clps711x_console_putchar(struct uart_port *port, int ch)
369 369 {
370 370 struct clps711x_port *s = dev_get_drvdata(port->dev);
  371 + u32 sysflg = 0;
371 372  
372 373 /* Wait for FIFO is not full */
373   - while (1) {
374   - u32 sysflg = 0;
375   -
  374 + do {
376 375 regmap_read(s->syscon, SYSFLG_OFFSET, &sysflg);
377   - if (!(sysflg & SYSFLG_UTXFF))
378   - break;
379   - cond_resched();
380   - }
  376 + } while (sysflg & SYSFLG_UTXFF);
381 377  
382 378 writew(ch, port->membase + UARTDR_OFFSET);
383 379 }
384 380  
385 381  
... ... @@ -387,18 +383,14 @@
387 383 {
388 384 struct uart_port *port = clps711x_uart.state[co->index].uart_port;
389 385 struct clps711x_port *s = dev_get_drvdata(port->dev);
  386 + u32 sysflg = 0;
390 387  
391 388 uart_console_write(port, c, n, uart_clps711x_console_putchar);
392 389  
393 390 /* Wait for transmitter to become empty */
394   - while (1) {
395   - u32 sysflg = 0;
396   -
  391 + do {
397 392 regmap_read(s->syscon, SYSFLG_OFFSET, &sysflg);
398   - if (!(sysflg & SYSFLG_UBUSY))
399   - break;
400   - cond_resched();
401   - }
  393 + } while (sysflg & SYSFLG_UBUSY);
402 394 }
403 395  
404 396 static int uart_clps711x_console_setup(struct console *co, char *options)
drivers/tty/serial/efm32-uart.c
... ... @@ -798,6 +798,9 @@
798 798  
799 799 static const struct of_device_id efm32_uart_dt_ids[] = {
800 800 {
  801 + .compatible = "energymicro,efm32-uart",
  802 + }, {
  803 + /* doesn't follow the "vendor,device" scheme, don't use */
801 804 .compatible = "efm32,uart",
802 805 }, {
803 806 /* sentinel */
drivers/tty/serial/omap-serial.c
... ... @@ -225,14 +225,19 @@
225 225 if (enable)
226 226 enable_irq(up->wakeirq);
227 227 else
228   - disable_irq(up->wakeirq);
  228 + disable_irq_nosync(up->wakeirq);
229 229 }
230 230  
231 231 static void serial_omap_enable_wakeup(struct uart_omap_port *up, bool enable)
232 232 {
233 233 struct omap_uart_port_info *pdata = dev_get_platdata(up->dev);
234 234  
  235 + if (enable == up->wakeups_enabled)
  236 + return;
  237 +
235 238 serial_omap_enable_wakeirq(up, enable);
  239 + up->wakeups_enabled = enable;
  240 +
236 241 if (!pdata || !pdata->enable_wakeup)
237 242 return;
238 243  
... ... @@ -1495,6 +1500,11 @@
1495 1500 uart_suspend_port(&serial_omap_reg, &up->port);
1496 1501 flush_work(&up->qos_work);
1497 1502  
  1503 + if (device_may_wakeup(dev))
  1504 + serial_omap_enable_wakeup(up, true);
  1505 + else
  1506 + serial_omap_enable_wakeup(up, false);
  1507 +
1498 1508 return 0;
1499 1509 }
1500 1510  
... ... @@ -1502,6 +1512,9 @@
1502 1512 {
1503 1513 struct uart_omap_port *up = dev_get_drvdata(dev);
1504 1514  
  1515 + if (device_may_wakeup(dev))
  1516 + serial_omap_enable_wakeup(up, false);
  1517 +
1505 1518 uart_resume_port(&serial_omap_reg, &up->port);
1506 1519  
1507 1520 return 0;
... ... @@ -1789,6 +1802,7 @@
1789 1802 pm_runtime_disable(up->dev);
1790 1803 uart_remove_one_port(&serial_omap_reg, &up->port);
1791 1804 pm_qos_remove_request(&up->pm_qos_request);
  1805 + device_init_wakeup(&dev->dev, false);
1792 1806  
1793 1807 return 0;
1794 1808 }
... ... @@ -1877,17 +1891,7 @@
1877 1891  
1878 1892 up->context_loss_cnt = serial_omap_get_context_loss_count(up);
1879 1893  
1880   - if (device_may_wakeup(dev)) {
1881   - if (!up->wakeups_enabled) {
1882   - serial_omap_enable_wakeup(up, true);
1883   - up->wakeups_enabled = true;
1884   - }
1885   - } else {
1886   - if (up->wakeups_enabled) {
1887   - serial_omap_enable_wakeup(up, false);
1888   - up->wakeups_enabled = false;
1889   - }
1890   - }
  1894 + serial_omap_enable_wakeup(up, true);
1891 1895  
1892 1896 up->latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
1893 1897 schedule_work(&up->qos_work);
... ... @@ -1900,6 +1904,8 @@
1900 1904 struct uart_omap_port *up = dev_get_drvdata(dev);
1901 1905  
1902 1906 int loss_cnt = serial_omap_get_context_loss_count(up);
  1907 +
  1908 + serial_omap_enable_wakeup(up, false);
1903 1909  
1904 1910 if (loss_cnt < 0) {
1905 1911 dev_dbg(dev, "serial_omap_get_context_loss_count failed : %d\n",
drivers/tty/serial/serial_core.c
... ... @@ -89,8 +89,7 @@
89 89 struct uart_state *state = tty->driver_data;
90 90 struct uart_port *port = state->uart_port;
91 91  
92   - if (!uart_circ_empty(&state->xmit) && state->xmit.buf &&
93   - !tty->stopped && !tty->hw_stopped)
  92 + if (!tty->stopped && !tty->hw_stopped)
94 93 port->ops->start_tx(port);
95 94 }
96 95  
... ... @@ -1452,6 +1451,8 @@
1452 1451 clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
1453 1452 spin_unlock_irqrestore(&port->lock, flags);
1454 1453 tty_port_tty_set(port, NULL);
  1454 + if (!uart_console(state->uart_port))
  1455 + uart_change_pm(state, UART_PM_STATE_OFF);
1455 1456 wake_up_interruptible(&port->open_wait);
1456 1457 wake_up_interruptible(&port->delta_msr_wait);
1457 1458 }
drivers/tty/serial/st-asc.c
... ... @@ -295,7 +295,7 @@
295 295 status & ASC_STA_OE) {
296 296  
297 297 if (c & ASC_RXBUF_FE) {
298   - if (c == ASC_RXBUF_FE) {
  298 + if (c == (ASC_RXBUF_FE | ASC_RXBUF_DUMMY_RX)) {
299 299 port->icount.brk++;
300 300 if (uart_handle_break(port))
301 301 continue;
... ... @@ -325,7 +325,7 @@
325 325 flag = TTY_FRAME;
326 326 }
327 327  
328   - if (uart_handle_sysrq_char(port, c))
  328 + if (uart_handle_sysrq_char(port, c & 0xff))
329 329 continue;
330 330  
331 331 uart_insert_char(port, c, ASC_RXBUF_DUMMY_OE, c & 0xff, flag);
drivers/tty/tty_io.c
... ... @@ -878,9 +878,8 @@
878 878 spin_lock_irq(&current->sighand->siglock);
879 879 put_pid(current->signal->tty_old_pgrp);
880 880 current->signal->tty_old_pgrp = NULL;
881   - spin_unlock_irq(&current->sighand->siglock);
882 881  
883   - tty = get_current_tty();
  882 + tty = tty_kref_get(current->signal->tty);
884 883 if (tty) {
885 884 unsigned long flags;
886 885 spin_lock_irqsave(&tty->ctrl_lock, flags);
... ... @@ -897,6 +896,7 @@
897 896 #endif
898 897 }
899 898  
  899 + spin_unlock_irq(&current->sighand->siglock);
900 900 /* Now clear signal->tty under the lock */
901 901 read_lock(&tasklist_lock);
902 902 session_clear_tty(task_session(current));
... ... @@ -273,16 +273,6 @@
273 273  
274 274 --------------------------------------------------------------------------
275 275  
276   -Driver: ip2 -- Computone IntelliPort Plus serial device
277   -
278   -File: intelliport2.bin
279   -
280   -Licence: Unknown
281   -
282   -Found in hex form in kernel source.
283   -
284   ---------------------------------------------------------------------------
285   -
286 276 Driver: CPiA2 -- cameras based on Vision's CPiA2
287 277  
288 278 File: cpia2/stv0672_vp4.bin