[SeaBIOS] WD elements problem

Wim Vervoorn wvervoorn at eltan.com
Tue Nov 10 16:28:37 CET 2015


Hello Kevin,

I attached a log of both patches.

The disk was recognized in both cases but couldn't be mounted for various reasons. I booted from linux and included a dmesg to show you the Linux failure.

There was another item worth noticing as well. I started the test with the msleep left out. If I do this the disk is recognized in the bottom slot but to get it working in the top slot I needed to add the msleep unfortunately.


Best Regards,

Wim Vervoorn

Eltan B.V.
Ambachtstraat 23
5481 SM Schijndel
The Netherlands

T : +31-(0)73-594 46 64
E : wvervoorn at eltan.com
W : http://www.eltan.com

"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE IMMEDIATELY NOTIFY THE SENDER BY TELEPHONE +31-(0)73-5944664 OR REPLY EMAIL, AND IMMEDIATELY DELETE THIS MESSAGE AND ALL COPIES." 







-----Original Message-----
From: Kevin O'Connor [mailto:kevin at koconnor.net] 
Sent: Monday, November 9, 2015 5:50 PM
To: Wim Vervoorn <wvervoorn at eltan.com>
Cc: seabios at seabios.org
Subject: Re: [SeaBIOS] WD elements problem

On Mon, Nov 09, 2015 at 02:38:39PM +0000, Wim Vervoorn wrote:
> Hello Kevin,
>  
> I hooked up an external USB 3.0 WD hard drive and found that this wasn't supported by SeaBIOS as this used 4K blocks.
>  

If you don't care about the data on that drive, you could try the patches below.  (If there is any important data on the drive, definitely don't try these patches as they could definitely cause
corruption.)

The first patch ignores the block size and continues on assuming a block size of 512.  The second patch should only be applied after reverting the first patch - it removes the requirement for 512 byte blocks.

Neither of these patches is correct, but they could provide additional information.

Thanks,
-Kevin


Patch 1:

--- a/src/hw/blockcmd.c
+++ b/src/hw/blockcmd.c
@@ -226,7 +226,7 @@ scsi_drive_setup(struct drive_s *drive, const char *s, int prio)
     // READ CAPACITY returns the address of the last block.
     // We do not bother with READ CAPACITY(16) because BIOS does not support
     // 64-bit LBA anyway.
-    drive->blksize = be32_to_cpu(capdata.blksize);
+    drive->blksize = DISK_SECTOR_SIZE;
     if (drive->blksize != DISK_SECTOR_SIZE) {
         dprintf(1, "%s: unsupported block size %d\n", s, drive->blksize);
         return -1;

Patch 2:

--- a/src/hw/blockcmd.c
+++ b/src/hw/blockcmd.c
@@ -227,7 +227,7 @@ scsi_drive_setup(struct drive_s *drive, const char *s, int prio)
     // We do not bother with READ CAPACITY(16) because BIOS does not support
     // 64-bit LBA anyway.
     drive->blksize = be32_to_cpu(capdata.blksize);
-    if (drive->blksize != DISK_SECTOR_SIZE) {
+    if (0) {
         dprintf(1, "%s: unsupported block size %d\n", s, drive->blksize);
         return -1;
     }


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: XHCI-FAIL_WD_ELEMENTS(SS)_BOTTOM_PATCH2_STRIPPED.txt
URL: <http://www.seabios.org/pipermail/seabios/attachments/20151110/226bd515/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: XHCI-FAIL_WD_ELEMENTS(SS)_BOTTOM_PATCH1_STRIPPED.txt
URL: <http://www.seabios.org/pipermail/seabios/attachments/20151110/226bd515/attachment-0003.txt>


More information about the SeaBIOS mailing list