diff --git a/pmon/fs/dev_part.c b/pmon/fs/dev_part.c index fc41744d..49cd5480 100644 --- a/pmon/fs/dev_part.c +++ b/pmon/fs/dev_part.c @@ -782,7 +782,7 @@ static int _DevPartOpen(DeviceDisk* dev, const char* dev_name) //dev->part = NULL; char *p_name = dev_name+2; int ide_cd_index = *p_name - '0'; -#if defined(LOONGSON_3A2H) || defined(LS7A) || defined(LS2K) +#if defined(LOONGSON_3A2H) || defined(LS7A) || defined(LOONGSON_2K) if(1){ #else if(is_ide_cd_ready(ide_cd_index)){ diff --git a/pmon/fs/iso9660fs.c b/pmon/fs/iso9660fs.c index bc60ed58..a6267159 100644 --- a/pmon/fs/iso9660fs.c +++ b/pmon/fs/iso9660fs.c @@ -169,6 +169,7 @@ iso9660_open(int fd, const char *path, int flags, int mode) struct iso_directory_record *dp; int rc; int showdir,lookupdir; + char retry_times = 0; showdir=0; if(path[strlen(path)-1]=='/')lookupdir=1; /* Try to get to the physical device */ @@ -194,6 +195,7 @@ iso9660_open(int fd, const char *path, int flags, int mode) opath = strchr(opath, '/') + 1; if(opath[0]==0){opath="/";} +again: /* Try to open the physical device */ rc = devio_open(fd, dpath, flags, mode); if (rc < 0) @@ -212,7 +214,15 @@ iso9660_open(int fd, const char *path, int flags, int mode) } errno = ENOENT; /* In case of error */ if (bcmp(vd->id, ISO_STANDARD_ID, sizeof vd->id) != 0) - goto out; + if (retry_times < 50) { + retry_times++; + //printf("retry_times %d.\n",retry_times); + free(buf); + (void)devio_close(fd); + delay(10000); + goto again; + } else + goto out; if (isonum_711(vd->type) == ISO_VD_END) goto out; if (isonum_711(vd->type) == ISO_VD_PRIMARY) diff --git a/sys/dev/pci/ahcisata.c b/sys/dev/pci/ahcisata.c index e7b7d364..0bc78806 100755 --- a/sys/dev/pci/ahcisata.c +++ b/sys/dev/pci/ahcisata.c @@ -743,16 +743,16 @@ static int get_ahci_device_data(u8 port, u8 * fis, int fis_len, u8 * buf, }; writel_with_flush(1, port_mmio + PORT_CMD_ISSUE); if (waiting_for_cmd_completed(port_mmio + PORT_CMD_ISSUE, 2000000, 0x1)) { - printf("%s : timeout exit! %d bytes transferred.\n", __func__, __LINE__, - pp->cmd_slot->status); +// printf("%s : timeout exit! %d bytes transferred.\n", __func__, __LINE__, +// pp->cmd_slot->status); - printf("PxIS: 0x%08x, PxSERR: 0x%08x\n", readl(port_mmio + PORT_IRQ_STAT), readl(port_mmio + PORT_SCR_ERR)); - printf("PxTFD: 0x%08x, PxSSTS: 0x%08x\n", readl(port_mmio + PORT_TFDATA), readl(port_mmio + PORT_SCR_STAT)); +// printf("PxIS: 0x%08x, PxSERR: 0x%08x\n", readl(port_mmio + PORT_IRQ_STAT), readl(port_mmio + PORT_SCR_ERR)); +// printf("PxTFD: 0x%08x, PxSSTS: 0x%08x\n", readl(port_mmio + PORT_TFDATA), readl(port_mmio + PORT_SCR_STAT)); if (waiting_for_cmd_completed(port_mmio + PORT_CMD_ISSUE, 2000000, 0x1)) { - printf("Waiting another 2s is useless.\n"); +// printf("Waiting another 2s is useless.\n"); }else{ - printf("Waiting another 2s is usefull.\n"); +// printf("Waiting another 2s is usefull.\n"); } return -1;