ok

On 20/04/2011, at 12:54 AM, Kenneth R Westerback wrote:

> gdt(4) man page says 'transparent raw SCSI mode' is unsupported.
> The code just returns errors to any attempts to submit i/o.  I'm
> pretty sure nobody is going to add support so eliminate the framework
> for it.
> 
> Shrinks the iopool diff.
> 
> Any dissenting voices?
> 
> .... Ken
> 
> Index: share/man/man4/gdt.4
> ===================================================================
> RCS file: /cvs/src/share/man/man4/gdt.4,v
> retrieving revision 1.30
> diff -u -p -r1.30 gdt.4
> --- share/man/man4/gdt.4      1 Apr 2011 19:13:58 -0000       1.30
> +++ share/man/man4/gdt.4      19 Apr 2011 13:50:43 -0000
> @@ -145,7 +145,7 @@ inspired by the Linux driver by
> .Sh BUGS
> An ISA & EISA front-end is needed.
> .Pp
> -The driver does not yet support transparent raw SCSI mode.
> +The driver does not support transparent raw SCSI mode.
> .Pp
> It would be nice to configure the RAID units after boot
> but the information on how to do that is not public.
> Index: sys/dev/ic/gdt_common.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/gdt_common.c,v
> retrieving revision 1.55
> diff -u -p -r1.55 gdt_common.c
> --- sys/dev/ic/gdt_common.c   12 Oct 2010 00:53:32 -0000      1.55
> +++ sys/dev/ic/gdt_common.c   19 Apr 2011 13:50:44 -0000
> @@ -82,7 +82,6 @@ int gdt_ioctl_disk(struct gdt_softc *, s
> int   gdt_ioctl_alarm(struct gdt_softc *, struct bioc_alarm *);
> int   gdt_ioctl_setstate(struct gdt_softc *, struct bioc_setstate *);
> #endif /* NBIO > 0 */
> -void gdt_raw_scsi_cmd(struct scsi_xfer *);
> void  gdt_scsi_cmd(struct scsi_xfer *);
> void  gdt_start_ccbs(struct gdt_softc *);
> int   gdt_sync_event(struct gdt_softc *, int, u_int8_t,
> @@ -99,10 +98,6 @@ struct scsi_adapter gdt_switch = {
>       gdt_scsi_cmd, gdtminphys, 0, 0,
> };
> 
> -struct scsi_adapter gdt_raw_switch = {
> -     gdt_raw_scsi_cmd, gdtminphys, 0, 0,
> -};
> -
> int gdt_cnt = 0;
> u_int8_t gdt_polling;
> u_int8_t gdt_from_wait;
> @@ -484,26 +479,6 @@ gdt_attach(struct gdt_softc *sc)
> 
>       config_found(&sc->sc_dev, &saa, scsiprint);
> 
> -     sc->sc_raw_link = malloc(sc->sc_bus_cnt * sizeof (struct scsi_link),
> -         M_DEVBUF, M_NOWAIT | M_ZERO);
> -     if (sc->sc_raw_link == NULL)
> -             panic("gdt_attach");
> -
> -     for (i = 0; i < sc->sc_bus_cnt; i++) {
> -             /* Fill in the prototype scsi_link. */
> -             sc->sc_raw_link[i].adapter_softc = sc;
> -             sc->sc_raw_link[i].adapter = &gdt_raw_switch;
> -             sc->sc_raw_link[i].adapter_target = 7;
> -             sc->sc_raw_link[i].openings = 4;        /* XXX a guess */
> -             sc->sc_raw_link[i].adapter_buswidth =
> -                 (sc->sc_class & GDT_FC) ? GDT_MAXID : 16;   /* XXX */
> -
> -             bzero(&saa, sizeof(saa));
> -             saa.saa_sc_link = &sc->sc_raw_link[i];
> -
> -             config_found(&sc->sc_dev, &saa, scsiprint);
> -     }
> -
>       gdt_polling = 0;
>       return (0);
> }
> @@ -987,43 +962,6 @@ gdt_internal_cache_cmd(struct scsi_xfer 
>       }
> 
>       xs->error = XS_NOERROR;
> -}
> -
> -/* Start a raw SCSI operation */
> -void
> -gdt_raw_scsi_cmd(struct scsi_xfer *xs)
> -{
> -     struct scsi_link *link = xs->sc_link;
> -     struct gdt_softc *sc = link->adapter_softc;
> -     struct gdt_ccb *ccb;
> -     int s;
> -
> -     GDT_DPRINTF(GDT_D_CMD, ("gdt_raw_scsi_cmd "));
> -
> -     if (xs->cmdlen > 12 /* XXX create #define */) {
> -             GDT_DPRINTF(GDT_D_CMD, ("CDB too big %p ", xs));
> -             bzero(&xs->sense, sizeof(xs->sense));
> -             xs->sense.error_code = SSD_ERRCODE_VALID | SSD_ERRCODE_CURRENT;
> -             xs->sense.flags = SKEY_ILLEGAL_REQUEST;
> -             xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */
> -             xs->error = XS_SENSE;
> -             scsi_done(xs);
> -             return;
> -     }
> -
> -     if ((ccb = gdt_get_ccb(sc, xs->flags)) == NULL) {
> -             GDT_DPRINTF(GDT_D_CMD, ("no ccb available for %p ", xs));
> -             xs->error = XS_DRIVER_STUFFUP;
> -             scsi_done(xs);
> -             return;
> -     }
> -
> -     xs->error = XS_DRIVER_STUFFUP;
> -     s = splbio();
> -     scsi_done(xs);
> -     gdt_free_ccb(sc, ccb);
> -
> -     splx(s);
> }
> 
> void
> Index: sys/dev/ic/gdtvar.h
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/gdtvar.h,v
> retrieving revision 1.17
> diff -u -p -r1.17 gdtvar.h
> --- sys/dev/ic/gdtvar.h       12 Aug 2009 17:51:33 -0000      1.17
> +++ sys/dev/ic/gdtvar.h       19 Apr 2011 13:50:44 -0000
> @@ -268,7 +268,6 @@ struct gdt_softc {
>       struct  device sc_dev;
>       void   *sc_ih;
>       struct  scsi_link sc_link;      /* Virtual SCSI bus for cache devs */
> -     struct  scsi_link *sc_raw_link; /* Raw SCSI busses */
> 
>       int     sc_class;               /* Controller class */
> #define GDT_ISA               0x01

Reply via email to