Re: PATCH [4/5] qla2xxx: cleanup DMA mappings...

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

 



> +		struct page	*page;
> +		unsigned long	offset;
> +
> +		page = virt_to_page(cmd->request_buffer);
> +		offset = ((unsigned long)cmd->request_buffer & ~PAGE_MASK);
> +		req_dma = pci_map_page(ha->pdev, page, offset,
> +		    cmd->request_bufflen, cmd->sc_data_direction);

Why're you're redoing that code please switch to pci_map_single insted
of these nasty operations to go to the page first, the code will become
a lit simpler too, e.g. the above becomes just:

	req_dma = pci_map_single(ha->pdev, cmd->request_buffer,
			cmd->request_bufflen, cmd->sc_data_direction);

-
: 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