From owner-freebsd-firewire@FreeBSD.ORG Tue Nov 30 13:05:30 2004 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED8DD16A4CE for ; Tue, 30 Nov 2004 13:05:30 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (84-72-27-39.dclient.hispeed.ch [84.72.27.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39A6443D1F for ; Tue, 30 Nov 2004 13:05:29 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [2002:5448:1b27:0:220:afff:fed4:dbcb]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id iAUD5OR01167 verified NO) for ; Tue, 30 Nov 2004 14:05:27 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.11.6/FNORD) id iAUD5Ot01166; Tue, 30 Nov 2004 14:05:24 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Tue, 30 Nov 2004 14:05:24 +0100 (CET) Message-Id: <200411301305.iAUD5Ot01166@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma To: FreeBSD Firewire Developers Subject: Firewire/USB conflicting number of sectors for certain drives X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 13:05:31 -0000 Salut, First a quick question -- I've noticed that a few soundcards exist (external) with Firewire interfaces, and I wonder what the chances of FreeBSD being able to support such a device might be, if anyone might be able to comment. Thanks... Now, the issue at hand: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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) I'll be rebuilding my modules with the latest source Real Soon Now, to see if this is still an issue, and would be happy to provide any needed info. thanks barry bouwsma From owner-freebsd-firewire@FreeBSD.ORG Fri Dec 3 01:48:01 2004 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE0D416A4CE for ; Fri, 3 Dec 2004 01:48:00 +0000 (GMT) Received: from pd2mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C222043D49 for ; Fri, 3 Dec 2004 01:48:00 +0000 (GMT) (envelope-from howard@digitalanvil.ca) Received: from pd2mr7so.prod.shaw.ca (pd2mr7so-qfe3.prod.shaw.ca [10.0.141.10])2004))freebsd-firewire@freebsd.org; Thu, 02 Dec 2004 18:48:00 -0700 (MST) Received: from pn2ml3so.prod.shaw.ca ([10.0.121.147]) by pd2mr7so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I8400DYJIC01OI0@pd2mr7so.prod.shaw.ca> for freebsd-firewire@freebsd.org; Thu, 02 Dec 2004 18:48:00 -0700 (MST) Received: from cerberus.digitalanvil.ca ([68.146.84.251])2003)) freebsd-firewire@freebsd.org; Thu, 02 Dec 2004 18:48:00 -0700 (MST) Received: from [192.168.200.3] (lhasa [192.168.200.3]) by cerberus.digitalanvil.ca (Postfix) with ESMTP id 4FF024519B for ; Thu, 02 Dec 2004 18:48:00 -0700 (MST) Date: Thu, 02 Dec 2004 18:48:00 -0700 From: Howard Harvey To: freebsd-firewire@freebsd.org Message-id: <41AFC5D0.5000309@digitalanvil.ca> Organization: Digital Anvil MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) Subject: Possible driver tweak. X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: howard.harvey@digitalanvil.ca List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2004 01:48:01 -0000 I've got this little Shuttle box here and the following is seen at boot time: pci0: at device 29.7 (no driver attached) I figured it has to be a firewire device, since all the other normal USB bits seem to get found quite all right. Spelunking thru 'pciconf -lv' shows the following: none0@pci0:29:7: class=0x0c0320 card=0xfb521297 chip=0x24cd8086 \ rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) \ USB EHCI Controller' class = serial bus subclass = USB Low 16 bits of 'chip' match FW_VENDORID_INTEL pretty closely. At the risk of doing something _monumentally_ stupid, is it merely a question of cramming in something like: #define FW_DEVICE_INTEL82801DB (0x24cd << 16) into fwohcireg.h at line 57 and then stuff if (id == (FW_VENDORID_INTEL | FW_DEVICE_INTEL82801DB)) { device_set_desc(dev, "Intel 82801DB"); return 0; } int fwohci_pci.c at about line 203 Or am I deluding myself? If thoroughly delusional, where (fuzzily) would the next chunk of device support need to get bolted in?