Browse Source

Fix the SATA CD-ROM error.

The modification is in the common file /sys/dev/ata/cd.c .
ERROR:There's a panic when startup by using the sata CD-ROM to install an OS.
Relevancy:Except the 3A2H branch.

Change-Id: I656ba505462c8e7dd525b411062d9ed41ae5813f
master
zhouxuezhi 8 years ago
committed by 周学智
parent
commit
746073c32a
  1. 13
      sys/dev/ata/cd.c

13
sys/dev/ata/cd.c

@ -165,9 +165,12 @@ int ide_cdmatch(struct device *parent, void *match_, void *aux)
* The routine called by the low level scsi routine when it discovers
* A device suitable for this driver
*/
#ifdef DEBUG_CD
struct ide_cd_softc *mycd;
#endif
//#ifdef DEBUG_CD
#define MAX_IDE_CDS 4
int ide_cd_index = 0;
struct ide_cd_softc *mycd[MAX_IDE_CDS];
//#endif
void ide_cdattach(struct device *parent, struct device *self, void *aux)
{
@ -177,6 +180,7 @@ void ide_cdattach(struct device *parent, struct device *self, void *aux)
printf("cd attach drive=%d\n", drvp->drive);
mycd[ide_cd_index++] = cd;
cd->openings = aa_link->aa_openings;
cd->drvp = aa_link->aa_drv_data; //set by wdcattach and wdcprobe
@ -766,9 +770,6 @@ int ide_cdwrite_intr(struct ide_cd_softc *cd, struct packet_cmd *pc)
return -1;
}
#define MAX_IDE_CDS 4
int ide_cd_index = 0;
struct ide_cd_softc *mycd[MAX_IDE_CDS];
int is_ide_cd_ready(int ide_cd_index)
{

Loading…
Cancel
Save