|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
Add IDE / SATA support for AMD SB900 chipset.The following diffs add support for IDE and SATA with the AMD SB900 chipset.
Index: pciide.c =================================================================== RCS file: /cvs/src/sys/dev/pci/pciide.c,v retrieving revision 1.298 diff -u -p -r1.298 pciide.c --- pciide.c 5 Sep 2009 10:24:58 -0000 1.298 +++ pciide.c 13 Sep 2009 06:49:14 -0000 @@ -557,6 +557,10 @@ const struct pciide_product_desc pciide_ { PCI_PRODUCT_AMD_CS5536_IDE, 0, amd756_chip_map + }, + { PCI_PRODUCT_AMD_SB900_IDE, + 0, + ixp_chip_map } }; Index: ahci.c =================================================================== RCS file: /cvs/src/sys/dev/pci/ahci.c,v retrieving revision 1.148 diff -u -p -r1.148 ahci.c --- ahci.c 13 Sep 2009 13:26:39 -0000 1.148 +++ ahci.c 20 Sep 2009 17:55:31 -0000 @@ -427,8 +427,8 @@ int ahci_nvidia_mcp_attach(struct ahci struct pci_attach_args *); static const struct ahci_device ahci_devices[] = { - { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, - ahci_no_match, ahci_vt8251_attach }, + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, + NULL, ahci_ati_sb600_attach }, { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, NULL, ahci_ati_sb600_attach }, { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, @@ -438,7 +438,9 @@ static const struct ahci_device ahci_dev { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP67_AHCI_1, NULL, ahci_nvidia_mcp_attach }, { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_5, - NULL, ahci_nvidia_mcp_attach } + NULL, ahci_nvidia_mcp_attach }, + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, + ahci_no_match, ahci_vt8251_attach } }; int ahci_pci_match(struct device *, void *, void *); -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.Got a dmesg?
On Sun, Sep 20, 2009 at 02:31:27PM -0400, Brad wrote: > The following diffs add support for IDE and SATA with the AMD SB900 chipset. > > > Index: pciide.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/pciide.c,v > retrieving revision 1.298 > diff -u -p -r1.298 pciide.c > --- pciide.c 5 Sep 2009 10:24:58 -0000 1.298 > +++ pciide.c 13 Sep 2009 06:49:14 -0000 > @@ -557,6 +557,10 @@ const struct pciide_product_desc pciide_ > { PCI_PRODUCT_AMD_CS5536_IDE, > 0, > amd756_chip_map > + }, > + { PCI_PRODUCT_AMD_SB900_IDE, > + 0, > + ixp_chip_map > } > }; > > > > Index: ahci.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/ahci.c,v > retrieving revision 1.148 > diff -u -p -r1.148 ahci.c > --- ahci.c 13 Sep 2009 13:26:39 -0000 1.148 > +++ ahci.c 20 Sep 2009 17:55:31 -0000 > @@ -427,8 +427,8 @@ int ahci_nvidia_mcp_attach(struct ahci > struct pci_attach_args *); > > static const struct ahci_device ahci_devices[] = { > - { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > - ahci_no_match, ahci_vt8251_attach }, > + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, > + NULL, ahci_ati_sb600_attach }, > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, > NULL, ahci_ati_sb600_attach }, > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, > @@ -438,7 +438,9 @@ static const struct ahci_device ahci_dev > { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP67_AHCI_1, > NULL, ahci_nvidia_mcp_attach }, > { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_5, > - NULL, ahci_nvidia_mcp_attach } > + NULL, ahci_nvidia_mcp_attach }, > + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > + ahci_no_match, ahci_vt8251_attach } > }; > > int ahci_pci_match(struct device *, void *, void *); > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Sunday 20 September 2009 14:45:07 Marco Peereboom wrote:
> Got a dmesg? I can't give a dmesg for hw that isn't available for purchase yet. > On Sun, Sep 20, 2009 at 02:31:27PM -0400, Brad wrote: > > The following diffs add support for IDE and SATA with the AMD SB900 > > chipset. > > > > > > Index: pciide.c > > =================================================================== > > RCS file: /cvs/src/sys/dev/pci/pciide.c,v > > retrieving revision 1.298 > > diff -u -p -r1.298 pciide.c > > --- pciide.c 5 Sep 2009 10:24:58 -0000 1.298 > > +++ pciide.c 13 Sep 2009 06:49:14 -0000 > > @@ -557,6 +557,10 @@ const struct pciide_product_desc pciide_ > > { PCI_PRODUCT_AMD_CS5536_IDE, > > 0, > > amd756_chip_map > > + }, > > + { PCI_PRODUCT_AMD_SB900_IDE, > > + 0, > > + ixp_chip_map > > } > > }; > > > > > > > > Index: ahci.c > > =================================================================== > > RCS file: /cvs/src/sys/dev/pci/ahci.c,v > > retrieving revision 1.148 > > diff -u -p -r1.148 ahci.c > > --- ahci.c 13 Sep 2009 13:26:39 -0000 1.148 > > +++ ahci.c 20 Sep 2009 17:55:31 -0000 > > @@ -427,8 +427,8 @@ int ahci_nvidia_mcp_attach(struct ahci > > struct pci_attach_args *); > > > > static const struct ahci_device ahci_devices[] = { > > - { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > > - ahci_no_match, ahci_vt8251_attach }, > > + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, > > + NULL, ahci_ati_sb600_attach }, > > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, > > NULL, ahci_ati_sb600_attach }, > > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, > > @@ -438,7 +438,9 @@ static const struct ahci_device ahci_dev > > { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP67_AHCI_1, > > NULL, ahci_nvidia_mcp_attach }, > > { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_5, > > - NULL, ahci_nvidia_mcp_attach } > > + NULL, ahci_nvidia_mcp_attach }, > > + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > > + ahci_no_match, ahci_vt8251_attach } > > }; > > > > int ahci_pci_match(struct device *, void *, void *); > > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.> From: Brad <brad@...>
> Date: Sun, 20 Sep 2009 14:52:48 -0400 > > On Sunday 20 September 2009 14:45:07 Marco Peereboom wrote: > > Got a dmesg? > > I can't give a dmesg for hw that isn't available for purchase yet. Will that hardware ever be available for purchase? And will it indeed behave as you expect? I'm not a big believer in preemptively adding code for new hardware, especially if there is publically available datasheet for that hardware. Even if there is pre-production hardware available, that hardware may never enter the market, and we end up with dead code that confuses people later on. For example when some bright sould decides to re-use the PCI product ID for something completely different. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.Then how do we know this works?
On Sun, Sep 20, 2009 at 02:52:48PM -0400, Brad wrote: > On Sunday 20 September 2009 14:45:07 Marco Peereboom wrote: > > Got a dmesg? > > I can't give a dmesg for hw that isn't available for purchase yet. > > > On Sun, Sep 20, 2009 at 02:31:27PM -0400, Brad wrote: > > > The following diffs add support for IDE and SATA with the AMD SB900 > > > chipset. > > > > > > > > > Index: pciide.c > > > =================================================================== > > > RCS file: /cvs/src/sys/dev/pci/pciide.c,v > > > retrieving revision 1.298 > > > diff -u -p -r1.298 pciide.c > > > --- pciide.c 5 Sep 2009 10:24:58 -0000 1.298 > > > +++ pciide.c 13 Sep 2009 06:49:14 -0000 > > > @@ -557,6 +557,10 @@ const struct pciide_product_desc pciide_ > > > { PCI_PRODUCT_AMD_CS5536_IDE, > > > 0, > > > amd756_chip_map > > > + }, > > > + { PCI_PRODUCT_AMD_SB900_IDE, > > > + 0, > > > + ixp_chip_map > > > } > > > }; > > > > > > > > > > > > Index: ahci.c > > > =================================================================== > > > RCS file: /cvs/src/sys/dev/pci/ahci.c,v > > > retrieving revision 1.148 > > > diff -u -p -r1.148 ahci.c > > > --- ahci.c 13 Sep 2009 13:26:39 -0000 1.148 > > > +++ ahci.c 20 Sep 2009 17:55:31 -0000 > > > @@ -427,8 +427,8 @@ int ahci_nvidia_mcp_attach(struct ahci > > > struct pci_attach_args *); > > > > > > static const struct ahci_device ahci_devices[] = { > > > - { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > > > - ahci_no_match, ahci_vt8251_attach }, > > > + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, > > > + NULL, ahci_ati_sb600_attach }, > > > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, > > > NULL, ahci_ati_sb600_attach }, > > > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, > > > @@ -438,7 +438,9 @@ static const struct ahci_device ahci_dev > > > { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP67_AHCI_1, > > > NULL, ahci_nvidia_mcp_attach }, > > > { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_5, > > > - NULL, ahci_nvidia_mcp_attach } > > > + NULL, ahci_nvidia_mcp_attach }, > > > + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > > > + ahci_no_match, ahci_vt8251_attach } > > > }; > > > > > > int ahci_pci_match(struct device *, void *, void *); > > > > > > -- > > > This message has been scanned for viruses and > > > dangerous content by MailScanner, and is > > > believed to be clean. > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Sunday 20 September 2009 15:29:40 Mark Kettenis wrote:
> > From: Brad <brad@...> > > Date: Sun, 20 Sep 2009 14:52:48 -0400 > > > > On Sunday 20 September 2009 14:45:07 Marco Peereboom wrote: > > > Got a dmesg? > > > > I can't give a dmesg for hw that isn't available for purchase yet. > > Will that hardware ever be available for purchase? And will it indeed > behave as you expect? Yes and yes. To be clear the id's being added like this were taken from the equivalent Linux drivers, where the "IDE compat mode to AHCI mode" code was taken from in the first place and put into OpenBSD. Both the id addition and the original mode switching code was provided by AMD. No additional changes were made to handle the IDE and SATA controllers for the chipset. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Sun, 20 Sep 2009, Brad wrote:
> The following diffs add support for IDE and SATA with the AMD SB900 chipset. > > > Index: ahci.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/ahci.c,v > retrieving revision 1.148 > diff -u -p -r1.148 ahci.c > --- ahci.c 13 Sep 2009 13:26:39 -0000 1.148 > +++ ahci.c 20 Sep 2009 17:55:31 -0000 > @@ -427,8 +427,8 @@ int ahci_nvidia_mcp_attach(struct ahci > struct pci_attach_args *); > > static const struct ahci_device ahci_devices[] = { > - { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, > - ahci_no_match, ahci_vt8251_attach }, > + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, > + NULL, ahci_ati_sb600_attach }, > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, > NULL, ahci_ati_sb600_attach }, > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, Are you sure that the workaround for the buggy SB600 chipset is still required for the SB900? Kind regards, Markus |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.> > From: Brad <brad@...>
> > Date: Sun, 20 Sep 2009 14:52:48 -0400 > > > > On Sunday 20 September 2009 14:45:07 Marco Peereboom wrote: > > > Got a dmesg? > > > > I can't give a dmesg for hw that isn't available for purchase yet. > > Will that hardware ever be available for purchase? And will it indeed > behave as you expect? > > I'm not a big believer in preemptively adding code for new hardware, > especially if there is publically available datasheet for that > hardware. Even if there is pre-production hardware available, that > hardware may never enter the market, and we end up with dead code that > confuses people later on. For example when some bright sould decides > to re-use the PCI product ID for something completely different. I think that is too cynical. I think it should be commited. I think that these things do actually hit the market just after we make our next release, and we look like idiots. We have an opportunity to beat the market, and we don't. Our tree is full of thousands of pieces of support for devices that are just as rare as such a prototype chip today. But if it becomes common, I would rather have the few extra lines than NOT. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Sun, Sep 20, 2009 at 02:31:27PM -0400, Brad wrote:
> The following diffs add support for IDE and SATA with the AMD SB900 chipset. Here is an updated diff after the last commit to ahci(4). Index: ahci.c =================================================================== RCS file: /cvs/src/sys/dev/pci/ahci.c,v retrieving revision 1.150 diff -u -p -r1.150 ahci.c --- ahci.c 13 Oct 2009 00:19:38 -0000 1.150 +++ ahci.c 13 Oct 2009 00:56:24 -0000 @@ -427,6 +427,9 @@ int ahci_nvidia_mcp_attach(struct ahci struct pci_attach_args *); static const struct ahci_device ahci_devices[] = { + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, + NULL, ahci_ati_sb600_attach }, + { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, NULL, ahci_ati_sb600_attach }, { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, Index: pciide.c =================================================================== RCS file: /cvs/src/sys/dev/pci/pciide.c,v retrieving revision 1.301 diff -u -p -r1.301 pciide.c --- pciide.c 5 Oct 2009 20:39:26 -0000 1.301 +++ pciide.c 9 Oct 2009 23:22:46 -0000 @@ -560,6 +560,10 @@ const struct pciide_product_desc pciide_ { PCI_PRODUCT_AMD_CS5536_IDE, 0, amd756_chip_map + }, + { PCI_PRODUCT_AMD_SB900_IDE, + 0, + ixp_chip_map } }; -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.do the sb900 chipsets suffer the same bugs as the sb600 ones?
dlg On 13/10/2009, at 11:00 AM, Brad wrote: > On Sun, Sep 20, 2009 at 02:31:27PM -0400, Brad wrote: >> The following diffs add support for IDE and SATA with the AMD SB900 >> chipset. > > Here is an updated diff after the last commit to ahci(4). > > > Index: ahci.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/ahci.c,v > retrieving revision 1.150 > diff -u -p -r1.150 ahci.c > --- ahci.c 13 Oct 2009 00:19:38 -0000 1.150 > +++ ahci.c 13 Oct 2009 00:56:24 -0000 > @@ -427,6 +427,9 @@ int ahci_nvidia_mcp_attach(struct ahci > struct pci_attach_args *); > > static const struct ahci_device ahci_devices[] = { > + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, > + NULL, ahci_ati_sb600_attach }, > + > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, > NULL, ahci_ati_sb600_attach }, > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, > Index: pciide.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/pciide.c,v > retrieving revision 1.301 > diff -u -p -r1.301 pciide.c > --- pciide.c 5 Oct 2009 20:39:26 -0000 1.301 > +++ pciide.c 9 Oct 2009 23:22:46 -0000 > @@ -560,6 +560,10 @@ const struct pciide_product_desc pciide_ > { PCI_PRODUCT_AMD_CS5536_IDE, > 0, > amd756_chip_map > + }, > + { PCI_PRODUCT_AMD_SB900_IDE, > + 0, > + ixp_chip_map > } > }; > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Tue, Oct 13, 2009 at 02:56:40PM +1000, David Gwynne wrote:
> do the sb900 chipsets suffer the same bugs as the sb600 ones? I can't really answer that at the moment. But looking at the Linux driver it isn't implementing any of their implemented quirks for this controller. So I have refactored the IDE mode to AHCI mode code into a separate function and have dropped the quirk flag for the SB900 to start off with. Index: ahci.c =================================================================== RCS file: /cvs/src/sys/dev/pci/ahci.c,v retrieving revision 1.150 diff -u -p -r1.150 ahci.c --- ahci.c 13 Oct 2009 00:19:38 -0000 1.150 +++ ahci.c 14 Oct 2009 00:38:07 -0000 @@ -421,12 +421,19 @@ const struct ahci_device *ahci_lookup_de int ahci_no_match(struct pci_attach_args *); int ahci_vt8251_attach(struct ahci_softc *, struct pci_attach_args *); +void ahci_ati_sb_idetoahci(struct ahci_softc *, + struct pci_attach_args *pa); int ahci_ati_sb600_attach(struct ahci_softc *, struct pci_attach_args *); +int ahci_amd_sb900_attach(struct ahci_softc *, + struct pci_attach_args *); int ahci_nvidia_mcp_attach(struct ahci_softc *, struct pci_attach_args *); static const struct ahci_device ahci_devices[] = { + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_SB900_SATA, + NULL, ahci_amd_sb900_attach }, + { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, NULL, ahci_ati_sb600_attach }, { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, @@ -575,8 +582,8 @@ ahci_vt8251_attach(struct ahci_softc *sc return (0); } -int -ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa) +void +ahci_ati_sb_idetoahci(struct ahci_softc *sc, struct pci_attach_args *pa) { pcireg_t magic; @@ -596,8 +603,22 @@ ahci_ati_sb600_attach(struct ahci_softc pci_conf_write(pa->pa_pc, pa->pa_tag, AHCI_PCI_ATI_SB600_MAGIC, magic); } +} + +int +ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa) +{ + ahci_ati_sb_idetoahci(sc, pa); sc->sc_flags |= AHCI_F_IGN_FR; + + return (0); +} + +int +ahci_amd_sb900_attach(struct ahci_softc *sc, struct pci_attach_args *pa) +{ + ahci_ati_sb_idetoahci(sc, pa); return (0); } -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Tue, Oct 13, 2009 at 09:08:46PM -0400, Brad wrote:
> On Tue, Oct 13, 2009 at 02:56:40PM +1000, David Gwynne wrote: > > do the sb900 chipsets suffer the same bugs as the sb600 ones? > > I can't really answer that at the moment. But looking at the Linux > driver it isn't implementing any of their implemented quirks for this > controller. So I have refactored the IDE mode to AHCI mode code into > a separate function and have dropped the quirk flag for the SB900 to > start off with. Here is an updated diff after the PCI product name changes. Index: ahci.c =================================================================== RCS file: /cvs/src/sys/dev/pci/ahci.c,v retrieving revision 1.150 diff -u -p -r1.150 ahci.c --- ahci.c 13 Oct 2009 00:19:38 -0000 1.150 +++ ahci.c 15 Oct 2009 23:33:56 -0000 @@ -421,12 +421,19 @@ const struct ahci_device *ahci_lookup_de int ahci_no_match(struct pci_attach_args *); int ahci_vt8251_attach(struct ahci_softc *, struct pci_attach_args *); +void ahci_ati_sb_idetoahci(struct ahci_softc *, + struct pci_attach_args *pa); int ahci_ati_sb600_attach(struct ahci_softc *, struct pci_attach_args *); +int ahci_amd_hudson2_attach(struct ahci_softc *, + struct pci_attach_args *); int ahci_nvidia_mcp_attach(struct ahci_softc *, struct pci_attach_args *); static const struct ahci_device ahci_devices[] = { + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA, + NULL, ahci_amd_hudson2_attach }, + { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, NULL, ahci_ati_sb600_attach }, { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, @@ -575,8 +582,8 @@ ahci_vt8251_attach(struct ahci_softc *sc return (0); } -int -ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa) +void +ahci_ati_sb_idetoahci(struct ahci_softc *sc, struct pci_attach_args *pa) { pcireg_t magic; @@ -596,8 +603,22 @@ ahci_ati_sb600_attach(struct ahci_softc pci_conf_write(pa->pa_pc, pa->pa_tag, AHCI_PCI_ATI_SB600_MAGIC, magic); } +} + +int +ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa) +{ + ahci_ati_sb_idetoahci(sc, pa); sc->sc_flags |= AHCI_F_IGN_FR; + + return (0); +} + +int +ahci_amd_hudson2_attach(struct ahci_softc *sc, struct pci_attach_args *pa) +{ + ahci_ati_sb_idetoahci(sc, pa); return (0); } Index: pciide.c =================================================================== RCS file: /cvs/src/sys/dev/pci/pciide.c,v retrieving revision 1.302 diff -u -p -r1.302 pciide.c --- pciide.c 13 Oct 2009 22:05:13 -0000 1.302 +++ pciide.c 15 Oct 2009 23:11:48 -0000 @@ -560,6 +560,10 @@ const struct pciide_product_desc pciide_ { PCI_PRODUCT_AMD_CS5536_IDE, 0, amd756_chip_map + }, + { PCI_PRODUCT_AMD_HUDSON2_IDE, + 0, + ixp_chip_map } }; -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
|
Re: Add IDE / SATA support for AMD SB900 chipset.On Thursday 22 October 2009 21:36:10 Brad wrote:
> On Tue, Oct 13, 2009 at 09:08:46PM -0400, Brad wrote: > > On Tue, Oct 13, 2009 at 02:56:40PM +1000, David Gwynne wrote: > > > do the sb900 chipsets suffer the same bugs as the sb600 ones? > > > > I can't really answer that at the moment. But looking at the Linux > > driver it isn't implementing any of their implemented quirks for this > > controller. So I have refactored the IDE mode to AHCI mode code into > > a separate function and have dropped the quirk flag for the SB900 to > > start off with. > > Here is an updated diff after the PCI product name changes. > Still looking for a response. > Index: ahci.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/ahci.c,v > retrieving revision 1.150 > diff -u -p -r1.150 ahci.c > --- ahci.c 13 Oct 2009 00:19:38 -0000 1.150 > +++ ahci.c 15 Oct 2009 23:33:56 -0000 > @@ -421,12 +421,19 @@ const struct ahci_device *ahci_lookup_de > int ahci_no_match(struct pci_attach_args *); > int ahci_vt8251_attach(struct ahci_softc *, > struct pci_attach_args *); > +void ahci_ati_sb_idetoahci(struct ahci_softc *, > + struct pci_attach_args *pa); > int ahci_ati_sb600_attach(struct ahci_softc *, > struct pci_attach_args *); > +int ahci_amd_hudson2_attach(struct ahci_softc *, > + struct pci_attach_args *); > int ahci_nvidia_mcp_attach(struct ahci_softc *, > struct pci_attach_args *); > > static const struct ahci_device ahci_devices[] = { > + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA, > + NULL, ahci_amd_hudson2_attach }, > + > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA, > NULL, ahci_ati_sb600_attach }, > { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1, > @@ -575,8 +582,8 @@ ahci_vt8251_attach(struct ahci_softc *sc > return (0); > } > > -int > -ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa) > +void > +ahci_ati_sb_idetoahci(struct ahci_softc *sc, struct pci_attach_args *pa) > { > pcireg_t magic; > > @@ -596,8 +603,22 @@ ahci_ati_sb600_attach(struct ahci_softc > pci_conf_write(pa->pa_pc, pa->pa_tag, > AHCI_PCI_ATI_SB600_MAGIC, magic); > } > +} > + > +int > +ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa) > +{ > + ahci_ati_sb_idetoahci(sc, pa); > > sc->sc_flags |= AHCI_F_IGN_FR; > + > + return (0); > +} > + > +int > +ahci_amd_hudson2_attach(struct ahci_softc *sc, struct pci_attach_args *pa) > +{ > + ahci_ati_sb_idetoahci(sc, pa); > > return (0); > } > Index: pciide.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/pciide.c,v > retrieving revision 1.302 > diff -u -p -r1.302 pciide.c > --- pciide.c 13 Oct 2009 22:05:13 -0000 1.302 > +++ pciide.c 15 Oct 2009 23:11:48 -0000 > @@ -560,6 +560,10 @@ const struct pciide_product_desc pciide_ > { PCI_PRODUCT_AMD_CS5536_IDE, > 0, > amd756_chip_map > + }, > + { PCI_PRODUCT_AMD_HUDSON2_IDE, > + 0, > + ixp_chip_map > } > }; -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
| Free embeddable forum powered by Nabble | Forum Help |