Re: ll_rw_blk.c

From: Russell King (rmk@arm.linux.org.uk)
Date: Sun Mar 19 2000 - 10:56:28 EST


willy@thepuffingroup.com writes:
> What is _this_ section of code intended to do?
>
> #ifdef CONFIG_BLK_DEV_FD
> floppy_init();
> #else
> #if !defined (__mc68000__) && !defined(CONFIG_PPC) && !defined(__sparc__)\
> && !defined(CONFIG_APUS) && !defined(__sh__)
> outb_p(0xc, 0x3f2);
> #endif
> #endif

It's to cover the case where you are loading the kernel from a floppy disk,
and said kernel does not have the floppy driver configured in. The outb_p
turns the floppy drives off.

> CONFIG_APUS can only be defined if CONFIG_PPC has been defined, so that's
> redundant. I _assume_ this is supposed to ACK something that the floppy
> drive would have ACKed if it were configured in? In any case, this looks
> really bogus to me, and I think it would probably be better off replaced with

I'd like it see it replaced by a floppy_off() or similar, which the architecture
can define for itself. Who says that the floppy that you're using to boot is
controled via port 0x3f2 in all cases?
   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
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 : Thu Mar 23 2000 - 21:00:26 EST