[#3910] UART1 port has disorder line transmitted if the file is big
Submitted By: Mingquan Pan
Open Date
2008-02-18 22:50:14 Close Date
2008-02-28 01:50:56
Priority:
Medium Assignee:
Sonic Zhang
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
08r1-8
App binary format:
N/A
Summary: UART1 port has disorder line transmitted if the file is big
Details:
UART1 port has disorder line transmitted if the file is big than about 4K.
Like in the test case to transmit the /etc/boa.conf which is 5.8 k,the first two lines is disordered, and looks like it has some line behind to printed ahead.
test@linux:~/work/cruise/checkouts/uclinux-dist/testsuites/serial> ./serial_uart1_test.exp
Starting ./serial_uart1_test.exp
spawn /bin/sh
telnet 10.100.4.50
sh-3.00$ telnet 10.100.4.50
Trying 10.100.4.50...
Connected to 10.100.4.50.
Escape character is '^]'.
BusyBox v1.4.1 (2008-02-19 10:41:40 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> stty -F /dev/ttyBF1 ispeed 57600 ospeed 57600
root:/> cat /dev/ttyBF1
spawn /bin/sh
sh-3.00$ echo 123456789 > /dev/ttyS0
sh-3.00$
123456789
Case 1 ...PASS
cat /dev/ttyS0 > aaa
wait for receiving data...
root:/> cat /etc/boa.conf > /dev/ttyBF1
Still wait.
sh-3.00$ cat aaa
# The "Se: AddType type extension [extension ...]
# Uncomment the nexd
# into the server (see defines.h) or specified on the command line with
# the -c option, for example:
#
# boa -c /usr
# Port: The port Boa runs on. The default port for http servers is 80.
# If it is less than 1024, the server must be started as root.
Port 80
# User: The name or UID the server should run as.
# Group: The group name or GID the server should run as.
User root
Group root
# ServerAdmin: The email address where server problems should be sent.
# Note: this is not currently used.
#ServerAdmin root@localhost
# ErrorLog: The location of the error log file. If this does not start
# with /, it is considered relative to the server root.
# Set to /dev/null if you don't want errors logged.
#ErrorLog /var/log/boa/error_log
# AccessLog: The location of the access log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less effective) to disable
# Access logging.
#AccessLog /var/log/boa/access_log
# RefererLog: The location of the referer log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less effective) to disable
# referer logging.
#RefererLog /var/log/boa/referer_log
# AgentLog: The location of the agent log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less effective) to disable
# User-Agent logging.
#AgentLog /var/log/boa/agent_log
# VerboseCGILogs: this is just a logical switch.
# Comment out to disable.
#VerboseCGILogs
# ServerName: the name of this server that should be sent back to
# clients if different than that returned by gethostname -- often
# this is www.foo.bar.
ServerName www.LG-blackfin.com
# DocumentRoot: The root directory of the HTML documents.
DocumentRoot /home/httpd
# ChRoot: Boa root '/' directory. This is useful to improve security of
# your system. Don't forget that ALL DIRECTORIES used by boa except logs
# must be in this directory. If you need cgi scripts, you must copy shared
# libraries to this directory (see ldconfig(8) for more info)
#Chroot /var
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is recieved.
UserDir public_html
# DirectoryIndex: Name of the file to use as a pre-written HTML
# directory index. Please MAKE AND USE THESE FILES. On the
# fly creation of directory indexes can be _slow_.
#
DirectoryIndex index.html
#DirectoryMaker /usr/boa_indexer
# LocalCodepage: Local codepage. This is send to client in 'Content-Type:'
# header by default.
#LocalCodepage iso-8859-1
# Codepage: Load codepage conversion table from file. This table will be used
# on-the-fly conversion.
#Codepage us-ascii /usr/lib/boa/iso-8859-2/us-ascii
# CodepageByURL: Specify URL prefix codepage. This command is used for manual
# codepage selection. For example, www.cz.boa.org/asc/document.html
# converts /document.html to us-ascii
#CodepageByURL /asc us-ascii
# CodepageByBrowser: Specify codepage by $USER_AGENT. This command is used for
# automatic codepage selection. You can use characters '*' and '?' in browser
# string. For example, "CodepageByBrowser Lynx/* us-ascii" will send for Lynx
# users all documents in us-ascii.
#CodepageByBrowser Lynx/* us-ascii
# KeepAliveMax: Number of KeepAlive requests to allow per connection
# Comment out, or set to 0 to disable keepalive processing
KeepAliveMax 100
# KeepAliveTimeout: seconds to wait before keepalive connection times out
KeepAliveTimeout 20
# MimeTypes: This is the file that is used to generate mime type pairs
# and Content-Type fields for boa.
MimeTypes /etc/mime.types
# DefaultType: MIME type used if the file extension is unknown, or there
# is no file extension.
DefaultType text/html
# AddType: adds types without editing mime.types
d# Example: AddType type extension [extension ...]
# Uncomment the next line if you want .cgi files to execute from anywhere
#AddType application/x-httpd-cgi cgi
# Redirect, Alias, and ScriptAlias all have the same semantics -- they
# match the beginning of a request and take appropriate action. Use
# Redirect for other servers, Alias for the same server, and ScriptAlias
# to enable directories for script execution.
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example: Redirect /bar elsewhere/feh/bar
# Aliases: Aliases one path to another.
# Example: Alias /path1/bar /path2/foo
#Alias /doc /usr/doc
# ScriptAlias: Maps a virtual path to a directory for serving scripts
# Example: ScriptAlias /htbin/ /www/htbin/
ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
# VirtualHost: Maps a virtual host to a directory.
# Example: VirtualHost cz.boa.org /html/htdocs/boa/
#VirtualHost www.second.company.com /var/www/second_company/
# Auth: HTTP Basic authorization. Format is "Auth <Directory> <PasswdFile>".
# Password file should be readable _ONLY_ by root or trusted user(s). This file
# is opened before boa gives out privs.
# Example: Auth /secret /var/www/secret.passwd
#Auth /etc /etc/passwd
os2unix aaa
sh-3.00$ dos2unix aaa
dos2unix: converting file aaa to UNIX format ...
convert file.
sh-3.00$ finish dos2unix.
rcp root@10.100.4.50:/etc/boa.conf .
sh-3.00$ Copy file.
diff -u aaa boa.conf
--- aaa 2008-02-19 11:32:35.000000000 +0800
+++ boa.conf 2008-02-19 11:32:38.000000000 +0800
@@ -1,6 +1,4 @@
-# The "Se: AddType type extension [extension ...]
-
-# Uncomment the nexd
+# The "ServerRoot" is not in this configuration file. It can be compiled
# into the server (see defines.h) or specified on the command line with
# the -c option, for example:
#
sh-3.00$
Two files diffs. +++ boa.conf 2008-02-19 11:32:38.000000000 +0800
@@ -1,6 +1,4 @@
-# The "Se: AddType type extension [extension ...]
-
-# Uncomment the nexd
+# The "ServerRoot" is not in this configuration file. It can be compiled
# into the server (see defines.h) or specified on the command line with
# the -c option, for example:
#
sh-3.00$
Case 2 ...FAIL
Follow-ups
--- Sonic Zhang 2008-02-20 02:28:09
Fixed.
--- Mingquan Pan 2008-02-21 00:44:44
It still occours in kernel r4307.
Loading .text @ 0x00001000 (1011696 bytes)
Loading .rodata @ 0x000f8000 (228132 bytes)
Loading __ksymtab @ 0x0012fb24 (14320 bytes)
Loading __ksymtab_gpl @ 0x00133314 (4016 bytes)
Loading __ksymtab_strings @ 0x001342c4 (43892 bytes)
Loading __param @ 0x0013ee38 (300 bytes)
Loading .data @ 0x0013f000 (69632 bytes)
Loading .init.text @ 0x00150000 (93948 bytes)
Loading .init.data @ 0x00166efc (3308 bytes)
Loading .init.setup @ 0x00167be8 (596 bytes)
Loading .initcall.init @ 0x00167e3c (432 bytes)
Loading .con_initcall.init @ 0x00167fec (4 bytes)
Loading .init.ramfs @ 0x00167ff0 (4090478 bytes)
Loading .text_l1 @ 0xffa00000 (8248 bytes)
sh_addr: FFA00000, p_paddr: 0054EA5E
Loading from: 0254F000 to 0054EA5E, size: 8248
Loading .data_l1 @ 0xff800000 (192 bytes)
sh_addr: FF800000, p_paddr: 00550A96
Loading from: 02552000 to 00550A96, size: 192
Clearing .bss @ 0x00551000 (61232 bytes)
## Starting application at 0x00150000 ...
Linux version 2.6.22.18-ADI-2008R1-svn4307 (test@linux) (gcc version 4.1.2 (ADI
svn)) #64 Thu Feb 21 12:26:55 CST 2008
early printk enabled on early_BFuart0
Hardware Trace Active and Enabled
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Reset caused by Software reset
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00001000-0x000f7ff0
rodata = 0x000f8000-0x0013ef64
data = 0x0013f000-0x00150000
stack = 0x00140000-0x00142000
init = 0x00150000-0x00551000
bss = 0x00551000-0x0055ff30
available = 0x0055ff30-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 51260k/65536k RAM, (4100k init code, 987k kernel code, 412k
data, 1024k dma, 7756k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (39 KB free)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
Generic PHY: Registered new driver
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Dynamic Power Management Controller Driver v0.1: major=10, minor = 254
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
SMSC LAN83C185: Registered new driver
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1,
mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0,
regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 01:06:04 (3964)
Freeing unused kernel memory: 4100k freed
dma_alloc_init: dma_page @ 0x0054e000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.4.1 (2008-02-19 10:41:40 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> successful boot attempt
ifconfig eth0 10.100.4.50
root:/> PHY: 0:01 - Link is Up - 100/Full
ifconfig set success.
(Back at linux.analog.com)
----------------------------------------------------
(/home/test/checkouts/testsuites.2008R1/serial/) C-Kermit>q
Closing /dev/ttyS0...OK
######Please check that serial cable has been switched from uart0 to the
testing uart port /dev/ttyBF1 ! ####
spawn /bin/sh
telnet 10.100.4.50
sh-3.00$ telnet 10.100.4.50
Trying 10.100.4.50...
Connected to 10.100.4.50.
Escape character is '^]'.
BusyBox v1.4.1 (2008-02-19 10:41:40 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> stty -F /dev/ttyBF1 ispeed 57600 ospeed 57600
root:/> cat /dev/ttyBF1
spawn /bin/sh
sh-3.00$ echo 123456789 > /dev/ttyS0
sh-3.00$
123456789
Case 2 ...PASS
root:/> cat /dev/ttyS0 > aaa
wait for receiving data...
cat /etc/boa.conf > /dev/ttyBF1
root:/>
Still wait.
sh-3.00$ cat aaa
# Boa v0.onnection
# Commente
# File format has changed little from 0.92
# version changes are noted in the comments
#
# The Boa configuration file is parsed with a lex/yacc or flex/bison
# generated parser. If it reports an error, the line number will be
# provided; it should be easy to spot. The syntax of each of these
# rules is very simple, and they can occur in any order. Where possible
# these directives mimic those of NCSA httpd 1.3; I saw no reason to
# introduce gratuitous differences.
# The "ServerRoot" is not in this configuration file. It can be
compiled
# into the server (see defines.h) or specified on the command line with
# the -c option, for example:
#
# boa -c /usr
# Port: The port Boa runs on. The default port for http servers is 80.
# If it is less than 1024, the server must be started as root.
Port 80
# User: The name or UID the server should run as.
# Group: The group name or GID the server should run as.
User root
Group root
# ServerAdmin: The email address where server problems should be sent.
# Note: this is not currently used.
#ServerAdmin root@localhost
# ErrorLog: The location of the error log file. If this does not start
# with /, it is considered relative to the server root.
# Set to /dev/null if you don't want errors logged.
#ErrorLog /var/log/boa/error_log
# AccessLog: The location of the access log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less effective) to disable
# Access logging.
#AccessLog /var/log/boa/access_log
# RefererLog: The location of the referer log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less effective) to disable
# referer logging.
#RefererLog /var/log/boa/referer_log
# AgentLog: The location of the agent log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less deffective) to disable
# User-Agent logging.
#AgentLog /var/log/boa/agent_log
# VerboseCGILogs: this is just a logical switch.
# Comment out to disable.
#VerboseCGILogs
# ServerName: the name of this server that should be sent back to
# clients if different than that returned by gethostname -- often
# this is www.foo.bar.
ServerName www.LG-blackfin.com
# DocumentRoot: The root directory of the HTML documents.
DocumentRoot /home/httpd
# ChRoot: Boa root '/' directory. This is useful to improve security of
# your system. Don't forget that ALL DIRECTORIES used by boa except logs
# must be in this directory. If you need cgi scripts, you must copy shared
# libraries to this directory (see ldconfig(8) for more info)
#Chroot /var
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is recieved.
UserDir public_html
# DirectoryIndex: Name of the file to use as a pre-written HTML
# directory index. Please MAKE AND USE THESE FILES. On the
# fly creation of directory indexes can be _slow_.
#
DirectoryIndex index.html
#DirectoryMaker /usr/boa_indexer
# LocalCodepage: Local codepage. This is send to client in 'Content-Type:'
# header by default.
#LocalCodepage iso-8859-1
# Codepage: Load codepage conversion table from file. This table will be used
# on-the-fly conversion.
#Codepage us-ascii /usr/lib/boa/iso-8859-2/us-ascii
# CodepageByURL: Specify URL prefix codepage. This command is used for manual
# codepage selection. For example, www.cz.boa.org/asc/document.html
# converts /document.html to us-ascii
#CodepageByURL /asc us-ascii
# CodepageByBrowser: Specify codepage by $USER_AGENT. This command is used for
# automatic codepage selection. You can use characters '*' and '?' in browser
# string. For example, "CodepageByBrowser Lynx/* us-ascii" will send
for Lynx
# users all documents in us-ascii.
#CodepageByBrowser Lynx/* us-ascii
# KeepAliveMax: Number of KeepAlive requests to allow per connection
# Comment out, or set to 0 to disable keepalive processing
KeepAliveMax 100
# KeepAliveTimeout: seconds to wait before keepalive connection times out
KeepAliveTimeout 20
# MimeTypes: This is the file that is used to generate mime type pairs
# and Content-Type fields for boa.
MimeTypes /etc/mime.types
# DefaultType: MIME type used if the file extension is unknown, or there
# is no file extension.
DefaultType text/html
# AddType: adds types without editing mime.types
# Example: AddType type extension [extension ...]
# Uncomment the next line if you want .cgi files to execute from anywhere
#AddType application/x-httpd-cgi cgi
# Redirect, Alias, and ScriptAlias all have the same semantics -- they
# match the beginning of a request and take appropriate action. Use
# Redirect for other servers, Alias for the same server, and ScriptAlias
# to enable directories for script execution.
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example: Redirect /bar elsewhere/feh/bar
# Aliases: Aliases one path to another.
# Example: Alias /path1/bar /path2/foo
#Alias /doc /usr/doc
# ScriptAlias: Maps a virtual path to a directory for serving scripts
# Example: ScriptAlias /htbin/ /www/htbin/
ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
# VirtualHost: Maps a virtual host to a directory.
# Example: VirtualHost cz.boa.org /html/htdocs/boa/
#VirtualHost www.second.company.com /var/www/second_company/
# Auth: HTTP Basic authorization. Format is "Auth <Directory>
<PasswdFile>".
# Password file should be readable _ONLY_ by root or trusted user(s). This
file
# is opened before boa gives out privs.
# Example: Auth /secret /var/www/secret.passwd
#Auth /etc /etc/passwd
sh-3.00$ dos2unix aaa
dos2unix: converting file aaa to UNIX format ...
convert file.
sh-3.00$ finish dos2unix.
rcp root@10.100.4.50:/etc/boa.conf .
sh-3.00$ Copy file.
diff -u aaa boa.conf
--- aaa 2008-02-21 13:42:05.000000000 +0800
+++ boa.conf 2008-02-21 13:42:08.000000000 +0800
@@ -1,5 +1,4 @@
-# Boa v0.onnection
-# Commente
+# Boa v0.94 configuration file
# File format has changed little from 0.92
# version changes are noted in the comments
#
sh-3.00$
Two files diffs. +++ boa.conf 2008-02-21 13:42:08.000000000 +0800
@@ -1,5 +1,4 @@
-# Boa v0.onnection
-# Commente
+# Boa v0.94 configuration file
# File format has changed little from 0.92
# version changes are noted in the comments
#
sh-3.00$
--- Sonic Zhang 2008-02-21 22:55:30
Fixed this time.
Update tx dma buffer tail only after dma is done.
--- Vitja Makarov 2008-02-26 02:09:33
Hi, sonic!
Could you change timer interval to something that actually depends on HZ?
#define DMA_RX_FLUSH_JIFFIES (HZ/20), that wakes 20 times per second, and
max data size is about 512 bytes at 115200.
--- Mingquan Pan 2008-02-28 01:50:56
Changed and fixed.Close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found