On Wed, 2009-08-12 at 02:47 +0100, Ben Hutchings wrote: > On Fri, 2009-07-31 at 11:36 -0400, R. Scott Bailey wrote: > > Package: linux-image-2.6.30-1-alpha-smp > > Version: 2.6.30-2 > > Severity: important > > > > Well, the firmware loading logic has been flaky on my system for a few > > releases now. I previously reported bug 527265 against 2.6.29, where the > > qla1040 firmware would not load at all, and that was resolved in a later > > 2.6.29 image. > > > > In this release (2.6.30-2) I get new/different bad behavior. My system > > has three QLA1040 cards in it. In the attached console output from the boot, > > notice that at time 23.256824, the first adapter (scsi0) is located, > > generates a stack trace trying to load firmware, and fails to initialize > > the card. (There goes my tape drive!) A little later, at 83.499957, the > > second adapter is found and this time the firmware loads fine. Ditto for > > the third adapter after that. > [...] > > The warning that is triggered here will only appear once and does not > necessarily lead to failure. So it may be a mere coincidence that the > first card is not initialised properly. > > Anyway, this is clearly a bug in the firmware loading code. I have a possible fix but since you're using an Alpha I will have to ask you to rebuild the kernel in order to test it. You can build a custom kernel with the attached patch applied, but unless you are used to doing that you may have difficulty configuring it correctly. Below are instructions for rebuilding the official kernel image with just this change. These commands are based on <http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official> which has some more explanation. Please save the attached patch to a file. As root, run: apt-get install build-essential fakeroot apt-get build-dep linux-2.6 As a normal user, run: apt-get source linux-2.6 cd linux-2.6-2.6.30-* make -f debian/rules.gen setup_alpha_none_alpha-smp In the next command, you need to change "/tmp" to the directory you saved the patch file in: (cd debian/build/source_alpha_none && patch -p1 < /tmp/drivers-scsi-qla1280-request-firmware-unlocked.patch) fakeroot make -f debian/rules.gen binary-arch_alpha_none_alpha-smp This should (eventually) result in a new kernel package you can install as an upgrade to the current 2.6.30 kernel. Please report your results. Ben. -- Ben Hutchings Never put off till tomorrow what you can avoid all together.
commit 480c1e36532fc2783834d9582a11fbf1d493af42 Author: Ben Hutchings <ben@decadent.org.uk> Date: Sun Aug 16 03:42:24 2009 +0100 qla1280: Drop host_lock while requesting firmware request_firmware() may sleep and it appears to be safe to release the spinlock here. diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 5defe5e..97cbf12 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -1642,8 +1642,10 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha) uint16_t mb[MAILBOX_REGISTER_COUNT], i; int err; + spin_unlock_irq(ha->host->host_lock); err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, &ha->pdev->dev); + spin_lock_irq(ha->host->host_lock); if (err) { printk(KERN_ERR "Failed to load image \"%s\" err %d\n", ql1280_board_tbl[ha->devnum].fwname, err); @@ -1701,8 +1703,10 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) return -ENOMEM; #endif + spin_unlock_irq(ha->host->host_lock); err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, &ha->pdev->dev); + spin_lock_irq(ha->host->host_lock); if (err) { printk(KERN_ERR "Failed to load image \"%s\" err %d\n", ql1280_board_tbl[ha->devnum].fwname, err);
Attachment:
signature.asc
Description: This is a digitally signed message part