On Sat, 13 Oct 2018, Christoph Hellwig wrote:
> On Sat, Oct 13, 2018 at 09:24:51AM +1100, Finn Thain wrote:
> > > struct scatterlist *sg = scsi_sglist(cmd);
> > > - int dir = cmd->sc_data_direction;
> > > - int total, i;
> > > + int total = 0, i;
> > >
> > > - if (dir == DMA_NONE)
> > > -
On Sat, Oct 13, 2018 at 09:24:51AM +1100, Finn Thain wrote:
> > struct scatterlist *sg = scsi_sglist(cmd);
> > - int dir = cmd->sc_data_direction;
> > - int total, i;
> > + int total = 0, i;
> >
> > - if (dir == DMA_NONE)
> > - return;
> > -
>
> Removing this DMA_NONE test
On Thu, 11 Oct 2018, Christoph Hellwig wrote:
> diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
> index 90604bff8dd2..73fcbd65b9fe 100644
> --- a/drivers/scsi/esp_scsi.c
> +++ b/drivers/scsi/esp_scsi.c
> @@ -369,19 +369,25 @@ static void esp_map_dma(struct esp *esp, struct
> scsi_c
On Fri, Oct 12, 2018 at 04:45:57PM +1100, Finn Thain wrote:
> > + if (esp->flags & ESP_FLAG_NO_DMA_MAP)
> > + return;
> > +
> > + dma_unmap_single(esp->dev, ent->sense_dma, SCSI_SENSE_BUFFERSIZE,
> > +DMA_FROM_DEVICE);
> > + ent->sense_ptr = NULL;
> > +}
> > +
>
On Thu, 11 Oct 2018, Christoph Hellwig wrote:
> index 90604bff8dd2..73fcbd65b9fe 100644
> --- a/drivers/scsi/esp_scsi.c
> +++ b/drivers/scsi/esp_scsi.c
> @@ -369,19 +369,25 @@ static void esp_map_dma(struct esp *esp, struct
> scsi_cmnd *cmd)
> {
> struct esp_cmd_priv *spriv = ESP_CMD_PRIV(
Except for the mac_esp driver, which uses PIO or pseudo DMA, all drivers
share the same dma mapping calls. Move the dma mapping into the core
code using the scsi_dma_map / scsi_dma_unmap helpers, with a special
identify mapping variant triggered off a new ESP_FLAG_NO_DMA_MAP flag
for mac_esp.
Sig
6 matches
Mail list logo