diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-02-21 19:00:48 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-02-21 19:00:48 +0000 |
| commit | 2c6b49f6affb5cd2f304ef1b0210d45d9da380db (patch) | |
| tree | 0a783f7251946cbeba07417df9c459d72a6aa14e /sys/dev | |
| parent | a9f39f60e00f584efee7cf645508bc8baa5d81ce (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/aac/aac_disk.c | 8 | ||||
| -rw-r--r-- | sys/dev/ata/ata-disk.c | 9 | ||||
| -rw-r--r-- | sys/dev/ida/ida_disk.c | 8 | ||||
| -rw-r--r-- | sys/dev/twe/twe_freebsd.c | 12 |
4 files changed, 24 insertions, 13 deletions
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c index 664cc72a17ffd..cc777dd3be986 100644 --- a/sys/dev/aac/aac_disk.c +++ b/sys/dev/aac/aac_disk.c @@ -66,7 +66,7 @@ static int aac_disk_detach(device_t dev); static d_open_t aac_disk_open; static d_close_t aac_disk_close; static d_strategy_t aac_disk_strategy; -static d_dump_t aac_disk_dump; +static dumper_t aac_disk_dump; #define AAC_DISK_CDEV_MAJOR 151 @@ -241,7 +241,7 @@ aac_dump_map_sg(void *arg, bus_dma_segment_t *segs, int nsegs, int error) * Send out one command at a time with up to AAC_MAXIO of data. */ static int -aac_disk_dump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length) +aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { struct aac_disk *ad; struct aac_softc *sc; @@ -251,8 +251,10 @@ aac_disk_dump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size int size; static bus_dmamap_t dump_datamap; static int first = 0; + struct disk *dp; - ad = dev->si_drv1; + dp = arg; + ad = dp->d_dev->si_drv1; if (ad == NULL) return (EINVAL); diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 6478171308d3f..13906ab9bb99e 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -55,7 +55,7 @@ static d_open_t adopen; static d_close_t adclose; static d_strategy_t adstrategy; -static d_dump_t addump; +static dumper_t addump; static struct cdevsw ad_cdevsw = { /* open */ adopen, /* close */ adclose, @@ -315,12 +315,15 @@ adstrategy(struct bio *bp) } static int -addump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length) +addump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { - struct ad_softc *adp = dev->si_drv1; + struct ad_softc *adp; struct ad_request request; static int once; + struct disk *dp; + dp = arg; + adp = dp->d_dev->si_drv1; if (!adp) return ENXIO; diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index e93dce8ba7bfb..f4265c9960c91 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -61,7 +61,7 @@ static int idad_detach(device_t dev); static d_open_t idad_open; static d_close_t idad_close; static d_strategy_t idad_strategy; -static d_dump_t idad_dump; +static dumper_t idad_dump; #define IDAD_CDEV_MAJOR 109 @@ -180,13 +180,15 @@ bad: } static int -idad_dump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length) +idad_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { struct idad_softc *drv; int error = 0; + struct disk *dp; - drv = idad_getsoftc(dev); + dp = arg; + drv = idad_getsoftc(dp->d_dev); if (drv == NULL) return (ENXIO); diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 95ca2a7c53e30..9bc27a37d97e2 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -586,7 +586,7 @@ DRIVER_MODULE(twed, twe, twed_driver, twed_devclass, 0, 0); static d_open_t twed_open; static d_close_t twed_close; static d_strategy_t twed_strategy; -static d_dump_t twed_dump; +static dumper_t twed_dump; #define TWED_CDEV_MAJOR 147 @@ -693,12 +693,16 @@ twed_strategy(twe_bio *bp) * System crashdump support */ static int -twed_dump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length) +twed_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { - struct twed_softc *twed_sc = (struct twed_softc *)dev->si_drv1; - struct twe_softc *twe_sc = (struct twe_softc *)twed_sc->twed_controller; + struct twed_softc *twed_sc; + struct twe_softc *twe_sc; int error; + struct disk *dp; + dp = arg; + twed_sc = (struct twed_softc *)dp->d_dev->si_drv1; + twe_sc = (struct twe_softc *)twed_sc->twed_controller; if (!twed_sc || !twe_sc) return(ENXIO); |
