Subject: Re: review of minor SCSIbus midlayer change, #1, possibly for 5.0
To: Jason R Thorpe <thorpej@zembu.com>
From: Matthew Jacob <mjacob@feral.com>
List: tech-kern
Date: 08/07/2000 17:09:27
Sorry- I asked you what was actually *in* that branch recently, but mealybugs
ate that mail I guess...
Do you want that branch to be a shared development branch for this stuff? I
could start looking into things there and 'carrying the ball' as you put it. I
have somewhat limited bandwidth so I didn't pull down a copy of this branch- I
have no idea what shape it's in or what's in it (that's why I emailed you...)
But for 5.0 I just have this and one other change to try and get in (the
second change is to use REPORT LUNS on SCSI2 or greater devices to set lun
widths for devices (for > 8 luns). Anyone have any objections? I'm assuming
that the thorpej_scsipi has too extensive a set of changes for 5.0?
-matt
-matt
On Mon, 7 Aug 2000, Jason R Thorpe wrote:
> On Mon, Aug 07, 2000 at 04:46:15PM -0700, Matthew Jacob wrote:
>
> > This allows both dynamic flag setting for 'acceleration' from userland as well
> > as from initial configuration for host adapters that support the ioctl
> > function.
> >
> > Thoughts? Makes things cleaner, and is a start toward finer control.
>
> Sure, this seems fine for now -- I have addressed this issue in the
> thorpej_scsipi branch ... how I wish someone would pick up the ball
> and roll with it.
>
> > Index: sys/scsiio.h
> > ===================================================================
> > RCS file: /cvsroot/syssrc/sys/sys/scsiio.h,v
> > retrieving revision 1.7
> > diff -u -r1.7 scsiio.h
> > --- scsiio.h 1998/10/10 03:18:51 1.7
> > +++ scsiio.h 2000/08/07 23:43:34
> > @@ -90,4 +90,15 @@
> >
> > #define SCBUSIORESET _IO('U', 1) /* reset SCSI bus */
> >
> > +/* enable/disable device properties */
> > +struct scbusaccel_args {
> > + int sa_target; /* target to set property on */
> > + int sa_lun; /* lun to set property on */
> > + int sa_flags; /* flags to set or clear */
> > +};
> > +#define SC_ACCEL_SYNC 0x01 /* enable sync mode */
> > +#define SC_ACCEL_WIDE 0x02 /* enable wide transfers */
> > +#define SC_ACCEL_TAGS 0x04 /* enable tagged queuing */
> > +#define SCBUSACCEL _IOW('U', 2, struct scbusaccel_args)
> > +
> > #endif /* _SYS_SCSIIO_H_ */
> > Index: dev/scsipi/scsiconf.c
> > ===================================================================
> > RCS file: /cvsroot/syssrc/sys/dev/scsipi/scsiconf.c,v
> > retrieving revision 1.148
> > diff -u -r1.148 scsiconf.c
> > --- scsiconf.c 2000/08/03 12:36:08 1.148
> > +++ scsiconf.c 2000/08/07 23:43:35
> > @@ -817,7 +817,7 @@
> > default:
> > break;
> > }
> > - if (checkdtype)
> > + if (checkdtype) {
> > switch (inqbuf.device & SID_TYPE) {
> > case T_DIRECT:
> > case T_SEQUENTIAL:
> > @@ -841,6 +841,25 @@
> > case T_NODEVICE:
> > goto bad;
> > }
> > + /*
> > + * At this point we can also tell the adapter that it
> > + * may negotiate things as appropriate.
> > + */
> > + if (sc_link->adapter->scsipi_ioctl) {
> > + struct scbusaccel_args s;
> > + s.sa_target = target;
> > + s.sa_lun = lun;
> > + s.sa_flags = 0;
> > + if ((sc_link->quirks & SDEV_NOTAG) == 0)
> > + s.sa_flags |= SC_ACCEL_TAGS;
> > + if ((sc_link->quirks & SDEV_NOSYNC) == 0)
> > + s.sa_flags |= SC_ACCEL_SYNC;
> > + if ((sc_link->quirks & SDEV_NOWIDE) == 0)
> > + s.sa_flags |= SC_ACCEL_WIDE;
> > + (void) (*sc_link->adapter->scsipi_ioctl)
> > + (sc_link, SCBUSACCEL, (caddr_t)&s, FWRITE, curproc);
> > + }
> > + }
> >
> > if ((cf = config_search(scsibussubmatch, (struct device *)scsi,
> > &sa)) != NULL) {
> >
> >
>
> --
> -- Jason R. Thorpe <thorpej@zembu.com>
>