From 6101e74932171998fce633f825bbc4156745239c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 4 Nov 2024 15:14:47 -0500 Subject: [PATCH] SCSI: Remove unused sim_priv fields. Whatever "compatibility layer" these were for, nothing in-tree uses them anymore. --- headers/os/drivers/bus/SCSI.h | 7 ------- src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp | 1 - src/add-ons/kernel/bus_managers/scsi/scsi_io.cpp | 6 ------ .../kernel/busses/scsi/virtio/VirtioSCSIController.cpp | 1 - 4 files changed, 15 deletions(-) diff --git a/headers/os/drivers/bus/SCSI.h b/headers/os/drivers/bus/SCSI.h index af91138c56..2dfe0eac4b 100644 --- a/headers/os/drivers/bus/SCSI.h +++ b/headers/os/drivers/bus/SCSI.h @@ -99,8 +99,6 @@ #define SCSI_MAX_CDB_SIZE 16 // max size of cdb #define SCSI_MAX_SENSE_SIZE 64 // max size of sense data -#define SCSI_SIM_PRIV 1536 // SIM private data; this may be a bit much but - // we currently need that for the compatibility layer // bus/device handle typedef struct scsi_bus_info *scsi_bus; @@ -155,10 +153,6 @@ typedef struct scsi_ccb { const physical_entry *orig_sg_list; uint16 orig_sg_count; uint32 orig_data_length; - - // private SIM data - uchar sim_state; // set to zero when request is submitted first time - uchar sim_priv[SCSI_SIM_PRIV]; /* SIM private data area */ } scsi_ccb; @@ -253,7 +247,6 @@ typedef struct { uchar version_num; /* Version number for the SIM/HBA */ uchar hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ uchar hba_misc; /* Misc HBA feature flags */ - uint32 sim_priv; /* Size of SIM private data area */ uchar vuhba_flags[SCSI_VUHBA];/* Vendor unique capabilities */ uchar initiator_id; /* ID of the HBA on the SCSI bus */ uint32 hba_queue_size; // size of adapters command queue diff --git a/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp b/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp index 597865987e..a8457734fc 100644 --- a/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp +++ b/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp @@ -255,7 +255,6 @@ ATAChannel::PathInquiry(scsi_path_inquiry *info) { info->hba_inquiry = SCSI_PI_TAG_ABLE | SCSI_PI_WIDE_16; info->hba_misc = 0; - info->sim_priv = 0; info->initiator_id = 2; info->hba_queue_size = 1; memset(info->vuhba_flags, 0, sizeof(info->vuhba_flags)); diff --git a/src/add-ons/kernel/bus_managers/scsi/scsi_io.cpp b/src/add-ons/kernel/bus_managers/scsi/scsi_io.cpp index 4812c36f3c..2e8597e04b 100644 --- a/src/add-ons/kernel/bus_managers/scsi/scsi_io.cpp +++ b/src/add-ons/kernel/bus_managers/scsi/scsi_io.cpp @@ -158,9 +158,6 @@ submit_autosense(scsi_ccb *request) // request is not emulated device->auto_sense_request->emulated = false; - // initial SIM state for this request - request->sim_state = 0; - device->auto_sense_originator = request; // make it next request to process @@ -472,9 +469,6 @@ scsi_async_io(scsi_ccb *request) SHOW_FLOW(3, "ordered=%d", request->ordered); - // give SIM a well-defined first state - request->sim_state = 0; - // make sure device/bus is not blocked if (!scsi_check_enqueue_request(request)) return; diff --git a/src/add-ons/kernel/busses/scsi/virtio/VirtioSCSIController.cpp b/src/add-ons/kernel/busses/scsi/virtio/VirtioSCSIController.cpp index d854ed8860..d49a176efc 100644 --- a/src/add-ons/kernel/busses/scsi/virtio/VirtioSCSIController.cpp +++ b/src/add-ons/kernel/busses/scsi/virtio/VirtioSCSIController.cpp @@ -152,7 +152,6 @@ VirtioSCSIController::PathInquiry(scsi_path_inquiry *info) { info->hba_inquiry = SCSI_PI_TAG_ABLE; info->hba_misc = 0; - info->sim_priv = 0; info->initiator_id = VIRTIO_SCSI_INITIATOR_ID; info->hba_queue_size = fConfig.cmd_per_lun != 0 ? fConfig.cmd_per_lun : 1; memset(info->vuhba_flags, 0, sizeof(info->vuhba_flags));