Linus Torvalds wrote:
>
>
> On Wed, 2 Aug 2000, Rogier Wolff wrote:
> >
> > Correctly implemented phy-writers would then do:
[ Now modifed to match Linus' suggestion ]
> > switch (addr >> 28) {
> > case 0: write_phy_8 (addr & 0x0fffffff, val);break;
> > case 1: write_phy_16 (addr & 0x0fffffff, val);break;
> > case 2: write_phy_32 (addr & 0x0fffffff, val);break;
> > default: return -EIO; /* Don't know about fancy stuff */
> > }
>
> I would suggest making case 0 be the 8-bit one, and leaving binary
> compatibility. I think you tried to do that by having case 0 together with
> "val < 0x100" be the current case, but if somebody currently passes in the
> upper bits as "don't care" due to knowing that it's an 8-bit interface..
> And just drop the "autodetect" case. It doesn't add anything, and it's
> going to result in flaky behaviour at some point. Make it another "future
> expansion" thing, or possibly just document it as something private for
> special needs where each phy-writer can just do something magical.
Very sensible. I'm ok with this. Mitch?
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * Common sense is the collection of * ****** prejudices acquired by age eighteen. -- Albert Einstein ********- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:10 EST