James Bottomley ([EMAIL PROTECTED]) recently sent
me a patch that enables a scsi reset to be called from the user
space. It uses an ioctl() found in recent sg drivers called
SG_SCSI_RESET that was defined but previously did nothing.
Either a scsi device, bus or host can be reset (depending on what
the HBA in question supports). James tested it on an Adaptec
2944 and a NCR PQS card that uses the sym53c8xx driver and I have
tested it on advansys hardware. If anybody has a requirement for
this functionality then please try the attached patch and send
any problem reports to me (or this group).
The attached tarball contains a "diff" file that can be used to
patch a 2.2.14 kernel and a test program called sg_reset. I added
a few changes to James's original patch, the only significant
one being that root permission is now needed to execute a scsi
reset. Interestingly the requests I have received for this
functionality have all come from people working on RAIDs.
Doug Gilbert
reset_scsi_lk2214.tgz