From patchwork Fri Apr 24 11:18:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6268821 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 650D3BF4A6 for ; Fri, 24 Apr 2015 11:19:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E8592022A for ; Fri, 24 Apr 2015 11:19:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A75262026F for ; Fri, 24 Apr 2015 11:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966584AbbDXLTH (ORCPT ); Fri, 24 Apr 2015 07:19:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58927 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966351AbbDXLSx (ORCPT ); Fri, 24 Apr 2015 07:18:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7D560ADCA; Fri, 24 Apr 2015 11:18:45 +0000 (UTC) From: Hannes Reinecke To: James Bottomley Cc: Christoph Hellwig , Ondrey Zary , Doug Gilberg , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH 22/23] advansys: Remove call to dma_cache_sync() Date: Fri, 24 Apr 2015 13:18:41 +0200 Message-Id: <1429874322-85488-24-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1429874322-85488-1-git-send-email-hare@suse.de> References: <1429874322-85488-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Only required if the dma buffer has been allocated via dma_alloc_noncoherent(), which this one is not. With that call removed we can now also compile on ARM. Signed-off-by: Hannes Reinecke --- drivers/scsi/Kconfig | 2 +- drivers/scsi/advansys.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index b021bcb..a4564b3 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -503,7 +503,7 @@ config SCSI_DPT_I2O config SCSI_ADVANSYS tristate "AdvanSys SCSI support" - depends on SCSI && VIRT_TO_BUS && !ARM + depends on SCSI && VIRT_TO_BUS depends on ISA || EISA || PCI help This is a driver for all SCSI host adapters manufactured by diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 7142a79..3b81f44 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -7510,17 +7510,17 @@ static int advansys_slave_configure(struct scsi_device *sdev) return 0; } -static __le32 advansys_get_sense_buffer_dma(struct scsi_cmnd *scp) +static __le32 asc_get_sense_buffer_dma(struct scsi_cmnd *scp) { struct asc_board *board = shost_priv(scp->device->host); + scp->SCp.dma_handle = dma_map_single(board->dev, scp->sense_buffer, - SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); + SCSI_SENSE_BUFFERSIZE, + DMA_FROM_DEVICE); if (dma_mapping_error(board->dev, scp->SCp.dma_handle)) { ASC_DBG(1, "failed to map sense buffer\n"); return 0; } - dma_cache_sync(board->dev, scp->sense_buffer, - SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); return cpu_to_le32(scp->SCp.dma_handle); } @@ -7549,7 +7549,7 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp, asc_scsi_q->q1.target_lun = scp->device->lun; asc_scsi_q->q2.target_ix = ASC_TIDLUN_TO_IX(scp->device->id, scp->device->lun); - asc_scsi_q->q1.sense_addr = advansys_get_sense_buffer_dma(scp); + asc_scsi_q->q1.sense_addr = asc_get_sense_buffer_dma(scp); asc_scsi_q->q1.sense_len = SCSI_SENSE_BUFFERSIZE; if (!asc_scsi_q->q1.sense_addr) return ASC_BUSY;