Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbdH1PmS (ORCPT ); Mon, 28 Aug 2017 11:42:18 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:13185 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751297AbdH1PmQ (ORCPT ); Mon, 28 Aug 2017 11:42:16 -0400 X-IronPort-AV: E=Sophos;i="5.41,442,1498492800"; d="scan'208";a="45972706" From: Bart Van Assche To: "sfr@canb.auug.org.au" , "greg@kroah.com" CC: "James.Bottomley@HansenPartnership.com" , "linux-kernel@vger.kernel.org" , "hare@suse.de" , "linux-next@vger.kernel.org" , "martin.petersen@oracle.com" , "sameer.wadgaonkar@unisys.com" Subject: Re: linux-next: manual merge of the scsi tree with the staging tree Thread-Topic: linux-next: manual merge of the scsi tree with the staging tree Thread-Index: AQHTIA5V5cYCCR1KWkWcyt7ODzVJyaKZ6BgA Date: Mon, 28 Aug 2017 15:41:28 +0000 Message-ID: <1503934884.2841.22.camel@wdc.com> References: <20170828164127.15902025@canb.auug.org.au> <20170828064921.GA24696@kroah.com> In-Reply-To: <20170828064921.GA24696@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@wdc.com; x-originating-ip: [63.163.107.100] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1353;20:hTAmOk1V6XcchkLZpcsf9745Ew9o25L9kX1cJ2wsiuIRFQS8/1o+wClZpmnxrBuD6nW701/RBb8hUtN3tZybDJOSJbobHu/WvYklP/5dXVe1Lfv/CNA3VikSO7k89yURF7cpbicLghsRjUEBZtZN6LINrIXJslRHs5gGAs33++w= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 514592e1-eec5-47bf-30d1-08d4ee2b3fba x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0401MB1353; x-ms-traffictypediagnostic: CY1PR0401MB1353: wdcipoutbound: EOP-TRUE x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0401MB1353;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0401MB1353; x-forefront-prvs: 0413C9F1ED x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(199003)(24454002)(377424004)(189002)(2501003)(305945005)(2906002)(8936002)(3660700001)(3280700002)(97736004)(5660300001)(189998001)(6436002)(36756003)(3846002)(102836003)(229853002)(68736007)(14454004)(72206003)(99286003)(77096006)(103116003)(6486002)(25786009)(6246003)(50986999)(106356001)(76176999)(6116002)(2900100001)(105586002)(101416001)(54906002)(54356999)(6506006)(33646002)(6512007)(4326008)(81166006)(81156014)(2950100002)(7736002)(8676002)(86362001)(66066001)(53936002)(478600001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1353;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <369FDC46C03CEA4B80304C5E39A13EFF@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2017 15:41:28.5472 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1353 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v7SFgOPi002489 Content-Length: 2910 Lines: 64 On Mon, 2017-08-28 at 08:49 +0200, Greg KH wrote: > On Mon, Aug 28, 2017 at 04:41:27PM +1000, Stephen Rothwell wrote: > > Hi James, > > > > Today's linux-next merge of the scsi tree got a conflict in: > > > > drivers/staging/unisys/visorhba/visorhba_main.c > > > > between commits: > > > > 781facd05eb9 ("staging: unisys: visorhba: visorhba_main.c: fixed comment formatting issues") > > > > from the staging tree and commit: > > > > 7bc4e528d9f6 ("scsi: visorhba: sanitze private device data allocation") > > > > from the scsi tree. > > > > I fixed it up (see below) and can carry the fix as necessary. This > > is now fixed as far as linux-next is concerned, but any non trivial > > conflicts should be mentioned to your upstream maintainer when your tree > > is submitted for merging. You may also want to consider cooperating > > with the maintainer of the conflicting tree to minimise any particularly > > complex conflicts. > > Ick, messy merge, thanks for doing this. Hello Greg, If you agree with the following, please communicate this to the visorhba authors: * Most SCSI drivers exist under drivers/scsi, including the virtio-scsi and xen-scsifront drivers. So why has the visorhba driver been added under unisys/visorhba? * Since the SCSI core already keeps track of which commands are pending, the visorhba driver should not do this. I'm referring here to the scsipending data structure and the pending[] array in struct visorhb_devdata. * The pending[] array should be removed and should be converted into driver-private command data by setting the .cmd_size member of the SCSI host template. * scsi_host_find_tag() should be used when a command completion is received to look up the pointer of the SCSI command that has been completed. * All code that calls for_each_vdisk_match() looks buggy to me in some way. E.g. visorhba_abort_handler() should only affect the command passed as an argument to that function and no other SCSI commands. * The device and bus reset handlers should call scsi_done() for all affected commands if forward_taskmgmt_command() succeeds instead of only the command passed as an argument. * The for_each_vdisk_match() macro does not protect against concurrent device removal and hence is unsafe. This macro should be removed and in contexts where it is *really* needed to iterate over SCSI devices shost_for_each_device() should be used instead. * Instead of creating a kernel thread to poll for responses the visorhba driver should only process responses after it has received an interrupt that tells it to do so (see also the visor_thread_start() calls). * SCSI drivers should not have special-case code for host shutdown. * The 'dev_info_list' member in struct visorhba_data is not used and hence should be removed. Please note that I have not attempted to do a full review of the visorhba driver. Thanks, Bart.