/testbed/scsipi/atapiconf.h

http://rtems-atapi.googlecode.com/ · C Header · 58 lines · 20 code · 9 blank · 29 comment · 0 complexity · 6a6fb52948188a2751edb10e55375ded MD5 · raw file

  1. /* $NetBSD: atapiconf.h,v 1.23 2009/10/19 18:41:16 bouyer Exp $ */
  2. /*
  3. * Copyright (c) 1996, 2001 Manuel Bouyer. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  15. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  16. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  17. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  18. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  19. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  20. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  21. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  23. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef _DEV_SCSIPI_ATAPICONF_H
  26. #define _DEV_SCSIPI_ATAPICONF_H
  27. #include "../sys/device.h"
  28. #include "scsipiconf.h"
  29. struct atapibus_softc {
  30. device_t sc_dev;
  31. struct scsipi_channel *sc_channel; /* our scsipi_channel */
  32. };
  33. extern const struct scsipi_periphsw atapi_probe_periphsw;
  34. /*
  35. * We need some more data than in scsipi_adapter.
  36. * So define a new atapi_adapter, we'll cast channel->chan_adapter to
  37. * atapi_adapter when we need the extra data (only in ATAPI code)
  38. */
  39. struct atapi_adapter {
  40. struct scsipi_adapter _generic;
  41. void (*atapi_probe_device)(struct atapibus_softc *, int);
  42. };
  43. void *atapi_probe_device(struct atapibus_softc *, int,
  44. struct scsipi_periph *, struct scsipibus_attach_args *);
  45. int atapiprint(void *, const char *);
  46. void atapi_print_addr(struct scsipi_periph *);
  47. int atapi_interpret_sense(struct scsipi_xfer *);
  48. void atapi_scsipi_cmd(struct scsipi_xfer *);
  49. #endif /* _DEV_SCSIPI_ATAPICONF_H */