From: Chunbo Luo <chunbo.luo@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: jeff@garzik.org
Subject: [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled
Date: Fri, 27 Jun 2008 10:20:46 +0800 [thread overview]
Message-ID: <1214533246.6284.10.camel@pek-cluo> (raw)
Hi
When ata_scsi_scan_host() scan device failed, it will start a work queue
unconditionally. This may cause some noisy messages. This patch fix this
problem.
---
commit 6c686a6814a805782c7ab48ad89352ee309e8c32
Author: Chunbo Luo <chunbo.luo@windriver.com>
Date: Fri Jun 27 09:56:52 2008 +0800
libata-scsi: Don't start hotplug work queue if hotplug is disabled
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>
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 57a4364..7ed5bb3 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3108,8 +3108,9 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
" 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));
}
/**
---
Best Regards
Chunbo
next reply other threads:[~2008-06-27 2:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 2:20 Chunbo Luo [this message]
2008-07-18 13:33 ` [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled Tejun Heo
2008-07-21 3:03 ` Chunbo Luo
2008-07-21 4:40 ` Tejun Heo
2008-07-21 6:16 ` Chunbo Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214533246.6284.10.camel@pek-cluo \
--to=chunbo.luo@windriver.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.