lkml.org 
[lkml]   [2007]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [bug] ata subsystem related crash with latest -git
    Benny Halevy wrote:
    >
    >
    > On 10/18/07, *Jeff Garzik* <jeff@garzik.org <mailto:jeff@garzik.org>> wrote:
    >
    > Jens Axboe wrote:
    > > 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)) {
    >
    >
    > I'm not sure, but shouldn't that be || rather than &&?

    sg_len is zero at the end of each scatterlist entry, so we need to test
    the additional ata_sg_is_last() condition to determine if we are really
    at the end of the PRD table.

    Jeff



    -
    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 11:17    [W:0.024 / U:2.936 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site