[BACK]Return to ss.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / scsipi

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/scsipi/ss.c between version 1.73 and 1.73.6.1

version 1.73, 2008/04/05 15:47:01 version 1.73.6.1, 2008/06/23 04:31:29
Line 249  ssopen(dev_t dev, int flag, int mode, st
Line 249  ssopen(dev_t dev, int flag, int mode, st
         struct scsipi_adapter *adapt;          struct scsipi_adapter *adapt;
   
         unit = SSUNIT(dev);          unit = SSUNIT(dev);
         if (unit >= ss_cd.cd_ndevs)          ss = device_lookup_private(&ss_cd, unit);
                 return (ENXIO);          if (ss == NULL)
         ss = ss_cd.cd_devs[unit];  
         if (!ss)  
                 return (ENXIO);                  return (ENXIO);
   
         if (!device_is_active(&ss->sc_dev))          if (!device_is_active(&ss->sc_dev))
Line 313  bad:
Line 311  bad:
 static int  static int
 ssclose(dev_t dev, int flag, int mode, struct lwp *l)  ssclose(dev_t dev, int flag, int mode, struct lwp *l)
 {  {
         struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(dev)];          struct ss_softc *ss = device_lookup_private(&ss_cd, SSUNIT(dev));
         struct scsipi_periph *periph = ss->sc_periph;          struct scsipi_periph *periph = ss->sc_periph;
         struct scsipi_adapter *adapt = periph->periph_channel->chan_adapter;          struct scsipi_adapter *adapt = periph->periph_channel->chan_adapter;
         int error;          int error;
Line 350  ssclose(dev_t dev, int flag, int mode, s
Line 348  ssclose(dev_t dev, int flag, int mode, s
 static void  static void
 ssminphys(struct buf *bp)  ssminphys(struct buf *bp)
 {  {
         struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(bp->b_dev)];          struct ss_softc *ss = device_lookup_private(&ss_cd, SSUNIT(bp->b_dev));
         struct scsipi_periph *periph = ss->sc_periph;          struct scsipi_periph *periph = ss->sc_periph;
   
         scsipi_adapter_minphys(periph->periph_channel, bp);          scsipi_adapter_minphys(periph->periph_channel, bp);
Line 373  ssminphys(struct buf *bp)
Line 371  ssminphys(struct buf *bp)
 static int  static int
 ssread(dev_t dev, struct uio *uio, int flag)  ssread(dev_t dev, struct uio *uio, int flag)
 {  {
         struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(dev)];          struct ss_softc *ss = device_lookup_private(&ss_cd, SSUNIT(dev));
         int error;          int error;
   
         if (!device_is_active(&ss->sc_dev))          if (!device_is_active(&ss->sc_dev))
Line 400  ssread(dev_t dev, struct uio *uio, int f
Line 398  ssread(dev_t dev, struct uio *uio, int f
 static void  static void
 ssstrategy(struct buf *bp)  ssstrategy(struct buf *bp)
 {  {
         struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(bp->b_dev)];          struct ss_softc *ss = device_lookup_private(&ss_cd, SSUNIT(bp->b_dev));
         struct scsipi_periph *periph = ss->sc_periph;          struct scsipi_periph *periph = ss->sc_periph;
         int s;          int s;
   
Line 535  ssdone(struct scsipi_xfer *xs, int error
Line 533  ssdone(struct scsipi_xfer *xs, int error
 int  int
 ssioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)  ssioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
 {  {
         struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(dev)];          struct ss_softc *ss = device_lookup_private(&ss_cd, SSUNIT(dev));
         int error = 0;          int error = 0;
         struct scan_io *sio;          struct scan_io *sio;
   

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.73.6.1

CVSweb <webmaster@jp.NetBSD.org>