IDE Disk scatter/gather I/O Functionality.

IDE Disk scatter/gather I/O Functionality.

Post by Woo Hyun Ah » Wed, 16 May 2001 20:42:05



Do FreeBSD disk drivers provide scatter/gather I/O for

the latest Western digital IDE disks?

If it is possible, how can I use the functionality?

Also, I want to know directories/files where the functionality is included

in the kernel source.

 
 
 

IDE Disk scatter/gather I/O Functionality.

Post by mic.. » Wed, 16 May 2001 21:58:17



Quote:> Do FreeBSD disk drivers provide scatter/gather I/O for
> the latest Western digital IDE disks?
> If it is possible, how can I use the functionality?
> Also, I want to know directories/files where the functionality is included
> in the kernel source.

From /usr/src/sys/dev/ata/ata-disk.c

 /* use tagged queueing if supported */
    if (ad_tagsupported(adp)) {
        adp->num_tags = AD_PARAM->queuelen;
        adp->flags |= AD_F_TAG_ENABLED;
        adp->controller->flags |= ATA_QUEUED;
        if (ata_command(adp->controller, adp->unit, ATA_C_SETFEATURES,
                        0, 0, 0, 0, ATA_C_F_DIS_RELIRQ, ATA_WAIT_INTR))
            printf("ad%d: disabling release interrupt failed\n", adp->lun);
        if (ata_command(adp->controller, adp->unit, ATA_C_SETFEATURES,
                        0, 0, 0, 0, ATA_C_F_DIS_SRVIRQ, ATA_WAIT_INTR))
            printf("ad%d: disabling service interrupt failed\n", adp->lun);
    }
static int
ad_tagsupported(struct ad_softc *adp)
{
#ifdef ATA_ENABLE_TAGS
    const char *drives[] = {"IBM-DPTA", "IBM-DTLA", NULL};
    int i = 0;

    /* Promise controllers doesn't work with tagged queuing */
    if ((adp->controller->chiptype & 0x0000ffff) == 0x0000105a)
        return 0;

    /* check that drive has tags enabled, and is one we know works */
    if (AD_PARAM->supqueued && AD_PARAM->enabqueued) {
        while (drives[i] != NULL) {
            if (!strncmp(AD_PARAM->model, drives[i], strlen(drives[i])))
                return 1;
            i++;
        }
    }
#endif
    return 0;

Quote:}

--
Michel Talon