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
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,