Re: linux-next: Tree for July 16 (crash on quad core AMD)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pierre Ossman wrote:
>> Well, I don't know how often such usages would be necessary.  If it's a
>> very common ops, you can add a param to the next function but frankly I
>> think it's better to build a inside control structure for that.  There's
>> no need for external buffer, just an inner loop is sufficient.
>>
> 
> I'm not sure how this can be solved by an inner loop. My primary use
> case is:
> 
> 1. Wait for interrupt
> 2. Write n bytes
> 3. goto 1
> 
> n has no guarantee of being aligned to any page boundaries, so state
> needs to be kept between each invokation of writing a chunk of data. I
> doubt I'm alone in this use pattern (in fact, most device drivers using
> PIO should do something similar).

Oh... I see.  How about adding sg_miter_consume(@miter, @bytes)?  If the
function is never called, the whole chunk is assumed to be consumed.  If
the function is called only @bytes are consumed.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux