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:

 

        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:

 

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.