Subject: kern/19912: Toshiba CDROM fails sync negotiation during install (patch included)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <michael@moria.de>
List: netbsd-bugs
Date: 01/18/2003 13:44:56
>Number:         19912
>Category:       kern
>Synopsis:       Toshiba CDROM fails sync negotiation during install (patch included)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 18 13:45:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Michael Haardt
>Release:        1.6 and -current
>Organization:
>Environment:
NetBSD galadriel 1.6L NetBSD 1.6L (GENERIC) #0: Fri Jan 17 05:58:44 MET 2003     feyrer@miyu:/usr/cvs/src-current/sys/arch/sparc/compile/obj.sparc/GENERIC sparc

>Description:
In src/sys/dev/scsipi/scsiconf.c there is:

        {{T_CDROM, T_REMOV,
         "TOSHIBA ", "XM-4101TASUNSLCD", "1755"}, PQUIRK_NOLUNS|PQUIRK_NOSYNC},

I have a similar drive which is recognised as 'sync' device in -current
and in 1.6, although it should be async.
>How-To-Repeat:
Mount a CD and try to access a file:

cd0(esp0:0:6:0): esp0: timed out [ecb 0xf04f3578 (flags 0x1, dleft 10000, stat 0)], <state 5, nexus 0xf04f3578, phase(l 1, c 1, p 1), resid 10000, msg(q 0,o 0) DMA active>
cd0(esp0:0:6:0): sync negotiation disabled
cd0(esp0:0:6:0): esp0: timed out [ecb 0xf04f3578 (flags 0x41, dleft 10000, stat 0)], <state 5, nexus 0xf04f3578, phase(l 1, c 1, p 1), resid 10000, msg(q 20,o 0) DMA active> AGAIN
sd0: async, 8-bit transfers
sd1: async, 8-bit transfers
cd0: async, 8-bit transfers
esp0: invalid state: 6
esp0: invalid state: 6
esp0: invalid state: 6

And that's about it, all I can still do it L1-A.
>Fix:
Add this to src/sys/dev/scsipi/scsiconf.c:

        {{T_CDROM, T_REMOV,
         "TOSHIBA ", "XM-4101TASUNSLCD", "3424"}, PQUIRK_NOLUNS|PQUIRK_NOSYNC},

There is already an entry for revision 1755, as described above.
I did a binary patch of the -current kernel image, replacing 1755 by 3424, and it fixed the problem for me.

>Release-Note:
>Audit-Trail:
>Unformatted: