summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-02-22 20:29:45 +0000
committerJens Arnold <amiconn@rockbox.org>2008-02-22 20:29:45 +0000
commita0b5780e2d7731eb06c9882d103f87ae9064f2eb (patch)
treebf92127c9af47625a3495fc38c38ba66c0910dbf
parent77970e4017074427144cd600edc432972b77999e (diff)
downloadrockbox-a0b5780e2d7731eb06c9882d103f87ae9064f2eb.tar.gz
rockbox-a0b5780e2d7731eb06c9882d103f87ae9064f2eb.zip
Remove sector 0 write protection from the ATA and MMC drivers. The one in the ATA driver makes it impossible to change sector 0 from within rockbox USB mode, and nobody reported having seen that sector 0 panic for a loong time. Afaik it dates back to when ATA and filesystem write support were developed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16370 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata.c3
-rw-r--r--firmware/drivers/ata_mmc.c3
2 files changed, 0 insertions, 6 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 94a785c46a..549a7bf920 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -482,9 +482,6 @@ int ata_write_sectors(IF_MV2(int drive,)
482 int ret = 0; 482 int ret = 0;
483 long spinup_start; 483 long spinup_start;
484 484
485 if (start == 0)
486 panicf("Writing on sector 0\n");
487
488#ifndef MAX_PHYS_SECTOR_SIZE 485#ifndef MAX_PHYS_SECTOR_SIZE
489#ifdef HAVE_MULTIVOLUME 486#ifdef HAVE_MULTIVOLUME
490 (void)drive; /* unused for now */ 487 (void)drive; /* unused for now */
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index 6d69501deb..fdd091248f 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -802,9 +802,6 @@ int ata_write_sectors(IF_MV2(int drive,)
802 int drive = current_card; 802 int drive = current_card;
803#endif 803#endif
804 804
805 if (start == 0)
806 panicf("Writing on sector 0\n");
807
808 c_addr = start * SECTOR_SIZE; 805 c_addr = start * SECTOR_SIZE;
809 c_end_addr = c_addr + count * SECTOR_SIZE; 806 c_end_addr = c_addr + count * SECTOR_SIZE;
810 807