Re: umass media size off-by-one?



Craig Boston wrote:
Hi all, I ran into this while trying to use geli to encrypt an external
usb-2 hard drive. It appears that sometimes the media size reported by
umass is one sector too big. For example:

umass0: Prolific Technology Inc. Mass Storage Device, rev 2.00/1.00, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <WDC WD18 00JB-00DUA0 65.1> Fixed Direct Access SCSI-0 device da0: 40.000MB/s transfers
da0: 171705MB (351651889 512 byte sectors: 255H 63S/T 21889C)

# dd if=/dev/zero of=/dev/da0 oseek=351651888 count=1
dd: /dev/da0: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 0.002951 secs (0 bytes/sec)

# dd if=/dev/zero of=/dev/da0 oseek=351651887 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.000982 secs (521360 bytes/sec)

This is with a "high speed, power 100 mA, config 1, Mass Storage
Device(0x3507), Prolific Technology Inc.(0x067b), rev 1.00" enclosure.
I tested with two USB flash memory devices and those seem to report the
correct size.

I'm currently rebuilding a kernel with USB_DEBUG to see if it's specific
to a certain protocol and try to figure out if it's a bug in one of them
or if the enclosure is lying. Has anyone run into this before?

Craig

Fixed in 7-CURRENT. Contact Warner Losh to make sure that your device
is quirked appropriately.

Scott
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • umass media size off-by-one?
    ... Prolific Technology Inc. Mass Storage Device, rev 2.00/1.00, addr 2 ... da0: 40.000MB/s transfers ... Device, Prolific Technology Inc., rev 1.00" enclosure. ... I tested with two USB flash memory devices and those seem to report the ...
    (freebsd-stable)
  • Re: Auditing Questionnaire design
    ... Duane Hookom ... >> MS Access MVP ... Our hospital is tracking patient transfers. ... >>> in a report without having to use a Dcount function for every question: ...
    (microsoft.public.access.tablesdbdesign)
  • binding subreports to a main report programatically
    ... it's basically a report that shows accounts transferring ... i'd like to include this transfer data on a main report we ... i was hoping to bind the subreport above but when i try to ... only see the transfers INTO the region on the main report. ...
    (microsoft.public.access.reports)
  • Re: Auditing Questionnaire design
    ... Our hospital is tracking patient transfers. ... > transferring physicians name, attending physicians name, and the nurses ... > in a report without having to use a Dcount function for every question: ... > a query that shows only the transfers for a month's time. ...
    (microsoft.public.access.tablesdbdesign)