Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/dev/wip/libumass add cd@scsi and cd@atapi (untested...



details:   https://anonhg.NetBSD.org/src/rev/9ef7bf8c6344
branches:  trunk
changeset: 751959:9ef7bf8c6344
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 09 19:02:19 2010 +0000

description:
add cd@scsi and cd@atapi (untested. if you have a usb cd drive, let me know)

diffstat:

 sys/rump/dev/wip/libumass/Makefile                 |   6 ++++--
 sys/rump/dev/wip/libumass/UMASS.ioconf             |  18 ++++++++++++++++--
 sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c |   7 +++++--
 3 files changed, 25 insertions(+), 6 deletions(-)

diffs (83 lines):

diff -r 531313f20a29 -r 9ef7bf8c6344 sys/rump/dev/wip/libumass/Makefile
--- a/sys/rump/dev/wip/libumass/Makefile        Tue Feb 09 18:57:03 2010 +0000
+++ b/sys/rump/dev/wip/libumass/Makefile        Tue Feb 09 19:02:19 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2010/02/03 21:18:38 pooka Exp $
+#      $NetBSD: Makefile,v 1.4 2010/02/09 19:02:19 pooka Exp $
 #
 #
 # umass.  includes scsibus+sd for simplicity due to the umass code
@@ -10,9 +10,11 @@
 LIB=   rumpdev_umass
 
 SRCS=  umass.c umass_isdata.c umass_quirks.c umass_scsipi.c
-SRCS+= scsipiconf.c scsipi_base.c scsipi_ioctl.c scsi_base.c scsiconf.c sd.c
+SRCS+= scsipiconf.c scsipi_base.c scsipi_ioctl.c scsi_base.c scsiconf.c
 SRCS+= atapi_base.c atapiconf.c
 
+SRCS+= cd.c sd.c
+
 SRCS+= sd_at_scsibus_at_umass.c
 
 IOCONFIG= UMASS.ioconf
diff -r 531313f20a29 -r 9ef7bf8c6344 sys/rump/dev/wip/libumass/UMASS.ioconf
--- a/sys/rump/dev/wip/libumass/UMASS.ioconf    Tue Feb 09 18:57:03 2010 +0000
+++ b/sys/rump/dev/wip/libumass/UMASS.ioconf    Tue Feb 09 19:02:19 2010 +0000
@@ -1,4 +1,11 @@
-#      $NetBSD: UMASS.ioconf,v 1.2 2010/02/04 00:37:08 pooka Exp $
+#      $NetBSD: UMASS.ioconf,v 1.3 2010/02/09 19:02:19 pooka Exp $
+#
+
+#
+# Technically we should not have drive components (sd, cd) in here,
+# since in the future we might want to attach them via a completely
+# separate mechanism (say, with the scsi host controller in rump).
+# But, bundle them up for now.
 #
 
 ioconf umass
@@ -10,8 +17,15 @@
 
 # USB Mass Storage
 umass* at uhub? port ? configuration ? interface ?
+
+# SCSI support
 scsibus* at scsi?
 sd*    at scsibus? target ? lun ?
 
+# ATAPI support
 atapibus* at atapi?
-sd*    at atapibus? drive ?
+sd*    at atapibus? drive ? flags 0x0000
+
+# cd drives (untested!)
+cd*    at scsibus? target ? lun ?
+cd*    at atapibus? drive ? flags 0x0000
diff -r 531313f20a29 -r 9ef7bf8c6344 sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c
--- a/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c        Tue Feb 09 18:57:03 2010 +0000
+++ b/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c        Tue Feb 09 19:02:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd_at_scsibus_at_umass.c,v 1.7 2010/02/03 21:18:38 pooka Exp $ */
+/*     $NetBSD: sd_at_scsibus_at_umass.c,v 1.8 2010/02/09 19:02:19 pooka Exp $ */
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -23,7 +23,7 @@
 {
        extern struct cfattach rumpusbhc_ca;
        extern struct cfattach usb_ca, uhub_ca, uroothub_ca, umass_ca;
-       extern struct cfattach scsibus_ca, atapibus_ca, sd_ca;
+       extern struct cfattach scsibus_ca, atapibus_ca, sd_ca, cd_ca;
        extern struct bdevsw sd_bdevsw;
        extern struct cdevsw sd_cdevsw;
        devmajor_t bmaj, cmaj;
@@ -54,6 +54,9 @@
        FLAWLESSCALL(config_cfdriver_attach(&sd_cd));
        FLAWLESSCALL(config_cfattach_attach("sd", &sd_ca));
 
+       FLAWLESSCALL(config_cfdriver_attach(&cd_cd));
+       FLAWLESSCALL(config_cfattach_attach("cd", &cd_ca));
+
        FLAWLESSCALL(config_cfattach_attach("uhub", &uroothub_ca));
 
        bmaj = cmaj = -1;



Home | Main Index | Thread Index | Old Index