linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Xilin Temac Timer ?
@ 2008-03-26 17:02 khollan
  2008-03-26 19:48 ` Xilinx " John Linn
  2008-03-31 14:33 ` JFFS2 root-fs Georg Schardt
  0 siblings, 2 replies; 6+ messages in thread
From: khollan @ 2008-03-26 17:02 UTC (permalink / raw)
  To: linuxppc-embedded


Hi

What is the purpose of stopping the timer in the ioctl call to read a PHY
register?  This is the code:

    case SIOCGMIIREG:   /* Read GMII PHY register. */
    case SIOCDEVPRIVATE + 1:    /* for binary compat, remove in 2.5 */
        if (data->phy_id > 31 || data->reg_num > 31)
            return -ENXIO;

        /* Stop the PHY timer to prevent reentrancy. */
        spin_lock_irqsave(&XTE_spinlock, flags);
        del_timer_sync(&lp->phy_timer);

        ret = XTemac_PhyRead(&lp->Emac, data->phy_id,
                       data->reg_num, &data->val_out);

        /* Start the PHY timer up again. */
        lp->phy_timer.expires = jiffies + 2 * HZ;
        add_timer(&lp->phy_timer);
        spin_unlock_irqrestore(&XTE_spinlock, flags);
        if (ret != XST_SUCCESS) {
            printk(KERN_ERR
                   "%s: XTemac: could not read from PHY, error=%d.\n",
                   dev->name, ret);
            return -EBUSY;
        }
        return 0;

I ask because I have an application that needs to read a Phy register before
the timer has started to see if a link is present.  This causes a kernel bug
when trying to run the del_timer_sync function because there is not a
running timer.  I would like to know if it is safe to remove the timer del
and add but keep the spin lock.

Thanks for your help

Kevin
-- 
View this message in context: http://www.nabble.com/Xilin-Temac-Timer---tp16306218p16306218.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: JFFS2 root-fs
@ 2008-03-31 17:23 Sugathan, Rupesh
  2008-04-01  6:07 ` Georg Schardt
  0 siblings, 1 reply; 6+ messages in thread
From: Sugathan, Rupesh @ 2008-03-31 17:23 UTC (permalink / raw)
  To: Georg Schardt; +Cc: linuxppc-embedded

=20
It seems to me, that the kernel does not find ANY file. because the
/dev/console file is in the image, but the initial console is not found
too

1) You should probably unpack and mount the jffs2 image on your host
directory to ensure that you see all files in place.=20
2) Check to see if your designated flash partition can hold all of your
jffs2 image.

Were you able to use the 'same' rootfs in any other way (nfs mount or
ramdisk) on the target?

Thanks
--
Rupesh Sugathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-01  6:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 17:02 Xilin Temac Timer ? khollan
2008-03-26 19:48 ` Xilinx " John Linn
2008-03-27 19:31   ` khollan
2008-03-31 14:33 ` JFFS2 root-fs Georg Schardt
  -- strict thread matches above, loose matches on Subject: below --
2008-03-31 17:23 Sugathan, Rupesh
2008-04-01  6:07 ` Georg Schardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).