patch for review: ATI SB600 SATA AHCI
Jakub Siroky
jakob at dev.citybikes.cz
Sun Jan 20 11:43:05 PST 2008
Yes, maybe this is the same patch you've mentioned. In RELENG_7_0 I had
to manually update concerned files - look up the lines and add the
information at proper place. I don't understand the meaning of functions
besides chipset static definitions, but it has been working on
6.2-STABLE and RELENG_7_0 without problems.
On Sun, 20 Jan 2008 17:54:40 +0100
Volker <volker at vwsoft.com> wrote:
> On 12/23/-58 20:59, Jakub Siroky wrote:
> > Hello,
> >
> > I've been using these patches for some time with success. Although
> > slight correction to patches is needed - code placement changed a
> > bit (in case of line wrapping, see the attachments).
> >
> > --- ata-chipset.c.orig Mon Oct 9 23:01:35 2006
> > +++ ata-chipset.c Wed Sep 5 22:08:02 2007
> > @@ -1239,12 +1239,16 @@
> > struct ata_pci_controller *ctlr = device_get_softc(dev);
> > struct ata_chip_id *idx;
> > static struct ata_chip_id ids[] =
> > - {{ ATA_ATI_IXP200, 0x00, 0, 0, ATA_UDMA5, "IXP200" },
> > - { ATA_ATI_IXP300, 0x00, 0, 0, ATA_UDMA6, "IXP300" },
> > - { ATA_ATI_IXP400, 0x00, 0, 0, ATA_UDMA6, "IXP400" },
> > - { ATA_ATI_IXP300_S1, 0x00, SIIMEMIO, 0, ATA_SA150, "IXP300" },
> > - { ATA_ATI_IXP400_S1, 0x00, SIIMEMIO, 0, ATA_SA150, "IXP400" },
> > - { ATA_ATI_IXP400_S2, 0x00, SIIMEMIO, 0, ATA_SA150, "IXP400" },
> > + {{ ATA_ATI_IXP200, 0x00, 0, 0, ATA_UDMA5,
> > "IXP200" },
> > + { ATA_ATI_IXP300, 0x00, 0, 0, ATA_UDMA6,
> > "IXP300" },
> > + { ATA_ATI_IXP400, 0x00, 0, 0, ATA_UDMA6,
> > "IXP400" },
> > + { ATA_ATI_IXP600, 0x00, 0, ATISINGLE, ATA_UDMA6,
> > "IXP600" },
> > + { ATA_ATI_IXP700, 0x00, 0, ATISINGLE, ATA_UDMA6,
> > "IXP700" },
> > + { ATA_ATI_IXP300_S1, 0x00, SIIMEMIO, 0, ATA_SA150,
> > "IXP300" },
> > + { ATA_ATI_IXP400_S1, 0x00, SIIMEMIO, 0, ATA_SA150,
> > "IXP400" },
> > + { ATA_ATI_IXP400_S2, 0x00, SIIMEMIO, 0, ATA_SA150,
> > "IXP400" },
> > + { ATA_ATI_IXP600_S1, 0x00, 0, AHCI, ATA_SA300,
> > "IXP600" },
> > + { ATA_ATI_IXP700_S1, 0x00, 0, AHCI, ATA_SA300,
> > "IXP700" }, { 0, 0, 0, 0, 0, 0}};
> > char buffer[64];
> >
> > @@ -1271,6 +1275,18 @@
> >
> > if (ata_setup_interrupt(dev))
> > return ENXIO;
> > +
> > + if (ctlr->chip->cfg2 & AHCI) {
> > + ctlr->r_rid2 = PCIR_BAR(5);
> > + ctlr->r_type2 = SYS_RES_MEMORY;
> > + if ((ctlr->r_res2 = bus_alloc_resource_any(dev,
> > ctlr->r_type2,
> > +
> > &ctlr->r_rid2,
> > + RF_ACTIVE)))
> > + return ata_ahci_chipinit(dev);
> > + }
> > +
> > + if (ctlr->chip->cfg2 & ATISINGLE)
> > + ctlr->channels = 1;
> >
> > ctlr->setmode = ata_ati_setmode;
> > return 0;
> >
> > -- ata-pci.h.orig Sat Sep 30 21:51:49 2006
> > +++ ata-pci.h Wed Sep 5 22:00:21 2007
> > @@ -102,6 +102,10 @@
> > #define ATA_ATI_IXP300_S1 0x436e1002
> > #define ATA_ATI_IXP400_S1 0x43791002
> > #define ATA_ATI_IXP400_S2 0x437a1002
> > +#define ATA_ATI_IXP600_S1 0x43801002
> > +#define ATA_ATI_IXP600 0x438c1002
> > +#define ATA_ATI_IXP700_S1 0x43901002
> > +#define ATA_ATI_IXP700 0x439c1002
> >
> > #define ATA_CENATEK_ID 0x16ca
> > #define ATA_CENATEK_ROCKET 0x000116ca
> > @@ -415,6 +419,7 @@
> > #define VIABUG 0x0200
> > #define VIABAR 0x0400
> > #define VIAAHCI 0x0800
> > +#define ATISINGLE 0x1000
>
> Jakub,
>
> I think your patch is against old code before the ATA code has been
> restructured. I've tried a similar patch (provided by Coleman Kane)
> against recent RELENG_7 but applying the patch failed.
>
> That has been the reason for me to write a new patch (at least for the
> chipset my notebook is using, as I don't know much about other
> chipsets). I've just been unsure whether or not calling ata_ahci_init
> is everything what is required for proper chip initialization or not
> but from what I was reading out of the current code, other functions
> don't do much more.
>
> I may include other chipset changes (from your patch) and send a new
> patch if my patch does not miss anything for proper operation. At
> least the codes changes work here for me (or I haven't noticed
> anything bad). @sos: can you comment on this?
>
> Volker
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to
> "freebsd-stable-unsubscribe at freebsd.org"
More information about the freebsd-stable
mailing list