mharsch / ldd3-samples Goto Github PK
View Code? Open in Web Editor NEWSample code from Linux Device Drivers, 3rd Edition (O'Reilly 2005)
License: Other
Sample code from Linux Device Drivers, 3rd Edition (O'Reilly 2005)
License: Other
Parallel port write fails occasionally, succeeds always on next write.
root@debian1:/ldd3-samples/short# echo -n "0" > /dev/short0
bash: echo: write error: Operation not permitted
root@debian1:/ldd3-samples/short# echo -n "0" > /dev/short0
root@debian1:/ldd3-samples/short# echo -n "0" > /dev/short0
[ 3749.614133] short: init, req region OK
[ 3749.614528] short: init registered irq [7]
[ 3749.614534] short: init, irq [7] base [888] use_mem [0] major [250] probe [0] share [0]
[ 3774.100000] short: cleanup
[ 3840.883497] short: init, req region OK
[ 3840.883623] short: init registered irq [7]
[ 3840.883625] short: init, irq [7] base [53248] use_mem [0] major [250] probe [0] share [0]
[ 4145.343071] short: do_short_write value error
[ 4149.304409] short: write, val [1], port [53248]
[ 4165.372757] short: do_short_write value error
[ 4167.002722] short: write, val [2], port [53248]
Fix
if (kstrtouint(kbuf, 10, &val) != 0 || val > 255) {
printk("short: do_short_write value error\n");
return -1;
Hi @mharsch, thanks for sharing this. I started with some additional changes for more recent kernels, see https://github.com/cu-ecen-5013/ldd3-samples/tree/update-to-4-18-all, however I noticed https://github.com/martinezjavier/ldd3 is a bit further along in the work needed, so I plan to try this one next. I can send you a PR for the work I've done on the update-to-4-18-all branch but it might be better if you rebased your repo off https://github.com/martinezjavier/ldd3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.