Re: [PARPORT] Re: linux-2.4.2 pd.c patch - driver was untested??? (this patch too, I have no PARIDE HW ;-( )

From: Andrea Arcangeli (andrea@suse.de)
Date: Sun Jul 22 2001 - 21:28:44 EDT

  • Next message: user on p350linux: "[PARPORT] help with parport"

    On Tue, Jul 17, 2001 at 05:23:07PM +0200, Andrea Arcangeli wrote:
    > [ sorry for the late reply ]
    >
    > On Thu, Jul 05, 2001 at 11:49:15AM +0100, Tim Waugh wrote:
    > > On Tue, Jun 26, 2001 at 11:35:30PM +0300, Sergij Kolisnyk wrote:
    > >
    > > > Hello! The BUG: Author of patch in
    > > > http://www.torque.net/parport/archive/current/2458.html have just
    > > > confused max_segments with max_sectors. In result driver built
    > > > clustered ATA requests exceeding the maximum of 256 sectors. My
    > > > driver failed on that error, and I fixed this confusing (after
    > > > reading 2.4. ll_rw_blk.c). (May be pd.c has some features, that
    > > > prevent it failing on this bug, but I think such confuse should be
    > > > fixed anyway ;-) )
    > >
    > > I don't really know that code well enough to comment. Andrea?
    >
    > the patch looks correct (maybe it is just included, I didn't checekd).
    >
    > It probably started to trigger around 2.4.2 because the otherwise
    > default MAX_SECTORS grown. Infact I've no idea why it is been decreased
    > to 256 in 2.4.2, I definitely overlooked that change.

    btw, I'd also avoid to left a dangling pointer after the module is
    deleted, this is an incremental fix:

    --- paride/drivers/block/paride/pd.c.~1~ Mon Jul 23 03:26:53 2001
    +++ paride/drivers/block/paride/pd.c Mon Jul 23 03:27:20 2001
    @@ -599,6 +599,8 @@
     
             for (unit=0;unit<PD_UNITS;unit++)
                if (PD.present) pi_release(PI);
    +
    + max_sectors[MAJOR_NR] = NULL;
     }
     
     #endif

    >
    > Andrea
    >
    > -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    > -- with the single word "unsubscribe" in the body of the message. --

    Andrea

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 02:27:35 EDT