Date: Mon, 29 Jun 2009 09:55:52 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 165385 for review Message-ID: <200906290955.n5T9tqUA092968@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165385 Change 165385 by mav@mav_mavbook on 2009/06/29 09:55:13 Fix locking issue. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#15 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#15 (text+ko) ==== @@ -714,6 +714,17 @@ softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; adasetgeom(periph, cgd); + softc->disk->d_sectorsize = softc->params.secsize; + softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors; + /* XXX: these are not actually "firmware" values, so they may be wrong */ + softc->disk->d_fwsectors = softc->params.secs_per_track; + softc->disk->d_fwheads = softc->params.heads; +// softc->disk->d_devstat->block_size = softc->params.secsize; +// softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE; + + disk_create(softc->disk, DISK_VERSION); + mtx_lock(periph->sim->mtx); + dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), "%juMB (%ju %u byte sectors: %dH %dS/T %dC)", @@ -728,17 +739,6 @@ periph->periph_name, periph->unit_number); } - softc->disk->d_sectorsize = softc->params.secsize; - softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors; - /* XXX: these are not actually "firmware" values, so they may be wrong */ - softc->disk->d_fwsectors = softc->params.secs_per_track; - softc->disk->d_fwheads = softc->params.heads; -// softc->disk->d_devstat->block_size = softc->params.secsize; -// softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE; - - disk_create(softc->disk, DISK_VERSION); - mtx_lock(periph->sim->mtx); - /* * Add async callbacks for bus reset and * bus device reset calls. I don't bother
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906290955.n5T9tqUA092968>