Live data from Hacker News

Linux may have been causing USB disconnects

plus.google.com

71–80 of 123 posts

Re: Linux may have been causing USB disconnects

#71
post #61

Earlier quoted context omitted.

That is a VERY general statement, most software engineers who do hardware stuff also know what takes to make it. You can't design a driver for a card without knowing everything about the card. And I'd say the same with hardware engineers. If you don't know how the software is going to run, how are you suppose to architect it. You can't make a piece of hardware without thinking about how the driver will work.

though I agree that it's probably too general of a statement, I'm more with raverbashing on this one: while now mainly doing software I have a strong hardware background and it's more often than not just baffling to see the approach of software-only engineers when having to code over the software/hardware border. Then again, maybe I only met some exceptions. I also have no idea if/how these topics are covered in a ty…

Well, back when I was an MIT undergraduate, one of the core CS classes handed us a breadboard and a bunch of 74XX TTL chips, and we needed to construct a general register and stack computer from that. (We did get some PC boards that gave us a ALU and a UART that plugged into the breadboard, as well as the ability to program an EPROM to implement the firmware, but none of this "here's an Arduino or Rasberry Pi".)

Maybe there's so much complexity in the software stack that we can't start CS majors starting from the hardware level any more, but I can't help thinking we've lost something as a result. These days, there are Java programmers who get that "deer in headlights" look when confronted with terms such as "cache line miss".

Re: Linux may have been causing USB disconnects

#73
post #71
post #61

Earlier quoted context omitted.

though I agree that it's probably too general of a statement, I'm more with raverbashing on this one: while now mainly doing software I have a strong hardware background and it's more often than not just baffling to see the approach of software-only engineers when having to code over the software/hardware border. Then again, maybe I only met some exceptions. I also have no idea if/how these topics are covered in a ty…

Well, back when I was an MIT undergraduate, one of the core CS classes handed us a breadboard and a bunch of 74XX TTL chips, and we needed to construct a general register and stack computer from that. (We did get some PC boards that gave us a ALU and a UART that plugged into the breadboard, as well as the ability to program an EPROM to implement the firmware, but none of this "here's an Arduino or Rasberry Pi".) Mayb…

Which class was this, and are any of the notes or project assignments available online? That sounds like a fun project.

Re: Linux may have been causing USB disconnects

#75

Now can someone fix the embarrassing network bug in Linux. You know, where if you access a link to a network, or access an open networked path after 255 seconds or so ... You receive a network error. It still begs belief that such a fundamental aspect of Linux is broken ... When I show Linux to newbies and this fault occurs (ie. 100% of the time), I simply say "Linux isn't perfect ..." But inside, I cringe... It occu…

> where if you access a link to a network, or access an open networked path after 255 seconds or so

this terminology doesn't really make sense in the context of a TCP connection.

but, anyway, check:

    net.ipv4.tcp_keepalive_time
    net.ipv4.tcp_keepalive_probes
    net.ipv4.tcp_keepalive_intvl
docs for the values here: https://www.kernel.org/doc/Documentation/networking/ip-sysct...

Re: Linux may have been causing USB disconnects

#76
post #64

Earlier quoted context omitted.

If you issue a database query, you have no particular guarantee that it's going to complete in any finite amount of time. At some point, you simply throw up your hands and say it would be unreasonable to wait any longer, and accept the resulting error condition.

No, the spec is saying don't issue a request at all for "at least" 10ms. "At least" because you might have to wait longer, who knows how long, until it's safe to issue a request without triggering a disconnect.

> No

I don't know who you think you're disagreeing with, but it clearly isn't me.

Re: Linux may have been causing USB disconnects

#77
post #58

Earlier quoted context omitted.

If you are connecting to a remote system, it could be NAT configured badly on your router. The router provided by my ISP (Virgin Media) is ruthless at closing idle TCP connections after only a few minutes. I'd see this with idle SSH logins being closed all the time. The solution (for me at least) was to ensure connections used TCP keepalives, and vastly decrease the keepalive times (various sysctl calls, I don't have…

Or just use a decent router and put the Virgin supplied thing in modem mode.

My fix involved spending no money and required supporting no more devices :)

Re: Linux may have been causing USB disconnects

#78
post #64

Earlier quoted context omitted.

No, the spec is saying don't issue a request at all for "at least" 10ms. "At least" because you might have to wait longer, who knows how long, until it's safe to issue a request without triggering a disconnect.

> No I don't know who you think you're disagreeing with, but it clearly isn't me.

acchow is disagreeing with your database query likeness. Your comment was effectively saying that it's just waiting until it's ready. And this is clearly something that can be disagreed with.

Based on the way this article is worded, it seems like there is no way to check when TRSMRCY is over. Imagine if you were waiting for a database query and if the database wasn't done thinking yet, simply accessing the socket would make the query abort.

Re: Linux may have been causing USB disconnects

#79

Earlier quoted context omitted.

I can't speak for kernel developers, but when you have complex and large codebase running on a huge variety of hardware, you will have some edge cases that are rare or difficult to debug. And I don't envy the folks that have to interface directly with hardware, I have enough fun in database land...

I'm an embedded software developer now doing some things with databases.... Give me hardware any day :-)

I'm an embedded software developer who designs internal embedded databases and import/export routines to external databases.

My brain hurts, but at least I'm never bored. :/

Re: Linux may have been causing USB disconnects

#80
post #8

Be sure to check out the mailing list post linked from the G+ post which contains more technical details and proposed fixes http://marc.info/?l=linux-usb&m=137714769606183&w=2

Why on earth is all the text on that website set to font-weight:600 and using Courier New of all fonts? Incredibly hard to read.

GNU/Design.
Post reply on HN