From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Gr�goire Favre" <gregoire.favre@gmail.com>
Cc: dino@in.ibm.com, Andrew Morton <akpm@osdl.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?
Date: Mon, 13 Jun 2005 15:50:47 -0500 [thread overview]
Message-ID: <1118695847.5079.41.camel@mulgrave> (raw)
In-Reply-To: <20050613183719.GA8653@gmail.com>
On Mon, 2005-06-13 at 20:37 +0200, =?utf-8?Q?Gr=E9goire?= Favre wrote:
> target1:0:1: SC IS ffff81003fca89c0
>
> target1:0:1: scsirate IS 0xf, min_period is 9
>
> target1:0:1: asynchronous.
>
> Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08
>
> Type: CD-ROM ANSI SCSI revision: 02
>
> target1:0:1: Beginning Domain Validation
>
> target1:0:1: Domain Validation skipping write tests
>
> target1:0:1: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 15)
OK, this is what tells me there's an error in the bios reading routines
for ultra cards.
Can you try this (it should apply straight on your currently patched
2.6.12-rc6 tree)... hopefully I've been more careful in the bios reading
routines for the ultra (and fast) cards.
Thanks,
James
diff -u b/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
--- b/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -622,26 +622,37 @@
dev_printk(KERN_ERR, &starget->dev, "SC IS %p\n", sc);
if (sc) {
+ int maxsync = AHC_SYNCRATE_DT;
+ int ultra = 0;
+ int flags = sc->device_flags[target_offset];
+
+ if (ahc->flags & AHC_NEWEEPROM_FMT) {
+ if (flags & CFSYNCHISULTRA)
+ ultra = 1;
+ } else if (flags & CFULTRAEN)
+ ultra = 1;
+ /* AIC nutcase; 10MHz appears as ultra = 1, CFXFER = 0x04
+ * change it to ultra=0, CFXFER = 0 */
+ if(ultra && (flags & CFXFER) == 0x04) {
+ dev_printk(KERN_ERR, &starget->dev, "10MHz, flags 0x%x\n", flags);
+ ultra = 0;
+ flags &= ~CFXFER;
+ }
+
if ((ahc->features & AHC_ULTRA2) != 0) {
- scsirate = sc->device_flags[target_offset] & CFXFER;
- dev_printk(KERN_ERR, &starget->dev, "ULTRA2\n");
+ scsirate = (flags & CFXFER) | ultra ? 0x8 : 0;
+ dev_printk(KERN_ERR, &starget->dev, "ULTRA2, flags 0x%x\n", flags);
} else {
- scsirate = (sc->device_flags[target_offset] & CFXFER) << 4;
- if (sc->device_flags[target_offset] & CFSYNCH)
- scsirate |= SOFS;
+ scsirate = (flags & CFXFER) << 4;
+ maxsync = ultra ? AHC_SYNCRATE_ULTRA :
+ AHC_SYNCRATE_FAST;
}
- if (sc->device_flags[target_offset] & CFWIDEB) {
- scsirate |= WIDEXFER;
- spi_max_width(starget) = 1;
- } else
- spi_max_width(starget) = 0;
- spi_min_period(starget) =
- ahc_find_period(ahc, scsirate, AHC_SYNCRATE_DT);
- dev_printk(KERN_ERR, &starget->dev, "scsirate IS 0x%x, min_period is %d\n", scsirate, spi_min_period(starget));
- if (spi_min_period(starget) == 0)
- /* This means async, so set offset to zero */
+ spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0;
+ if (!(flags & CFSYNCH))
spi_max_offset(starget) = 0;
-
+ spi_min_period(starget) =
+ ahc_find_period(ahc, scsirate, maxsync);
+ dev_printk(KERN_ERR, &starget->dev, "scsirate IS 0x%x, min_period is %d, flags 0x%x\n", scsirate, spi_min_period(starget), flags);
tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
starget->id, &tstate);
next prev parent reply other threads:[~2005-06-13 20:51 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-16 8:58 What breaks aic7xxx in post 2.6.12-rc2 ? Grégoire Favre
2005-05-16 15:03 ` Jesper Juhl
2005-05-16 15:12 ` What breaks aic7xxx in post 2.6.12-rc2 ? (on amd64 ?) Grégoire Favre
2005-05-16 15:31 ` Jesper Juhl
2005-05-17 7:13 ` What breaks aic7xxx in post 2.6.12-rc2 ? Dinakar Guniguntala
2005-05-17 7:29 ` Andrew Morton
2005-05-17 8:34 ` Dinakar Guniguntala
2005-05-17 14:34 ` James Bottomley
2005-05-17 15:57 ` Grégoire Favre
2005-05-17 16:38 ` James Bottomley
2005-05-17 16:52 ` Grégoire Favre
2005-05-17 18:16 ` James Bottomley
2005-05-17 17:08 ` Dinakar Guniguntala
2005-05-17 18:34 ` James Bottomley
2005-05-17 19:26 ` Grégoire Favre
2005-05-17 19:50 ` James Bottomley
2005-05-17 19:56 ` Grégoire Favre
2005-05-17 21:06 ` James Bottomley
2005-05-17 22:09 ` Grégoire Favre
2005-05-17 22:14 ` James Bottomley
2005-05-21 23:22 ` Grégoire Favre
2005-05-22 13:54 ` James Bottomley
2005-05-24 15:39 ` Grégoire Favre
2005-05-26 13:19 ` James Bottomley
2005-05-26 14:35 ` Grégoire Favre
2005-05-26 14:46 ` James Bottomley
2005-05-26 17:35 ` Grégoire Favre
2005-05-30 14:38 ` James Bottomley
2005-05-30 14:51 ` Michael Tokarev
2005-05-30 14:59 ` James Bottomley
2005-05-30 15:09 ` Grégoire Favre
2005-05-30 15:34 ` James Bottomley
2005-05-30 16:01 ` Grégoire Favre
2005-05-30 18:17 ` James Bottomley
2005-05-30 19:07 ` Grégoire Favre
2005-06-06 18:17 ` James Bottomley
2005-06-07 8:57 ` Grégoire Favre
2005-06-12 15:38 ` James Bottomley
2005-06-13 14:50 ` Grégoire Favre
2005-06-13 14:59 ` James Bottomley
2005-06-13 15:05 ` Christoph Hellwig
2005-06-13 15:17 ` Grégoire Favre
2005-06-13 18:37 ` Gr�goire Favre
2005-06-13 20:50 ` James Bottomley [this message]
2005-06-13 21:33 ` Gregoire Favre
2005-06-13 21:46 ` James Bottomley
2005-06-13 21:59 ` Gregoire Favre
2005-06-13 22:04 ` James Bottomley
2005-06-13 22:25 ` Gregoire Favre
2005-06-14 2:20 ` James Bottomley
2005-06-14 9:28 ` What breaks aic7xxx in post 2.6.12-rc2 ? (fixed in 2.6.12-rc6 with patches) Gregoire Favre
2005-06-13 21:42 ` What breaks aic7xxx in post 2.6.12-rc2 ? Frank van Maarseveen
2005-06-13 22:59 ` James Bottomley
2005-06-14 21:42 ` Frank van Maarseveen
2005-06-15 12:02 ` Frank van Maarseveen
2005-06-15 14:14 ` James Bottomley
2005-06-15 20:09 ` Frank van Maarseveen
2005-06-15 20:15 ` James Bottomley
2005-06-15 20:15 ` James Bottomley
2005-06-15 20:49 ` Frank van Maarseveen
2005-05-18 9:07 ` Dinakar Guniguntala
2005-05-18 14:12 ` James Bottomley
2005-05-18 14:40 ` Dinakar Guniguntala
2005-05-19 3:07 ` K.R. Foley
2005-05-19 4:23 ` James Bottomley
2005-05-19 9:51 ` Dinakar Guniguntala
2005-05-19 23:56 ` James Bottomley
2005-05-20 1:05 ` K.R. Foley
2005-05-20 1:17 ` James Bottomley
2005-05-20 1:32 ` K.R. Foley
2005-05-20 1:33 ` James Bottomley
2005-05-20 1:40 ` James Bottomley
2005-05-20 1:54 ` K.R. Foley
2005-05-20 2:30 ` James Bottomley
2005-05-20 3:06 ` K.R. Foley
2005-05-20 10:09 ` Dinakar Guniguntala
2005-05-19 11:27 ` K.R. Foley
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=1118695847.5079.41.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=dino@in.ibm.com \
--cc=gregoire.favre@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox