From patchwork Tue Mar 1 14:39:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 547461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCE44C433F5 for ; Tue, 1 Mar 2022 14:40:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235265AbiCAOk4 (ORCPT ); Tue, 1 Mar 2022 09:40:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234116AbiCAOkp (ORCPT ); Tue, 1 Mar 2022 09:40:45 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3562A62F7 for ; Tue, 1 Mar 2022 06:40:04 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id EBCBD1F899; Tue, 1 Mar 2022 14:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1646145602; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aRT8LoBc/T0TYic8bwUy+RzDaaMnEWb265J47CssTlY=; b=or2lXJTR4cFoTyDI03mIAwN6/SqTe+ePXTo9jkYnSMtaMmhlVuGpo44gvCDz912/9P0YwD Xhdld2UokpY6QicBEGcHaIAjt58sJ6lFe/Kg0X+3f+V8uCyGUE41OcYqTnnTU02rgw0x4w BaTBnQEmJamij+XrTNK1e2U8qGF54ZU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1646145602; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aRT8LoBc/T0TYic8bwUy+RzDaaMnEWb265J47CssTlY=; b=xExj2HMndwg6uvinivTqudBZ5iCSnVJqcZnb/SmoLvtIrw/pOiYcK0Sng8Nd/xvKDijm5r ioW3iyU6Wzy0g0AQ== Received: from adalid.arch.suse.de (adalid.arch.suse.de [10.161.8.13]) by relay2.suse.de (Postfix) with ESMTP id E2AB1A3B8C; Tue, 1 Mar 2022 14:40:02 +0000 (UTC) Received: by adalid.arch.suse.de (Postfix, from userid 16045) id D163251933D6; Tue, 1 Mar 2022 15:40:02 +0100 (CET) From: Hannes Reinecke To: "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke , Hannes Reinecke Subject: [PATCH 2/4] aic79xx: use scsi device as argument for BUILD_SCSIID() Date: Tue, 1 Mar 2022 15:39:55 +0100 Message-Id: <20220301143957.40998-3-hare@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220301143957.40998-1-hare@suse.de> References: <20220301143957.40998-1-hare@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Hannes Reinecke --- drivers/scsi/aic7xxx/aic79xx_osm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 928099163f0f..f900ed05f36a 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -541,8 +541,8 @@ ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb) } /******************************** Macros **************************************/ -#define BUILD_SCSIID(ahd, cmd) \ - (((scmd_id(cmd) << TID_SHIFT) & TID) | (ahd)->our_id) +#define BUILD_SCSIID(ahd, sdev) \ + (((sdev_id(sdev) << TID_SHIFT) & TID) | (ahd)->our_id) /* * Return a string describing the driver. @@ -818,7 +818,7 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd) ahd_set_sense_residual(reset_scb, 0); reset_scb->platform_data->xfer_len = 0; reset_scb->hscb->control = 0; - reset_scb->hscb->scsiid = BUILD_SCSIID(ahd,cmd); + reset_scb->hscb->scsiid = BUILD_SCSIID(ahd, cmd->device); reset_scb->hscb->lun = cmd->device->lun; reset_scb->hscb->cdb_len = 0; reset_scb->hscb->task_management = SIU_TASKMGMT_LUN_RESET; @@ -1577,7 +1577,7 @@ ahd_linux_run_command(struct ahd_softc *ahd, struct ahd_linux_device *dev, * Fill out basics of the HSCB. */ hscb->control = 0; - hscb->scsiid = BUILD_SCSIID(ahd, cmd); + hscb->scsiid = BUILD_SCSIID(ahd, cmd->device); hscb->lun = cmd->device->lun; scb->hscb->task_management = 0; mask = SCB_GET_TARGET_MASK(ahd, scb);