* [patch 1/2] libata-scsi: don't start hotplug work queue if hotplug is disabled
@ 2008-07-30 19:32 akpm
2008-07-30 22:42 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-07-30 19:32 UTC (permalink / raw)
To: jeff; +Cc: linux-ide, akpm, chunbo.luo, tj
From: Chunbo Luo <chunbo.luo@windriver.com>
Previously, queue_delayed_work() was started unconditionally, but if
ATA_PFLAG_SCSI_HOTPLUG is not set and we do this, the work queue may cause
multiple messages like this:
ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
So now,it is only started when the hotplug flag is actually set.
Signed-off-by: Chunbo Luo <chunbo.luo@windriver.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/ata/libata-scsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN drivers/ata/libata-scsi.c~libata-scsi-dont-start-hotplug-work-queue-if-hotplug-is-disabled drivers/ata/libata-scsi.c
--- a/drivers/ata/libata-scsi.c~libata-scsi-dont-start-hotplug-work-queue-if-hotplug-is-disabled
+++ a/drivers/ata/libata-scsi.c
@@ -3206,8 +3206,9 @@ void ata_scsi_scan_host(struct ata_port
" switching to async\n");
}
- queue_delayed_work(ata_aux_wq, &ap->hotplug_task,
- round_jiffies_relative(HZ));
+ if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG)
+ queue_delayed_work(ata_aux_wq, &ap->hotplug_task,
+ round_jiffies_relative(HZ));
}
/**
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 1/2] libata-scsi: don't start hotplug work queue if hotplug is disabled
2008-07-30 19:32 [patch 1/2] libata-scsi: don't start hotplug work queue if hotplug is disabled akpm
@ 2008-07-30 22:42 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2008-07-30 22:42 UTC (permalink / raw)
To: akpm; +Cc: jeff, linux-ide, chunbo.luo
akpm@linux-foundation.org wrote:
> From: Chunbo Luo <chunbo.luo@windriver.com>
>
> Previously, queue_delayed_work() was started unconditionally, but if
> ATA_PFLAG_SCSI_HOTPLUG is not set and we do this, the work queue may cause
> multiple messages like this:
>
> ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
>
> So now,it is only started when the hotplug flag is actually set.
>
> Signed-off-by: Chunbo Luo <chunbo.luo@windriver.com>
> Cc: Jeff Garzik <jeff@garzik.org>
> Cc: Tejun Heo <tj@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Oops, I forgot to send the alternative patch (verified by Chunbo). I'm
sending it to Jeff now and cc'ing you. Please drop this one when the
patch hits -mm.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 22:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 19:32 [patch 1/2] libata-scsi: don't start hotplug work queue if hotplug is disabled akpm
2008-07-30 22:42 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).