All of lore.kernel.org
 help / color / mirror / Atom feed
From: Volkan Unal <vunal@linux.ibm.com>
To: linux-s390@vger.kernel.org
Cc: oberpar@linux.ibm.com, sth@linux.ibm.com, hoeppner@linux.ibm.com,
	meted@linux.ibm.com
Subject: [PATCH 1/3] s390/dasd: Add device type defines for FBA devices
Date: Wed, 22 Jul 2026 16:16:49 +0100	[thread overview]
Message-ID: <20260722151651.292621-2-vunal@linux.ibm.com> (raw)
In-Reply-To: <20260722151651.292621-1-vunal@linux.ibm.com>

Replace magic numbers in dasd_fba_ids[] with descriptive macros
to improve code readability.

The defines distinguish between:
 - Virtual FBA devices (0x6310/0x9336): Memory backed virtual
   devices.
 - Physical FBA devices (0x3880/0x3370): Physical 3370 disk with
   3880 controller.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Mete Durlu <meted@linux.ibm.com>
Signed-off-by: Volkan Unal <vunal@linux.ibm.com>
---
 drivers/s390/block/dasd_fba.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 029acb83ecab..45a488db897f 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -31,6 +31,11 @@
 #define DASD_FBA_CCW_LOCATE 0x43
 #define DASD_FBA_CCW_DEFINE_EXTENT 0x63
 
+#define DASD_FBA_CU_TYPE_VIRTUAL	0x6310
+#define DASD_FBA_DEV_TYPE_VIRTUAL	0x9336
+#define DASD_FBA_CU_TYPE_PHYSICAL	0x3880
+#define DASD_FBA_DEV_TYPE_PHYSICAL	0x3370
+
 MODULE_DESCRIPTION("S/390 DASD FBA Disks device driver");
 MODULE_LICENSE("GPL");
 
@@ -42,8 +47,8 @@ struct dasd_fba_private {
 };
 
 static struct ccw_device_id dasd_fba_ids[] = {
-	{ CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), .driver_info = 0x1},
-	{ CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), .driver_info = 0x2},
+	{ CCW_DEVICE_DEVTYPE (DASD_FBA_CU_TYPE_VIRTUAL, 0, DASD_FBA_DEV_TYPE_VIRTUAL, 0), .driver_info = 0x1},
+	{ CCW_DEVICE_DEVTYPE (DASD_FBA_CU_TYPE_PHYSICAL, 0, DASD_FBA_DEV_TYPE_PHYSICAL, 0), .driver_info = 0x2},
 	{ /* end of list */ },
 };
 
-- 
2.55.0


  reply	other threads:[~2026-07-22 15:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 15:16 [PATCH 0/3] s390/dasd: Restrict discard support to virtual DASD devices Volkan Unal
2026-07-22 15:16 ` Volkan Unal [this message]
2026-07-22 15:20   ` [PATCH 1/3] s390/dasd: Add device type defines for FBA devices sashiko-bot
2026-07-22 15:16 ` [PATCH 2/3] s390/dasd: Restrict discard support to virtual DASD devices Volkan Unal
2026-07-22 15:33   ` sashiko-bot
2026-07-22 15:16 ` [PATCH 3/3] s390/dasd: Make FBA discard support conditional per device Volkan Unal
2026-07-22 15:38   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260722151651.292621-2-vunal@linux.ibm.com \
    --to=vunal@linux.ibm.com \
    --cc=hoeppner@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=meted@linux.ibm.com \
    --cc=oberpar@linux.ibm.com \
    --cc=sth@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.