SCSI Device unavailable after firmware download. Redhat or "sg" issue?
I'm currently writing an application that downloads firmware to SCSI tape drives via the "sg" interface on Red Hat Enterprise 2.1
Here is the problem:
After the firmware download command finishes flashing the firmware on the tape drive, the drive becomes unavailable. The system must be rebooted to access the drive.
* The actual firmware download succeeds. It's not until I try the next command - "Test for Unit Ready" - that it hangs.
* My application can be ctrl c'ed out of, but I can't restart the application.
* On Red Hat 7.1, I can make it work if I issue a device reset immediately following the download with ioctl -SG_SCSI_RESET_DEVICE
* The drive still appears in /proc/scsi/scsi but cannot be removed using "scsi remove-single-device" or re-added using "scsi add-single-device".
* I tried closing the handle "close(fd)" and reopening it but that did nothing, although both open() and close() succeeded.
Any help would be appreciated...
You are trying to use hardware after a low level firmware upgrade. This is not even possible on mainframes. I don't know exactly what the purpose of this is, but if you update firmware on any device, the computer must be rebooted so the bios can redetect it. This isn't a linux issue, but a basic hardware premise.
You should not test for unit ready until you reboot. And in that event, you will already know if the unit is functional or not by the operation of the attached devices.
You are wanting to remount a device that the bios cannot talk to. And so no, it's not going to work. Anyhow, that as they say, is that.
You should be cautious with the advice you give. We want to advance knowledge not stifle it. If I was a junior developer, I would have been offended by your aggressive, negative response. Instead I realize that you are simply misguided and here is why: Firmware upgrade via this method has worked on all Red Hat distributions from 7.1 through 9. The problem that I described is only exhibited on the new Enterprise 2.1 Edition. I'm the Senior Software Architect/Developer for Certance (a Seagate affiliate), Tape Division. I currently support this same functionality on all Microsoft , Sun Solaris, and Novell NetWare (as well as Red Hat Linux) operating systems. This functionality has existed in our applications for years.
In general Linux is an easy port. All of my development consists of modularized C++ objects, and I seldom, if ever, have issues like this. This is probably a Red Hat -vs- "sg" issue, but I thought I would give this forum a try before going to Red Hat.
|All times are GMT -5. The time now is 03:16 AM.|