panic when removing pccard
Pete Carah
pete at altadena.net
Fri Jun 8 22:00:06 UTC 2007
Warner wrote:
> I'll take a look at this problem. The one difference between what you
> are doing and what I do all the time is that you have devices plugged
> into your usb bus and I don't. Given the name of the card, I suspect
> that's because they are soldered onto the usb bus.
>
I see the same problem (in 6.x stable and 5.x stable; not using current
lately) with a Verizon (audiovox) card; the Sierra 555 doesn't do it (no
USB). If I'm VERY careful stopping ppp (not pppd...) and waiting "long
enough" sometimes it doesn't panic and sometimes it does. I think the
panic requires the serial sub-device to be open, and the teardown on
unplugging the usb controller is in the wrong order. (the usb side
doesn't check refcounts?) Windoze handles this right, presumably by
passing the disconnect message to the serial layer and waiting for it to
clean up before disconnecting the usb. This is mostly with the old usb
stack; I used newusb for a while but managing cvsup+build was too much
trouble... Most of the cell-modems are fixed usb (indeed soldered in
place).
Removing a umass before camcontrol eject acts (eject before umount
panics later...) will sometimes (usually) do this too; it isn't just a
serial-port (or soldered usb) problem. Since umount wants to write in
the normal case, one has to think carefully about what to do with the
layering violation that results from disconnecting the usb. (clearly
will require fsck later in any event; it would be nice not to panic,
though).
> We need to solve this problem for 7.0, I think.
Maybe even in 6.x. Interlayer messaging would handle these disconnect
situations easily but probably slows things down in the "normal" case.
>
> Warner
-- Pete
More information about the freebsd-current
mailing list