Re: [Bugme-new] [Bug 13675] New: sierra_close sometimes crashes upon device removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 6, 2009 at 6:37 PM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 6 Jul 2009, Peter Naulls wrote:
>
>> On Mon, Jul 6, 2009 at 11:01 AM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:
>> > On Mon, 6 Jul 2009, Peter Naulls wrote:
>> >
>>
>> >>
>> >> ttyUSB3 is now missing, which was the device I was trying to use.
>> >
>> > This is correct behavior, isn't it?  Your program is still running and
>> > still holding ttyUSB3 open, so that same minor number can't be used for
>> > a new device node.
>> >
>>
>> Dubious.  It's true that I am still holding it open, but it will eventually be
>> let go by pppd et al.  Apart from that, it's a departure from behaviour in
>> previous kernel versions.
>
> Not at all; the kernel has always behaved this way.  Maybe it's not a
> good way, but it hasn't changed.

I beg to differ.  The software in question has been working for more than
a year's worth of kernels.  There's something different about
2.6.31-rc2 over 2.6.30 (with your patches).  Maybe it's some subtlety
I'm now triggering.

>>   And how do I determine which interface
>> is the correct control interface the 3rd, 5th, 10th time it's inserted?
>
> I don't know.  In fact, I don't even know how you can determine the
> correct interface the first time.  After all, if you had another USB
> serial device plugged in earlier then all the ttyUSB numbers would get
> bumped up correspondingly.

Certainly. See below.

> The information may be available in sysfs.  It certainly is available
> in the system log, but digging it out isn't easy.
>
>> I don't pretend to be an expert on device allocation etc, in the kernel,
>> so please correct me here, but this doesn't seem the best.
>
> What would you prefer?  And what would you do if you had 2 of these
> devices?

Like you said - and what the code I have already does.  Enumerate
values in /sys and then look for unique USB IDs.  I then know for
certain USB IDs that it's the first device (or in the case of various
wacky Sierra devices, the nth device).  Certainly I assume they're
sequential, but that could be changed. But If it's now the 3rd device
instead of the 4th after removal and reinsertion, then that's
definitely odd.

Real world context: this is a 3G router which accepts multiple cards,
on which I expect the customer to do all kinds of crazy plugging and
unplugging.

Maybe I can work around all this, but what I don't have right now
is a good characterization of the problem.    If you wish, I can
get that, but I feel it would be more productive for someone who
knows the code be able to describe what should be happening.


-- 
- Peter Naulls
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux