tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sys/dev/isa/fd.c FDUNIT/FDTYPE

On Sep 25,  6:14am, Edgar =?iso-8859-1?B?RnXf?= wrote:
} Subject: Re: sys/dev/isa/fd.c FDUNIT/FDTYPE
} IT> The topic is how to add 8th type and currently fd.c uses hardcoded '8'.
} JN> Actually, the topic is asking what the purpose of FDUNIT and
} JN> FDTYPE is.  That question has been answered.
} As I started this discussion in the first place, I should probably clarify 
what my intentions on asking this question were.
} 1. I observed that, at least on amd64, MAKEDEV adds 16 to the minor
} for fd1 while fd.c treats the minor mod/div 8. So (either I was
} wrong, which doesn't semm to be the case or) MAKEDEV or fd.c had to
} be fixed in order for a second floppy (fd1, unit 1) to work.

     Yes, good catch.  I'm guessing that there aren't many amd64 based
machines with two floppy drives (I don't think I've seen any).

} 2. As I originally observed that discrepancy in the course of adding
} a ninth floppy type, I expressed that my personal choice would have
} been to adjust the kernel to MAKEDEV (e.g. div/mod 16) and not the
} other way round (e.g. div/mod 8).

     My preference, as stated, would be to fix MAKEDEV.  And, possibly
modify the floppy driver to be able to modify one of the table entries
so that you don't need to go through the gyrations that you mentioned.

} Since I seem to be about the only person using floppies in NetBSD

     You're not the only one.  If I didn't care, I wouldn't comment.
I'm probably the last person to have created/added a floppy driver to
NetBSD (I did the driver for SBus based sparc64 machines).  I still
have plans for creating MI floppy driver(s) and doing various
cleanups.  At this point these plans pretty much fall under the
category of "exercise for the student" (the driver I created was my
first significant foray into kernel land).  This means that although I
still intend to do it, it is below various other priorities, such as
fixing if_cas and NAT-T, since it has limited utility.  But at the same
time, I don't want one single driver to get messed up as that makes the
grand unification much more difficult.

} land (and my current intent is only to have the content of some four
} shoeboxes full of (mostly ten-sector) Atari floppies more readily

     These are actually readable on a standard PC style floppy drive?
On a side note, I did have an Atari 800 at one time, but I never did
get the floppy drive for it.

} available), the question is probably irrelevant. I have modified my
} local copy of fd.c to have ten sectors at type 8; so I modified it to
} also treat the minor div/mod 16. I could also hijack one of the other
} six types I don't need and stay div/mod 8.

     I would have hijacked one of the last two types.  That's the
easiest modification.  Also, I have never seen those in the field.

}-- End of excerpt from Edgar =?iso-8859-1?B?RnXf?=

Home | Main Index | Thread Index | Old Index