Eric Youngdale wrote:

>         I am enclosing a patch for you folks to test out.  The actual
> patch contains a number of accumulated things that I have picked up from
> linux-scsi - the main thing I am interested in is the > 7 lun stuff in
> scsi-scan.c.

Can I simply patch the stock 2.4.1 and test this out
with a 7 LUNs old SCSI CD changer?
(I don't need to use the latest pre-patch
series for 2.4.2, correct?)


The following is not directly related to the
current topic, but I have a GOOD news to tell you
and the scsi driver developers.

For some time (like 2 years or so),
I had a trouble when I tried
to mount and access two CDs at the same time
from Nakamichi 7 CD changer device.
(This is "blacklist"ed in scsi_scan.c.)

Under 2.2.x, if I try to run "ls -lR /mnt1"
and "ls -lR /mnt2" against the two mounted
CDs simultaneously, the system
often gets hung solid.
(As for 2.0.xx, I don't remember now.)

[Please don't ask why I wanted to access
two CDs at the same time. Such access CAN
happen during operation either by mistake
or intentionally.]

Under 2.3.1yy test series, after a
certain date, the serious hung disappers, but
the output was often incorrect. The ls output stops
short of covering the entire CD
and the result was useless.

Somewhat later, after a newer development
during 2.3.1zz, I noticed that using BusLogic card
for the CD changer somehow completed the
simultaneous "ls -lR ..." output against the
two CDs, while using the DC390 card
somehow still saw the output problem.
So I figure  finally there must be
some subtle timing problem in the
SCSI subsystem and various card drivers.
(I could not figure out what timing difference
between Buslogic driver and tmscsim driver caused
the difference.)

Oh, I forgot to mention. During the
run of the simultaneous access to two CDs
the MBR changer switches the tray mechanically
to access the different CDs and so I hear
rather loud (for an electronic device)   noise
from the changer.
The switch is slow : I think such (deadtime)
timing is not specified anywhere in SCSI spec
and thus the perceived problem.

However, I need to stress Solaris 7 and Windows 95
(the last time I checked) handled the device
and my abuse flawlessly. This made me think,
why fail under linux only?

So I was cursing this devilsh timing bug that lurked
somewhere in the SCSI subsystem and the drivers for
sometime.

Anyway, after seeing the latest post from Eric,
I have another excuse to test the CD changer
device using the simultaneous "ls -lR ...".
(Yes, of course I have a legitimate concern that
the patch won't break devices like MBR.)

Right now I have the stock 2.4.1 kernel and
the DC390 driver is from that distribution.

Today, when I tried the simultaneous access to the TWO CDs
in the MBR changer device, the system saw NO ERRORS !
I tried it twice. Still no errors.

So, between now (on a PC with Duron 750Mhz)
and the time when I tested it last time on a
K6-III/400 PC (2.3.1zz),
the problem I noticed somehow disappeared.
Well, at least for now :-)

Congratulations!

(Well, I might want to try the test more times to
make sure the bug is gone.
But it takes almost 15 mins to
run "ls -lR" on the entire Free Solaris 7 CD on
this slow double speed CD changer.

    duron:~# time ls -lR /tmp/cd0 > /tmp/cd0.new-list

    real    14m14.781s
    user    0m1.220s
    sys     0m1.930s
    duron:~# pwd

    ishikawa@duron$ ls -l /tmp/cd0*
    -rw-r--r--    1 root     root      1806427 Feb  7 15:30 /tmp/cd0.list
    -rw-r--r--    1 root     root      1806427 Feb  7 15:45 /tmp/cd0.new-list

This is a tad slow, but I forgot
if this speed is the norm or not.)

I will test the latest patch just to make sure that
patch doesn't interfere with such 7 lun changer device.


Happy Hacking,

Chiaki Ishikawa


Reference.

Part of dmesg output:

DC390: 1 adapters found
scsi1 : Tekram DC390/AM53C974 V2.0f 2000-12-20
  Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A111
  Type:   Optical Device                     ANSI SCSI revision: 02
Detected scsi removable disk sdb at scsi1, channel 0, id 5, lun 0
  Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A111
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: NRC       Model: MBR-7             Rev: 110
  Type:   CD-ROM                             ANSI SCSI revision: 02
DC390: Target 5: Sync transfer 5.0 MHz, Offset 8
sdb : READ CAPACITY failed.
sdb : status = 1, message = 00, host = 0, driver = 28
sdb : extended sense code = 2
sdb : block size assumed to be 512 bytes, disk size 1GB.
 /dev/scsi/host1/bus0/target5/lun0: I/O error: dev 08:10, sector 0
 unable to read partition table
Detected scsi CD-ROM sr0 at scsi1, channel 0, id 5, lun 1
Detected scsi CD-ROM sr1 at scsi1, channel 0, id 6, lun 0
Detected scsi CD-ROM sr2 at scsi1, channel 0, id 6, lun 1
Detected scsi CD-ROM sr3 at scsi1, channel 0, id 6, lun 2
Detected scsi CD-ROM sr4 at scsi1, channel 0, id 6, lun 3
Detected scsi CD-ROM sr5 at scsi1, channel 0, id 6, lun 4
Detected scsi CD-ROM sr6 at scsi1, channel 0, id 6, lun 5
Detected scsi CD-ROM sr7 at scsi1, channel 0, id 6, lun 6
sr0: scsi-1 drive
Uniform CD-ROM driver Revision: 3.12
sr1: scsi-1 drive
sr2: scsi-1 drive
sr3: scsi-1 drive
sr4: scsi-1 drive
sr5: scsi-1 drive
sr6: scsi-1 drive
sr7: scsi-1 drive

Output of /proc/scsi/tmscsim/1 and /proc/scsi/scsi

ishikawa@duron$ cat /proc/scsi/tmscsim/1
Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0f 2000-12-20
SCSI Host Nr 1, DC390 Adapter Nr 0
IOPortBase 0xd400, IRQ 10
MaxID 7, MaxLUN 8, AdapterID 7, SelTimeout 250 ms, DelayReset 3 s
TagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns
Statistics: Cmnds 16168, Cmnds not sent directly 0, Out of SRB conds 0
            Lost arbitrations 0, Sel. connected 0, Connected: No
Nr of attached devices: 9, Nr of DCBs: 9
Map of attached LUNs: 00 00 00 00 00 03 7f 00
Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd
00  05  00  Yes  Yes  Yes  Yes  No    200 ns     5.0 M      08      01
01  05  01  Yes  Yes  Yes  Yes  No    100 ns     5.0 M      08      01
02  06  00  Yes  No   Yes  No   No   (100 ns)                       01
03  06  01  Yes  No   Yes  No   No   (100 ns)                       01
04  06  02  Yes  No   Yes  No   No   (100 ns)                       01
05  06  03  Yes  No   Yes  No   No   (100 ns)                       01
06  06  04  Yes  No   Yes  No   No   (100 ns)                       01
07  06  05  Yes  No   Yes  No   No   (100 ns)                       01
08  06  06  Yes  No   Yes  No   No   (100 ns)                       01
Commands in Queues: Query: 0:
ishikawa@duron$

ishikawa@duron$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 04 Lun: 00
  Vendor: HITACHI  Model: DK318H-91WS      Rev: B2BQ
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 05 Lun: 00
  Vendor: MATSHITA Model: PD-1 LF-1000     Rev: A111
  Type:   Optical Device                   ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 05 Lun: 01
  Vendor: MATSHITA Model: PD-1 LF-1000     Rev: A111
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 00
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 01
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 02
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 03
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 04
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 05
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 06
  Vendor: NRC      Model: MBR-7            Rev: 110
  Type:   CD-ROM                           ANSI SCSI revision: 02
ishikawa@duron$


Happy Hacking again.!



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to