Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-20-2003, 07:11 PM   #1
LQ Newbie
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
Unhappy 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...
Old 10-20-2003, 09:43 PM   #2
Senior Member
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
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.
Old 10-21-2003, 02:41 PM   #3
LQ Newbie
Registered: Oct 2003
Posts: 2

Original Poster
Rep: Reputation: 0
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.

jrv M.S.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
xine "Audio output unavailable. Device is busy." shellshock Linux - Software 3 05-13-2006 01:19 PM
Where to download precompiled bash binaries, such as "time" and "top"? elinuxqs Linux - Newbie 12 11-14-2005 09:36 PM
"Successful install" results in "Boot device not found" slackr007 Linux - Newbie 2 05-31-2005 09:02 PM
Sound: "No such device" with cs4614 on Debian. It worked with RedHat 9 goozlq Linux - Software 7 10-14-2004 07:16 PM
Fedora Core 1 SCSI CD-ROM Won't Mount (always get "is not a valid block device") jerrykuch Linux - Hardware 2 04-18-2004 02:02 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration