Re: [PATCH] dc395x: dynamically map scatter-gather for PIO (take 2)

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

 



On Sun, 2006-04-02 at 21:57 +0200, Guennadi Liakhovetski wrote:
> +                               if (fc == 0x40 &&
> (srb->dcb->sync_period & WIDE_SYNC)) {
> +                                       /* Read the last byte ... */
> +                                       if (srb->total_xfer_length >
> 0) {
> +                                               u8 byte =
> DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
> +
> +                                               *virt++ = byte;
> +                                               srb->total_xfer_length--;
> +                                               if
> (debug_enabled(DBG_PIO))
> +                                                       printk(" %
> 02x", byte);
> +                                       }
> +
> +                                       DC395x_write8(acb,
> TRM_S1040_SCSI_CONFIG2, 0);
> +                               }
> +
> +                               if (srb->cmd->use_sg) {
> +                                       scsi_kunmap_atomic_sg(base);

I put this in, but just a warning here.  You're modifying a kmapped
page, so you need to call flush_kernel_dcache_page() before unmapping it
otherwise user space may not see the change on VIPT or VIVT CPU (the
data may be in a non congruent cache line).

James


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux