Re: [PATCH] pata_cmd640: CMD640 PCI support

From: Alan Cox
Date: Fri Mar 02 2007 - 18:48:33 EST


> > + if (ap->port_no != 0 && adev->devno != timing->last) {
> > + pci_write_config_byte(pdev, DRWTIM23, timing->reg58[adev->devno]);
> > + timing->last = adev->devno;
> > + }
>
> It might be worth looking into whether ->dev_select is a better place
> for this sort of code

It isn't, for any driver because ->dev_select() is used extremely early
before all the setup of modes is even begun. This is why all the PATA
drivers hook qc_issue_prot instead.

> > + static struct ata_port_info *port_info[2] = { &info, &info };
> > +
> > + /* CMD640 detected, commiserations */
> > + pci_write_config_byte(pdev, 0x5C, 0x00);
>
> magic number

Indeed. Its undocumented magic.

> > +static int cmd640_reinit_one(struct pci_dev *pdev)
> > +{
> > + return ata_pci_device_resume(pdev);
> > +}
>
> appears to be useless wrapper

To remind me to add the resume path, which I've now done. Basically the
FIFO fixes go away on a resume ...

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/