SCSI-CDROM Media change not detected! (generic scsi!)

SCSI-CDROM Media change not detected! (generic scsi!)

Post by Thomas Niederreite » Thu, 25 Apr 1996 04:00:00


I hope you can help me, its a quite annoying problem.

I am developing right now a CD-Writer-Program, which reads a lot from
CD-Rom (SCSI).
I read via a generic-scsi-call the TOC of the CD..and the generic-scsi
interface causes that the kernel (testet up to 1.3.93) that the media-change
isn't detected any longer!
So If I change CD and start to read RAW any data (with dd) to read the
Image to HD, the first few blocks (the ones that were cached) contain
the data from the wrong (previous) CD!

I don't know If this can be considered as Kernel-Bug...all I need
is a way to force the kernel to forget its cache and accpting the
new CD. (Force Change-Media, Flush all Buffers or so)
A simple sync doesn't help because it doesn't flush read-buffers...

The CD's are never mounted.
The only way I found so far, to read the new CD correctly is when
I cause a readfault on the CD..(by trying to mount it, when no CD is
in the drive)

I tested the behavior on a few Computers with different SCSI-Cd-Roms and
Controllers (Adaptec 1542B, NCR53c810),
all the same..

Please tell me how to I can solve this...Perhaps there is a ioctl that
helps? Or patching the sg.c in the kernel to invalidate all buffers
when closing the generic-scsi-device?
I am not a kernel-hacker, I am not sure how to fix that.

I also posted a similar "bug-report" to and
I waited a few days but nobody answered..

Many thanx,

Thomas Niederreiter

  ___ ___              
 /   |   \  ___________   | REAL   : Thomas Niederreiter: Munich, Germany  

\    Y    (  <_> )  | \/  | MUD/IRC: Hor/_Hor  
 \___|_  / \____/|__|     |
       \/ All I want is a warm bed and a kind word and unlimited power        
                      -- Ashleigh Brilliant


1. SCSI CDROM not detect


        I have a sound Blaster 16 SCSI sound card with a Compaq SCSI cdrom
attach to it. The SB is using IRQ 7. When I try to install Yggdrasil
Fall 1994 version Linux, it said "0 scsi host detected". However, I
can successfully install it if I connect my cdrom to my NCR53c810 SCSI
controller card. (PCI IRQ5), whats problem?

My computer
486 DX2-66 overdrive
540 M Quantum Harddrive
SB 16 SCSI using irq 7
NCR53c810 SCSI controller card (PCI) using irq 5.
Compaq SCSI cdrom
ATI mach64 WinTurbo


2. Announcement:

3. Solaris 2.5.1 or 2.6 on a new production Enterprise 3000?

4. CDROM (SCSI) Installation Problem, Block Device not Detected

5. read(), write() and sockets - handling fragmentation

6. installation: Generic CDROM not detected

7. SUCCESS: JDK 1.3.1 + HotSpot on FBSD 5.0-R

8. detecting generic SCSI-support

9. How to get SCSI-Host nr from generic SCSI device?

10. scsi cdwriter not on /proc/scsi/scsi

11. How to recognize SCSI CD-ROM as a "Generic SCSI" device?

12. Problem with SCSI Acard and linux 2.2.x(Maybe generic SCSI bug)