Re: [PATCH] via82cxxx IDE: Support multiple controllers

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

 



On 9/2/05, Daniel Drake <[email protected]> wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > Same thing as with VT6420 support:
> >
> > I'm still concerned about VIA IDE chipset + VT6410 combo
> > (AFAIR I've also seen VT6410 on PCI add-on card but I can be wrong).
> >
> > via82cxxx.c needs to be fixed to support multiple controllers first.
>
> Hows this? I don't have any hardware with two VIA controllers, however I have
> tested this on a pc which has a single vt8233a controller.
>
> ---
>
> Support multiple controllers in the via82cxxx IDE driver
>
> Signed-off-by: Daniel Drake <[email protected]>

--- linux/drivers/ide/pci/via82cxxx.c.orig	2005-08-31 01:32:05.000000000 +0100
+++ linux/drivers/ide/pci/via82cxxx.c	2005-09-02 01:16:59.000000000 +0100
@@ -101,11 +101,19 @@ static struct via_isa_bridge {
 	{ NULL }
 };

-static struct via_isa_bridge *via_config;
-static unsigned int via_80w;
-static unsigned int via_clock;
 static char *via_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA100",
"UDMA133" };

I would really prefer not to add per host struct via82xxx_dev,
(making it per hwif and doing extra match in ->init_hwif() is acceptable).

+struct via82cxxx_dev
+{
+	struct pci_dev *pci_dev, *isa_dev;

pci_dev is needed only for /proc/via and I would prefer /proc/via
to vanish because it complicates driver needlessly (could you do
this in separate patch?).

isa_dev has no relevance for vt6410 and won't be needed if
/proc/via goes away

+	struct via_isa_bridge *via_config;

Please instead add via_config_find() which would
find proper via_config given PCI ID.

+	unsigned int via_clock;

Global via_clock is OK as IDE core doesn't
support per bus PCI clocks anyway.

+	unsigned int via_80w;

Cable detection code should be moved to separate function
and be called from ->init_hwif() (required for future hotplug support).

Otherwise patch looks fine.

Thanks and sorry for the delay,
Bartlomiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux