Date: Thu, 25 Jun 2009 10:37:37 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 165148 for review Message-ID: <200906251037.n5PAbbeH072797@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165148 Change 165148 by mav@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",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906251037.n5PAbbeH072797>