aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-12-09 10:24:54 +0100
committerHelge Deller <deller@gmx.de>2024-01-04 18:48:50 +0100
commitb4d48fcdc3f73ec0d335024abd836bf13fea3959 (patch)
tree2bdfed3be0c5fdf3fc1b6d3c9a6b6c7e9c88243b
parentb77d66680283670ccfb7277c61f0360752f04be1 (diff)
downloadseabios-hppa-b4d48fcdc3f73ec0d335024abd836bf13fea3959.zip
seabios-hppa-b4d48fcdc3f73ec0d335024abd836bf13fea3959.tar.gz
seabios-hppa-b4d48fcdc3f73ec0d335024abd836bf13fea3959.tar.bz2
parisc/scsi: Add maximum transfer size per SCSI controller
LSI controller allows up to 4MB transactions per call, the ESP controller only up to 64k per call. Values for other drivers need to be added too. Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/block.h1
-rw-r--r--src/hw/esp-scsi.c1
-rw-r--r--src/hw/lsi-scsi.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/block.h b/src/block.h
index 5cd2e5d..f780847 100644
--- a/src/block.h
+++ b/src/block.h
@@ -51,6 +51,7 @@ struct drive_s {
struct chs_s lchs; // Logical CHS
u64 sectors; // Total sectors count
u32 cntl_id; // Unique id for a given driver type.
+ u32 max_bytes_transfer; // maximum number of bytes which can bet transferred at once
u8 removable; // Is media removable (currently unused)
// Info for EDD calls
diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c
index 38c95c1..ab161de 100644
--- a/src/hw/esp-scsi.c
+++ b/src/hw/esp-scsi.c
@@ -180,6 +180,7 @@ esp_scsi_init_lun(struct esp_lun_s *llun, struct pci_device *pci, u32 iobase,
{
memset(llun, 0, sizeof(*llun));
llun->drive.type = DTYPE_ESP_SCSI;
+ llun->drive.max_bytes_transfer = 64*1024; /* 64kb */
llun->drive.cntl_id = pci->bdf;
llun->pci = pci;
llun->target = target;
diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c
index 5583bd6..784d3e2 100644
--- a/src/hw/lsi-scsi.c
+++ b/src/hw/lsi-scsi.c
@@ -142,6 +142,7 @@ lsi_scsi_init_lun(struct lsi_lun_s *llun, struct pci_device *pci, u32 iobase,
{
memset(llun, 0, sizeof(*llun));
llun->drive.type = DTYPE_LSI_SCSI;
+ llun->drive.max_bytes_transfer = 4*1024*1024; /* 4 MB */
llun->drive.cntl_id = pci->bdf;
llun->pci = pci;
llun->target = target;