In some drivers we use two devices to be able to boot.

So if si_iosize_max is allready set, dont mess with it..

Also just log the problem with maxphys not being set once.

designed by:	phk
tested by:	sos
This commit is contained in:
Søren Schmidt 1999-10-02 20:21:49 +00:00
parent 9f050ed597
commit dc722a14c7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51878
2 changed files with 3 additions and 1 deletions

View File

@ -178,6 +178,7 @@ minphys(bp)
if(!maxphys) {
printf("WARNING: %s maxphys = 0 ??", devtoname(bp->b_dev));
maxphys = DFLTPHYS;
bp->b_dev->si_iosize_max = DFLTPHYS;
}
if (bp->b_kvasize && (bp->b_kvasize < maxphys))
maxphys = bp->b_kvasize;

View File

@ -116,7 +116,8 @@ diskopen(dev_t dev, int oflags, int devtype, struct proc *p)
return (ENXIO);
if (!dsisopen(dp->d_slice)) {
pdev->si_iosize_max = dev->si_iosize_max;
if (!pdev->si_iosize_max)
pdev->si_iosize_max = dev->si_iosize_max;
error = dp->d_devsw->d_open(pdev, oflags, devtype, p);
}