提交 bc21c105 编写于 作者: H Hannes Reinecke 提交者: Damien Le Moal

ata: sata_sx4: Drop pointless VPRINTK() calls and convert the remaining ones

Drop pointless VPRINTK() calls for setting up SG tables
and convert the remaining calls to structured logging.
Signed-off-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
上级 0b8e9cc7
...@@ -308,15 +308,9 @@ static inline void pdc20621_ata_sg(u8 *buf, unsigned int portno, ...@@ -308,15 +308,9 @@ static inline void pdc20621_ata_sg(u8 *buf, unsigned int portno,
/* output ATA packet S/G table */ /* output ATA packet S/G table */
addr = PDC_20621_DIMM_BASE + PDC_20621_DIMM_DATA + addr = PDC_20621_DIMM_BASE + PDC_20621_DIMM_DATA +
(PDC_DIMM_DATA_STEP * portno); (PDC_DIMM_DATA_STEP * portno);
VPRINTK("ATA sg addr 0x%x, %d\n", addr, addr);
buf32[dw] = cpu_to_le32(addr); buf32[dw] = cpu_to_le32(addr);
buf32[dw + 1] = cpu_to_le32(total_len | ATA_PRD_EOT); buf32[dw + 1] = cpu_to_le32(total_len | ATA_PRD_EOT);
VPRINTK("ATA PSG @ %x == (0x%x, 0x%x)\n",
PDC_20621_DIMM_BASE +
(PDC_DIMM_WINDOW_STEP * portno) +
PDC_DIMM_APKT_PRD,
buf32[dw], buf32[dw + 1]);
} }
static inline void pdc20621_host_sg(u8 *buf, unsigned int portno, static inline void pdc20621_host_sg(u8 *buf, unsigned int portno,
...@@ -332,12 +326,6 @@ static inline void pdc20621_host_sg(u8 *buf, unsigned int portno, ...@@ -332,12 +326,6 @@ static inline void pdc20621_host_sg(u8 *buf, unsigned int portno,
buf32[dw] = cpu_to_le32(addr); buf32[dw] = cpu_to_le32(addr);
buf32[dw + 1] = cpu_to_le32(total_len | ATA_PRD_EOT); buf32[dw + 1] = cpu_to_le32(total_len | ATA_PRD_EOT);
VPRINTK("HOST PSG @ %x == (0x%x, 0x%x)\n",
PDC_20621_DIMM_BASE +
(PDC_DIMM_WINDOW_STEP * portno) +
PDC_DIMM_HPKT_PRD,
buf32[dw], buf32[dw + 1]);
} }
static inline unsigned int pdc20621_ata_pkt(struct ata_taskfile *tf, static inline unsigned int pdc20621_ata_pkt(struct ata_taskfile *tf,
...@@ -351,7 +339,6 @@ static inline unsigned int pdc20621_ata_pkt(struct ata_taskfile *tf, ...@@ -351,7 +339,6 @@ static inline unsigned int pdc20621_ata_pkt(struct ata_taskfile *tf,
unsigned int dimm_sg = PDC_20621_DIMM_BASE + unsigned int dimm_sg = PDC_20621_DIMM_BASE +
(PDC_DIMM_WINDOW_STEP * portno) + (PDC_DIMM_WINDOW_STEP * portno) +
PDC_DIMM_APKT_PRD; PDC_DIMM_APKT_PRD;
VPRINTK("ENTER, dimm_sg == 0x%x, %d\n", dimm_sg, dimm_sg);
i = PDC_DIMM_ATA_PKT; i = PDC_DIMM_ATA_PKT;
...@@ -406,8 +393,6 @@ static inline void pdc20621_host_pkt(struct ata_taskfile *tf, u8 *buf, ...@@ -406,8 +393,6 @@ static inline void pdc20621_host_pkt(struct ata_taskfile *tf, u8 *buf,
unsigned int dimm_sg = PDC_20621_DIMM_BASE + unsigned int dimm_sg = PDC_20621_DIMM_BASE +
(PDC_DIMM_WINDOW_STEP * portno) + (PDC_DIMM_WINDOW_STEP * portno) +
PDC_DIMM_HPKT_PRD; PDC_DIMM_HPKT_PRD;
VPRINTK("ENTER, dimm_sg == 0x%x, %d\n", dimm_sg, dimm_sg);
VPRINTK("host_sg == 0x%x, %d\n", host_sg, host_sg);
dw = PDC_DIMM_HOST_PKT >> 2; dw = PDC_DIMM_HOST_PKT >> 2;
...@@ -424,14 +409,6 @@ static inline void pdc20621_host_pkt(struct ata_taskfile *tf, u8 *buf, ...@@ -424,14 +409,6 @@ static inline void pdc20621_host_pkt(struct ata_taskfile *tf, u8 *buf,
buf32[dw + 1] = cpu_to_le32(host_sg); buf32[dw + 1] = cpu_to_le32(host_sg);
buf32[dw + 2] = cpu_to_le32(dimm_sg); buf32[dw + 2] = cpu_to_le32(dimm_sg);
buf32[dw + 3] = 0; buf32[dw + 3] = 0;
VPRINTK("HOST PKT @ %x == (0x%x 0x%x 0x%x 0x%x)\n",
PDC_20621_DIMM_BASE + (PDC_DIMM_WINDOW_STEP * portno) +
PDC_DIMM_HOST_PKT,
buf32[dw + 0],
buf32[dw + 1],
buf32[dw + 2],
buf32[dw + 3]);
} }
static void pdc20621_dma_prep(struct ata_queued_cmd *qc) static void pdc20621_dma_prep(struct ata_queued_cmd *qc)
...@@ -447,8 +424,6 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) ...@@ -447,8 +424,6 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc)
WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP));
VPRINTK("ata%u: ENTER\n", ap->print_id);
/* hard-code chip #0 */ /* hard-code chip #0 */
mmio += PDC_CHIP0_OFS; mmio += PDC_CHIP0_OFS;
...@@ -492,7 +467,8 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) ...@@ -492,7 +467,8 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc)
readl(dimm_mmio); /* MMIO PCI posting flush */ readl(dimm_mmio); /* MMIO PCI posting flush */
VPRINTK("ata pkt buf ofs %u, prd size %u, mmio copied\n", i, sgt_len); ata_port_dbg(ap, "ata pkt buf ofs %u, prd size %u, mmio copied\n",
i, sgt_len);
} }
static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) static void pdc20621_nodata_prep(struct ata_queued_cmd *qc)
...@@ -504,8 +480,6 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) ...@@ -504,8 +480,6 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc)
unsigned int portno = ap->port_no; unsigned int portno = ap->port_no;
unsigned int i; unsigned int i;
VPRINTK("ata%u: ENTER\n", ap->print_id);
/* hard-code chip #0 */ /* hard-code chip #0 */
mmio += PDC_CHIP0_OFS; mmio += PDC_CHIP0_OFS;
...@@ -527,7 +501,7 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) ...@@ -527,7 +501,7 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc)
readl(dimm_mmio); /* MMIO PCI posting flush */ readl(dimm_mmio); /* MMIO PCI posting flush */
VPRINTK("ata pkt buf ofs %u, mmio copied\n", i); ata_port_dbg(ap, "ata pkt buf ofs %u, mmio copied\n", i);
} }
static enum ata_completion_errors pdc20621_qc_prep(struct ata_queued_cmd *qc) static enum ata_completion_errors pdc20621_qc_prep(struct ata_queued_cmd *qc)
...@@ -633,8 +607,6 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) ...@@ -633,8 +607,6 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc)
/* hard-code chip #0 */ /* hard-code chip #0 */
mmio += PDC_CHIP0_OFS; mmio += PDC_CHIP0_OFS;
VPRINTK("ata%u: ENTER\n", ap->print_id);
wmb(); /* flush PRD, pkt writes */ wmb(); /* flush PRD, pkt writes */
port_ofs = PDC_20621_DIMM_BASE + (PDC_DIMM_WINDOW_STEP * port_no); port_ofs = PDC_20621_DIMM_BASE + (PDC_DIMM_WINDOW_STEP * port_no);
...@@ -645,7 +617,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) ...@@ -645,7 +617,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc)
pdc20621_dump_hdma(qc); pdc20621_dump_hdma(qc);
pdc20621_push_hdma(qc, seq, port_ofs + PDC_DIMM_HOST_PKT); pdc20621_push_hdma(qc, seq, port_ofs + PDC_DIMM_HOST_PKT);
VPRINTK("queued ofs 0x%x (%u), seq %u\n", ata_port_dbg(ap, "queued ofs 0x%x (%u), seq %u\n",
port_ofs + PDC_DIMM_HOST_PKT, port_ofs + PDC_DIMM_HOST_PKT,
port_ofs + PDC_DIMM_HOST_PKT, port_ofs + PDC_DIMM_HOST_PKT,
seq); seq);
...@@ -656,7 +628,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) ...@@ -656,7 +628,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc)
writel(port_ofs + PDC_DIMM_ATA_PKT, writel(port_ofs + PDC_DIMM_ATA_PKT,
ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
readl(ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); readl(ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
VPRINTK("submitted ofs 0x%x (%u), seq %u\n", ata_port_dbg(ap, "submitted ofs 0x%x (%u), seq %u\n",
port_ofs + PDC_DIMM_ATA_PKT, port_ofs + PDC_DIMM_ATA_PKT,
port_ofs + PDC_DIMM_ATA_PKT, port_ofs + PDC_DIMM_ATA_PKT,
seq); seq);
...@@ -696,14 +668,12 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap, ...@@ -696,14 +668,12 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap,
u8 status; u8 status;
unsigned int handled = 0; unsigned int handled = 0;
VPRINTK("ENTER\n");
if ((qc->tf.protocol == ATA_PROT_DMA) && /* read */ if ((qc->tf.protocol == ATA_PROT_DMA) && /* read */
(!(qc->tf.flags & ATA_TFLAG_WRITE))) { (!(qc->tf.flags & ATA_TFLAG_WRITE))) {
/* step two - DMA from DIMM to host */ /* step two - DMA from DIMM to host */
if (doing_hdma) { if (doing_hdma) {
VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->print_id, ata_port_dbg(ap, "read hdma, 0x%x 0x%x\n",
readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
/* get drive status; clear intr; complete txn */ /* get drive status; clear intr; complete txn */
qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
...@@ -714,7 +684,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap, ...@@ -714,7 +684,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap,
/* step one - exec ATA command */ /* step one - exec ATA command */
else { else {
u8 seq = (u8) (port_no + 1 + 4); u8 seq = (u8) (port_no + 1 + 4);
VPRINTK("ata%u: read ata, 0x%x 0x%x\n", ap->print_id, ata_port_dbg(ap, "read ata, 0x%x 0x%x\n",
readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
/* submit hdma pkt */ /* submit hdma pkt */
...@@ -729,7 +699,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap, ...@@ -729,7 +699,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap,
/* step one - DMA from host to DIMM */ /* step one - DMA from host to DIMM */
if (doing_hdma) { if (doing_hdma) {
u8 seq = (u8) (port_no + 1); u8 seq = (u8) (port_no + 1);
VPRINTK("ata%u: write hdma, 0x%x 0x%x\n", ap->print_id, ata_port_dbg(ap, "write hdma, 0x%x 0x%x\n",
readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
/* submit ata pkt */ /* submit ata pkt */
...@@ -742,7 +712,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap, ...@@ -742,7 +712,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap,
/* step two - execute ATA command */ /* step two - execute ATA command */
else { else {
VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->print_id, ata_port_dbg(ap, "write ata, 0x%x 0x%x\n",
readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
/* get drive status; clear intr; complete txn */ /* get drive status; clear intr; complete txn */
qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
...@@ -755,7 +725,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap, ...@@ -755,7 +725,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap,
} else if (qc->tf.protocol == ATA_PROT_NODATA) { } else if (qc->tf.protocol == ATA_PROT_NODATA) {
status = ata_sff_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); status = ata_sff_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
DPRINTK("BUS_NODATA (drv_stat 0x%X)\n", status); ata_port_dbg(ap, "BUS_NODATA (drv_stat 0x%X)\n", status);
qc->err_mask |= ac_err_mask(status); qc->err_mask |= ac_err_mask(status);
ata_qc_complete(qc); ata_qc_complete(qc);
handled = 1; handled = 1;
...@@ -781,29 +751,21 @@ static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance) ...@@ -781,29 +751,21 @@ static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance)
unsigned int handled = 0; unsigned int handled = 0;
void __iomem *mmio_base; void __iomem *mmio_base;
VPRINTK("ENTER\n"); if (!host || !host->iomap[PDC_MMIO_BAR])
if (!host || !host->iomap[PDC_MMIO_BAR]) {
VPRINTK("QUICK EXIT\n");
return IRQ_NONE; return IRQ_NONE;
}
mmio_base = host->iomap[PDC_MMIO_BAR]; mmio_base = host->iomap[PDC_MMIO_BAR];
/* reading should also clear interrupts */ /* reading should also clear interrupts */
mmio_base += PDC_CHIP0_OFS; mmio_base += PDC_CHIP0_OFS;
mask = readl(mmio_base + PDC_20621_SEQMASK); mask = readl(mmio_base + PDC_20621_SEQMASK);
VPRINTK("mask == 0x%x\n", mask);
if (mask == 0xffffffff) { if (mask == 0xffffffff)
VPRINTK("QUICK EXIT 2\n");
return IRQ_NONE; return IRQ_NONE;
}
mask &= 0xffff; /* only 16 tags possible */ mask &= 0xffff; /* only 16 tags possible */
if (!mask) { if (!mask)
VPRINTK("QUICK EXIT 3\n");
return IRQ_NONE; return IRQ_NONE;
}
spin_lock(&host->lock); spin_lock(&host->lock);
...@@ -816,7 +778,8 @@ static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance) ...@@ -816,7 +778,8 @@ static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance)
else else
ap = host->ports[port_no]; ap = host->ports[port_no];
tmp = mask & (1 << i); tmp = mask & (1 << i);
VPRINTK("seq %u, port_no %u, ap %p, tmp %x\n", i, port_no, ap, tmp); if (ap)
ata_port_dbg(ap, "seq %u, tmp %x\n", i, tmp);
if (tmp && ap) { if (tmp && ap) {
struct ata_queued_cmd *qc; struct ata_queued_cmd *qc;
...@@ -829,10 +792,6 @@ static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance) ...@@ -829,10 +792,6 @@ static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance)
spin_unlock(&host->lock); spin_unlock(&host->lock);
VPRINTK("mask == 0x%x\n", mask);
VPRINTK("EXIT\n");
return IRQ_RETVAL(handled); return IRQ_RETVAL(handled);
} }
...@@ -1274,7 +1233,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1274,7 +1233,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
/* Initialize Time Period Register */ /* Initialize Time Period Register */
writel(0xffffffff, mmio + PDC_TIME_PERIOD); writel(0xffffffff, mmio + PDC_TIME_PERIOD);
time_period = readl(mmio + PDC_TIME_PERIOD); time_period = readl(mmio + PDC_TIME_PERIOD);
VPRINTK("Time Period Register (0x40): 0x%x\n", time_period); dev_dbg(host->dev, "Time Period Register (0x40): 0x%x\n", time_period);
/* Enable timer */ /* Enable timer */
writel(PDC_TIMER_DEFAULT, mmio + PDC_TIME_CONTROL); writel(PDC_TIMER_DEFAULT, mmio + PDC_TIME_CONTROL);
...@@ -1289,7 +1248,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1289,7 +1248,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
*/ */
tcount = readl(mmio + PDC_TIME_COUNTER); tcount = readl(mmio + PDC_TIME_COUNTER);
VPRINTK("Time Counter Register (0x44): 0x%x\n", tcount); dev_dbg(host->dev, "Time Counter Register (0x44): 0x%x\n", tcount);
/* /*
If SX4 is on PCI-X bus, after 3 seconds, the timer counter If SX4 is on PCI-X bus, after 3 seconds, the timer counter
...@@ -1297,17 +1256,19 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1297,17 +1256,19 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
*/ */
if (tcount >= PCI_X_TCOUNT) { if (tcount >= PCI_X_TCOUNT) {
ticks = (time_period - tcount); ticks = (time_period - tcount);
VPRINTK("Num counters 0x%x (%d)\n", ticks, ticks); dev_dbg(host->dev, "Num counters 0x%x (%d)\n", ticks, ticks);
clock = (ticks / 300000); clock = (ticks / 300000);
VPRINTK("10 * Internal clk = 0x%x (%d)\n", clock, clock); dev_dbg(host->dev, "10 * Internal clk = 0x%x (%d)\n",
clock, clock);
clock = (clock * 33); clock = (clock * 33);
VPRINTK("10 * Internal clk * 33 = 0x%x (%d)\n", clock, clock); dev_dbg(host->dev, "10 * Internal clk * 33 = 0x%x (%d)\n",
clock, clock);
/* PLL F Param (bit 22:16) */ /* PLL F Param (bit 22:16) */
fparam = (1400000 / clock) - 2; fparam = (1400000 / clock) - 2;
VPRINTK("PLL F Param: 0x%x (%d)\n", fparam, fparam); dev_dbg(host->dev, "PLL F Param: 0x%x (%d)\n", fparam, fparam);
/* OD param = 0x2 (bit 31:30), R param = 0x5 (bit 29:25) */ /* OD param = 0x2 (bit 31:30), R param = 0x5 (bit 29:25) */
pci_status = (0x8a001824 | (fparam << 16)); pci_status = (0x8a001824 | (fparam << 16));
...@@ -1315,7 +1276,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1315,7 +1276,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
pci_status = PCI_PLL_INIT; pci_status = PCI_PLL_INIT;
/* Initialize PLL. */ /* Initialize PLL. */
VPRINTK("pci_status: 0x%x\n", pci_status); dev_dbg(host->dev, "pci_status: 0x%x\n", pci_status);
writel(pci_status, mmio + PDC_CTL_STATUS); writel(pci_status, mmio + PDC_CTL_STATUS);
readl(mmio + PDC_CTL_STATUS); readl(mmio + PDC_CTL_STATUS);
...@@ -1327,15 +1288,16 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1327,15 +1288,16 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
printk(KERN_ERR "Detect Local DIMM Fail\n"); printk(KERN_ERR "Detect Local DIMM Fail\n");
return 1; /* DIMM error */ return 1; /* DIMM error */
} }
VPRINTK("Local DIMM Speed = %d\n", speed); dev_dbg(host->dev, "Local DIMM Speed = %d\n", speed);
/* Programming DIMM0 Module Control Register (index_CID0:80h) */ /* Programming DIMM0 Module Control Register (index_CID0:80h) */
size = pdc20621_prog_dimm0(host); size = pdc20621_prog_dimm0(host);
VPRINTK("Local DIMM Size = %dMB\n", size); dev_dbg(host->dev, "Local DIMM Size = %dMB\n", size);
/* Programming DIMM Module Global Control Register (index_CID0:88h) */ /* Programming DIMM Module Global Control Register (index_CID0:88h) */
if (pdc20621_prog_dimm_global(host)) { if (pdc20621_prog_dimm_global(host)) {
printk(KERN_ERR "Programming DIMM Module Global Control Register Fail\n"); dev_err(host->dev,
"Programming DIMM Module Global Control Register Fail\n");
return 1; return 1;
} }
...@@ -1372,13 +1334,14 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1372,13 +1334,14 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
PDC_DIMM_SPD_TYPE, &spd0)) { PDC_DIMM_SPD_TYPE, &spd0)) {
pr_err("Failed in i2c read: device=%#x, subaddr=%#x\n", dev_err(host->dev,
"Failed in i2c read: device=%#x, subaddr=%#x\n",
PDC_DIMM0_SPD_DEV_ADDRESS, PDC_DIMM_SPD_TYPE); PDC_DIMM0_SPD_DEV_ADDRESS, PDC_DIMM_SPD_TYPE);
return 1; return 1;
} }
if (spd0 == 0x02) { if (spd0 == 0x02) {
void *buf; void *buf;
VPRINTK("Start ECC initialization\n"); dev_dbg(host->dev, "Start ECC initialization\n");
addr = 0; addr = 0;
length = size * 1024 * 1024; length = size * 1024 * 1024;
buf = kzalloc(ECC_ERASE_BUF_SZ, GFP_KERNEL); buf = kzalloc(ECC_ERASE_BUF_SZ, GFP_KERNEL);
...@@ -1390,7 +1353,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) ...@@ -1390,7 +1353,7 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
addr += ECC_ERASE_BUF_SZ; addr += ECC_ERASE_BUF_SZ;
} }
kfree(buf); kfree(buf);
VPRINTK("Finish ECC initialization\n"); dev_dbg(host->dev, "Finish ECC initialization\n");
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册