diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-02-18 21:36:53 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-02-18 21:36:53 +0000 |
| commit | 0b7ed341e106c1583e873116529015d2ae042fd0 (patch) | |
| tree | 16cf67c25fa19d01be97b31241d2c56e85a88674 /sys/dev/pst/pst-raid.c | |
| parent | f63503fcbb7a5b0e118435058a2d2c56f1083252 (diff) | |
Notes
Diffstat (limited to 'sys/dev/pst/pst-raid.c')
| -rw-r--r-- | sys/dev/pst/pst-raid.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c index e545a5fb34c5..83a52803b526 100644 --- a/sys/dev/pst/pst-raid.c +++ b/sys/dev/pst/pst-raid.c @@ -56,7 +56,7 @@ struct pst_softc { struct iop_softc *iop; struct i2o_lct_entry *lct; struct i2o_bsa_device *info; - struct disk disk; + struct disk *disk; struct bio_queue_head queue; }; @@ -149,16 +149,19 @@ pst_attach(device_t dev) bioq_init(&psc->queue); - psc->disk.d_name = "pst"; - psc->disk.d_strategy = pststrategy; - psc->disk.d_maxsize = 64 * 1024; /*I2O_SGL_MAX_SEGS * PAGE_SIZE;*/ - psc->disk.d_drv1 = psc; - disk_create(lun, &psc->disk, DISKFLAG_NOGIANT, NULL, NULL); + psc->disk = disk_alloc(); + psc->disk->d_name = "pst"; + psc->disk->d_strategy = pststrategy; + psc->disk->d_maxsize = 64 * 1024; /*I2O_SGL_MAX_SEGS * PAGE_SIZE;*/ + psc->disk->d_drv1 = psc; + psc->disk->d_unit = lun; - psc->disk.d_sectorsize = psc->info->block_size; - psc->disk.d_mediasize = psc->info->capacity; - psc->disk.d_fwsectors = 63; - psc->disk.d_fwheads = 255; + psc->disk->d_sectorsize = psc->info->block_size; + psc->disk->d_mediasize = psc->info->capacity; + psc->disk->d_fwsectors = 63; + psc->disk->d_fwheads = 255; + + disk_create(psc->disk, DISK_VERSION); printf("pst%d: %lluMB <%.40s> [%lld/%d/%d] on %.16s\n", lun, (unsigned long long)psc->info->capacity / (1024 * 1024), |
