summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Ilenko <AIlenko@IBS.RU>2022-08-05 10:52:37 +0300
committerAlexandr Ilenko <AIlenko@IBS.RU>2022-08-12 16:43:51 +0300
commitf4806b2022c2697acb521c840609186de5b66a33 (patch)
treee99c78ea43554145891b9a19f1554d3b36c8d9d2
parent3645e3b6f163b979a7fadc886b4b2c06191b0301 (diff)
downloadopenbmc-f4806b2022c2697acb521c840609186de5b66a33.tar.xz
kernel: CR: allow forcely >2.5 GB cdrom images
-rw-r--r--meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed/0001-CR-allow-forcely-2.5-GB-cdrom-images.patch51
-rw-r--r--meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed/0001-CR-allow-forcely-2.5-GB-cdrom-images.patch b/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed/0001-CR-allow-forcely-2.5-GB-cdrom-images.patch
new file mode 100644
index 0000000000..ffe5a7e9b9
--- /dev/null
+++ b/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed/0001-CR-allow-forcely-2.5-GB-cdrom-images.patch
@@ -0,0 +1,51 @@
+From 49f54e6bb55ae5dda06e75fc35cbfd19005d5315 Mon Sep 17 00:00:00 2001
+From: Alexandr Ilenko <AIlenko@IBS.RU>
+Date: Fri, 5 Aug 2022 10:15:18 +0300
+Subject: [PATCH] CR: allow forcely >2.5 GB cdrom images
+
+---
+ drivers/usb/gadget/function/storage_common.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/drivers/usb/gadget/function/storage_common.c b/drivers/usb/gadget/function/storage_common.c
+index 197630f38fcb..f43010fad1e0 100644
+--- a/drivers/usb/gadget/function/storage_common.c
++++ b/drivers/usb/gadget/function/storage_common.c
+@@ -239,15 +239,34 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
+ blkbits = 9;
+ }
+
++// Change request by customer (forcely):
++// - TO allow "***.iso" images of DVD disk(s) to be used also as "cdrom" ones
++// (in "cdrom" device).
++// - This change reverts the guard of iso9660 size limitation locally only.
++// - Request was initiated on 11.07.2022 via Telegram
++// - Request was forcely admitted on 20.07.2022 on sprint review
++// - Authoring, validating, testing of software of each vendor and point of contact
++// is Willey.su
++#define ALLOW_FORCELY_GT_2500MB_CDROM_IMAGE
++
+ num_sectors = size >> blkbits; /* File size in logic-block-size blocks */
+ min_sectors = 1;
+ if (curlun->cdrom) {
+ min_sectors = 300; /* Smallest track is 300 frames */
+ if (num_sectors >= 256*60*75) {
++#ifdef ALLOW_FORCELY_GT_2500MB_CDROM_IMAGE
++ loff_t num_sectors_backup = num_sectors;
++#endif
+ num_sectors = 256*60*75 - 1;
+ LINFO(curlun, "file too big: %s\n", filename);
+ LINFO(curlun, "using only first %d blocks\n",
+ (int) num_sectors);
++#ifdef ALLOW_FORCELY_GT_2500MB_CDROM_IMAGE
++ num_sectors = num_sectors_backup;
++ LINFO(curlun, "using really all %d blocks"
++ " (ignoring of the limitation forcely)\n",
++ (int) num_sectors);
++#endif
+ }
+ }
+ if (num_sectors < min_sectors) {
+--
+2.35.1
+
diff --git a/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend
index 7ced02fda2..1bf8e128a1 100644
--- a/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-ibs/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -19,4 +19,5 @@ SRC_URI += " \
file://sila.cfg \
file://aspeed-bmc-sila-cp2-5422.dts;subdir=git/arch/arm/boot/dts \
file://openbmc-flash-layout-32MB.dtsi;subdir=git/arch/arm/boot/dts \
+ file://0001-CR-allow-forcely-2.5-GB-cdrom-images.patch \
"