tech-kern archive

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

Re: ataraid(4) controllers with AHCI



On Sat, Feb 09, 2008 at 12:45:20PM +0100, Juan RP wrote:
> Hi,
> 
> I'm adding support for the JMicron and Intel Matrix RAID metadata formats
> to the ataraid(4) driver and I got both attaching and working with
> the character device (when I use the block device the system hungs
> and I'm not able to debug it)... back to the issue, to detect the drives
> on the controllers while it's in RAID mode through AHCI, I had to make the 
> following changes:
> 
> Index: dev/ic/ahcisata_core.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/ic/ahcisata_core.c,v
> retrieving revision 1.11
> diff -b -u -p -r1.11 ahcisata_core.c
> --- dev/ic/ahcisata_core.c    25 Jan 2008 21:41:48 -0000      1.11
> +++ dev/ic/ahcisata_core.c    9 Feb 2008 11:36:30 -0000
> @@ -245,7 +245,8 @@ ahci_attach(struct ahci_softc *sc)
>       aprint_normal(", %d ports, %d command slots, features 0x%x\n",
>           sc->sc_atac.atac_nchannels, sc->sc_ncmds,
>           ahci_cap & ~(AHCI_CAP_NPMASK|AHCI_CAP_NCS));
> -     sc->sc_atac.atac_cap = ATAC_CAP_DATA16 | ATAC_CAP_DMA | ATAC_CAP_UDMA;
> +     sc->sc_atac.atac_cap |= ATAC_CAP_DATA16 | ATAC_CAP_DMA | ATAC_CAP_UDMA;

Why change = to |= here ? AFAIK atac_cap has not been used before.
Other than this, looks fine to me. Thanks for working on this !

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--



Home | Main Index | Thread Index | Old Index