Using the ide_tape driver (OnStream ADR
Using the ide_tape driver (OnStream ADR² 60) on a 2.6.16-gentoo-r8 kernel (.config attached) results in the following (repeated) kernel messages: Badness in dma_map_sg at include/asm/dma-mapping.h:47 [<c02e2de5>] ide_build_sglist+0xc5/0xe0 [<c02e2e3c>] ide_build_dmatable+0x3c/0x140 [<c02e31db>] ide_dma_setup+0x2b/0xa0 [<c88bd055>] idetape_issue_packet_command+0x205/0x250 [ide_tape] [<c88bd8f3>] idetape_do_request+0x1c3/0x2f0 [ide_tape] [<c02dc0d3>] start_request+0x123/0x200 [<c02dc3ea>] ide_do_request+0x20a/0x350 [<c02dc954>] ide_intr+0xc4/0x100 [<c88bc9f0>] idetape_pc_intr+0x0/0x330 [ide_tape] [<c0131db8>] handle_IRQ_event+0x28/0x70 [<c0131e57>] __do_IRQ+0x57/0xa0 [<c010462a>] do_IRQ+0x1a/0x30 [<c0102f7a>] common_interrupt+0x1a/0x20 [<c0396bd3>] cleanup_rbuf+0xe3/0x110 [<c0397104>] tcp_recvmsg+0x2e4/0x720 [<c0372808>] sock_common_recvmsg+0x38/0x50 [<c036f5c2>] do_sock_read+0x82/0x90 [<c036f731>] sock_aio_read+0x61/0x70 [<c03a26ad>] tcp_send_delayed_ack+0xbd/0xe0 [<c03a576f>] tcp_v4_do_rcv+0xcf/0xe0 [<c014d1c8>] do_sync_read+0xb8/0x100 [<c038c5d0>] ip_local_deliver_finish+0x0/0x140 [<c0126c70>] autoremove_wake_function+0x0/0x40 [<c03789e2>] netif_receive_skb+0x132/0x1a0 [<c014d330>] vfs_read+0x120/0x130 [<c014d5ad>] sys_read+0x3d/0x70 [<c0102d09>] syscall_call+0x7/0xb Badness in dma_map_sg at include/asm/dma-mapping.h:47 [<c02e2de5>] ide_build_sglist+0xc5/0xe0 [<c02e2e3c>] ide_build_dmatable+0x3c/0x140 [<c02e31db>] ide_dma_setup+0x2b/0xa0 [<c88bd055>] idetape_issue_packet_command+0x205/0x250 [ide_tape] [<c88bd8f3>] idetape_do_request+0x1c3/0x2f0 [ide_tape] [<c02dc0d3>] start_request+0x123/0x200 [<c02dc3ea>] ide_do_request+0x20a/0x350 [<c02dc954>] ide_intr+0xc4/0x100 [<c88bc9f0>] idetape_pc_intr+0x0/0x330 [ide_tape] [<c0131db8>] handle_IRQ_event+0x28/0x70 [<c0131e57>] __do_IRQ+0x57/0xa0 [<c010462a>] do_IRQ+0x1a/0x30 [<c0102f7a>] common_interrupt+0x1a/0x20 The following modules are loaded: Module Size Used by ipt_MASQUERADE 2816 1 iptable_nat 6532 1 ip_nat 15148 2 ipt_MASQUERADE,iptable_nat ip_conntrack 45996 3 ipt_MASQUERADE,iptable_nat,ip_nat nfnetlink 5272 2 ip_nat,ip_conntrack ip_tables 10840 1 iptable_nat x_tables 9476 3 ipt_MASQUERADE,iptable_nat,ip_tables ppp_deflate 4992 0 zlib_deflate 20248 1 ppp_deflate zlib_inflate 16640 1 ppp_deflate bsd_comp 5760 0 ppp_async 8704 1 crc_ccitt 2048 1 ppp_async ppp_generic 19732 7 ppp_deflate,bsd_comp,ppp_async slhc 6400 1 ppp_generic ne2k_pci 8800 0 8390 7936 1 ne2k_pci r8169 23432 0 3c59x 39720 0 ide_tape 32880 2 There is a debian bugreport here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327355 The only difference is that I do not experience the kernel panic (not yet at least). emerge --info: Portage 2.1_pre4-r1 (default-linux/x86/2006.0, gcc-3.3.6, glibc-2.3.5-r3, 2.6.16-gentoo-r8 i686) ================================================================= System uname: 2.6.16-gentoo-r8 i686 Celeron (Coppermine) Gentoo Base System version 1.12.0_pre19 dev-lang/python: 2.2.1-r5, 2.4.2-r1 dev-python/pycrypto: 2.0.1-r3 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.4.1-r10, 1.5.20 virtual/os-headers: 2.4.19 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i586-pc-linux-gnu" CFLAGS="-mcpu=pentium2 -O3 -pipe" CHOST="i586-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=pentium2 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts cli crypt cups dri eds emboss encode esd foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imap imlib ipv6 isdnlog jpeg libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png pppd python quicktime readline reflection samba sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_ati video_cards_fglrx video_cards_vesa" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY
Created attachment 87572 [details] .config of the running kernel
Please list the other kernels you have tried, and whether each one has this bug or not.
Please reopen when you respond to comment #2
I have run into an extremely similar problem, and I expect it is due to the same bug as was earlier referenced in Debian, #327355. I am also using the ide_tape driver (HP Colorado 8GB Internal) on a 2.6.16-gentoo-r9 kernel. When I access the drive, this appears constantly (as frequently as tail -f updates) in my kernel messages as long as the drive is in use: Badness in dma_map_sg at include/asm/dma-mapping.h:47 [<c02b5689>] ide_build_sglist+0xc9/0xe0 [<c02b56db>] ide_build_dmatable+0x3b/0x160 [<c02b5ae3>] ide_dma_setup+0x23/0xa0 [<e096f178>] idetape_issue_packet_command+0x258/0x280 [ide_tape] [<e096f8f3>] idetape_do_request+0x73/0x320 [ide_tape] [<c02ae40f>] start_request+0x1cf/0x260 [<c02ae7e7>] ide_do_request+0x307/0x400 [<c02aed75>] ide_intr+0xd5/0x140 [<c013ec10>] handle_IRQ_event+0x30/0x80 [<c013ece7>] __do_IRQ+0x87/0xe0 [<c01057f9>] do_IRQ+0x19/0x40 [<c0103d5a>] common_interrupt+0x1a/0x20 [<c027cb46>] acpi_processor_idle+0x16b/0x2e4 [<c0100d97>] cpu_idle+0x37/0x80 [<c04628b2>] start_kernel+0x152/0x180 Badness in dma_map_sg at include/asm/dma-mapping.h:47 [<c02b5689>] ide_build_sglist+0xc9/0xe0 [<c02b56db>] ide_build_dmatable+0x3b/0x160 [<c02b5ae3>] ide_dma_setup+0x23/0xa0 [<e096f178>] idetape_issue_packet_command+0x258/0x280 [ide_tape] [<e096f8f3>] idetape_do_request+0x73/0x320 [ide_tape] [<c02ae40f>] start_request+0x1cf/0x260 [<c02ae7e7>] ide_do_request+0x307/0x400 [<c02aed75>] ide_intr+0xd5/0x140 [<c013ec10>] handle_IRQ_event+0x30/0x80 [<c013ece7>] __do_IRQ+0x87/0xe0 [<c01057f9>] do_IRQ+0x19/0x40 [<c0103d5a>] common_interrupt+0x1a/0x20 [<c0394b18>] sha_transform+0x158/0x200 [<c0247760>] extract_buf+0x40/0x100 [<c023dbd0>] copy_to_user+0x30/0x60 [<c024791a>] extract_entropy_user+0x5a/0xe0 [<c0247c52>] urandom_read+0x12/0x20 [<c015e5a4>] vfs_read+0x84/0x140 [<c0102de9>] syscall_call+0x7/0xb Attempts to use the ide-scsi module (to get more complete information through mt status) result in a kernel panic when writing to the drive, which is not saved due to it not syncing. So far, using ide-tape, it appears to work, but still kicks out those errors. My own emerge --info is: Portage 2.1-r1 (default-linux/x86/no-nptl, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r9 i586) ================================================================= System uname: 2.6.16-gentoo-r9 i586 AMD-K6(tm) 3D processor Gentoo Base System version 1.6.14 distcc 2.18.3 i386-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.12-r6 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i386-pc-linux-gnu" CFLAGS="-O2 -mtune=i686 -pipe" CHOST="i386-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O2 -mtune=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distcc distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://192.168.0.2/gentoo-portage" USE="x86 X alsa apm arts avi berkdb bitmap-fonts cli crypt cups dlloader dri eds emboss encode foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls ogg opengl oss pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_r128 video_cards_mach64 video_cards_vesa video_cards_vga" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
I have discovered, for now, how to avoid the Badness error messages. While updating the firmware of the HP tape drive, I happened to plug the drive into a Promise PDC20268 controller, and on boot, it was identified as a PIO4 device. The tape drive is currently attached to a VIA vt82c586b chipset controller, and it assigns it DMA capabilities - mdma2, according to hdparm. While hdparm fails to successfully change the drive to any PIO mode, setting -x sdma0 -d0 eliminates the 40+ lines of badness errors a second that were being generated, and the drive currently appears to be functioning correctly.