lkml.org 
[lkml]   [2007]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [bug] ata subsystem related crash with latest -git
On Thu, Oct 18 2007, Jeff Garzik wrote:
> Ingo Molnar wrote:
>> * Jens Axboe <jens.axboe@oracle.com> wrote:
>>> --- a/drivers/scsi/scsi_lib.c
>>> +++ b/drivers/scsi/scsi_lib.c
>>> @@ -39,7 +39,7 @@
>>> * (unless chaining is used). Should ideally fit inside a single page,
>>> to
>>> * avoid a higher order allocation.
>>> */
>>> -#define SCSI_MAX_SG_SEGMENTS 128
>>> +#define SCSI_MAX_SG_SEGMENTS 129
>> this one finally made the trick and it's booting fine now, without any
>> crashes!
>
> Alas, this didn't help me here. I did manage to capture the error messages
> this time, and in the two machines I'm actively testing on, sata_mv is the
> driver that's dying in both cases. Machine A additionally has sata_nv,
> which is working. Machine B additionally has ata_piix, which is working.
> So in both cases, its sata_mv that is throwing SError complaints:

Theory - ata_sg_is_last() isn't returning true for the last entry. Can
you double check that it correcly marks the last entry in mv_fill_sg()?
Alternatively, just try this patch.


diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 4df8311..b858183 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1139,6 +1139,7 @@ static void mv_fill_sg(struct ata_queued_cmd *qc)
struct mv_port_priv *pp = qc->ap->private_data;
struct scatterlist *sg;
struct mv_sg *mv_sg;
+ int end_marked = 0;

mv_sg = pp->sg_tbl;
ata_for_each_sg(sg, qc) {
@@ -1159,13 +1160,15 @@ static void mv_fill_sg(struct ata_queued_cmd *qc)
sg_len -= len;
addr += len;

- if (!sg_len && ata_sg_is_last(sg, qc))
+ if (!sg_len && ata_sg_is_last(sg, qc)) {
mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
+ end_marked++;
+ }

mv_sg++;
}
-
}
+ BUG_ON(end_marked != 1);
}

static inline void mv_crqb_pack_cmd(__le16 *cmdw, u8 data, u8 addr, unsigned last)
--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-18 10:35    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site