Set si_bsize_phys and si_bsize_max in all legacy CD drivers.

This commit is contained in:
Poul-Henning Kamp 1999-09-01 13:03:05 +00:00
parent c6b85633cb
commit db6f05bfac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50748
8 changed files with 16 additions and 0 deletions

View file

@ -296,6 +296,8 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
if (!(cd->flags & MCDVALID) && cd->openflags)
return ENXIO;
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if (mcd_getstat(unit,1) == -1)
return EIO;

View file

@ -258,6 +258,8 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p)
XDEBUG(1,("scd%d: DEBUG: status = 0x%x\n", unit, inb(cd->iobase+IREG_STATUS)));
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if ((rc = spin_up(unit)) != 0) {
print_error(unit, rc);
return EIO;

View file

@ -399,6 +399,8 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
return ENXIO;
cdp = acdtab[lun];
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if (!(cdp->flags & F_BOPEN) && !cdp->refcnt) {
/* Prevent user eject */
acd_request_wait(cdp, ATAPI_PREVENT_ALLOW,

View file

@ -623,6 +623,8 @@ int matcdopen(dev_t dev, int flags, int fmt,
if (ldrive >= TOTALDRIVES) return(ENXIO);
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
#ifdef DEBUGOPEN
printf("matcd%d: Open: dev %x partition %x controller %x flags %x cdrive %x\n",

View file

@ -296,6 +296,8 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
if (!(cd->flags & MCDVALID) && cd->openflags)
return ENXIO;
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if (mcd_getstat(unit,1) == -1)
return EIO;

View file

@ -258,6 +258,8 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p)
XDEBUG(1,("scd%d: DEBUG: status = 0x%x\n", unit, inb(cd->iobase+IREG_STATUS)));
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if ((rc = spin_up(unit)) != 0) {
print_error(unit, rc);
return EIO;

View file

@ -399,6 +399,8 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
return ENXIO;
cdp = acdtab[lun];
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if (!(cdp->flags & F_BOPEN) && !cdp->refcnt) {
/* Prevent user eject */
acd_request_wait(cdp, ATAPI_PREVENT_ALLOW,

View file

@ -399,6 +399,8 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
return ENXIO;
cdp = acdtab[lun];
dev->si_bsize_phys = 2048;
dev->si_bsize_max = MAXBSIZE;
if (!(cdp->flags & F_BOPEN) && !cdp->refcnt) {
/* Prevent user eject */
acd_request_wait(cdp, ATAPI_PREVENT_ALLOW,