Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Dec 2004 21:37:31 +0100 (CET)
From:      Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk>
To:        Firewire Developers <freebsd-firewire@freebsd.org>, USB developers <freebsd-usb@freebsd.org>
Subject:   Re: Firewire/USB conflicting number of sectors for certain drives
Message-ID:  <200412262037.iBQKbV102633@Mail.NOSPAM.DynDNS.dK>
References:  <200411301305.iAUD5Ot01166@Mail.NOSPAM.DynDNS.dK>

next in thread | previous in thread | raw e-mail | index | archive | help

Happy 2004!!1!

I happened to be looking at the Linux USB code and noticed their
definition of quirks, and noted an interesting `FIX_CAPACITY' type
of quirk that doesn't seem to be present in FreeBSD, which sounds
very much like what I thought was a firewire problem (having set
up my disk under USB and then failed to access the last partition
with Firewire).

The essence of the quirk is that the reported size with USB of
some devices is 1 too large, which sounds exactly like what I am
describing in the message below, which I initially posted to the
firewire list.

Now I think I posted the below in error, and it needs to be sent to
the USB list instead, which is what I'm trying to do with this
crosspost.  Sorry for annoying the Firewire-fanatics with this, when
it seems to be the domain of the USB-users.

Here's the message, for freebsd-usb@ , and the linux code which does
this is in drivers/usb/storage/ procotols.c and unusual_devs.h, for
anyone who wishes to look there.


thanks
barry bouwsma


| Date: Tue, 30 Nov 2004 14:05:24 +0100 (CET)
| Message-Id: <200411301305.iAUD5Ot01166@Mail.NOSPAM.DynDNS.dK>
| From: Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk>
| To: FreeBSD Firewire Developers <freebsd-firewire@freebsd.org>
| Subject: Firewire/USB conflicting number of sectors for certain drives
| 
| Salut,
[ ... ]
| I have three different disks in front of me, all equipped with both
| USB and Firewire connectors.  Two of the three report a different
| number of sectors -- one fewer -- when connected via firewire, than
| when connected via USB1 (UHCI and apparently OHCI though I know of
| access problems with the latter; have not checked against EHCI).
| The third disk, however, reports the same sectors in `dmesg', and
| I initially set it up connected with Firewire, while the other drives
| have been set up over USB1 as the hardware which I had at hand.
| 
| The two drives are Western Digital, hidden behind something as you
| can see in the below dmesg snippets.  Here the reported sectors from
| them:
| USB:  da1: 238475MB (488397169 512 byte sectors: 255H 63S/T 30401C)
| FW:   da1: 238475MB (488397168 512 byte sectors: 255H 63S/T 30401C)
| and
| USB:  da1: 190782MB (390721969 512 byte sectors: 255H 63S/T 24321C)
| FW:   da1: 190782MB (390721968 512 byte sectors: 255H 63S/T 24321C)
| 
| Too bad I disklabel'ed and whatnot the disk when connected via USB,
| so that any Firewire access fails to report the actual partition
| where I expect to find the data (it now appears to extend beyond the
| end of the disk).  Hmmm.
| da1s1: slice extends beyond end of disk: truncating from 488397106 to 488397105
| sectors
| 
| The third drive -- the first one I acquired -- is a Maxtor, and does
| not have this issue.  I'm using kernel modules on FreeBSD 4.x, modules
| built on 11.05.2004, which otherwise work splendidly, though I may have
| one or two minor hacks compiled in.  I haven't tried more recent source
| or anything based on -current.
| 
| 
| It's probably a known issue that (as you see below), the drive attached
| by USB is identified by what the actual drive is, whereas when connected
| via firewire, it appears to be identified as the chipset that interfaces
| from firewire to the drive's ATA -- at least with my modules.
| 
| 
| Here's a bit of some `dmesg' concerning the drives, although it's
| not comprehensive, in case there's something to be seen below:
| 
| exhibit 1 on usb:
| umass0: ASSMANN Electronic GmbH product 0x3507, rev 2.00/0.01, addr 4
| umass0:3:0:-1: Attached to scbus3
| pass1 at umass-sim0 bus 0 target 0 lun 0
| pass1: <WDC WD25 00JB-00GVA0 08.0> Fixed Direct Access SCSI-0 device
| pass1: 1.000MB/s transfers
| Creating DISK da1
| da1 at umass-sim0 bus 0 target 0 lun 0
| da1: <WDC WD25 00JB-00GVA0 08.0> Fixed Direct Access SCSI-0 device
| da1: 1.000MB/s transfers
| da1: 238475MB (488397169 512 byte sectors: 255H 63S/T 30401C)
| 
| exhibit 1 then connected via firewire:
| pass1 at sbp0 bus 0 target 1 lun 0
| pass1: <ASSMANN  0102> Fixed Simplified Direct Access SCSI-4 device
| pass1: Serial Number \^_
| pass1: 50.000MB/s transfers
| Creating DISK da1
| sbp0:1:0 sbp_cam_scan_lun
| da1 at sbp0 bus 0 target 1 lun 0
| da1: <ASSMANN  0102> Fixed Simplified Direct Access SCSI-4 device
| da1: Serial Number \^_
| da1: 50.000MB/s transfers
| da1: 238475MB (488397168 512 byte sectors: 255H 63S/T 30401C)
| da1s1: type 0xa5, start 63, end = 488397168, size 488397106 : OK
| da1s1: slice extends beyond end of disk: truncating from 488397106 to 488397105
| sectors
| da1: raw partition size != slice size
| da1: start 63, end 488397167, size 488397105
| da1c: start 63, end 488397168, size 488397106
| 
| 
| exhibit 2 connected via usb:
| umass1: Generic USB 2.0 Storage Device, rev 2.00/0.01, addr 5
| umass1:4:1:-1: Attached to scbus4
| pass1 at umass-sim1 bus 1 target 0 lun 0
| pass1: <WDC WD20 00JB-00GVA0 08.0> Fixed Direct Access SCSI-0 device
| pass1: 1.000MB/s transfers
| Creating DISK da1
| da1 at umass-sim1 bus 1 target 0 lun 0
| da1: <WDC WD20 00JB-00GVA0 08.0> Fixed Direct Access SCSI-0 device
| da1: 1.000MB/s transfers
| da1: 190782MB (390721969 512 byte sectors: 255H 63S/T 24321C)
| 
| and then via firewire:
| da1 at sbp0 bus 0 target 1 lun 0
| da1: < 1394 to ATA 2804> Fixed Simplified Direct Access SCSI-4 device
| da1: Serial Number ^_
| da1: 50.000MB/s transfers
| da1: 190782MB (390721968 512 byte sectors: 255H 63S/T 24321C)
| 
| 
| for reference, the Maxtor drive appears comparable with both:
| usb:
| umass1: Maxtor 5000XT v01.00.00, rev 2.00/1.00, addr 5
| umass1: Get Max Lun not supported (STALLED)
| umass1:4:1:-1: Attached to scbus4
| pass1 at umass-sim1 bus 1 target 0 lun 0
| pass1: <Maxtor 5000XT v01.00.00 0100> Fixed Direct Access SCSI-0 device
| pass1: Serial Number A80A06AE
| pass1: 1.000MB/s transfers
| Creating DISK da1
| da1 at umass-sim1 bus 1 target 0 lun 0
| da1: <Maxtor 5000XT v01.00.00 0100> Fixed Direct Access SCSI-0 device
| da1: Serial Number A80A06AE
| da1: 1.000MB/s transfers
| da1: 239371MB (490232832 512 byte sectors: 255H 63S/T 30515C)
| 
| firewire:
| pass1 at sbp0 bus 0 target 0 lun 0
| pass1: <Maxtor 5000XT  v1.00.00 0000> Fixed Simplified Direct Access SCSI-4 devi
| ce
| pass1: Serial Number A80A06AE
| pass1: 50.000MB/s transfers
| Creating DISK da1
| sbp0:0:0 sbp_cam_scan_lun
| da1 at sbp0 bus 0 target 0 lun 0
| da1: <Maxtor 5000XT  v1.00.00 0000> Fixed Simplified Direct Access SCSI-4 device
| da1: Serial Number A80A06AE
| da1: 50.000MB/s transfers
| da1: 239371MB (490232832 512 byte sectors: 255H 63S/T 30515C)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412262037.iBQKbV102633>