[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210626211820.107310-5-i.kononenko@yadro.com>
Date: Sun, 27 Jun 2021 00:18:17 +0300
From: Igor Kononenko <i.kononenko@...ro.com>
To: Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <openbmc@...ts.ozlabs.org>, Igor Kononenko <i.kononenko@...ro.com>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH 4/6] fms: Support the DVD/BD images size over 2.1Gb
Adds the ability to use the FMS image size greater than 2.1Gb. This
limitation is due to the maximum number of available frames on the
CD-ROM media.
An incoming implementation of additional media formats (DVD-ROM, BD-ROM)
should support both formats' possible capacity.
End-user-impact: Now, the FMS able to use a medium-image backend file,
which size is more significant than 2.1Gb
Signed-off-by: Igor Kononenko <i.kononenko@...ro.com>
---
drivers/usb/gadget/function/storage_common.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/usb/gadget/function/storage_common.c b/drivers/usb/gadget/function/storage_common.c
index b883b8b7b05b..468f7622b11d 100644
--- a/drivers/usb/gadget/function/storage_common.c
+++ b/drivers/usb/gadget/function/storage_common.c
@@ -242,15 +242,8 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
num_sectors = size >> blkbits; /* File size in logic-block-size blocks */
min_sectors = 1;
- if (curlun->cdrom) {
+ if (curlun->cdrom)
min_sectors = 300; /* Smallest track is 300 frames */
- if (num_sectors >= 256*60*75) {
- 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);
- }
- }
if (num_sectors < min_sectors) {
LINFO(curlun, "file too small: %s\n", filename);
rc = -ETOOSMALL;
--
2.32.0
Powered by blists - more mailing lists