PATCH: CMD640 IDE chipset

From: Stefan Talpalaru
Date: Wed Oct 29 2003 - 07:13:32 EST


Hi Bartolomiej!

--- Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@xxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> Can you please drop all code-style changes (such as foo() -> foo ())

sorry about that, I ran Lindent on it...

> from your patch and describe what real changes you've done?
> Also please fix your mailer, it breaks lines.
>
> BTW Andre is no longer maintaing IDE, cc: me instead, thanks.
>
> cheers,
> --bartlomiej

Please excuse me for sending this patch as an attachment,
but as my mail account is Yahoo! and I'm too lazy to find a better
sollution, I cannot get the patch through the web interface without
breaking the lines.
This patch integrates the CMD640 chipset support in the 2.4.22
kernel. I was using it succesfully in the 2.2.x kernel series, but
got no result in the 2.4.x kernels. After comparing the 2 versions,
I noticed errors in the new version (outb_p() instead of outl_p())
and also some useless code (the wrapers: __put_cmd640_reg() and
__get_cmd640_reg() - which I removed and placed the locks where needed;
the pci_conf1() and pci_conf2() functions).
I also removed the CONFIG_BLK_DEV_CMD640_ENHANCED config option, as
it
makes little difference for the kernel size.
The init_hwif_cmd640() function had to be rewritten because it is
called once for each ide interface found, so the old way of addressing
all the drives in one run was no longer working. Therefore, to not
break all the code, came the need for a function that computes the
index from the ide_drive_t* : calculate_index().
The code that handles PIO settings was rearanged in a new function:
cmd640_tuneproc().
To end the description, I brought back to live a piece of dead code
just because I needed to use both ide interfaces on my old 486 board.

later.

=====
Stefan Talpalaru

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

Attachment: diff.cmd640
Description: diff.cmd640