From owner-freebsd-hardware Wed Jan 16 10:34:11 2002 Delivered-To: freebsd-hardware@freebsd.org Received: from temphost.dragondata.com (temphost.dragondata.com [63.167.131.128]) by hub.freebsd.org (Postfix) with ESMTP id E9A8C37B404 for ; Wed, 16 Jan 2002 10:34:04 -0800 (PST) Received: (from toasty@localhost) by temphost.dragondata.com (8.11.3/8.11.3) id g0GIglg00413 for hardware@freebsd.org; Wed, 16 Jan 2002 12:42:47 -0600 (CST) (envelope-from toasty) From: Kevin Day Message-Id: <200201161842.g0GIglg00413@temphost.dragondata.com> Subject: New disk driver can't label? To: hardware@freebsd.org Date: Wed, 16 Jan 2002 12:42:47 -0600 (CST) X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I just wrote a disk driver for a new disk controller we'll be releasing to manufacturing soon. Using the md and ad drivers for an example, I've got it MOSTLY working. This works: su-2.04# dd if=/dev/zero of=/dev/fabd2 bs=512 count=100 100+0 records in 100+0 records out 51200 bytes transferred in 0.081392 secs (629055 bytes/sec) fabd2: invalid primary partition table: no magic su-2.04# disklabel -r -w fabd2 auto fabd2s1: type 0xa5, start 63, end = 150136559, size 150136497 : OK su-2.04# newfs /dev/fabd2c fabd2: invalid primary partition table: no magic Warning: 2320 sector(s) in last cylinder unallocated /dev/fabd2c: 150136560 sectors in 36655 cylinders of 1 tracks, 4096 sectors 73308.9MB in 2291 cyl groups (16 c/g, 32.00MB/g, 7936 i/g) super-block backups (for fsck -b #) at: This doesn't, but it works fine on an ad driver: su-2.04# dd if=/dev/zero of=/dev/fabd2 bs=512 count=100 100+0 records in 100+0 records out 51200 bytes transferred in 0.092964 secs (550751 bytes/sec) fabd2: invalid primary partition table: no magic su-2.04# fdisk -I fabd2 ******* Working on device /dev/fabd2 ******* fdisk: invalid fdisk partition table found su-2.04# fdisk fabd2 ******* Working on device /dev/fabd2 ******* parameters extracted from in-core disklabel are: cylinders=148945 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=148945 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 63, size 150136497 (73308 Meg), flag 80 (active) beg: cyl 0/ sector 1/ head 1; end: cyl 464/ sector 63/ head 15 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: fabd2s1: type 0xa5, start 63, end = 150136559, size 150136497 : OK /kernel: fabd2: cannot find label (no disk label) /kernel: fabd2s1: cannot find label (no disk label) su-2.04# disklabel -r -w fabd2s1 auto disklabel: ioctl DIOCGDINFO: Invalid argument disklabel: auto: unknown disk type fabd2s1: type 0xa5, start 63, end = 150136559, size 150136497 : OK /kernel: fabd2: cannot find label (no disk label) /kernel: fabd2s1: cannot find label (no disk label) /kernel: fabd2: cannot find label (no disk label) /kernel: fabd2s1: cannot find label (no disk label) disklabel and vinum both want to call DIOCGDINFO on fabd2s1, which always returns EINVAL, but I can't figure out why my driver appears any differently than ad or md. I have to admit I'm really not an expert on the diskslice code, so I'm sort of lost. Does anyone have any ideas, or places to point me to figure out what I'm doing wrong? Thanks, Kevin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message