diff options
author | Tejun Heo | 2007-05-01 11:50:15 +0200 |
---|---|---|
committer | Jeff Garzik | 2007-05-12 00:09:18 +0200 |
commit | f4d6d00466ef4879e4289f18c2f59210a06a7ada (patch) | |
tree | 60a0ec3c2872f1f21c2b546af3e04990b3bfa60b /include/linux | |
parent | libata: clean up SFF init mess (diff) | |
download | kernel-qcow2-linux-f4d6d00466ef4879e4289f18c2f59210a06a7ada.tar.gz kernel-qcow2-linux-f4d6d00466ef4879e4289f18c2f59210a06a7ada.tar.xz kernel-qcow2-linux-f4d6d00466ef4879e4289f18c2f59210a06a7ada.zip |
libata: ignore EH scheduling during initialization
libata enables SCSI host during ATA host activation which happens
after IRQ handler is registered and IRQ is enabled. All ATA ports are
in frozen state when IRQ is enabled but frozen ports may raise limited
number of IRQs after being frozen - IOW, ->freeze() is not responsible
for clearing pending IRQs. During normal operation, the IRQ handler
is responsible for clearing spurious IRQs on frozen ports and it
usually doesn't require any extra code.
Unfortunately, during host initialization, the IRQ handler can end up
scheduling EH for a port whose SCSI host isn't initialized yet. This
results in OOPS in the SCSI midlayer. This is relatively short window
and scheduling EH for probing is the first thing libata does after
initialization, so ignoring EH scheduling until initialization is
complete solves the problem nicely.
This problem was spotted by Berck E. Nash in the following thread.
http://thread.gmane.org/gmane.linux.kernel/519412
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Berck E. Nash <flyboy@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 95b74ba7dbf4..90abcdc3d4ef 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -190,6 +190,7 @@ enum { ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */ ATA_PFLAG_UNLOADING = (1 << 5), /* module is unloading */ ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ + ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |