2.6.11-rc3-bk5, oops in scsi_try_bus_reset
I see a few refcount handling bugs in the scsi and/or usb layer. With a vanilla kernel, plugging an usb stick in , and remove it a few times: usb 2-1: USB disconnect, address 4 Oops: kernel access of bad area, sig: 11 [#1] NIP: CDD3E424 LR: CDD05398 SP: C9713F40 REGS: c9713e90 TRAP: 0300Not tainted MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 DAR: 0130, DSISR: 4000 TASK = cae312c0[6674] 'scsi_eh_2' THREAD: c9712000 Last syscall: -1 GPR00: 00010718 C9713F40 CAE312C0 CDD146D0 0001 9032 GPR08: CAABF078 CB604800 C2801200 44088028 C07C67B8 0004 GPR16: C07D8B9A C07D69D0 CDD3 C9713F90 C03B286C C03433D8 C9713FA8 CDD3 GPR24: CAABF078 C2801200 C9713FA0 CAABF078 FFF0 C1711600 NIP [cdd3e424] bus_reset+0x64/0x134 [usb_storage] LR [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod] Call trace: [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod] [cdd068c4] scsi_error_handler+0x86c/0xe68 [scsi_mod] [c0006c2c] kernel_thread+0x44/0x60 Total memory = 192MB; using 512kB for hash table (at c050) Linux version 2.6.11-rc3-bk5-200502100455-usbtest ([EMAIL PROTECTED]) (gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)) #1 Thu Feb 10 05:07:02 UTC 2005 Found UniNorth memory controller host bridge, revision: 8 Mapped at 0xfdf0 Found a Keylargo mac-io controller, rev: 3, mapped at 0xfde8 Processor NAP mode on idle enabled. PowerMac motherboard: PowerBook Pismo Found UniNorth PCI host bridge at 0xf000. Firmware bus number: 0-0 Found UniNorth PCI host bridge at 0xf200. Firmware bus number: 0-1 Found UniNorth PCI host bridge at 0xf400. Firmware bus number: 0-0 via-pmu: Server Mode is disabled PMU driver 2 initialized for Core99, firmware: 0c nvram: Checking bank 0... nvram: gen0=172, gen1=171 nvram: Active bank is: 0 nvram: OF partition at 0x210 nvram: XP partition at 0x1220 nvram: NR partition at 0x1320 On node 0 totalpages: 49152 DMA zone: 49152 pages, LIFO batch:12 Normal zone: 0 pages, LIFO batch:1 HighMem zone: 0 pages, LIFO batch:1 Built 1 zonelists Kernel command line: root=/dev/hda12 selinux=0 elevator=as quiet PowerMac using OpenPIC irq controller at 0x8004 OpenPIC Version 1.2 (4 CPUs and 64 IRQ sources) at fc62f000 OpenPIC timer frequency is 4.16 MHz PID hash table entries: 1024 (order: 10, 16384 bytes) GMT Delta read from XPRAM: 60 minutes, DST: off time_init: decrementer frequency = 24.966218 MHz Console: colour dummy device 80x25 pmac_zilog: i2c-modem detected, id: 1 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Memory: 188000k available (2884k kernel code, 1828k data, 208k init, 0k highmem) AGP special page: 0xcbfff000 Calibrating delay loop... 796.67 BogoMIPS (lpj=398336) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 1084k freed NET: Registered protocol family 16 PCI: Probing PCI hardware Can't get bus-range for /[EMAIL PROTECTED]/[EMAIL PROTECTED], assuming it starts at 0 Registering openpic with sysfs... Linux Plug and Play Support v0.97 (c) Adam Belay usbcore: registered new driver usbfs usbcore: registered new driver hub TC classifier action (bugs to netdev@oss.sgi.com cc [EMAIL PROTECTED]) Thermal assist unit using timers, shrink_timer: 2000 jiffies audit: initializing netlink socket (disabled) audit(1108027661.271:0): initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Initializing Cryptographic API PCI: Enabling device :00:10.0 (0086 - 0087) aty128fb: Invalid ROM signature 0 should be 0xaa55 aty128fb: BIOS not located, guessing timings. aty128fb: Rage128 LF M3 AGP [chip rev 0x0] 8M 128-bit SDR SGRAM (1:1) Console: switching to colour frame buffer device 128x48 Registered ati backlight controller, level: 10/15 fb0: ATY Rage128 frame buffer device on Rage128 LF M3 AGP no framebuffer address found for /[EMAIL PROTECTED]/ATY,[EMAIL PROTECTED]/ATY,RageM3pB isapnp: Write Data Register 0xa79 already used Generic RTC Driver v1.07 Macintosh non-volatile memory driver v1.1 serial8250_init: nothing to do on this board pmac_zilog: 0.6 (Benjamin Herrenschmidt [EMAIL PROTECTED]) ttyS0 at MMIO 0x80013020 (irq = 22) is a Z85c30 ESCC - Internal modem ttyS1 at MMIO 0x80013000 (irq = 23) is a Z85c30 ESCC - Infrared port io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered Floppy drive(s): fd0 is 2.88M IN from bad port 3f4 at c01e2774 floppy0: no floppy controllers found RAMDISK driver initialized: 16 RAM disks of 123456K size 1024 blocksize loop: loaded (max 8 devices) MacIO PCI driver attached to Keylargo chipset mediabay0: Registered KeyLargo media-bay mediabay0: powering down mediabay0: switching to 3 mediabay0: powering up mediabay0: enabling (kind:3) mediabay0:
Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Thu, 10 Feb 2005, Olaf Hering wrote: I see a few refcount handling bugs in the scsi and/or usb layer. With a vanilla kernel, plugging an usb stick in , and remove it a few times: usb 2-1: USB disconnect, address 4 Oops: kernel access of bad area, sig: 11 [#1] NIP: CDD3E424 LR: CDD05398 SP: C9713F40 REGS: c9713e90 TRAP: 0300Not tainted MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 DAR: 0130, DSISR: 4000 TASK = cae312c0[6674] 'scsi_eh_2' THREAD: c9712000 Last syscall: -1 GPR00: 00010718 C9713F40 CAE312C0 CDD146D0 0001 9032 GPR08: CAABF078 CB604800 C2801200 44088028 C07C67B8 0004 GPR16: C07D8B9A C07D69D0 CDD3 C9713F90 C03B286C C03433D8 C9713FA8 CDD3 GPR24: CAABF078 C2801200 C9713FA0 CAABF078 FFF0 C1711600 NIP [cdd3e424] bus_reset+0x64/0x134 [usb_storage] LR [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod] Call trace: [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod] [cdd068c4] scsi_error_handler+0x86c/0xe68 [scsi_mod] [c0006c2c] kernel_thread+0x44/0x60 It's hard to tell for sure, but this looks much like the SCSI midlayer bug encountered by Srihari Vijayaraghavan in http://marc.theaimsgroup.com/?l=linux-usb-develm=110535224408095w=2 My response (unfortunately the email thread continuity got messed up) was http://marc.theaimsgroup.com/?l=linux-scsim=110537890416616w=2 And Mike Anderson's response was http://marc.theaimsgroup.com/?l=linux-scsim=110538854224319w=2 His explanation was Currently scsi_host_cancel being called from scsi_remove_host appears to not do anything as scsi_forget_host removes the devices from the list it iterates over. I don't know whether this problem has been fixed yet. Alan Stern - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] qla1280: update changelog
--- 1.72/drivers/scsi/qla1280.c 2004-10-22 06:20:31 +02:00 +++ edited/drivers/scsi/qla1280.c 2005-02-10 13:42:44 +01:00 @@ -20,6 +20,9 @@ #define QLA1280_VERSION 3.25 /* Revision History: +Rev 3.25.1, February 10, 2005 Christoph Hellwig + - use pci_map_single to map non-S/G requests + - remove qla1280_proc_info Rev 3.25, September 28, 2004, Christoph Hellwig - add support for ISP1020/1040 - don't include scsi.h anymore for 2.6.x - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] qla1280: user pci_map_single
--- 1.72/drivers/scsi/qla1280.c 2004-10-22 06:20:31 +02:00 +++ edited/drivers/scsi/qla1280.c 2005-02-10 13:42:44 +01:00 @@ -1571,16 +1465,12 @@ qla1280_done(struct scsi_qla_host *ha) /* Release memory used for this I/O */ if (cmd-use_sg) { - dprintk(3, S/G unmap_sg cmd=%p\n, cmd); - pci_unmap_sg(ha-pdev, cmd-request_buffer, -cmd-use_sg, cmd-sc_data_direction); + cmd-use_sg, cmd-sc_data_direction); } else if (cmd-request_bufflen) { - /*dprintk(1, No S/G unmap_single cmd=%x saved_dma_handle=%lx\n, - cmd, sp-saved_dma_handle); */ - - pci_unmap_page(ha-pdev, sp-saved_dma_handle, - cmd-request_bufflen, cmd-sc_data_direction); + pci_unmap_single(ha-pdev, sp-saved_dma_handle, + cmd-request_bufflen, + cmd-sc_data_direction); } /* Call the mid-level driver interrupt handler */ @@ -3354,14 +3244,11 @@ qla1280_64bit_start_scsi(struct scsi_qla REQUEST_ENTRY_SIZE); } } else {/* No scatter gather data transfer */ - struct page *page = virt_to_page(cmd-request_buffer); - unsigned long off = (unsigned long)cmd-request_buffer ~PAGE_MASK; - - dma_handle = pci_map_page(ha-pdev, page, off, - cmd-request_bufflen, - cmd-sc_data_direction); + dma_handle = pci_map_single(ha-pdev, + cmd-request_buffer, + cmd-request_bufflen, + cmd-sc_data_direction); - /* save dma_handle for pci_unmap_page */ sp-saved_dma_handle = dma_handle; #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) if (ha-flags.use_pci_vchannel) @@ -3636,11 +3523,10 @@ qla1280_32bit_start_scsi(struct scsi_qla REQUEST_ENTRY_SIZE); } } else {/* No S/G data transfer */ - struct page *page = virt_to_page(cmd-request_buffer); - unsigned long off = (unsigned long)cmd-request_buffer ~PAGE_MASK; - dma_handle = pci_map_page(ha-pdev, page, off, - cmd-request_bufflen, - cmd-sc_data_direction); + dma_handle = pci_map_single(ha-pdev, + cmd-request_buffer, + cmd-request_bufflen, + cmd-sc_data_direction); sp-saved_dma_handle = dma_handle; *dword_ptr++ = cpu_to_le32(pci_dma_lo32(dma_handle)); - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[BK PATCH] SCSI bug fixes for 2.6.11-rc3
This is a set of four bug fixes each with a corresponding user oops report and one well tested driver update. The patch is available at bk://linux-scsi.bkbits.net/scsi-rc-fixes-2.6 The short changelog is Andreas Herrmann: o zfcp: bugfixes (without kfree) for -bk Andrew Vasquez: o qla2xxx: fix BUG's for smp_processor_id() on interrupt Christoph Hellwig: o cciss: handle scsi_add_host failure James Bottomley: o SCSI: fix HBA removal problem with transport classes Seokmann Ju: o megaraid_mbox 2.20.4.3 patch and the diffstat is: Documentation/scsi/ChangeLog.megaraid | 104 drivers/block/cciss_scsi.c | 15 - drivers/s390/scsi/zfcp_erp.c |6 drivers/s390/scsi/zfcp_fsf.c | 37 +-- drivers/scsi/megaraid/Kconfig.megaraid |1 drivers/scsi/megaraid/mega_common.h|3 drivers/scsi/megaraid/megaraid_ioctl.h |1 drivers/scsi/megaraid/megaraid_mbox.c | 403 - drivers/scsi/megaraid/megaraid_mbox.h | 24 + drivers/scsi/megaraid/megaraid_mm.c| 39 +++ drivers/scsi/megaraid/megaraid_mm.h|5 drivers/scsi/qla2xxx/qla_isr.c |4 drivers/scsi/scsi_transport_fc.c |3 drivers/scsi/scsi_transport_iscsi.c|4 drivers/scsi/scsi_transport_spi.c |3 15 files changed, 604 insertions(+), 48 deletions(-) James - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] mark qlogicfc broken
The hardware is supported by qla2xxx which is much better (and maintained) driver. Keeping the driver around confuses people to actually use it with severe results, e.g. http://marc.theaimsgroup.com/?l=linux-kernelm=110656624623547w=2 --- 1.95/drivers/scsi/Kconfig 2005-01-28 18:14:29 +01:00 +++ edited/drivers/scsi/Kconfig 2005-02-10 14:59:56 +01:00 @@ -1270,7 +1248,7 @@ config SCSI_QLOGIC_FC tristate Qlogic ISP FC SCSI support - depends on PCI SCSI + depends on PCI SCSI BROKEN help This is a driver for the QLogic ISP2100 SCSI-FCP host adapter. - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] mark qlogicisp broken
It's lacking EH support and the hardware is supported by the qla1280 driver now. --- 1.95/drivers/scsi/Kconfig 2005-01-28 18:14:29 +01:00 +++ edited/drivers/scsi/Kconfig 2005-02-10 14:59:56 +01:00 @@ -1249,7 +1227,7 @@ config SCSI_QLOGIC_ISP tristate Qlogic ISP SCSI support (old driver) - depends on PCI SCSI + depends on PCI SCSI BROKEN ---help--- This driver works for all QLogic PCI SCSI host adapters (IQ-PCI, IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card. (This latter - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] mark eata_pio broken
it oopses when trying to use it with my SmartRaid IV card, it's a mess and the only hardware supported by it but not the eata driver are two 10-year old ISA boards. --- 1.95/drivers/scsi/Kconfig 2005-01-28 18:14:29 +01:00 +++ edited/drivers/scsi/Kconfig 2005-02-10 14:59:56 +01:00 @@ -611,7 +611,7 @@ config SCSI_EATA_PIO tristate EATA-PIO (old DPT PM2001, PM2012A) support - depends on (ISA || EISA || PCI) SCSI + depends on (ISA || EISA || PCI) SCSI BROKEN ---help--- This driver supports all EATA-PIO protocol compliant SCSI Host Adapters like the DPT PM2001 and the PM2012A. EATA-DMA compliant - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html