[lkml]   [2004]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectrmmod st "hangs" - bad interaction with sg
I was working on the qlogicisp/isp1020 driver in 2.6, as I still have
one of these antiques and the driver is a bit out of date (a patch is
forthcoming). In the process of testing my changes, I came across the

I have a single DDS-2 tape drive attached to the SCSI bus. qlogicisp
loads, and pulls and the tape is found. However, when I tried to unload
st, the unload "hung" unkillable. I use the quotes for a reason. After
much searching, I found that there is still a reference count on the
sysfs scsi_device and that is because when the driver gets loaded, not
only does st get loaded, but sg also gets pulled in and increments the
refcount on the sysfs scsi_device. Running 'rmmod sg' in another window
allows the original 'rmmod st' to complete.

This seems bad to me - either the original rmmod should fail with EBUSY,
or it should complete. However, for it to do so, it seems that st needs
to know that sg has its hooks into the device it controls, and it needs
to be able to make it let go. My workaround is impractical if sg is in
use on other devices too.

what do interested parties think? Would this be considered a bug? Should
I chase and see if I can find a way to make it behave, or does someone
already know what's wrong?


BTW, if anyone is interested in the fixed-up qlogicisp, I can make it
available. Error-handling is in and seems to be working (the main
complaint that 2.6 has), and interfaces have been updated to 2.6

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans