Date: Fri, 06 Dec 2013 18:48:06 -0600 From: Denver Hull <denverh@comcast.net> To: freebsd-usb@freebsd.org Subject: Retry a device reporting medium not present Message-ID: <52A27046.3000506@comcast.net>
next in thread | raw e-mail | index | archive | help
Hello, I have a Sony PRS 650 ebook reader that always reports "medium not presen= t" when it's first plugged in. On FreeBSD this results in device nodes t= hat aren't functional. On other systems, like Linux or Windows, retries = are performed, with the result that the reader is accessible as it should= be. An interesting note about this is that if I delete all the books on= the reader it does not initially report "medium not present" when it's p= lugged in. In which case everything works as it should on FreeBSD. But = after I've added books it begins to report "medium not present". If the = reader, with books, is present in when the system boots up then everythin= g is fine. My impression of all this is that once I've loaded the reader= up with some books, it takes it a little while to become ready after it'= s plugged into a USB port. When it reports "medium not present", FreeBSD= just gives up on it. At least that's the difference I see in the dmesg = reports between Linux and FreeBSD. Linux=20 retries, and is successful, FreeBSD doesn't. I've searched around to see if I could find an answer to this, but haven'= t found anything very helpful. I have found various reports of situation= s that sound similar, but never with any solid resolution. It may be tha= t it was never clear that the sequence I've described was occurring. I have managed to get the reader to function by adding the following to /= etc/devd.conf: attach 100 { match "device-name" "ugen[0-9]+.[0-9]+"; match "vendor" "0x054c"; match "product" "0x031e"; # 2 seconds is marginal: action "/bin/sleep 3"; action "/usr/sbin/usbconfig -d $device-name set_config 1"; action "/usr/sbin/usbconfig -d $device-name set_config 0"; }; I've been using that for about a year and a half. I think I came up with= it after combining suggestions from various places for cases where a dev= ice would work if it was present when the system booted, but not when it = was plugged in after the system was running. I don't think it's the best= answer, but so far it's the only one I've found that works consistently.= A quirk that allowed for retries that could be applied to this situatio= n would, I think, be a perfect solution. Or is there already a solution = that I haven't discovered? I'm currently running FreeBSD 9.2-STABLE #2 r258073, i386. The reader ha= s behaved the same way on systems with 8.x, i386 and amd64. I will be happy to supply any additional information that may be required= =2E Thanks, Denver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52A27046.3000506>