From patchwork Fri Nov 22 11:19:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 844914 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp2790674wrx; Fri, 22 Nov 2024 03:20:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWRpCqGD3f2tN+8FM14B2fEtWOPZh/rVRht5Bsbd7nZXKnsHMTfPC5eY99znBqZ9p7wb/geJw==@linaro.org X-Google-Smtp-Source: AGHT+IGSL0rCAiUuinjZ6w5BAdSIykT8WXtl/o7UXuZYkw8ebZx4RAmDIbthyHWElyOgbIq9qYjR X-Received: by 2002:ad4:5ce9:0:b0:6c3:6477:16e7 with SMTP id 6a1803df08f44-6d4423b38a8mr113309106d6.11.1732274445728; Fri, 22 Nov 2024 03:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732274445; cv=none; d=google.com; s=arc-20240605; b=MdN1r10DQgqcAW78GfeLeRdCDCYvj7b2U2/JfMJ2YmBLvnrdTb7x+xgFpV3K+PSDsr t61ShM5JXVF5F6GFWQGl1URLpvo9DSQlbFlxFI7ZKHDWy8qyGD84OG8Hxa4bkYIQJRKe S46wiVw19/0nE94hX0dceEGazPzXMj1L5y2hj57d0vMUvDVK8FivaHad7CoBLz5Np/ka w6PjGrEdUARRavPiTF19TTRH7kZlcYqpokKoiDClCtgHMPOAsfaefQSkDEiJn5zZD221 JL92qqSeX2Eskm2gsCAgrt76VLu3DS5JQ702BkzvRtxkTymfTd8Tv/rkTLv8gi+gUTUc y7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2hRSTyr9LseUA345HjOb58N9q4glOwPpxbZ3ixu2HJM=; fh=wBvcyqQhEU6e0ZqmVxQYHE0ci9Ai55t9//i9ttilHeA=; b=ZtyZovRUd8bdOJkXfel6x9UcVqJn9PTeQhNVNttusG20ZEAv9Hs2z5j+FjMp94Y9us Z8mYxWWhTK2N3bhXFJ7NhdNhJS90bzpKdrdbEItv5jayvBQ2E/bDx1+wnM5SCEpd183W pakkj+XJSDiyEAOvBtMjbLrs/UzW6NpMeaBlIs2Z9IoUZNd+w93DSrizWeDposMcTxLX DMi9O11XfneorbglHpR8JpqxDSW7EYlwo3Iq1FZQgbFC0Cycs0zaOpO+BOutFE0gHfz/ AMoG/42C1z/0BdwJUqgCVTHc7A7u+fhqBQpg3+OF7dsygTklLVp3q28K1/EoUfHbLTrK xwgg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oikOljE9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d451a99bd2si19740886d6.164.2024.11.22.03.20.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Nov 2024 03:20:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oikOljE9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tERhl-0007hN-QA; Fri, 22 Nov 2024 06:20:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tERhg-0007eJ-Vm for qemu-devel@nongnu.org; Fri, 22 Nov 2024 06:20:02 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tERhZ-00069p-DF for qemu-devel@nongnu.org; Fri, 22 Nov 2024 06:20:00 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-431ac30d379so17756965e9.1 for ; Fri, 22 Nov 2024 03:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732274390; x=1732879190; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2hRSTyr9LseUA345HjOb58N9q4glOwPpxbZ3ixu2HJM=; b=oikOljE90Xisob9a6/Lh3s85Tkc1LtG+zrjU5dpp1zy0iBxvUvE5X2U3MYRmFoH21A aetkbbCssPXAXvcLuStR+LkC9SPS4bsQ31/1AMcZ6bEeSOTevI+AEdNjMhOUMgEUQlXu Y39rMy78xAYo7Mah4Xph8fgEylyWMTXlN/GelNJqBYaHk6YK4A+ySk12fSI4hqoAkwK5 WgEI7XBH3xZAlMGwOWuBKe6L+ioy2wUMnOHeWW3+BsMNI95twX57zN09LfcZXVMjddfB PUhzu0LDQUX/gw3p8vu9SWuL5Cfrc6/IsddAHZsCnlGB9W3gPMsruJgP/Ks2HeyTsQ6V 4F9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732274390; x=1732879190; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2hRSTyr9LseUA345HjOb58N9q4glOwPpxbZ3ixu2HJM=; b=TXP8EtLcgLC844F8GVnVGW65Tas33juOd6BIXDpDP0CFQ80x53jwexWiHcx0fRUWLd KLYCATe+AZwlDen0dnxvq3o2kjCKeMbdWCJ2vwcHN/ViOemHtAszhe2wS5Sny1DDuaPu caOxxxOZian3KdOEbDzY+PINyEe4/wXR1tESc3/k/pc6a1ejCg2hjt3VAYzC0Wdf6bdA jEgbrRx31ssQeE0VmbwhaiQefhFrvc48A6uQ0lXcP99RtPqeVGPuu5hcB6FaKH5So0Qm Gi0BRr5w9hCI9cUuOs/FHYDpa1OzY5fe2GA5n+K/Owu52kgKDi735z/q4rvvULotFG6d kV+w== X-Gm-Message-State: AOJu0YyCh35kDRKQ/w8wXYZwqTwYUrbzhwRec2bavzguyurZ2xuHo07b tV7BxoMOPJAJWSvK1yh2cGB0iRpzkiMe7liDJhtb2FmdZN2VgVKyFZkXWAeui/YRlp0550FJOum f X-Gm-Gg: ASbGncv2tA8A9CdZnk06d+AHgBkcuVN+n2KzzKhZcfR7hQSx4zWYIa+3+r6QHq09PNp MD2787NRSOC+t08mbhTSkOrDlQTIuffkwq2pmnoSpWegKiM0afE1MKlM5izw2yeZnBYdQf3JoND iXDNU/79tZQJSGjI9ZjSzkxGG4i+SD1ak9uiFibJvre/MbmwaipYuC+V0qmWSb6wdW6r7MRzqyF ye9s3Qqe2jzqNrfddoaqFaHx19NhvxKJ4DjRBgBif15h0NLYrWkyHa0wWW8T0NSNWC9R1IjUpOp X-Received: by 2002:a05:600c:4f90:b0:431:4fa0:2e0b with SMTP id 5b1f17b1804b1-433ce4af2eemr16585165e9.28.1732274389724; Fri, 22 Nov 2024 03:19:49 -0800 (PST) Received: from localhost.localdomain ([176.187.211.33]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43366cbcd17sm65040505e9.1.2024.11.22.03.19.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 22 Nov 2024 03:19:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Mark Cave-Ayland , Aleksandar Rikalo , Harsh Prateek Bora , qemu-ppc@nongnu.org, Laurent Vivier , =?utf-8?q?Herv=C3=A9_Poussineau?= , Artyom Tarasenko , Thomas Huth , Richard Henderson , Thomas Huth , Peter Maydell , Paolo Bonzini , Fam Zheng , Helge Deller , Daniel Henrique Barboza , Nicholas Piggin , Marcel Apfelbaum Subject: [PATCH 1/3] hw/scsi/spapr_vscsi: Call scsi_bus_legacy_handle_cmdline() in REALIZE Date: Fri, 22 Nov 2024 12:19:37 +0100 Message-ID: <20241122111939.11936-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122111939.11936-1-philmd@linaro.org> References: <20241122111939.11936-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Call scsi_bus_legacy_handle_cmdline() in the DeviceRealize handler, just after scsi_bus_init(). Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/spapr_vscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index c75a6c8807..8e76bfd7ce 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -1218,6 +1218,7 @@ static void spapr_vscsi_realize(SpaprVioDevice *dev, Error **errp) dev->crq.SendFunc = vscsi_do_crq; scsi_bus_init(&s->bus, sizeof(s->bus), DEVICE(dev), &vscsi_scsi_info); + scsi_bus_legacy_handle_cmdline(&s->bus); /* ibmvscsi SCSI bus does not allow hotplug. */ qbus_set_hotplug_handler(BUS(&s->bus), NULL); @@ -1227,10 +1228,9 @@ void spapr_vscsi_create(SpaprVioBus *bus) { DeviceState *dev; - dev = qdev_new("spapr-vscsi"); + dev = qdev_new(TYPE_VIO_SPAPR_VSCSI_DEVICE); qdev_realize_and_unref(dev, &bus->bus, &error_fatal); - scsi_bus_legacy_handle_cmdline(&VIO_SPAPR_VSCSI_DEVICE(dev)->bus); } static int spapr_vscsi_devnode(SpaprVioDevice *dev, void *fdt, int node_off) From patchwork Fri Nov 22 11:19:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 844916 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp2790711wrx; Fri, 22 Nov 2024 03:20:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUZOIsHZjGw5kpA8971+2/StkyoCJCab/vKlOe+m8ZKjLanNE9d9JvZMmdOAy+3c1HEusMU4w==@linaro.org X-Google-Smtp-Source: AGHT+IEf/Donyxj8iJ5KS5szgYthrtUHvmLY/m1IBX3wqyNF4i3a/62VO3GFuiTJpOqBwsNHX2ZY X-Received: by 2002:a05:6902:703:b0:e2b:d4c8:c5e9 with SMTP id 3f1490d57ef6-e38f8ad708dmr2060868276.11.1732274451147; Fri, 22 Nov 2024 03:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732274451; cv=none; d=google.com; s=arc-20240605; b=Ryi2+QWXtAPtl8JtaSItjQCVQtP1x1YFoU86jKi40o73aW8rGp0QvBYB15YpHA76+p kA/yTJId6SrhwAQon17QjaRg040Djc5jxOnJcQmQ6ILYUr7Tkv+AjnHnrLEwsybXh+YW VqVo+eNG843mzjfxbp+8ppD+w6ClFkVwM6r7oCRMGeA3bWmsCtZH0fNDkcjIo1LtlWd5 5uV1fDEOrtWLsqBxYJV0QBIfSFyZxoDj0Y5oSzPTlY5pvxB68FwCAJkgim4pLuJsiMCg D/kBt1klHYLfd9QJRMEPgEzEoQkob3nJqOfTBuQ9HI2H124kwONbWoIOavMtw1YODZvM WRSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uPCQyQvoAOEbN8ixHzSuXBuJXKTD3sl0YDtIawxMPFk=; fh=wBvcyqQhEU6e0ZqmVxQYHE0ci9Ai55t9//i9ttilHeA=; b=RFW7akl6C6JziRo8Ay3L1z0pFOFTg0tX9/vBXemDRUW1SFvqo3vP5RlRNhZxTtRtVa sRsbum+ZsCf5hhjS8ORKgA1NzDLFpnn0WHP6uwSoGCbnPbuUwjznIdxY7jMYVEAa+5M5 YDnjw14eZr2mnOdOhRq1gDJKK2wAwL5z1qRm+ZOpQHP/FyJjkHKhfrpNHGShzilJde85 mwO47xsMqFmPEoaHXoQov3AGdYjShqQK+SA6o+UCyoV/ziDyruxn7n0FtAXvHFXj3mFp 2gr270gpcydzoaXP9dSbOm0zUKhypYjxZ0ut2KeBLLvI2UOAUnyMY20gKoHfG0kCsBms 5qpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hBU+z1wU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4653c475da2si19333911cf.291.2024.11.22.03.20.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Nov 2024 03:20:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hBU+z1wU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tERhm-0007hi-Nl; Fri, 22 Nov 2024 06:20:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tERhk-0007gu-Vz for qemu-devel@nongnu.org; Fri, 22 Nov 2024 06:20:05 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tERhf-0006AO-3X for qemu-devel@nongnu.org; Fri, 22 Nov 2024 06:20:04 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-382296631f1so1417537f8f.3 for ; Fri, 22 Nov 2024 03:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732274396; x=1732879196; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uPCQyQvoAOEbN8ixHzSuXBuJXKTD3sl0YDtIawxMPFk=; b=hBU+z1wUybSy+lxkI6xKrP23Kp4DM4IWbnRF+heJuUXkHdwqV4nsoeuZKI2bMQ/oFp J8DM2nSTyzQZjo6SuFrtM2RCVdeHwRHEwAzlB7KUirRmy/+g6ZTxXo0yXr9+X639EuXN Ry0vbTDxYXIcAnMPbPvfoZfgcvmAyCBS4mc4MgMrpm6TkWt7/ZfuZZ2ZEqugMx+VZtdq Fvn41TjGMAnt1REUctKgz/QpGw6KQAJ2tjaO23yVVfte30XvqwDSNB46eAReIWQsaFkF RKQZcX6gc5+fIlKAZxS29Cxmke2Rcn44jm9cK71cc/avnJ56I17WA0gitnI5XcDP/b5X oeew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732274396; x=1732879196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uPCQyQvoAOEbN8ixHzSuXBuJXKTD3sl0YDtIawxMPFk=; b=suITvjNvg6meLZ6gUYBJCYPVCsSumApYK7mInAQbPn6mevtmv8Nl6BuI4R9KanG1KZ yNoMYqBbwDEeNf+oDwT4spkhkMxY0bX0kEVFOZM9clAhsbQW5NHaMyjuo+b6zPIIrdh8 HHTYGV4AtA2mka1RbTJ1BnpMYYmPUDJon87cqfc66pMwy0aNZ+U+GX6e6aTdiyL+/7Z8 yTXvHmsW4EVANWl8W0xEdCzUBpPzJg2S50h94GUSr2BHTHlRNEaq/463tBfW5f7AVXZ6 h1GJ0EyXWJRvCZ64QXuFt1z6F0tQeyrolA1pQ4aWS+mqtdDmbQfSoJRKmRdEGYbd+ZDb IdWg== X-Gm-Message-State: AOJu0YxmHbelgy15EPsso7UMQy9GwUOUqr875SbFSgQkQln2C4OzbYWH /lPNOfKL+L7pjOYxxX6K7vqG6P+tRI8PVsFi2MgrO0sFkH2amn0RGO9dXWOXYTP6Q55QuWagtxR F X-Gm-Gg: ASbGncvOo9nukafS5JfH6Q2xGBU4ln47oQJpDsUnEV89uRwRmg50v0YdBrFEuORdDnF iQIz4TDMx3xz+NxB/yOdmrWutK2lDguAB1ybbjxnJXRerSCbkqzhSToSKlKWLuXKFj7ZzocvDMf H/MKdaRwOCsFaey5D+wFuHgHLgNQZJGQDVuQ9jZwFBEifL0EAqSEZqgVbvlzitXy0y9CzJWspBA SCXBGvsuye1wy/ty2yLC2LrkLsLUx0H7RVE4hpsAq1NfRXwjJhGOzE7iiXbEtx+BR8t09ZqGHg+ X-Received: by 2002:a5d:5987:0:b0:382:4d54:2cd9 with SMTP id ffacd0b85a97d-38260b5a0bdmr1957022f8f.20.1732274395769; Fri, 22 Nov 2024 03:19:55 -0800 (PST) Received: from localhost.localdomain ([176.187.211.33]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825faf9e87sm2108376f8f.29.2024.11.22.03.19.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 22 Nov 2024 03:19:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Mark Cave-Ayland , Aleksandar Rikalo , Harsh Prateek Bora , qemu-ppc@nongnu.org, Laurent Vivier , =?utf-8?q?Herv=C3=A9_Poussineau?= , Artyom Tarasenko , Thomas Huth , Richard Henderson , Thomas Huth , Peter Maydell , Paolo Bonzini , Fam Zheng , Helge Deller , Daniel Henrique Barboza , Nicholas Piggin , Marcel Apfelbaum Subject: [PATCH 2/3] hw/scsi/lsi53c895a: Call scsi_bus_legacy_handle_cmdline() once Date: Fri, 22 Nov 2024 12:19:38 +0100 Message-ID: <20241122111939.11936-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122111939.11936-1-philmd@linaro.org> References: <20241122111939.11936-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Call scsi_bus_legacy_handle_cmdline() once in the DeviceRealize handler, just after scsi_bus_init(). No need for lsi53c8xx_handle_legacy_cmdline(), remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci/pci.h | 2 -- hw/arm/realview.c | 3 +-- hw/arm/versatilepb.c | 3 +-- hw/hppa/machine.c | 3 +-- hw/ppc/prep.c | 1 - hw/scsi/lsi53c895a.c | 8 +------- 6 files changed, 4 insertions(+), 16 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index c0717e3121..7a69f0368c 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -655,8 +655,6 @@ PCIDevice *pci_create_simple_multifunction(PCIBus *bus, int devfn, const char *name); PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name); -void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev); - qemu_irq pci_allocate_irq(PCIDevice *pci_dev); void pci_set_irq(PCIDevice *pci_dev, int level); diff --git a/hw/arm/realview.c b/hw/arm/realview.c index b186f965c6..1042c1a1a3 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -294,8 +294,7 @@ static void realview_init(MachineState *machine, } n = drive_get_max_bus(IF_SCSI); while (n >= 0) { - dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a")); - lsi53c8xx_handle_legacy_cmdline(dev); + pci_create_simple(pci_bus, -1, "lsi53c895a"); n--; } } diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index d48235453e..716ed951bc 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -271,8 +271,7 @@ static void versatile_init(MachineState *machine, int board_id) } n = drive_get_max_bus(IF_SCSI); while (n >= 0) { - dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a")); - lsi53c8xx_handle_legacy_cmdline(dev); + pci_create_simple(pci_bus, -1, "lsi53c895a"); n--; } diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index a31dc32a9f..69b822bfc8 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -349,8 +349,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus, /* SCSI disk setup. */ if (drive_get_max_bus(IF_SCSI) >= 0) { - dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a")); - lsi53c8xx_handle_legacy_cmdline(dev); + pci_create_simple(pci_bus, -1, "lsi53c895a"); } /* Graphics setup. */ diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index fb58c312ac..0e5ff2a75c 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -328,7 +328,6 @@ static void ibm_40p_init(MachineState *machine) dev = DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(1, 0), "lsi53c810")); - lsi53c8xx_handle_legacy_cmdline(dev); qdev_connect_gpio_out(dev, 0, qdev_get_gpio_in(i82378_dev, 13)); /* XXX: s3-trio at PCI_DEVFN(2, 0) */ diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 1f728416e2..d632789434 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -2365,6 +2365,7 @@ static void lsi_scsi_realize(PCIDevice *dev, Error **errp) QTAILQ_INIT(&s->queue); scsi_bus_init(&s->bus, sizeof(s->bus), d, &lsi_scsi_info); + scsi_bus_legacy_handle_cmdline(&s->bus); } static void lsi_scsi_exit(PCIDevice *dev) @@ -2422,10 +2423,3 @@ static void lsi53c895a_register_types(void) } type_init(lsi53c895a_register_types) - -void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev) -{ - LSIState *s = LSI53C895A(lsi_dev); - - scsi_bus_legacy_handle_cmdline(&s->bus); -} From patchwork Fri Nov 22 11:19:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 844917 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp2790815wrx; Fri, 22 Nov 2024 03:21:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWZ3pDh7H7geYPQe1pmKaqSyNiN/sTRGBPKCcez3U5+OctMPdBa1LJy99Bng6f5AkdgoMyVSw==@linaro.org X-Google-Smtp-Source: AGHT+IFfiUIHp+gthxWSVZb1wB/19a140wF5Rz/bzLN0VtdfHZfNFpxB0LrXJQkJgwz7Z51Sscmt X-Received: by 2002:ad4:574b:0:b0:6cb:ce17:e80d with SMTP id 6a1803df08f44-6d4510167d7mr47226826d6.18.1732274470858; Fri, 22 Nov 2024 03:21:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732274470; cv=none; d=google.com; s=arc-20240605; b=Hl4bj3eOO1PVKIXXFU0BqpXibHgF3g/CWU+d50Q7wPKxxoDnvN8gxX0F91at0bdU/3 29YL9cE5kIZ7kQs61Ef85CvPyHCR/hNYzgFrgy/4r1TXcEJSGafDU2lugzuObUTFGf7O a8m4Zgu5aN4zgookNs1QFvoBzub7VqCf7d7jSuC16zyzUIKYHkjluGY2XoiJzS1/jViM lJUDC4YMvHq3x6lQWY/RL47LlQyb7SJ9xqPlL4cU73aMZjFzB2egUQGKJyMmqJ9U45nJ ADag6aW9HHzLmb7yNo3NlO9wVoaZFwbqDDM0xtmrJi6LzSuy64Z9cnv5EIa2f2e3Db89 NWHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w2mewmHu7F82WCCsJ8/YlP7drCNs4XevivVXJNwCNSg=; fh=wBvcyqQhEU6e0ZqmVxQYHE0ci9Ai55t9//i9ttilHeA=; b=S0kDA9LafpBorHHbEKAnqg5H+nhRAJY7NeY9gw/Szjvr/MI42E7DhHBu1GnQ9Shjgx XmYTWrTLDA+w+IornUaQy3ltBenv7q1jmdh5GRBGHlpUKWStxkGLcLmAXwFLLKw88E5z 0LyLyQiohw4byPQufiv27YA4GyNuuOdVXFvEBWDeEGHM8Dfog1xpW1LzQzNc1b6eLOxy tXs4O5ZOsm+i5kCGJ7UyAipo+y2+av80PKcvJfA/IcpqgBgpdDkdLleBOK/BFYc69Meq 1TMDe5suJakBLw74S+BYPiJVnIwHGoPM2HE/vMEtMqi0JGcqw2qTUzDgoqTZOKZ+ULqC 7t6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fxsoW62U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d451b67cbasi17583146d6.399.2024.11.22.03.21.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Nov 2024 03:21:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fxsoW62U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tERhv-0007m8-7h; Fri, 22 Nov 2024 06:20:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tERho-0007iJ-E7 for qemu-devel@nongnu.org; Fri, 22 Nov 2024 06:20:10 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tERhl-0006Cb-M1 for qemu-devel@nongnu.org; Fri, 22 Nov 2024 06:20:08 -0500 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2ffa97d99d6so4370311fa.1 for ; Fri, 22 Nov 2024 03:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732274402; x=1732879202; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w2mewmHu7F82WCCsJ8/YlP7drCNs4XevivVXJNwCNSg=; b=fxsoW62UNWtBGsKAI0pFbqa/XNHXDJssjeKlZxUT/d/wwpTsDc+GQRH9lROeEAGZNX HaFxUIcGtFLO6xXYKNmdYMKRt7mqAnkqWjb8gCD57Yt5jeU7seMLYQjyJfGJ18D9WOby mP/kIDl75lqbLa2yUTqLbtV9NvCvltht7L5AMKiPCXFTx9Xz750pkxeQci0Unsyq/Igg AOGIZqqv81DVgOkrReGnY1tbbdBFLudEXQ2m6JRHizNtM+KTDT6ziFP/7NBJJYV7XPiG yBlbjeUbXaZ1mC1Oq7rb8p9r8gV32gxLV3uNVehhXOvAJvc8XJ6nFXEpr0PvI80tTSC5 h4Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732274402; x=1732879202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w2mewmHu7F82WCCsJ8/YlP7drCNs4XevivVXJNwCNSg=; b=goPIwCmCdVgRadAH2zy6y5pbN1E6CMRJRRbqgeQrW/f1nH4CIBrx1RFzTEePm43SNu LPYXbPGcwDwepbb7MpzoSpFANhe5T0lce5pcDbgsctF97Eh+XGT4TARiF3aUr/qZkt2j IfnRVuyrMuYYMam+oA5sCyp8mbz9FuYyLUaYshUB3i1IXEUN9odspoVWpU28TnmcI6h3 29mFns/5N2BvUk4Mcseag1FSdHH5Z9x4bYt1c+TnWLdfataWQiGM3luXleRFuvsfeuAt UDeLNwuUQHE9TeNHxnmw1J5lik5RzYpdrFOk4C8zt4qczSa4h02RFEG1PHrvpDrCmFrX lLfw== X-Gm-Message-State: AOJu0YyJc+Ugk5S8VcrEa8rBptgYKoilBlQzfTvp3q8erD41sVOuUwho J6hiPAOc4agJ4dWu1bKT9enR7SwVgv4c6+XP39n/ZB0yTVHyDorfOg0vOEA3CVc+hiOJwYwigy5 4 X-Gm-Gg: ASbGncskSFNH2G4r+byux6kbRjg2a2hZ2SnEbVByY7Tb+BhSbtOfnKQS8Lq4VDQcxQQ tEjUKYtL6PSA/cCJpvzmghEn3A19qx089smQ9vavuVUpK+F1TASeXsgikUSP3jpnvbv2ZjfZW18 wz1g5Z0QY+X9salHjot9dkvCm1RRy4XRMjqfUW70LcAQqShgJc30FtFLQjeOdqZ5lD5Un/H8wEB mdwoS3/yyXbu3l46gNmwidz7bQKpfN47tz2OjpJcsKzDb3j9mwBaLxJk65c/0z0rRRxFd0DzKLF X-Received: by 2002:a05:6512:3e23:b0:539:e94d:2d3d with SMTP id 2adb3069b0e04-53dd35a4f38mr1136485e87.7.1732274402028; Fri, 22 Nov 2024 03:20:02 -0800 (PST) Received: from localhost.localdomain ([176.187.211.33]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433cde114d5sm24055655e9.17.2024.11.22.03.20.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 22 Nov 2024 03:20:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Mark Cave-Ayland , Aleksandar Rikalo , Harsh Prateek Bora , qemu-ppc@nongnu.org, Laurent Vivier , =?utf-8?q?Herv=C3=A9_Poussineau?= , Artyom Tarasenko , Thomas Huth , Richard Henderson , Thomas Huth , Peter Maydell , Paolo Bonzini , Fam Zheng , Helge Deller , Daniel Henrique Barboza , Nicholas Piggin , Marcel Apfelbaum Subject: [PATCH 3/3] hw/scsi/esp: Call scsi_bus_legacy_handle_cmdline() once Date: Fri, 22 Nov 2024 12:19:39 +0100 Message-ID: <20241122111939.11936-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122111939.11936-1-philmd@linaro.org> References: <20241122111939.11936-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=philmd@linaro.org; helo=mail-lj1-x22f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Call scsi_bus_legacy_handle_cmdline() once in the DeviceRealize handler, just after scsi_bus_init(). Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 2 -- hw/m68k/q800.c | 2 -- hw/mips/jazz.c | 2 -- hw/scsi/esp.c | 1 + hw/sparc/sun4m.c | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index 08886d432c..f0fdbef7ae 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -851,8 +851,6 @@ static void next_scsi_init(DeviceState *pcdev) next_pc->scsi_reset = qdev_get_gpio_in(dev, 0); next_pc->scsi_dma = qdev_get_gpio_in(dev, 1); - - scsi_bus_legacy_handle_cmdline(&esp->bus); } static void next_escc_init(DeviceState *pcdev) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 556604e1dc..816a662fd9 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -487,8 +487,6 @@ static void q800_machine_init(MachineState *machine) memory_region_add_subregion(&m->macio, ESP_PDMA - IO_BASE, sysbus_mmio_get_region(sysbus, 1)); - scsi_bus_legacy_handle_cmdline(&esp->bus); - /* Apple Sound Chip */ object_initialize_child(OBJECT(machine), "asc", &m->asc, TYPE_ASC); diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 0e43c9f0ba..71badb0616 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -347,8 +347,6 @@ static void mips_jazz_init(MachineState *machine, sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 5)); sysbus_mmio_map(sysbus, 0, 0x80002000); - scsi_bus_legacy_handle_cmdline(&esp->bus); - /* Floppy */ for (n = 0; n < MAX_FD; n++) { fds[n] = drive_get(IF_FLOPPY, 0, n); diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index ac841dc32e..a1d2f6f380 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -1542,6 +1542,7 @@ static void sysbus_esp_realize(DeviceState *dev, Error **errp) qdev_init_gpio_in(dev, sysbus_esp_gpio_demux, 2); scsi_bus_init(&s->bus, sizeof(s->bus), dev, &esp_scsi_info); + scsi_bus_legacy_handle_cmdline(&s->bus); } static void sysbus_esp_hard_reset(DeviceState *dev) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index d52e6a7213..26e0af43bf 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -338,7 +338,6 @@ static void *sparc32_dma_init(hwaddr dma_base, sysbus_mmio_map(SYS_BUS_DEVICE(dma), 0, dma_base); sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base); - scsi_bus_legacy_handle_cmdline(&esp->esp.bus); sysbus_mmio_map(SYS_BUS_DEVICE(lance), 0, le_base);