sdide: Marvell PATA, sdiahci: 82801 SATA RAID

This commit is contained in:
cinap_lenrek 2011-11-09 15:17:00 +01:00
parent d8b1af77d0
commit 29c9eb1c21
2 changed files with 32 additions and 14 deletions

View file

@ -2010,6 +2010,8 @@ didtype(Pcidev *p)
return Tesb; return Tesb;
if((p->did & 0xfffb) == 0x27c1) if((p->did & 0xfffb) == 0x27c1)
return Tich; /* 82801g[bh]m */ return Tich; /* 82801g[bh]m */
if((p->did & 0xffff) == 0x2822)
return Tich; /* 82801 SATA RAID */
if((p->did & 0xffff) == 0x2821) if((p->did & 0xffff) == 0x2821)
return Tich; /* 82801h[roh] */ return Tich; /* 82801h[roh] */
if((p->did & 0xfffe) == 0x2824) if((p->did & 0xfffe) == 0x2824)

View file

@ -1215,17 +1215,15 @@ atapktio0(Drive *drive, SDreq *r)
ctlr->command = Cpkt; /* debugging */ ctlr->command = Cpkt; /* debugging */
outb(cmdport+Command, Cpkt); outb(cmdport+Command, Cpkt);
if((drive->info[Iconfig] & Mdrq) != 0x0020){ microdelay(1);
microdelay(1); as = ataready(cmdport, ctlport, 0, Bsy, Drq|Chk, 4*1000);
as = ataready(cmdport, ctlport, 0, Bsy, Drq|Chk, 4*1000); if(as < 0 || (as & (Bsy|Chk))){
if(as < 0 || (as & (Bsy|Chk))){ drive->status = as<0 ? 0 : as;
drive->status = as<0 ? 0 : as; ctlr->curdrive = nil;
ctlr->curdrive = nil; ctlr->done = 1;
ctlr->done = 1; rv = SDtimeout;
rv = SDtimeout; }else
}else atapktinterrupt(drive);
atapktinterrupt(drive);
}
if(drive->pktdma) if(drive->pktdma)
atadmastart(ctlr, drive->write); atadmastart(ctlr, drive->write);
iunlock(ctlr); iunlock(ctlr);
@ -1243,8 +1241,17 @@ atapktio0(Drive *drive, SDreq *r)
} }
iunlock(ctlr); iunlock(ctlr);
if(drive->status & Chk) if(drive->status & Chk){
rv = SDcheck; if(DEBUG & DbgDEBUG)
print("atapktio: dev=%X status=%X error=%X pktcmd[0]=%.2X\n",
drive->dev, drive->status, drive->error, cmd[0]);
if(drive->pktdma){
print("atapktio: disabling dma\n");
drive->dmactl=0;
rv = SDretry;
} else
rv = SDcheck;
}
return rv; return rv;
} }
@ -2151,6 +2158,15 @@ atapnp(void)
case (0x438c<<16)|0x1002: /* ATI SB600 PATA */ case (0x438c<<16)|0x1002: /* ATI SB600 PATA */
case (0x439c<<16)|0x1002: /* SB7xx pata */ case (0x439c<<16)|0x1002: /* SB7xx pata */
break; break;
case (0x6101<<16)|0x11ab: /* Marvell PATA */
case (0x6121<<16)|0x11ab: /* Marvell PATA */
case (0x6123<<16)|0x11ab: /* Marvell PATA */
case (0x6145<<16)|0x11ab: /* Marvell PATA */
case (0x1b4b<<16)|0x91a0: /* Marvell PATA */
case (0x1b4b<<16)|0x91a4: /* Marvell PATA */
break;
case (0x0211<<16)|0x1166: /* ServerWorks IB6566 */ case (0x0211<<16)|0x1166: /* ServerWorks IB6566 */
{ {
Pcidev *sb; Pcidev *sb;
@ -2514,7 +2530,7 @@ SDifc sdideifc = {
"ide", /* name */ "ide", /* name */
atapnp, /* pnp */ atapnp, /* pnp */
nil, /* legacy */ nil, /* legacy */
ataenable, /* enable */ ataenable, /* enable */
atadisable, /* disable */ atadisable, /* disable */