openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* storage_common: Support ISO files greater than 2.1GB
@ 2023-03-06  7:32 Muggeridge, Matt
  0 siblings, 0 replies; only message in thread
From: Muggeridge, Matt @ 2023-03-06  7:32 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]

Hi,

When booting from virtual media with a Windows Installation ISO file (>8GB), I have found it fails to install due to this code in drivers/usb/gadget/function/storage_common.c<https://github.com/torvalds/linux/blob/master/drivers/usb/gadget/function/storage_common.c#:~:text=min_sectors%20%3D%201%3B-,if%20(curlun%2D%3Ecdrom)%20%7B,%7D,-if%20(num_sectors%20%3C%20min_sectors>:

        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);
               }
        }


Removing this if-statement allows the Windows installation to proceed successfully.

It leaves me wondering that given ISO files readily exceed these limits, what is the purpose of this if-statement? What unwanted side-effects might I experience by removing this code?

FWIW, I found old references for this topic:

  *   https://lkml.org/lkml/2015/3/11/852
  *   https://lists.ozlabs.org/pipermail/openbmc/2021-June/026820.htmlOpenBMC

The discussion in the first link highlights that the limits are probably there for audio-CD (as it emulates a CD-Player). I only need this to work for data-CD. Though, if a general solution is needed, the USB Gadget driver would need to distinguish between data-CD and audio-CD.

Thanks,
Matt.


[-- Attachment #2: Type: text/html, Size: 8880 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-08  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  7:32 storage_common: Support ISO files greater than 2.1GB Muggeridge, Matt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).