From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: stable@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.16.19] sbp2: backport read_capacity workaround for iPod
Date: Fri, 2 Jun 2006 19:34:30 +0200 (CEST) [thread overview]
Message-ID: <tkrat.26f002591ab59cf8@s5r6.in-berlin.de> (raw)
In-Reply-To: <447DC82A.3000501@s5r6.in-berlin.de>
sbp2: backport read_capacity workaround for iPod
There is a firmware bug in several Apple iPods which prevents access to
these iPods under certain conditions. The disk size reported by the iPod
is one sector too big. Once access to the end of the disk is attempted,
the iPod becomes inaccessible. This problem has been known for USB iPods
for some time and has recently been discovered to exist with
FireWire/USB combo iPods too.
This patch is derived from the fix in Linux 2.6.17, commit
e9a1c52c7b19d10342226c12f170d7ab644427e2, to be applicable to 2.6.16.x
without prerequisite patches. It hard-wires a workaround for three known
affected model numbers (those of 4th generation iPod, iPod Photo, iPod
mini).
Note: This patch lacks Linux 2.6.17's ability to enable and disable the
workaround via a module parameter.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Index: linux/drivers/ieee1394/sbp2.c
===================================================================
--- linux.orig/drivers/ieee1394/sbp2.c 2006-06-02 18:37:13.000000000 +0200
+++ linux/drivers/ieee1394/sbp2.c 2006-06-02 19:10:05.000000000 +0200
@@ -2491,9 +2491,20 @@ static int sbp2scsi_slave_alloc(struct s
static int sbp2scsi_slave_configure(struct scsi_device *sdev)
{
+ struct scsi_id_instance_data *scsi_id =
+ (struct scsi_id_instance_data *)sdev->host->hostdata[0];
+
blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
sdev->use_10_for_rw = 1;
sdev->use_10_for_ms = 1;
+
+ if ((scsi_id->sbp2_firmware_revision & 0xffff00) == 0x0a2700 &&
+ (scsi_id->ud->model_id == 0x000021 /* gen.4 iPod */ ||
+ scsi_id->ud->model_id == 0x000023 /* iPod mini */ ||
+ scsi_id->ud->model_id == 0x00007e /* iPod Photo */ )) {
+ SBP2_INFO("enabling iPod workaround: decrement disk capacity");
+ sdev->fix_capacity = 1;
+ }
return 0;
}
next prev parent reply other threads:[~2006-06-02 17:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-27 12:58 [PATCH 2.6.16.18 0/4] sbp2: workaround for buggy iPods Stefan Richter
2006-05-27 13:00 ` [PATCH 2.6.16.18 1/4] sbp2: consolidate workarounds, part one Stefan Richter
2006-05-27 13:01 ` [PATCH 2.6.16.18 2/4] sbp2: consolidate workarounds, part two Stefan Richter
2006-05-27 13:04 ` [PATCH 2.6.16.18 3/4] sbp2: add read_capacity workaround for iPod Stefan Richter
2006-05-27 13:06 ` [PATCH 2.6.16.18 4/4] sbp2: add ability to override hardwired blacklist Stefan Richter
2006-05-30 23:19 ` [stable] [PATCH 2.6.16.18 0/4] sbp2: workaround for buggy iPods Chris Wright
2006-05-31 16:45 ` Stefan Richter
2006-06-02 17:34 ` Stefan Richter [this message]
2006-06-02 17:46 ` [stable] [PATCH 2.6.16.19] sbp2: backport read_capacity workaround for iPod Chris Wright
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.26f002591ab59cf8@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 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®