add/re-enable at_wini debug output
This commit is contained in:
parent
2d95b37f12
commit
3bb73b431b
|
@ -375,6 +375,9 @@ FORWARD _PROTOTYPE( int atapi_transfer, (int proc_nr, int opcode,
|
||||||
u64_t position, iovec_t *iov, unsigned nr_req, int safe));
|
u64_t position, iovec_t *iov, unsigned nr_req, int safe));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define panic(f,m,n) at_panic(__LINE__, (f), (m), (n))
|
||||||
|
FORWARD _PROTOTYPE( void at_panic, (int line, char *h, char *msg, int n));
|
||||||
|
|
||||||
/* Entry points to this driver. */
|
/* Entry points to this driver. */
|
||||||
PRIVATE struct driver w_dtab = {
|
PRIVATE struct driver w_dtab = {
|
||||||
w_name, /* current device's name */
|
w_name, /* current device's name */
|
||||||
|
@ -520,6 +523,9 @@ PRIVATE void init_drive(struct wini *w, int base_cmd, int base_ctl,
|
||||||
w->base_cmd = base_cmd;
|
w->base_cmd = base_cmd;
|
||||||
w->base_ctl = base_ctl;
|
w->base_ctl = base_ctl;
|
||||||
w->base_dma = base_dma;
|
w->base_dma = base_dma;
|
||||||
|
if(w_pci_debug)
|
||||||
|
printf("at_wini%d: drive %d: base_cmd 0x%x, base_ctl 0x%x, base_dma 0x%x\n",
|
||||||
|
w_instance, w-wini, w->base_cmd, w->base_ctl, w->base_dma);
|
||||||
w->irq = irq;
|
w->irq = irq;
|
||||||
w->irq_mask = 1 << irq;
|
w->irq_mask = 1 << irq;
|
||||||
w->irq_need_ack = ack;
|
w->irq_need_ack = ack;
|
||||||
|
@ -623,7 +629,7 @@ PRIVATE void init_params_pci(int skip)
|
||||||
printf("atapci: couldn't enable IRQ line %d\n", irq);
|
printf("atapci: couldn't enable IRQ line %d\n", irq);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
} else if(w_pci_debug) printf("at_wini%d: dev %d: only compat drives\n", w_instance, devind);
|
||||||
|
|
||||||
base_dma = pci_attr_r32(devind, PCI_BAR_5) & 0xfffffffc;
|
base_dma = pci_attr_r32(devind, PCI_BAR_5) & 0xfffffffc;
|
||||||
|
|
||||||
|
@ -641,9 +647,9 @@ PRIVATE void init_params_pci(int skip)
|
||||||
base_cmd, base_ctl+PCI_CTL_OFF,
|
base_cmd, base_ctl+PCI_CTL_OFF,
|
||||||
base_dma, irq, 1, irq_hook, 1);
|
base_dma, irq, 1, irq_hook, 1);
|
||||||
if (w_pci_debug)
|
if (w_pci_debug)
|
||||||
printf("atapci %d: 0x%x 0x%x irq %d\n", devind, base_cmd, base_ctl, irq);
|
printf("at_wini%d: atapci %d: 0x%x 0x%x irq %d\n", w_instance, devind, base_cmd, base_ctl, irq);
|
||||||
w_next_drive += 2;
|
w_next_drive += 2;
|
||||||
} else printf("atapci: ignored drives on primary channel, base %x\n", base_cmd);
|
} else printf("at_wini%d: atapci: ignored drives on primary channel, base %x\n", w_instance, base_cmd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -652,6 +658,9 @@ PRIVATE void init_params_pci(int skip)
|
||||||
{
|
{
|
||||||
if (wini[i].base_cmd == REG_CMD_BASE0) {
|
if (wini[i].base_cmd == REG_CMD_BASE0) {
|
||||||
wini[i].base_dma= base_dma;
|
wini[i].base_dma= base_dma;
|
||||||
|
if(w_pci_debug)
|
||||||
|
printf("at_wini%d: drive %d: base_dma 0x%x\n",
|
||||||
|
w_instance, i, wini[i].base_dma);
|
||||||
pci_compat = 1;
|
pci_compat = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -673,9 +682,11 @@ PRIVATE void init_params_pci(int skip)
|
||||||
base_cmd, base_ctl+PCI_CTL_OFF, base_dma,
|
base_cmd, base_ctl+PCI_CTL_OFF, base_dma,
|
||||||
irq, 1, irq_hook, 3);
|
irq, 1, irq_hook, 3);
|
||||||
if (w_pci_debug)
|
if (w_pci_debug)
|
||||||
printf("atapci %d: 0x%x 0x%x irq %d\n", devind, base_cmd, base_ctl, irq);
|
printf("at_wini%d: atapci %d: 0x%x 0x%x irq %d\n",
|
||||||
|
w_instance, devind, base_cmd, base_ctl, irq);
|
||||||
w_next_drive += 2;
|
w_next_drive += 2;
|
||||||
} else printf("atapci: ignored drives on secondary channel, base %x\n", base_cmd);
|
} else printf("at_wini%d: atapci: ignored drives on "
|
||||||
|
"secondary channel, base %x\n", w_instance, base_cmd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -684,6 +695,9 @@ PRIVATE void init_params_pci(int skip)
|
||||||
{
|
{
|
||||||
if (wini[i].base_cmd == REG_CMD_BASE1 && base_dma != 0) {
|
if (wini[i].base_cmd == REG_CMD_BASE1 && base_dma != 0) {
|
||||||
wini[i].base_dma= base_dma+PCI_DMA_2ND_OFF;
|
wini[i].base_dma= base_dma+PCI_DMA_2ND_OFF;
|
||||||
|
if (w_pci_debug)
|
||||||
|
printf("at_wini%d: drive %d: base_dma 0x%x\n",
|
||||||
|
w_instance, i, wini[i].base_dma);
|
||||||
pci_compat = 1;
|
pci_compat = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2622,3 +2636,15 @@ PRIVATE int atapi_intr_wait()
|
||||||
|
|
||||||
#endif /* ENABLE_ATAPI */
|
#endif /* ENABLE_ATAPI */
|
||||||
|
|
||||||
|
#undef panic
|
||||||
|
|
||||||
|
PRIVATE void at_panic(line, h, msg, n)
|
||||||
|
int line;
|
||||||
|
char *h;
|
||||||
|
char *msg;
|
||||||
|
int n;
|
||||||
|
{
|
||||||
|
printf("at_wini%d: panic at line %d: ", w_instance, line);
|
||||||
|
panic(h, msg, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,8 +110,8 @@ message *m_ptr; /* pointer to request message */
|
||||||
{
|
{
|
||||||
priv(rp)->s_irq_tab[i]= priv.s_irq_tab[i];
|
priv(rp)->s_irq_tab[i]= priv.s_irq_tab[i];
|
||||||
#if 0
|
#if 0
|
||||||
kprintf("do_privctl: adding IRQ %d\n",
|
kprintf("do_privctl: adding IRQ %d for %d\n",
|
||||||
priv(rp)->s_irq_tab[i]);
|
priv(rp)->s_irq_tab[i], rp->p_endpoint);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,11 +124,10 @@ message *m_ptr; /* pointer to request message */
|
||||||
for (i= 0; i<priv.s_nr_io_range; i++)
|
for (i= 0; i<priv.s_nr_io_range; i++)
|
||||||
{
|
{
|
||||||
priv(rp)->s_io_tab[i]= priv.s_io_tab[i];
|
priv(rp)->s_io_tab[i]= priv.s_io_tab[i];
|
||||||
#if 0
|
kprintf("do_privctl: adding I/O range [%x..%x] for %d\n",
|
||||||
kprintf("do_privctl: adding I/O range [%x..%x]\n",
|
|
||||||
priv(rp)->s_io_tab[i].ior_base,
|
priv(rp)->s_io_tab[i].ior_base,
|
||||||
priv(rp)->s_io_tab[i].ior_limit);
|
priv(rp)->s_io_tab[i].ior_limit,
|
||||||
#endif
|
rp->p_endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check requests for IRQs */
|
/* Check requests for IRQs */
|
||||||
|
|
Loading…
Reference in a new issue