NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42225 (can't read data from SuperTop IDE Bridge (umass))



The following reply was made to PR kern/42225; it has been noted by GNATS.

From: Markus W Kilbinger <mk%kilbi.de@localhost>
To: Martin Husemann <martin%duskware.de@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/42225 (can't read data from SuperTop IDE Bridge (umass))
Date: Tue, 6 Apr 2010 12:21:04 +0200

 >>>>> "Martin" == Martin Husemann <martin%duskware.de@localhost> writes:
 
     >> residue = UGETDW(sc->csw.dCSWDataResidue);
     >> - if (residue < sc->transfer_datalen - sc->transfer_actlen)
     >> + if (residue != sc->transfer_datalen - sc->transfer_actlen)
     >> residue = sc->transfer_datalen - sc->transfer_actlen;
 
     Martin> Please add a few printfs and provide more detailed data,
     Martin> especially the values of residue, sc->transfer_datalen,
     Martin> sc->transfer_datalen and bCSWStatus.
 
 Following debug patch:
 
   Index: umass.c
   ===================================================================
   RCS file: /cvsroot/src/sys/dev/usb/umass.c,v
   retrieving revision 1.138
   diff -u -r1.138 umass.c
   --- umass.c  13 Feb 2010 02:16:51 -0000      1.138
   +++ umass.c  6 Apr 2010 10:12:07 -0000
   @@ -1179,8 +1179,12 @@
                DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, &sc->csw));
    
                residue = UGETDW(sc->csw.dCSWDataResidue);
   -            if (residue < sc->transfer_datalen - sc->transfer_actlen)
   +            if (residue != sc->transfer_datalen - sc->transfer_actlen) {
   +              printf("***UMASS residue = %d, datalen = %d, actlen = %d, 
status = %d\n", 
   +                     residue, sc->transfer_datalen, sc->transfer_actlen,
   +                     sc->csw.bCSWStatus);
                        residue = sc->transfer_datalen - sc->transfer_actlen;
   +            }
    
                /* Translate weird command-status signatures. */
                if ((sc->sc_quirks & UMASS_QUIRK_WRONG_CSWSIG) &&
 
 produced the following (additional) dmesg output during booting:
 
   umass0 at uhub5 port 2 configuration 1 interface 0
   umass0: Super Top USB 2.0  IDE DEVICE, rev 2.00/2.01, addr 2
   umass0: using SCSI over Bulk-Only
   scsibus0 at umass0: 2 targets, 1 lun per target
   sd0 at scsibus0 target 0 lun 0: <ST316002, 3A, 0\0000> disk fixed
   ***UMASS residue = 0, datalen = 32, actlen = 18, status = 0
   ***UMASS residue = 0, datalen = 32, actlen = 18, status = 0
   ***UMASS residue = 4, datalen = 40, actlen = 20, status = 0
   sd0: 149 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
   ***UMASS residue = 0, datalen = 32, actlen = 18, status = 0
   ***UMASS residue = 0, datalen = 32, actlen = 18, status = 0
   ***UMASS residue = 4, datalen = 40, actlen = 20, status = 0
   ***UMASS residue = 512, datalen = 512, actlen = 512, status = 0
   ***UMASS residue = 1536, datalen = 1536, actlen = 1536, status = 0
   ***UMASS residue = 512, datalen = 512, actlen = 512, status = 0
   ***UMASS residue = 512, datalen = 512, actlen = 512, status = 0
   [...]
   ***UMASS residue = 2048, datalen = 2048, actlen = 2048, status = 0
   ***UMASS residue = 2048, datalen = 2048, actlen = 2048, status = 0
 
 and 'dd if=/dev/rsd0d of=/dev/null count=2' produces
 
   ***UMASS residue = 512, datalen = 512, actlen = 512, status = 0
   ***UMASS residue = 512, datalen = 512, actlen = 512, status = 0
 
 More/other info needed?
 
 Markus.
 


Home | Main Index | Thread Index | Old Index