From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Jody McIntyre <scjody@modernduck.com>,
Ben Collins <bcollins@ubuntu.com>
Subject: [PATCH 3/4 resend] sbp2: add ability to override hardwired blacklist
Date: Mon, 15 May 2006 22:08:09 +0200 (CEST) [thread overview]
Message-ID: <tkrat.621eda7433bd0a08@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.7e87b6d07dda409e@s5r6.in-berlin.de>
In case the blacklist with workarounds for device bugs yields a false
positive, the module load parameter can now also be used as an override
instead of an addition to the blacklist.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
First posted on 2006-04-14.
This patch is already in -mm.
Index: linux-2.6.17-rc4/drivers/ieee1394/sbp2.h
===================================================================
--- linux-2.6.17-rc4.orig/drivers/ieee1394/sbp2.h 2006-05-15 21:51:13.000000000 +0200
+++ linux-2.6.17-rc4/drivers/ieee1394/sbp2.h 2006-05-15 21:52:18.000000000 +0200
@@ -239,6 +239,7 @@ struct sbp2_status_block {
#define SBP2_WORKAROUND_INQUIRY_36 0x2
#define SBP2_WORKAROUND_MODE_SENSE_8 0x4
#define SBP2_WORKAROUND_FIX_CAPACITY 0x8
+#define SBP2_WORKAROUND_OVERRIDE 0x100
/* This is the two dma types we use for cmd_dma below */
enum cmd_dma_types {
Index: linux-2.6.17-rc4/drivers/ieee1394/sbp2.c
===================================================================
--- linux-2.6.17-rc4.orig/drivers/ieee1394/sbp2.c 2006-05-15 21:51:13.000000000 +0200
+++ linux-2.6.17-rc4/drivers/ieee1394/sbp2.c 2006-05-15 21:52:18.000000000 +0200
@@ -156,6 +156,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclu
* Tell sd_mod to correct the last sector number reported by read_capacity.
* Avoids access beyond actual disk limits on devices with an off-by-one bug.
* Don't use this with devices which don't have this bug.
+ *
+ * - override internal blacklist
+ * Instead of adding to the built-in blacklist, use only the workarounds
+ * specified in the module load parameter.
+ * Useful if a blacklist entry interfered with a non-broken device.
*/
static int sbp2_default_workarounds;
module_param_named(workarounds, sbp2_default_workarounds, int, 0644);
@@ -164,6 +169,7 @@ MODULE_PARM_DESC(workarounds, "Work arou
", 36 byte inquiry = " __stringify(SBP2_WORKAROUND_INQUIRY_36)
", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8)
", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY)
+ ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE)
", or a combination)");
/* legacy parameter */
@@ -1587,17 +1593,18 @@ static void sbp2_parse_unit_directory(st
workarounds |= SBP2_WORKAROUND_INQUIRY_36;
}
- for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) {
- if (sbp2_workarounds_table[i].firmware_revision &&
- sbp2_workarounds_table[i].firmware_revision !=
- (firmware_revision & 0xffff00))
- continue;
- if (sbp2_workarounds_table[i].model_id &&
- sbp2_workarounds_table[i].model_id != ud->model_id)
- continue;
- workarounds |= sbp2_workarounds_table[i].workarounds;
- break;
- }
+ if (!(workarounds & SBP2_WORKAROUND_OVERRIDE))
+ for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) {
+ if (sbp2_workarounds_table[i].firmware_revision &&
+ sbp2_workarounds_table[i].firmware_revision !=
+ (firmware_revision & 0xffff00))
+ continue;
+ if (sbp2_workarounds_table[i].model_id &&
+ sbp2_workarounds_table[i].model_id != ud->model_id)
+ continue;
+ workarounds |= sbp2_workarounds_table[i].workarounds;
+ break;
+ }
if (workarounds)
SBP2_INFO("Workarounds for node " NODE_BUS_FMT ": 0x%x "
next prev parent reply other threads:[~2006-05-15 20:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 20:02 [PATCH 0/4 resend] sbp2: fixes for device bugs Stefan Richter
2006-05-15 20:04 ` [PATCH 1/4 resend] Stefan Richter
2006-05-15 20:06 ` [PATCH 2/4 resend] sbp2: add read_capacity workaround for iPod Stefan Richter
2006-05-15 20:08 ` Stefan Richter [this message]
2006-05-15 20:09 ` [PATCH 4/4 resend] ohci1394, sbp2: fix "scsi_add_device failed" with PL-3507 based devices Stefan Richter
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=tkrat.621eda7433bd0a08@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=akpm@osdl.org \
--cc=bcollins@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=scjody@modernduck.com \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®