Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 1996 21:20:32 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        asami@cs.berkeley.edu, bde@zeta.org.au
Cc:        current@freebsd.org, jgreco@brasil.moneng.mei.com, nisha@cs.berkeley.edu
Subject:   Re: more than 32 scsi disks on a single machine ?
Message-ID:  <199605111120.VAA24032@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
> * You mostly preserved compatibility with the existing device nodes, provided
> * everything uses the dk macros and functions.

>Well if they don't use them, they just won't be able to see disks >
>32. :>

They might write on the correct disk mod 32 :<.

> * I use 6 TYPE bits in the floppy driver.  Committing this has been
> * waiting about 1.5 years because I don't want to rearrange everyone's fd
> * minors.  Please bits from the top of the original TYPE.  PART2 should be
> * taking from the top too.

>You mean both UNIT2 and PART2 should have been taken from the highest
>bit?  Well I guess that's ok as long as there isn't a device that uses 
>both (Julian, what was the PART2 for?)....  By the way, should I avoid 
>the MSB for sign-extension problems?

I think PART2 is for more than 8 partitions.  The TYPE bits were supposed
to be driver dependent so it may be OK to use them, but then you won't
be able to use the same macros and utility functions as everything else.
In particular, using dkunit() and calling dsinit() like the sd driver
wants to do isn't acceptable unless all drivers agree on the encoding.

If you use the MSB then you get to fix the sign extension problems.
There aren't many except for the fundamental ones that minor() is supposed
to have type `int' but it takes 32 bits including the sign bit although it
only uses24 bits, and mknod(8) uses atoi() without checking for errors so
it doesn't even notice that atol() converts 2^31 to INT_MAX = 2^31 - 1.

> * 			     Watch out for the scsictl bit in MAKEDEV.

>According to MAKEDEV, scsictl is 0x20000000.  We'll run into it in a
>major way if we try to take some (contiguous) bits from the top.

Not easy to fix.  You could split the unit into 3 parts (:-().

> * `unit' is now evaluated multiply and there are too many columns.

>I can put in a \ for the columns, but I didn't think multiple
>evaluation of units was bad.  I thought people aren't supposed to do
>mkmakeminor(unit++, slice, part) kind of stuff with macros anyway.

The macro is in lower case so it should be function-like.

>Should I use a gcc extension or something to save the value of unit to 
>a temporary variable?

Perhaps make it a function.  Driver's shouldn't convert device numbers in
their inner loops.

> * The type bits now overlap ...

>You mean with the 6 bits you are using?

I meant that the dktype() macro extracts UNIT2 (and PART2) bits.

Bruce



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