638 /* Figure out Block Size before issuing a WRITE to CD-RW device */
639 #define SCSA2USB_CDRW_BLKSZ(bcount, len) ((bcount) / (len));
640 #define SCSA2USB_VALID_CDRW_BLKSZ(blksz) \
641 (((blksz) == CDROM_BLK_2048) || ((blksz) == CDROM_BLK_2352) || \
642 ((blksz) == CDROM_BLK_2336) || ((blksz) == CDROM_BLK_2324) || \
643 ((blksz) == 0))
644
645 /* debug and error msg logging */
646 #define DPRINT_MASK_SCSA 0x0001 /* for SCSA */
647 #define DPRINT_MASK_ATTA 0x0002 /* for ATTA */
648 #define DPRINT_MASK_EVENTS 0x0004 /* for event handling */
649 #define DPRINT_MASK_CALLBACKS 0x0008 /* for callbacks */
650 #define DPRINT_MASK_TIMEOUT 0x0010 /* for timeouts */
651 #define DPRINT_MASK_DUMPING 0x0020 /* for dumping */
652 #define DPRINT_MASK_PM 0x0040 /* for pwr mgmt */
653 #define DPRINT_MASK_ALL 0xffffffff /* for everything */
654
655 #ifdef DEBUG
656 #define SCSA2USB_PRINT_CDB scsa2usb_print_cdb
657 #else
658 #define SCSA2USB_PRINT_CDB(...)
659 #endif
660
661 /* ugen support */
662 #define SCSA2USB_MINOR_UGEN_BITS_MASK 0xff
663 #define SCSA2USB_MINOR_INSTANCE_MASK ~SCSA2USB_MINOR_UGEN_BITS_MASK
664 #define SCSA2USB_MINOR_INSTANCE_SHIFT 8
665
666 #define SCSA2USB_MINOR_TO_INSTANCE(minor) \
667 (((minor) & SCSA2USB_MINOR_INSTANCE_MASK) >> \
668 SCSA2USB_MINOR_INSTANCE_SHIFT)
669
670 #ifdef __cplusplus
671 }
672 #endif
673
674 #endif /* _SYS_USB_SCSA2USB_H */
|
638 /* Figure out Block Size before issuing a WRITE to CD-RW device */
639 #define SCSA2USB_CDRW_BLKSZ(bcount, len) ((bcount) / (len));
640 #define SCSA2USB_VALID_CDRW_BLKSZ(blksz) \
641 (((blksz) == CDROM_BLK_2048) || ((blksz) == CDROM_BLK_2352) || \
642 ((blksz) == CDROM_BLK_2336) || ((blksz) == CDROM_BLK_2324) || \
643 ((blksz) == 0))
644
645 /* debug and error msg logging */
646 #define DPRINT_MASK_SCSA 0x0001 /* for SCSA */
647 #define DPRINT_MASK_ATTA 0x0002 /* for ATTA */
648 #define DPRINT_MASK_EVENTS 0x0004 /* for event handling */
649 #define DPRINT_MASK_CALLBACKS 0x0008 /* for callbacks */
650 #define DPRINT_MASK_TIMEOUT 0x0010 /* for timeouts */
651 #define DPRINT_MASK_DUMPING 0x0020 /* for dumping */
652 #define DPRINT_MASK_PM 0x0040 /* for pwr mgmt */
653 #define DPRINT_MASK_ALL 0xffffffff /* for everything */
654
655 #ifdef DEBUG
656 #define SCSA2USB_PRINT_CDB scsa2usb_print_cdb
657 #else
658 #define SCSA2USB_PRINT_CDB(...) (void)(0)
659 #endif
660
661 /* ugen support */
662 #define SCSA2USB_MINOR_UGEN_BITS_MASK 0xff
663 #define SCSA2USB_MINOR_INSTANCE_MASK ~SCSA2USB_MINOR_UGEN_BITS_MASK
664 #define SCSA2USB_MINOR_INSTANCE_SHIFT 8
665
666 #define SCSA2USB_MINOR_TO_INSTANCE(minor) \
667 (((minor) & SCSA2USB_MINOR_INSTANCE_MASK) >> \
668 SCSA2USB_MINOR_INSTANCE_SHIFT)
669
670 #ifdef __cplusplus
671 }
672 #endif
673
674 #endif /* _SYS_USB_SCSA2USB_H */
|