Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 1995 06:31:23 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, vak@cronyx.ru
Cc:        hackers@freebsd.org
Subject:   Re: Help installing IDE CD-ROM driver
Message-ID:  <199508292031.GAA32192@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>   In 2.2-current, MAKEDEV only creates the 'c' partition.  This is
>>   probably bogus.  The 'c' partition is actually the 'a' partition (it has
>>   minor 0).  This is certainly bogus.  The wcd*) case is similar to the
>>   cd*|mcd*|scd*) and should be merged.

>There is no disklabel support in wcd driver, that's why
>there is no /dev/wcd0a device.  Is it really needed?

Not really, but it simplifies the device naming scheme and all other
cdrom drivers support it.  spec_read() and spec_write() use DIOCGPART to
attempt to get a reasonable i/o size for block devices, but this only
works for partitions of type FS_BSDFFS (a fixed default of BLKDEV_IOSIZE
== 2048 == TOO_SMALL is used if DIOCGPART isn't supported or the
partition type isn't ffs).

The DIOC* ioctl support is very easy using slices.  Just put this near the
start of wcdioctl():

	error = dsioctl(...);
	if (error != -1)
		return (error);

See wd.c...  I suppose it would be harder of the stratgy routine was
locked properly.

I plan to add a ds routine to build dummy labels and slice tables.  It
doesn't need many more args than the size of the disk.  The driver
should fill in miscellaneous interesting stuff such as the device name.

dscheck() should be used to check for accesses beyond the disk.  This
would help ensure a consistent handling of b_cylinder (aka b_cylin,
aka b_resid; it is no longer used), b_pblkno, and EOF.

Bruce



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