[#7288] SPORT Configuration returns error while argument inconsistent
Submitted By: Alexander Ens
Open Date
2012-08-24 08:41:09
Priority:
Medium Assignee:
Nobody
Status:
Open Fixed In Release:
N/A
Found In Release:
snaps Release:
Trunk
Category:
Drivers Board:
Bluetechnix CM
Processor:
BF537 Silicon Revision:
0.3
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
4.3.5
App binary format:
FDPIC
Summary: SPORT Configuration returns error while argument inconsistent
Details:
When configure the SPORT0 with ioctl, following the SPORT documentation in
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:bfin_sport
the ioctl returns an error.
The error is returned from the switch case statement in function "sport_ioctl" in line 792 in /linux-2.6.x/drivers/char/bfin_sport.c
The parameter "cmd = 0" and the macro "SPORT_IOC_CONFIG = -1071624191" is not equal and therefore the default case is executed.
The Linux Kernel is compiled from the git clone:
root:/> uname -a
Linux blackfin 3.5.0-ADI-2012R1-pre-00815-g582dd7d-dirty #73 PREEMPT Wed Aug 22 10:02:03 CEST 2012 blackfin GNU/Linux
The SPORT read in TDM Mode returns an error:
root:/> sport_test -d -r /usr/test
sport_test: ioctl('/dev/sport0', SPORT_IOC_CONFIG) failed: Operation not permitted
When I modify the switch parameter that the case SPORT_IOC_CONFIG is executed, the first if condition with "copy_from_user()" is not executed, because no errors, fine. But now the values of config.word_len and all others members of config are not consistent with the members set in sport_test.c. The same inconsistency is by using my own function.
It looks like, that the arguments of the sport_ioctl() "cmd" and "arg" are not correct committed!?
Follow-ups
--- Sonic Zhang 2012-08-27 00:10:35
It looks the Blackfin toolchain you installed doesn't match the trunk Linux
kernel version. Please use the 2012R1 Blackfin Linux release instead.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found