Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ata/ata_da.c
Show First 20 Lines • Show All 3,441 Lines • ▼ Show 20 Lines | lbasize48 = ((u_int64_t)cgd->ident_data.lba_size48_1) | | ||||
((u_int64_t)cgd->ident_data.lba_size48_4 << 48); | ((u_int64_t)cgd->ident_data.lba_size48_4 << 48); | ||||
if ((cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) && | if ((cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) && | ||||
lbasize48 > ATA_MAX_28BIT_LBA) | lbasize48 > ATA_MAX_28BIT_LBA) | ||||
dp->sectors = lbasize48; | dp->sectors = lbasize48; | ||||
maxio = softc->cpi.maxio; /* Honor max I/O size of SIM */ | maxio = softc->cpi.maxio; /* Honor max I/O size of SIM */ | ||||
if (maxio == 0) | if (maxio == 0) | ||||
maxio = DFLTPHYS; /* traditional default */ | maxio = DFLTPHYS; /* traditional default */ | ||||
else if (maxio > MAXPHYS) | else if (maxio > maxphys) | ||||
maxio = MAXPHYS; /* for safety */ | maxio = maxphys; /* for safety */ | ||||
if (softc->flags & ADA_FLAG_CAN_48BIT) | if (softc->flags & ADA_FLAG_CAN_48BIT) | ||||
maxio = min(maxio, 65536 * softc->params.secsize); | maxio = min(maxio, 65536 * softc->params.secsize); | ||||
else /* 28bit ATA command limit */ | else /* 28bit ATA command limit */ | ||||
maxio = min(maxio, 256 * softc->params.secsize); | maxio = min(maxio, 256 * softc->params.secsize); | ||||
if (softc->quirks & ADA_Q_128KB) | if (softc->quirks & ADA_Q_128KB) | ||||
maxio = min(maxio, 128 * 1024); | maxio = min(maxio, 128 * 1024); | ||||
softc->disk->d_maxsize = maxio; | softc->disk->d_maxsize = maxio; | ||||
d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; | d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |