PERFORCE change 165148 for review
Alexander Motin
mav at FreeBSD.org
Thu Jun 25 10:37:39 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165148
Change 165148 by mav at mav_mavbook on 2009/06/25 10:37:16
Corrent d_maxsize.
Tune formatting.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#12 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#12 (text+ko) ====
@@ -644,8 +644,8 @@
softc->disk->d_drv1 = periph;
if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48)
softc->disk->d_maxsize = MAXPHYS; /* ahci driver limit */
- else
- softc->disk->d_maxsize = 255 * 512; /* 28bit ATA command limit */
+ else /* 28bit ATA command limit */
+ softc->disk->d_maxsize = min(MAXPHYS, 255 * 512);
softc->disk->d_unit = periph->unit_number;
softc->disk->d_flags = 0;
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE)
@@ -654,13 +654,12 @@
adasetgeom(periph, cgd);
dp = &softc->params;
snprintf(announce_buf, sizeof(announce_buf),
- "%juMB (%ju %u byte sectors: %dH %dS/T "
- "%dC)", (uintmax_t)
- (((uintmax_t)dp->secsize *
- dp->sectors) / (1024*1024)),
- (uintmax_t)dp->sectors,
- dp->secsize, dp->heads,
- dp->secs_per_track, dp->cylinders);
+ "%juMB (%ju %u byte sectors: %dH %dS/T %dC)",
+ (uintmax_t)(((uintmax_t)dp->secsize *
+ dp->sectors) / (1024*1024)),
+ (uintmax_t)dp->sectors,
+ dp->secsize, dp->heads,
+ dp->secs_per_track, dp->cylinders);
xpt_announce_periph(periph, announce_buf);
if (softc->flags & ADA_FLAG_CAN_NCQ) {
printf("%s%d: Native Command Queueing Enabled\n",
More information about the p4-projects
mailing list