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: current-users%netbsd.org@localhost
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/42225 (can't read data from SuperTop IDE Bridge (umass))
Date: Sun, 4 Apr 2010 22:18:48 +0200

 Hi!
 
 After several months I've reactivated my SuperTop hardware:
 
   umass1 at uhub5 port 4 configuration 1 interface 0
   umass1: Super Top USB 2.0  IDE DEVICE, rev 2.00/2.01, addr 3
   umass1: using SCSI over Bulk-Only
   scsibus1 at umass1: 2 targets, 1 lun per target
   sd1 at scsibus1 target 0 lun 0: <ST316002, 3A, 0\0000> disk fixed
   sd1: 149 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
 
 on my -current machine
 
   NetBSD 5.99.25 (Q) #8: Sun Apr  4 21:43:29 MEST 2010  .../amd64/compile/Q 
amd64
 
 , but it didn't work! I could see the dmesg, fdisk and disklabel
 output, but reading more than 1 block seems to fail (it works at/with
 other machines / os's).
 
 So, looking at the source and the initial and final patches I've made
 the following change:
 
 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     4 Apr 2010 20:07:22 -0000
 @@ -1179,7 +1179,7 @@
                 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)
                         residue = sc->transfer_datalen - sc->transfer_actlen;
  
                 /* Translate weird command-status signatures. */
 
 
 With this little change my usb disk works! (?)
 I only have (tested) some usb memory sticks as other umasses and did
 not see any problem with this change/patch.
 
 If not requiring a quirk (for several usb ide bridges) what is residue
 good for?
 
 Comments?
 
 Markus.
 


Home | Main Index | Thread Index | Old Index